<?php include('header.php'); ?>
<?php include('session.php'); ?>
<?php $get_id = $_GET['stdev_id']; ?><!-----------------------------------get device location details------------------------------------>
    <body>
		<?php include('navbar.php') ?>
        <div class="container-fluid">
            <div class="row-fluid">
				<?php include('device_location_slidebar.php'); ?>
                <div class="span9" id="content">
                     <div class="row-fluid">
					 <a href="device_location.php" class="btn btn-info"  id="return" data-placement="right" title="Click to return" ><i class="icon-arrow-left icon-large"></i> Back</a>
					  <script type="text/javascript">
		              $(document).ready(function(){
		              $('#return').tooltip('show');
		              $('#return').tooltip('hide');
		              });
		             </script>
					 <!-----------------------------------sc logo for print------------------------------------>
						<h2 id="sc" align="center"><image src="images/sclogo.png" width="45%" height="45%"/></h2>
						
						<?php $location_query = mysqli_query($con,"select * from stlocation	                     
	                     where stdev_id = '$get_id'");
	                     $location_row = mysqli_fetch_array($location_query);
	                    ?>
						
        <!-------------------------------block ------------------------------>
            <div id="block_bg" class="block">
                  <div class="navbar navbar-inner block-header">							
							  <div class="muted pull-left"><i class="icon-building"></i>  <?php echo $location_row['stdev_location_name']; ?> </div>
							  
                <div id="" class="muted pull-right">
				<?php 
				$my_device = mysqli_query($con,"select * from stdevice    
	LEFT JOIN stlocation ON stdevice.stdev_id = stlocation.stdev_id
	WHERE stdevice.stdev_id = '$get_id' ");
				$count_my_device = mysqli_num_rows($my_device);?>
				 List: <span class="badge badge-info"><?php echo $count_my_device; ?></span>
				</div>
								
           </div>
							
<!-----------------------------------for Print display visible------------------------------------>							
<h4 id="sc">Location:<?php echo $location_row['stdev_location_name']; ?>   List
<div align="right" id="sc">Date:
<?php
 $date = new DateTime();
 echo $date->format('l, F jS, Y');
 ?></div>
</h4>
							
 <div class="container-fluid">
 <div class="row-fluid">						 
 <br/>
 <!-----------------------------------device categorized by their location details using nav pills------------------------------------>
	<div class="pull-left">
			    <ul class="nav nav-pills">
				<?php	
	           $my_device = mysqli_query($con,"select * from stdevice    
	LEFT JOIN stlocation ON stdevice.stdev_id = stlocation.stdev_id
	WHERE stdevice.stdev_id = '$get_id' ");
			    $count = mysqli_num_rows($my_device);
			    ?>
				<li class="">
				<a href= 'mydevice.php<?php echo '?stdev_id='.$get_id; ?>')">All&nbsp;<span class="label label-default"> <?php echo $count;?></span></a>
					
				</li>
				
			<?php	
	          $my_desktop = mysqli_query($con,"select * from stdevice    
	LEFT JOIN stlocation ON stdevice.stdev_id = stlocation.stdev_id
	LEFT JOIN device_name ON device_name.dev_id = stdevice.dev_id
	WHERE stdevice.stdev_id  = '$get_id' AND device_name.dev_name='Desktop' ");
			  $count = mysqli_num_rows($my_desktop);
			  ?>
              					
				<li class="">			
				    <a href= 'mydesktop.php<?php echo '?stdev_id='.$get_id; ?>')">Dekstop&nbsp;<span class="label label-default"> <?php echo $count;?></span></a>					
				</li>
				<?php	
	             $my_ultrabook = mysqli_query($con,"select * from stdevice    
	LEFT JOIN stlocation ON stdevice.stdev_id = stlocation.stdev_id
	LEFT JOIN device_name ON device_name.dev_id = stdevice.dev_id
	WHERE stdevice.stdev_id  = '$get_id' AND device_name.dev_name='ultra book' 
				");
			    $count = mysqli_num_rows($my_ultrabook);
               ?>
				<li class="">			
				    <a href= 'myultrabook.php<?php echo '?stdev_id='.$get_id; ?>')">Ultra Book&nbsp;<span class="label label-default"> <?php echo $count;?></span></a>					
				</li>	
				<?php	
	             $my_laptop = mysqli_query($con,"select * from stdevice    
	LEFT JOIN stlocation ON stdevice.stdev_id = stlocation.stdev_id
	LEFT JOIN device_name ON device_name.dev_id = stdevice.dev_id
	WHERE stdevice.stdev_id  = '$get_id' AND device_name.dev_name='Laptop' 
				");
			    $count = mysqli_num_rows($my_laptop);
               ?>
				<li class="">			
				    <a href= 'mylaptop.php<?php echo '?stdev_id='.$get_id; ?>')">Laptop&nbsp;<span class="label label-default"> <?php echo $count;?></span></a>					
				</li>				
				
			  <?php	
	             $my_server = mysqli_query($con,"select * from stdevice    
	LEFT JOIN stlocation ON stdevice.stdev_id = stlocation.stdev_id
	LEFT JOIN device_name ON device_name.dev_id = stdevice.dev_id
	WHERE stdevice.stdev_id  = '$get_id' AND device_name.dev_name='Server' 
				");
			    $count = mysqli_num_rows($my_server);
               ?>
				<li class="">			
				    <a href= 'myserver.php<?php echo '?stdev_id='.$get_id; ?>')">Server&nbsp;<span class="label label-default"> <?php echo $count;?></span></a>					
				</li>				
				<?php	
	             $my_vga = mysqli_query($con,"select * from stdevice    
	LEFT JOIN stlocation ON stdevice.stdev_id = stlocation.stdev_id
	LEFT JOIN device_name ON device_name.dev_id = stdevice.dev_id
	WHERE stdevice.stdev_id  = '$get_id' AND device_name.dev_name='Adapter Converter' 
				");
			    $count = mysqli_num_rows($my_vga);
               ?>
				<li class="">			
				    <a href= 'myvga.php<?php echo '?stdev_id='.$get_id; ?>')">Adapter Converter&nbsp;<span class="label label-default"> <?php echo $count;?></span></a>					
				</li>	
				<?php	
	             $my_dvd = mysqli_query($con,"select * from stdevice    
	LEFT JOIN stlocation ON stdevice.stdev_id = stlocation.stdev_id
	LEFT JOIN device_name ON device_name.dev_id = stdevice.dev_id
	WHERE stdevice.stdev_id  = '$get_id' AND device_name.dev_name='dvd' 
				");
			    $count = mysqli_num_rows($my_dvd);
               ?>
				<li class="">			
				    <a href= 'mydvd.php<?php echo '?stdev_id='.$get_id; ?>')">DVD&nbsp;<span class="label label-default"> <?php echo $count;?></span></a>					
				</li>				
				
				<?php	
	            $my_ea= mysqli_query($con,"select * from stdevice    
	LEFT JOIN stlocation ON stdevice.stdev_id = stlocation.stdev_id
	LEFT JOIN device_name ON device_name.dev_id = stdevice.dev_id
	WHERE stdevice.stdev_id  = '$get_id' AND device_name.dev_name='ETHERNET ADAPTER'  ");
			    $count = mysqli_num_rows($my_ea);
               ?>			
				<li class="">			
				    <a href= 'myea.php<?php echo '?stdev_id='.$get_id; ?>')">Ethernet Adapter&nbsp;<span class="label label-default"> <?php echo $count;?></span></a>					
				</li>
					<?php	
	            $my_pointer= mysqli_query($con,"select * from stdevice    
	LEFT JOIN stlocation ON stdevice.stdev_id = stlocation.stdev_id
	LEFT JOIN device_name ON device_name.dev_id = stdevice.dev_id
	WHERE stdevice.stdev_id  = '$get_id' AND device_name.dev_name='pointer'  ");
			    $count = mysqli_num_rows($my_pointer);
               ?>			
				<li class="">			
				    <a href= 'mypointer.php<?php echo '?stdev_id='.$get_id; ?>')">Pointer&nbsp;<span class="label label-default"> <?php echo $count;?></span></a>					
				</li>
					<?php	
	            $my_netgear= mysqli_query($con,"select * from stdevice    
	LEFT JOIN stlocation ON stdevice.stdev_id = stlocation.stdev_id
	LEFT JOIN device_name ON device_name.dev_id = stdevice.dev_id
	WHERE stdevice.stdev_id  ='$get_id' AND device_name.dev_name='NETGEAR WIFI ADAPTER'  ");
			    $count = mysqli_num_rows($my_netgear);
               ?>			
				<li class="">			
				    <a href= 'mynetgear.php<?php echo '?stdev_id='.$get_id; ?>')">Netgear WIFI Adapter&nbsp;<span class="label label-default"> <?php echo $count;?></span></a>					
				</li>
				<?php	
	            $my_spinetix= mysqli_query($con,"select * from stdevice    
	LEFT JOIN stlocation ON stdevice.stdev_id = stlocation.stdev_id
	LEFT JOIN device_name ON device_name.dev_id = stdevice.dev_id
	WHERE stdevice.stdev_id  = '$get_id' AND device_name.dev_name='SPINETIX HMP 130'  ");
			    $count = mysqli_num_rows($my_spinetix);
               ?>			
				<li class="">			
				    <a href= 'myspinetix.php<?php echo '?stdev_id='.$get_id; ?>')">SPINETIX HMP 130&nbsp;<span class="label label-default"> <?php echo $count;?></span></a>					
				</li>	
				<?php	
	            $my_lcd= mysqli_query($con,"select * from stdevice    
	LEFT JOIN stlocation ON stdevice.stdev_id = stlocation.stdev_id
	LEFT JOIN device_name ON device_name.dev_id = stdevice.dev_id
	WHERE stdevice.stdev_id  = '$get_id' AND device_name.dev_name='LCD MOBILE & TV'  ");
			    $count = mysqli_num_rows($my_lcd);
               ?>			
				<li class="">			
				    <a href= 'mylcd.php<?php echo '?stdev_id='.$get_id; ?>')">LCD TV&nbsp;<span class="label label-default"> <?php echo $count;?></span></a>					
				</li>
				<?php	
	            $my_led= mysqli_query($con,"select * from stdevice    
	LEFT JOIN stlocation ON stdevice.stdev_id = stlocation.stdev_id
	LEFT JOIN device_name ON device_name.dev_id = stdevice.dev_id
	WHERE stdevice.stdev_id  = '$get_id' AND device_name.dev_name='LED MOBILE & TV'  ");
			    $count = mysqli_num_rows($my_led);
               ?>			
				<li class="">			
				    <a href= 'myled.php<?php echo '?stdev_id='.$get_id; ?>')">LED TV &nbsp;<span class="label label-default"> <?php echo $count;?></span></a>					
				</li>	
				
				<?php	
	            $my_external= mysqli_query($con,"select * from stdevice    
	LEFT JOIN stlocation ON stdevice.stdev_id = stlocation.stdev_id
	LEFT JOIN device_name ON device_name.dev_id = stdevice.dev_id
	WHERE stdevice.stdev_id  = '$get_id' AND device_name.dev_name='External Hardisk'  ");
			    $count = mysqli_num_rows($my_external);
               ?>			
				<li class="">			
				    <a href= 'myexternal.php<?php echo '?stdev_id='.$get_id; ?>')">External Hardisk &nbsp;<span class="label label-default"> <?php echo $count;?></span></a>					
				</li>	
				<li class="">			
				    <a href= 'myexternal.php<?php echo '?stdev_id='.$get_id; ?>')">External Hardisk &nbsp;<span class="label label-default"> <?php echo $count;?></span></a>					
				</li>
				<?php	
	            $a= mysqli_query($con,"select * from stdevice    
	LEFT JOIN stlocation ON stdevice.stdev_id = stlocation.stdev_id
	LEFT JOIN device_name ON device_name.dev_id = stdevice.dev_id
	WHERE stdevice.stdev_id  = '1' AND device_name.dev_name='Access Point'");
			    $count = mysqli_num_rows($a);
               ?>			
				<li class="">			
				    <a href= 'myaccess_point.php<?php echo '?stdev_id='.$get_id; ?>')">Access Point &nbsp;<span class="label label-default"> <?php echo $count;?></span></a>					
				</li>
				<?php	
	            $c= mysqli_query($con,"select * from stdevice    
	LEFT JOIN stlocation ON stdevice.stdev_id = stlocation.stdev_id
	LEFT JOIN device_name ON device_name.dev_id = stdevice.dev_id
	WHERE stdevice.stdev_id  = '1' AND device_name.dev_name='Core Switch'");
			    $count = mysqli_num_rows($c);
               ?>			
				<li class="">			
				    <a href= 'mycore_switch.php<?php echo '?stdev_id='.$get_id; ?>')">Core Switch &nbsp;<span class="label label-default"> <?php echo $count;?></span></a>					
				</li>	
				
				<?php	
	            $e= mysqli_query($con,"select * from stdevice    
	LEFT JOIN stlocation ON stdevice.stdev_id = stlocation.stdev_id
	LEFT JOIN device_name ON device_name.dev_id = stdevice.dev_id
	WHERE stdevice.stdev_id  ='$get_id'  AND device_name.dev_name='FR. Switch'");
			    $count = mysqli_num_rows($e);
               ?>			
				<li class="">			
				    <a href= 'myfloor_switch.php<?php echo '?stdev_id='.$get_id; ?>')">FR Switch &nbsp;<span class="label label-default"> <?php echo $count;?></span></a>					
				</li>	
				
				<?php	
	            $ee= mysqli_query($con,"select * from stdevice    
	LEFT JOIN stlocation ON stdevice.stdev_id = stlocation.stdev_id
	LEFT JOIN device_name ON device_name.dev_id = stdevice.dev_id
	WHERE stdevice.stdev_id  ='$get_id'  AND device_name.dev_name='Switch'");
			    $count = mysqli_num_rows($ee);
               ?>			
				<li class="">			
				    <a href= 'switch.php<?php echo '?stdev_id='.$get_id; ?>')">Switch &nbsp;<span class="label label-default"> <?php echo $count;?></span></a>					
				</li>	
				<?php	
	            $f= mysqli_query($con,"select * from stdevice    
	LEFT JOIN stlocation ON stdevice.stdev_id = stlocation.stdev_id
	LEFT JOIN device_name ON device_name.dev_id = stdevice.dev_id
	WHERE stdevice.stdev_id  = '1' AND device_name.dev_name='Poe Switch'");
			    $count = mysqli_num_rows($f);
               ?>			
				<li class="">			
				    <a href= 'mypoe_switch.php<?php echo '?stdev_id='.$get_id; ?>')">Poe Switch &nbsp;<span class="label label-default"> <?php echo $count;?></span></a>					
				</li>	
				<?php	
	            $g= mysqli_query($con,"select * from stdevice    
	LEFT JOIN stlocation ON stdevice.stdev_id = stlocation.stdev_id
	LEFT JOIN device_name ON device_name.dev_id = stdevice.dev_id
	WHERE stdevice.stdev_id  = '1' AND device_name.dev_name='Thumbprint'");
			    $count = mysqli_num_rows($g);
               ?>			
				<li class="">			
				    <a href= 'mytumbprint.php<?php echo '?stdev_id='.$get_id; ?>')">Thumbprint &nbsp;<span class="label label-default"> <?php echo $count;?></span></a>					
				</li>	
				<?php	
	            $ig= mysqli_query($con,"select * from stdevice    
	LEFT JOIN stlocation ON stdevice.stdev_id = stlocation.stdev_id
	LEFT JOIN device_name ON device_name.dev_id = stdevice.dev_id
	WHERE stdevice.stdev_id  = '1' AND device_name.dev_name='Printer'");
			    $count = mysqli_num_rows($ig);
               ?>			
				<li class="">			
				    <a href= 'myprinter.php<?php echo '?stdev_id='.$get_id; ?>')">Printer &nbsp;<span class="label label-default"> <?php echo $count;?></span></a>					
				</li>
								<?php	
	            $ih= mysqli_query($con,"select * from stdevice    
	LEFT JOIN stlocation ON stdevice.stdev_id = stlocation.stdev_id
	LEFT JOIN device_name ON device_name.dev_id = stdevice.dev_id
	WHERE stdevice.stdev_id  = '1' AND device_name.dev_name='Cash drawer'");
			    $count = mysqli_num_rows($ih);
               ?>			
				<li class="">			
				    <a href= 'mycash.php<?php echo '?stdev_id='.$get_id; ?>')">Cash drawer &nbsp;<span class="label label-default"> <?php echo $count;?></span></a>					
				</li>			
			
				<?php	
	            $ij= mysqli_query($con,"select * from stdevice    
	LEFT JOIN stlocation ON stdevice.stdev_id = stlocation.stdev_id
	LEFT JOIN device_name ON device_name.dev_id = stdevice.dev_id
	WHERE stdevice.stdev_id  = '1' AND device_name.dev_name='Printer Receipt'");
			    $count = mysqli_num_rows($ih);
               ?>			
				<li class="">			
				    <a href= 'myprinterreceipt.php<?php echo '?stdev_id='.$get_id; ?>')">Printer Receipt &nbsp;<span class="label label-default"> <?php echo $count;?></span></a>					
				</li>			
			
				<?php	
	            $ik= mysqli_query($con,"select * from stdevice    
	LEFT JOIN stlocation ON stdevice.stdev_id = stlocation.stdev_id
	LEFT JOIN device_name ON device_name.dev_id = stdevice.dev_id
	WHERE stdevice.stdev_id  = '1' AND device_name.dev_name='Monitor Display'");
			    $count = mysqli_num_rows($ih);
               ?>			
				<li class="">			
				    <a href= 'mymonitordisplay.php<?php echo '?stdev_id='.$get_id; ?>')">Monitor Display &nbsp;<span class="label label-default"> <?php echo $count;?></span></a>					
				</li>			
				
				<?php	
	            $ik= mysqli_query($con,"select * from stdevice    
	LEFT JOIN stlocation ON stdevice.stdev_id = stlocation.stdev_id
	LEFT JOIN device_name ON device_name.dev_id = stdevice.dev_id
	WHERE stdevice.stdev_id  = '1' AND device_name.dev_name='Display Visual Code'");
			    $count = mysqli_num_rows($ih);
               ?>			
				<li class="">			
				    <a href= 'mydisplaycode.php<?php echo '?stdev_id='.$get_id; ?>')">Display Visual Code &nbsp;<span class="label label-default"> <?php echo $count;?></span></a>					
				</li>
				<?php	
	            $ik= mysqli_query($con,"select * from stdevice    
	LEFT JOIN stlocation ON stdevice.stdev_id = stlocation.stdev_id
	LEFT JOIN device_name ON device_name.dev_id = stdevice.dev_id
	WHERE stdevice.stdev_id  =  '$get_id' AND device_name.dev_name='Battery Laptop'");
			    $count = mysqli_num_rows($ik);
               ?>			
				<li class="">			
				    <a href= 'mybatterylaptop.php<?php echo '?stdev_id='.$get_id; ?>')">Battery Laptop &nbsp;<span class="label label-default"> <?php echo $count;?></span></a>					
				</li>
				<?php	
	            $uu= mysqli_query($con,"select * from stdevice    
	LEFT JOIN stlocation ON stdevice.stdev_id = stlocation.stdev_id
	LEFT JOIN device_name ON device_name.dev_id = stdevice.dev_id
	WHERE stdevice.stdev_id  =  '$get_id' AND device_name.dev_name='tools'");
			    $count = mysqli_num_rows($uu);
               ?>			
				<li class="">			
				    <a href= 'mytools.php<?php echo '?stdev_id='.$get_id; ?>')">Tools &nbsp;<span class="label label-default"> <?php echo $count;?></span></a>					
				</li>
				<?php	
	            $oi= mysqli_query($con,"select * from stdevice    
	LEFT JOIN stlocation ON stdevice.stdev_id = stlocation.stdev_id
	LEFT JOIN device_name ON device_name.dev_id = stdevice.dev_id
	WHERE stdevice.stdev_id  =  '$get_id' AND device_name.dev_name='cable'");
			    $count = mysqli_num_rows($oi);
               ?>			
				<li class="">			
				    <a href= 'mycable.php<?php echo '?stdev_id='.$get_id; ?>')">Cable &nbsp;<span class="label label-default"> <?php echo $count;?></span></a>					
				</li>	
					<?php	
	            $my_es= mysqli_query($con,"select * from stdevice    
	LEFT JOIN stlocation ON stdevice.stdev_id = stlocation.stdev_id
	LEFT JOIN device_name ON device_name.dev_id = stdevice.dev_id
	WHERE stdevice.stdev_id  = '$get_id' AND device_name.dev_name='EXTERNAL STORAGE'");
			    $count = mysqli_num_rows($my_es);
               ?>	
			   <li class="">			
				    <a href= 'myes.php<?php echo '?stdev_id='.$get_id; ?>')">External Storage&nbsp;<span class="label label-default"> <?php echo $count;?></span></a>					
				</li>		
				</ul>
	</div>
</div>
</div>


<div class="block-content collapse in">
<div class="span12">
	<form action="" method="post"><!-----------------------------------table form------------------------------------>	
  	<table cellpadding="0" cellspacing="0" border="0" class="table" id="example">
		<thead>		
		     <tr>			        
					<th class="empty"></th>
					<th>Device Name</th>
					<th>Device Description </th>
					<th>Inventory Code</th>
			        <th>Device Brand  </th>
					<th>Device Model  </th>
					<th>Date Assign   </th>	
					<th>Device Status </th> 				
                    <th>Location Name </th>
					<th class="empty">Manage Device</th>
		    </tr>
		</thead>
<tbody>
<!-----------------------------------table Content------------------------------------>									
 <?php
$my_device = mysqli_query($con,"select * from location_details    
	            LEFT JOIN stdevice ON location_details.id = stdevice.id
				LEFT JOIN device_name ON stdevice.dev_id=device_name.dev_id
				where NOT EXISTS 
                (select * from location_details where dev_status='Dump')
				 and dev_name = 'AVR'                           and stdev_id = '$get_id'
				 OR NOT EXISTS 
                (select * from location_details where dev_status='Dump')
				 and dev_name = 'A.V.R'                          and stdev_id = '$get_id'
				 OR NOT EXISTS 
                (select * from location_details where dev_status='Dump')
                and dev_name = 'automatic Voltage Regulator'   and stdev_id = '$get_id'   
				OR NOT EXISTS 
                (select * from location_details where dev_status='Dump')
				and dev_name = 'automatic Voltage Reactor'      and stdev_id = '$get_id'
				OR NOT EXISTS 
                (select * from location_details where dev_status='Dump')
                and dev_name = 'automatic_Voltage_Regulator'   and stdev_id = '$get_id'   
				OR NOT EXISTS 
                (select * from location_details where dev_status='Dump')
				and dev_name = 'automatic-Voltage-Regulator'    and stdev_id = '$get_id'
				OR NOT EXISTS 
                (select * from location_details where dev_status='Dump')
                and dev_name = 'avrs'                          and stdev_id = '$get_id'   
				OR NOT EXISTS 
                (select * from location_details where dev_status='Dump')
				and dev_name = 'automatic v.r'                  and stdev_id = '$get_id'
				OR NOT EXISTS 
                (select * from location_details where dev_status='Dump')
                and dev_name = 'automatic voltage R.'          and stdev_id = '$get_id'   
				OR NOT EXISTS 
                (select * from location_details where dev_status='Dump')
				and dev_name = 'avregulator'                    and stdev_id = '$get_id'
				OR NOT EXISTS 
                (select * from location_details where dev_status='Dump')
                and dev_name = 'automatic Voltage Reactor'     and stdev_id = '$get_id'   
				OR NOT EXISTS 
                (select * from location_details where dev_status='Dump')
				and dev_name = 'automatic-Voltage-Reactor'      and stdev_id = '$get_id' 
				OR NOT EXISTS 
                (select * from location_details where dev_status='Dump')
                and dev_name = 'automaticVoltageReactor'       and stdev_id = '$get_id'   
				OR NOT EXISTS 
                (select * from location_details where dev_status='Dump')
				and dev_name = 'automaticVoltageRegulator'      and stdev_id = '$get_id'
				OR NOT EXISTS 
                (select * from location_details where dev_status='Dump')
                and dev_name = 'automtic Voltge Reactor'       and stdev_id = '$get_id'   
				OR NOT EXISTS 
                (select * from location_details where dev_status='Dump')
				and dev_name = 'automtic Voltge Regulator'      and stdev_id = '$get_id'");
while($row = mysqli_fetch_array($my_device)){
$id = $row['id'];		                                               
?>
<tr>
		<td><?php
			   $device_query2 = mysqli_query($con,"select * from stdevice ");
		       $dev=mysqli_fetch_assoc($device_query2);
		       if($row['dev_status']=='New')
		       {
			   echo '<i class="icon-check"></i><div id="hide"><strong>'.$row['dev_status'].'</strong></div>';
		       }
		       else if($row['dev_status']=='Used')
			   {
			   echo '<i class="icon-ok"></i><div id="hide"><strong>'.$row['dev_status'].'</strong></div>';
		       }
			   else if($row['dev_status']=='Repaired')
			   {
			   echo '<i class="icon-wrench"></i><div id="hide"><strong>'.$row['dev_status'].'</strong></div>';
		       }
		       else
			   {
			   echo '<i class="icon-remove-sign"></i><div id="hide"><strong>'.$row['dev_status'].'</strong></div>';
		       };
			  ?>
		</td>
			<td><?php echo $row['dev_name']; ?></td>
			<td><?php echo $row['dev_desc']; ?></td>
			<td><?php echo $row['dev_serial']; ?></td>
			<td><?php echo $row['dev_brand']; ?></td>
			<td><?php echo $row['dev_model']; ?></td>
			<td><?php echo $row['date_deployment']; ?></td>
			<td><?php
			   $my_device1 = mysqli_query($con,"select * from stdevice ");
		       $dev=mysqli_fetch_assoc($my_device1);
		       if($row['dev_status']=='New')
		       {
			   echo '<div class="alert alert-success"><i class="icon-check"></i><strong>'.$row['dev_status'].'</strong></div>';
		       }
		       else if($row['dev_status']=='Used')
			   {
			   echo '<div class="alert alert-warning"><i class="icon-ok"></i><strong>'.$row['dev_status'].'</strong></div>';
		       }
			    else if($row['dev_status']=='Repaired')
			   {
			   echo '<div class="alert alert-warning"><i class="icon-wrench"></i><strong>'.$row['dev_status'].'</strong></div>';
		       }
		       else
			   {
			   echo '<div class="alert alert-danger"><i class="icon-remove-sign"></i><strong>'.$row['dev_status'].'</strong></div>';
		       };
			  ?></td>
			<td><?php echo $location_row['stdev_location_name']; ?></td>
			
			<?php include('toolttip_edit_delete.php'); ?>
			<td width="185" class="empty"><a rel="tooltip"  title="Transfer Device" id="e<?php echo $id; ?>" href="transfer.php<?php echo '?id='.$id; ?>&<?php echo 'stdev_id='.$get_id; ?>" class="btn btn-warning"><i class="icon-move"></i> Transfer </a>
			<a rel="tooltip"  title="Update Status" id="t<?php echo $id; ?>" href="devlavr_update_status.php<?php echo '?id='.$id; ?>&<?php echo 'stdev_id='.$get_id; ?>" class="btn btn-success"><i class="icon-upload-alt"></i> Status</a></td>			
		</tr>
											
	<?php } ?>   
</tbody>
</table>
</form>	
 <!---------------------------------------------------- /block --------------------------------------------->
             </div>
          </div>
        </div>
     </div>
  </div>
</div>
<?php include('footer.php'); ?>
</div>
<?php include('script.php'); ?>
</body>