<?php include('header.php'); ?>
<?php include('session.php'); ?>
    <body>
		<?php include('navbar.php'); ?>
        <div class="container-fluid">
            <div class="row-fluid">
				<?php include('activity_log_slidebar.php'); ?>
                <div class="span9" id="content">
                     <div class="row-fluid">
                        <!-- block -->
				<div class="empty">
                    <div class="alert alert-success alert-dismissable">
                        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                         <i class="icon-info-sign"></i>  <strong>Note!:</strong> Select the checbox if you want to delete?
                    </div>
                </div>
				
				<?php	
	             $count_log=mysqli_query($con,"select * from cis_toner_instock_history");
	             $count = mysqli_num_rows($count_log);
                 ?>
                        <div id="block_bg" class="block">
                            <div class="navbar navbar-inner block-header">
                                <div class="muted pull-left"><i class="icon-user"></i> System Toner Instock Activity</div>
								<div class="muted pull-right">
								Number of System Toner Instock Activity: <span class="badge badge-info"><?php  echo $count; ?></span>
								</div>
                            </div>
                            <div class="block-content collapse in">
                                <div class="span12">
								<form action="delete_instock_toner_log.php" method="post">
  									<table cellpadding="0" cellspacing="0" border="0" class="table" id="example">
						            <!--a data-placement="right" title="Click to Delete check item" data-toggle="modal" href="#delete_tonerinstocklog" id="delete"  class="btn btn-danger" name=""><i class="icon-trash icon-large"> Delete</i></a>
									<script type="text/javascript">
									 $(document).ready(function(){
									 $('#delete').tooltip('show');
									 $('#delete').tooltip('hide');
									 });
									</script-->
									<a href="#" onClick="window.print()" class="btn btn-info" id="print" data-placement="top" title="Click to Print"><i class="icon-print icon-large"></i> Print List</a></p>		      
		   <script type="text/javascript">
		     $(document).ready(function(){
		     $('#print').tooltip('show');
		     $('#print').tooltip('hide');
		     });
		   </script> 
									<?php include('modal_delete.php'); ?>
										<thead>
										        <tr>					
                                                <!--th>Check</th-->
												<th>Date</th>
												<th>Toner</th>
												<th>Color</th>
												<th>PIC</th>
												<th>Action</th>
												<th>Manage</th>
									
												</tr>
												
										</thead>
										<tbody>
											
                              		<?php
										$query = mysqli_query($con,"select * from cis_toner_instock_history 
										LEFT JOIN admin ON cis_toner_instock_history.toner_pic = admin.username 
										LEFT JOIN stlocation ON cis_toner_instock_history.loc_id=stlocation.stdev_id 
										order by cis_toner_instock_history.last_update DESC");
										while($row = mysqli_fetch_array($query)){
										$id = $row['toner_id'];
										$username = $row['username'];
									?>
							
                                    <tr>
					                    <!--td width="70">
									     <input id="optionsCheckbox" class="uniform_on" name="selector[]" type="checkbox" value="<?php echo $id; ?>">
								        </td-->
 
                                         <td><?php  echo $row['last_update']; ?></td>
										 <td><?php  echo $row['toner_model']; ?></td>
										 <td><?php  echo $row['color']; ?></td>
                                         <td><?php echo $row['username']; ?></td>
                                         <td>Instock Toner &nbsp;
										 <?php echo $row['quantity']; ?> &nbsp;Units &nbsp;&nbsp; <?php echo $row['toner_description']; ?></td>
										<td class="empty" width="80"><a rel="tooltip"  title="Edit" id="e<?php echo $id; ?>" href="toner_instock_history_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;?>" </a></td> 
                                        </tr>
                         
						                 <?php } ?>
						   
                              
										</tbody>
									</table>
								</form>
                                </div>
                            </div>
                        </div>
                        <!-- /block -->
                    </div>


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