<?php
include("header.php");
foreach(single_service($connect,$_REQUEST["userservicetarget"]) as $row){
	
	$service_name=ucwords(strtolower($row["service"]));
	$desc=$row["description"];
	$date=$row["date"];
	$profile=$row["photo"];
	$user= $_REQUEST["userservicetarget"];
	if(($profile==="")){
		$profile='../images/img_avatar5.png';
	}else{	$profile="../admin/pages/services/".$row["photo"];
	}
}
?>

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

	


      <div class="w3-row" style='background:url("../images/boxed-bg.png")'>
       
        <!-- /.col -->
      
        <!-- /.col -->
     
  <div class="col-md-9 no-padding" style='margin-bottom:10px;'>
  

          <!-- /.box -->
		  <div class="w3-container   " style='padding:0px'>
          <!-- Widget: user widget style 1 -->
          <div class="box box-widget widget-user" >
            <!-- Add the bg color to the header using any of the bg-* classes -->
            <div class="widget-user-header w3-card-4" style='background:url("../images/boxed-bg.jpg")'>
              <div class="widget-user-image">
             <img class="img-circle" src="<?php echo $profile;?>" alt="User Avatar" style=''>
              </div>
              <!-- /.widget-user-image -->
			<h3 class="widget-user-username"><?php echo $service_name;?></h3>
            </div>
          </div>
		     <div class="box-body">
			<strong><i class="fa fa-book margin-r-5"></i> Description</strong>
              <p class="text-muted">
               <?php echo $desc;?>
              </p>
          </div>
          <!-- /.widget-user -->
			           
        </div>		      

	 
		
	

  </div>
  
  <div class="col-md-3 pull-right" style='padding:5px'>
			
	 	<div class="w3-container w3-padding w3-indigo">
		 <h5 class=''>Other Services</h5>
		</div>
		<?php
		 foreach(other_services($connect,$user) as $row){
	      
$service_name=ucwords(strtolower($row["service"]));
	 $sid=ucwords($row["id"]);
	  $desc=$row["description"];
	  $date=$row["date"];
	$profile=$row["photo"];
	$user= $_REQUEST["userservicetarget"];
	if(($profile==="")){
		$profile='../images/img_avatar5.png';
	}else{	$profile="../admin/pages/services/".$row["photo"];
	}

		$strlength=strlen(trim($desc));
	if($strlength>100){
		$n=substr($desc,0,100)."<span style='font-size:20px'>.... </span> ";
		
		
	}else{
		$n=$desc;
	}

?>
		
    <div class="w3-container w3-card-2 w3-hover-opacity w3-light-grey w3-justify" style='cursor:pointer;padding:2px' id='<?php echo  $sid;?>' onclick='window.location.assign("services.php?userservicetarget=<?php echo $sid;?>")'>
		<div class="w3-col s3 " style='max-width:200px;margin:5px'>
			<img src="<?php echo $profile;?>" style="width:100%;min-height:50px;max-height:200px">
		  </div>
      <h2 class='w3-text-indigo'><?php echo $service_name;?></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");
?>