<?php include('header.php'); ?>
<?php include('session.php'); ?>
    <body>
		<?php include('navbar.php'); ?>
        <div class="container-fluid">
            <div class="row-fluid">
				<?php include('Toner_sidebar.php'); ?>
			
				<div class="span9" id="content">
                     <div class="row-fluid">
					 <a href="add_toner.php" class="btn btn-info"  id="add" data-placement="right" title="Click to Add Device" ><i class="icon-plus-sign icon-large"></i> Add Toner Stock</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> Toner Stock (s) List</div>
                         
						  </div>
						  
                 <h4 id="sc">Toner 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"> 
     <div class="empty">
	     <div class="pull-right">
		   <a href="toner_list_print.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 class="block-content collapse in">
    <div class="span12">
	<form action="" method="post">
  	<table cellpadding="0" cellspacing="0" border="0" class="table" id="example">
		<thead>		
		        <tr>			        
					
					<th>Location</th>
					<th>Model</th>
					<th>Quantity</th>
			        <th>Description </th>
					<th>Color </th>
					
					<th>Date </th>	
					<th>Manage</th>					
		    </tr>
		</thead>
<tbody>
<!-----------------------------------Content------------------------------------>
	
<?php
     
		$device_query = mysqli_query($con,"select * from cis_toner_instock LEFT JOIN stlocation ON stlocation.stdev_id=cis_toner_instock.loc_id
		                            ");
		while($row = mysqli_fetch_array($device_query)){
		$id = $row['toner_id'];
		//$dev_id = $row['dev_id'];
		
		?>
										
		<tr>
		
			<td><?php echo $row['stdev_location_name']; ?></td>
		
			<td><?php echo $row['toner_model']; ?></td>
			<td><?php echo $row['quantity']; ?></td>
			<td><?php echo $row['toner_description']; ?></td>
			<td><?php echo $row['color']; ?></td>	
			<td><?php echo $row['last_update']; ?></td>
			
		
			
			
			<?php include('toolttip_edit_delete.php'); ?>												
			<td class="empty" width="80"><a rel="tooltip"  title="Edit" id="e<?php echo $id; ?>" href="toner_edit.php<?php echo '?id='.$id; ?>" class="btn btn-success"><i class="icon-pencil"> Edit</i></a>&nbsp;<a rel="tooltip"  title="Edit" id="e<?php echo $id; ?>" href="toner_loan.php<?php echo '?id='.$id; ?>" class="btn btn-success"><i class="icon-pencil"> Loan</i></a></td> 
		</tr>
											
	<?php } ?>   
</tbody>
</table>
</form>		
		
			  		
</div>
</div>
</div>
</div>
</div>
	
</div>	
<?php include('footer.php'); ?>
</div>
<?php include('script.php'); ?>
 </body>
</html>