<?php include('header.php'); ?>
<?php include('session.php'); ?>
    <body>
		<?php include('navbar.php'); ?>
        <div class="container-fluid">
            <div class="row-fluid">
				<?php include('Device_sidebar.php'); ?>
			
				<div class="span9" id="content">
                     <div class="row-fluid">
					 <a href="add_Device.php" class="btn btn-info"  id="add" data-placement="right" title="Click to Add Device" ><i class="icon-plus-sign icon-large"></i> Add Device</a>
					  <script type="text/javascript">
		              $(document).ready(function(){
		              $('#add').tooltip('show');
		              $('#add').tooltip('hide');
		              });
		             </script> 
					 <div id="sc" align="center"><image src="images/sclogo.png" width="45%" height="45%"/></div>
				<?php	
	             $count_item=mysqli_query($con,"select * from stdevice
				 						  LEFT JOIN device_name ON stdevice.dev_id=device_name.dev_id");
	             $count = mysqli_num_rows($count_item);
                 ?>	 
				   <div id="block_bg" class="block">
                        <div class="navbar navbar-inner block-header">
                             <div class="muted pull-left"><i class="icon-reorder icon-large"></i> Device Stock (s) List</div>
                          <div class="muted pull-right">
								Number of All Device: <span class="badge badge-info"><?php  echo $count; ?></span>
							 </div>
						  </div>
						  
                 <h4 id="sc">Device Stock 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
				$get_id='1';
	            $my_device = 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 = device_name.dev_id
	WHERE stdevice.stdev_id  = '1' AND device_name.dev_name='Desktop'  ");
			    $count = mysqli_num_rows($my_device);
			    ?>
				<li class="active">
				<a href= 'mydevice.php<?php echo '?stdev_id='.$get_id; ?>')">PICC&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  = '1' AND device_name.dev_name='Desktop'  ");
			  $count = mysqli_num_rows($my_desktop);
			  ?>
              					
				<li class="">			
				    <a href= 'mydesktop.php<?php echo '?stdev_id='.$get_id; ?>')">Desktop&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  = '1' 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  = '1' 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  = '1' 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  = '1' 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  = '1' 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  = '1' 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  = '1' 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  = '1' 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  = '1' 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  = '1' 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  = '1' 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  = '1' 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>		
				
				<?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  = '1' AND device_name.dev_name='Floor Switch'");
			    $count = mysqli_num_rows($e);
               ?>			
				<li class="">			
				    <a href= 'myfloor_switch.php<?php echo '?stdev_id='.$get_id; ?>')">Floor 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	
	            $bt= 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='Battery Laptop'");
			    $count = mysqli_num_rows($ih);
               ?>			
				<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>			
				</ul>
	 </div>
   </div>
</div>

<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
				$get_id='2';
	            $my_device = 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 = device_name.dev_id
	WHERE stdevice.stdev_id  = '2' AND device_name.dev_name='Desktop' ");
			    $count = mysqli_num_rows($my_device);
			    ?>
				<li class="active">
				<a href= 'mydevice.php<?php echo '?stdev_id='.$get_id; ?>')">TEP&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  = '2' AND device_name.dev_name='Desktop'  ");
			  $count = mysqli_num_rows($my_desktop);
			  ?>
              					
				<li class="">			
				    <a href= 'mydesktop.php<?php echo '?stdev_id='.$get_id; ?>')">Desktop&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  = '2' 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  = '2' 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  = '2' 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  = '2' 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  = '2' 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>
				
				
				
				</ul>
	 </div>
   </div>
</div>


<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
				$get_id='3';
	            $my_device = 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 = device_name.dev_id
	WHERE stdevice.stdev_id  = '3' AND device_name.dev_name='Desktop' ");
			    $count = mysqli_num_rows($my_device);
			    ?>
				<li class="active">
				<a href= 'mydevice.php<?php echo '?stdev_id='.$get_id; ?>')">PSR&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  = '3' AND device_name.dev_name='Desktop'  ")or die(mysql_error());
			  $count = mysqli_num_rows($my_desktop);
			  ?>
              					
				<li class="">			
				    <a href= 'mydesktop.php<?php echo '?stdev_id='.$get_id; ?>')">Desktop&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  = '3' AND device_name.dev_name='Ultra Book'  
				")or die(mysql_error());
			    $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  = '3' 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  = '3' 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  = '3' 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  = '3' 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>
				
				
				
				</ul>
	 </div>
   </div>
</div>

<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
				$get_id='4';
	            $my_device = 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 = device_name.dev_id
	WHERE stdevice.stdev_id  = '4' AND device_name.dev_name='Desktop' ");
			    $count = mysqli_num_rows($my_device);
			    ?>
				<li class="active">
				<a href= 'mydevice.php<?php echo '?stdev_id='.$get_id; ?>')">PULSE&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  = '4' AND device_name.dev_name='Desktop'  ");
			  $count = mysqli_num_rows($my_desktop);
			  ?>
              					
				<li class="">			
				    <a href= 'mydesktop.php<?php echo '?stdev_id='.$get_id; ?>')">Desktop&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  = '4' 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  = '4' 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  = '4' AND device_name.dev_name='Server'  ")or die(mysql_error());
			    $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  = '4' AND device_name.dev_name='Adapter Converter'  ")or die(mysql_error());
			    $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  = '4' AND device_name.dev_name='DVD'  ")or die(mysql_error());
			    $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>
				
				
				
				</ul>
	 </div>
   </div>
</div>

															
<div class="container-fluid">
  <div class="row-fluid"> 
     <div class="empty">
	     <div class="pull-right">
		   <a href="print_all_stock.php" class="btn btn-info" id="print" data-placement="left" title="Click to Print"><i class="icon-print icon-large"></i> Print List</a> 		      
		   <script type="text/javascript">
		     $(document).ready(function(){
		     $('#print').tooltip('show');
		     $('#print').tooltip('hide');
		     });
		   </script>        	   
         </div>
      </div>
    </div> 
</div>
	

			  		
</div>
</div>
</div>
</div>
</div>
	
</div>	
<?php include('footer.php'); ?>
</div>
<?php include('script.php'); ?>
 </body>
</html>