
<?php
include("header.php");
foreach(single_user($connect,$_REQUEST["usertarget"]) as $row){
	
	$staff_name=ucwords(strtolower($row["fname"]." ".$row["other_names"]));
	$gender=$row["gender"];
	$rank=$row["rank"];
	$level=$row["edlevel"];
	$course=$row["course"];
	$profile=$row["photo"];
	$user= $_REQUEST["usertarget"];
if(empty($row["photo"])){
						if($row["gender"]==="male"){ $profile='i../../mages/img_avatar3.png';}else{$profile='../../images/img_avatar5.png';}
					}else{
					$profile="../../admin/pages/".$row["photo"];
					}
}
?>
  <link rel="stylesheet" href="../../admin/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css">
  <!-- Bootstrap 3.3.7 -->
  <link rel="stylesheet" href="../../admin/plugins/bootstrap/css/bootstrap.min.css">
  <!-- Font Awesome -->
 <link rel="stylesheet" href="../../admin/plugins/font-awesome-4.7.0/css/font-awesome.min.css">
  <!-- Ionicons -->
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
  <!-- jvectormap -->
  <link rel="stylesheet" href="../../admin/plugins/jvectormap/jquery-jvectormap-1.2.2.css">
  <!-- Theme style -->

  <!-- bootstrap wysihtml5 - text editor -->

	


      <div class="w3-row">
       
        <!-- /.col -->
      
        <!-- /.col -->
     
  <div class="w3-twothird " style='margin-bottom:10px'>
  
		
    <div  class="w3-justify ">
	  

          <!-- /.box -->
		        <div class="col-md-12 " style='padding:0px'>
          <!-- Widget: user widget style 1 -->
          <div class="box box-widget widget-user-2" >
            <!-- Add the bg color to the header using any of the bg-* classes -->
            <div class="widget-user-header bg-green w3-card-4">
              <div class="widget-user-image">
             <img class="img-circle" src="<?php echo $profile;?>" alt="User" style=''>
              </div>
              <!-- /.widget-user-image -->
			<h3 class="widget-user-username"><?php echo $staff_name;?></h3>
              <h5 class="widget-user-desc"><?php echo $rank;?></h5>
            </div>
          </div>
          <!-- /.widget-user -->
        </div>		      



            <div class="col-md-5  w3-card-2 hide no-padding">


          <!-- Widget: user widget style 1 -->
          <div class="box box-widget widget-user-2">
            <!-- Add the bg color to the header using any of the bg-* classes -->
            <div class="widget-user-header bg-aqua-active">
              <h3 class="widget-user-username">Personal Details</h3>
            </div>
			
            <!-- /.box-header -->
            <div class="box-body">
              <strong><i class="fa fa-book margin-r-5"></i> Education</strong>

              <p class="text-muted">
               <?php echo $level." in ".$course;?>
              </p>

              <hr>

              <strong><i class="fa fa-map-marker margin-r-5"></i> Location</strong>

              <p class="text-muted">Malibu, California</p>

              <hr>

              <strong><i class="fa fa-pencil margin-r-5"></i> Skills</strong>

              <p>
                <span class="label label-danger">UI Design</span>
                <span class="label label-success">Coding</span>
                <span class="label label-info">Javascript</span>
                <span class="label label-warning">PHP</span>
                <span class="label label-primary">Node.js</span>
              </p>

              <hr>

              <strong><i class="fa fa-file-text-o margin-r-5"></i> Favorite Quote</strong>

              <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam fermentum enim neque.</p>
            </div>
            <!-- /.box-body -->
          </div>
          <!-- /.box -->
        </div> 
		
		<div class="col-md-5 hide">
          <!-- Widget: user widget style 1 -->
          <div class="box box-widget widget-user-2">
            <!-- Add the bg color to the header using any of the bg-* classes -->
            <div class="widget-user-header bg-yellow">
              <!-- /.widget-user-image -->
			<h3 class="widget-user-username">Other Details</h3>
            </div>
            <div class="box-footer no-padding">
              <ul class="nav nav-stacked">
                <li><a href="#">Projects <span class="pull-right badge bg-blue">31</span></a></li>
                <li><a href="#">Tasks <span class="pull-right badge bg-aqua">5</span></a></li>
                <li><a href="#">Completed Projects <span class="pull-right badge bg-green">12</span></a></li>
                <li><a href="#">Followers <span class="pull-right badge bg-red">842</span></a></li>
              </ul>
            </div>
          </div>
          <!-- /.widget-user -->
        </div>
        <!-- /.col -->
		
		<div class="col-md-12 " style='padding:5px'><br>
          <!-- Widget: user widget style 1 -->
          <div class="box box-widget widget-user-2">
            <div class="box-footer no-padding">
              <ul class="nav nav-stacked">
                <li><a href="#">Projects <span class="pull-right badge bg-blue">31</span></a></li>
                <li><a href="#">Tasks <span class="pull-right badge bg-aqua">5</span></a></li>
                <li><a href="#">Completed Projects <span class="pull-right badge bg-green">12</span></a></li>
                <li><a href="#">Followers <span class="pull-right badge bg-red">842</span></a></li>
              </ul>
            </div>
          </div>
          <!-- /.widget-user -->
        </div>
        <!-- /.col -->
		
		
	</div>

  </div>
  
  <div class="w3-third" style='padding:5px'>
			
	 	<div class="w3-container w3-padding w3-indigo">
		 <h5 class=''>Related Posts</h5>
		</div>
		<?php
		 foreach(user_few_latest_notes($connect,$user) as $row){
	      
   $id=$row["id"];
   $title=ucwords($row["topic"]);
   $covsm=$row["cover_sm"];
   $covlg=$row["cover_lg"];
   $notes=strip_tags(strtolower($row["notes"]));
   $user=$row["user"];
   $service=$row["service"];
   
   $strlength=strlen(trim($notes));
	if($strlength>100){
		$n=substr($notes,0,100)."<span style='font-size:20px'>.... </span> ";
		
		
	}else{
		$n=$notes;
	}
   
   ?>
		
    <div class="w3-container w3-card-2 w3-hover-opacity w3-light-grey w3-justify" style='cursor:pointer;padding:2px' id='<?php echo  $id;?>' onclick='window.location.assign("../post.php?post=<?php echo $id;?>")'>
		<div class="w3-col s3 " style='max-width:200px;margin:5px'>
			<img src="<?php echo "../../admin/pages/notes/".$covsm;?>" style="width:100%;min-height:115px;max-height:250px">
		  </div>
      <h2 class='w3-text-indigo'><?php echo $title;?></h2>
      <a class="w3-justify"><?php echo $n;?></a>
	  </a></div><br>
	 <?php } ?>
	 
	 
	
	
		<div class="w3-container w3-white w3-card-2" style='padding:0px'>
					<div class="w3-container w3-padding w3-blue">
					  <h5 class=''>Subscribe For Updates</h5>
					</div>
					<div class="w3-container" style='padding:0px'>
	<form class="w3-container padding-16" style='' id='form-subscribe' method='post'>
						
						<p>
						<label>Email</label>
						<input class="w3-input w3-border" type="eamil" name='user-email' autocomplete=on required>
						</p>
						 
						<p >
						<input type="hidden" name="btn_action" value='Add-Subscriber' id="btn_action" />
						<button type='submit' class="w3-btn-block w3-large w3-red w3-round " >Subscribe</button>
						</p>
					  </form>   
					</div>
			 </div>
	
	
  </div>
  
  
</div>
 <?php
include("footer.php");
?>