<?php
require("../connection.php");
include("../user.php");
$user_id=$_SESSION['user'];
$username=$_SESSION['user_name'];

$search1=$_REQUEST['employee_name'];

$cus=mysqli_query($con,"SELECT DISTINCT(em.employee_name),im.id,lm.location,im.created_on FROM issue_master im left join employee_master em on em.emp_no=im.emp_name left join location_master lm on lm.id=im.location where em.employee_name like '%$search1%' or lm.location like '%$search1%'");

$cn=mysqli_num_rows($cus);
$rs1=1;
?>
			 <ul class="nav nav-pills" style="float:left;max-height:450px;overflow-y:scroll; width:100%; " >
				  <?php 
				  while($row=mysqli_fetch_array($cus))
				  {
				  ?>
                   <li style="border-top:1px solid #ddd; cursor:pointer;width:97%;"  onClick="clicked(this.id);"  id="<?php echo $rs1;?>" >
				   <input type="hidden" name="invoice" id="invoice<?php echo $rs1;?>" value="<?php echo $row['id'];?>">
				   
				<?php $rs1++;
				?>
					<div id="attrib-advanced" class="tab-pane active" >
									<div style="position:relative; color:blue; float:left; line-height: 80px;">
					 					<b><img alt=" img" class="user-image" src="/asset_temp/images/user.png" height="70" width="70"></b>
									</div><br>
					 					<div style="text-transform: uppercase;font-size: 16px;padding-top: 1px;color: #000;line-height: 18px; font-weight:bold;float:right; position:relative;" >
											<span style="font-weight:bold;font-size:13px;">
											 <?php 
											echo $row['id'];
											?>
										</div><br>
										 
										<div class="emp_name">
										<div style="text-transform: uppercase;line-height: 18px; font-weight:bold;float:right; position:relative;" >&nbsp;||
											<span style="font-weight:normal;font-size:12px; color:#0000ff;">
											<?php echo $row['employee_name']." ".$row['location'];?> </span>
										</div>
										<div class="date">
									<div style="text-transform: uppercase;line-height: 18px; font-weight:bold;float:right; position:relative;" >&nbsp;||
										<span style="font-weight:normal;font-size:12px; color:#0000ff;">
										<?php echo $row['created_on'];?> </span>
									</div>
								</div>	
										
										</div><br>
										    
								</div>			
										
           </li>
		   <?php
		   }
		   ?>
      
                  
                 </ul>

