<?php
  require_once("../../session_check.php");
	require_once("../../../classes/main_classes.php");

	//OBJECTS
	$retrieveObj=new RETRIEVE();

	
	$get_user=$retrieveObj->retriever("users","*","user_id",$user_id,"fetch");
	if($get_user=="1020"){
		die("<p class='alert alert-warning'> Sorry something went wrong, try again later</p>");
	}

  //get user profile picture
  $profile_img=$retrieveObj->retriever("users","photo","user_id",$user_id,"fetch");

?>
<div class="profile-head">
    <div class="d-flex justify-content-between">
        <h5>User Information</h5>
        <a href="#" id="readonly_profile_view_btn" onclick="profile_edit_mode_view()">Edit Profile</a>
    </div>
    <div class="container-fluid">
    	<div class="row my-3 my-sm-2 my-md-2 my-lg-3">
            <div class="col-12 col-sm-6 col-md-6 col-lg-6">
                <label class="text-black">Firstname</label>
            </div>
            <div class="col-12 col-sm-6 col-md-6 col-lg-6">
                <p><?php echo $get_user->firstname ;?></p>
            </div>
        </div>
        <div class="row my-3 my-sm-2 my-md-2 my-lg-3">
            <div class="col-12 col-sm-6 col-md-6 col-lg-6">
                <label class="text-black">Lastname</label>
            </div>
            <div class="col-12 col-sm-6 col-md-6 col-lg-6">
                <p><?php echo $get_user->lastname ;?></p>
            </div>
        </div>
        <div class="row my-3 my-sm-2 my-md-2 my-lg-3">
            <div class="col-12 col-sm-6 col-md-6 col-lg-6">
                <label class="text-black">Username</label>
            </div>
            <div class="col-12 col-sm-6 col-md-6 col-lg-6">
                <p><?php echo $get_user->username ;?></p>
            </div>
        </div>
        <div class="row my-3 my-sm-2 my-md-2 my-lg-3">
            <div class="col-12 col-sm-6 col-md-6 col-lg-6">
                <label class="text-black">Email</label>
            </div>
            <div class="col-12 col-sm-6 col-md-6 col-lg-6">
                <p><?php echo $get_user->email ;?></p>
            </div>
        </div>
    </div>
</div>