<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<link href="../css/main.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="../css/scroll_table.css" />

<?php
include ("../navigation/header.php");
$page_name = "Quality-main";

$table_name = $_SESSION['db_prefix']."_wet_tile_spec";
$dr_query = "SELECT wet_report_no, production_no, production_date, mix_design_name  FROM $table_name WHERE approved = '1'; ";
$dr_result = mySQL_query($dr_query);
$dr_num = mysql_num_rows($dr_result);

?>

</head>

<body>

<?php



include ("../navigation/access.php");
if ($permission_num==1) {
include ("../navigation/quality_sidebar.php");
?>

<div class="main_frame">
 
<div class="page_head_frame">
        <table width="630" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><label class="label_page_head">Wet tile &amp; process inspection reports</label></td>
            </tr>
        </table>
</div>
<div class="page_inside_frame">
<script type="text/javascript" language="javascript" src="../jscript/jquery.dataTables.js"></script>
<script type="text/javascript" charset="utf-8">
			$(document).ready(function() {
				$('#scroll_table').dataTable( {
					"sScrollY": "500px",
					"bPaginate": false,
					"bScrollCollapse": true,
					"aaSorting": [[ 0, "desc" ]],
					"aoColumns": [
								{"iDataSort": 5},
								{"iDataSort": 4},
                              	{"bSortable": true},
                             	{"bSortable": true},
								{"bVisible": false},
								{"bVisible": false}
								 ]
				} );
			} );
		</script>
        <div align="right">
<img src="../images/info_blue.png" width="16" height="16">
<label class="label_info" style="font-size:10px">Click report no to open report</label>          
</div>
<table id="scroll_table" class="data_display">
<thead>
  <tr>
    <th align="left">Report no</th>
    <th align="left">Date</th>
    <th align="left">Product(s)</th>
    <th align="left">Production no(s)</th>
    <th align="left">&nbsp;</th>
    <th align="left">&nbsp;</th>
    </tr>
</thead>
  <?php 
  $i=0;
  while ($i<$dr_num) {
	  $report_no = mysql_result($dr_result, $i, "wet_report_no");
	  $production_no = mysql_result($dr_result, $i, "production_no");
	  $production_date = mysql_result($dr_result, $i, "production_date");
	  $mix_design_name = mysql_result($dr_result, $i, "mix_design_name");
	  ?>
  <tr>
    <td width="67"><a href="wet_tile_report.php?report_no=<?php echo $report_no ?>&approve=" onMouseOver="ddrivetip('Click to open inspection report.', 175)"; onMouseOut="hideddrivetip()"><?php echo $report_no ?></a></td>
    <td width="110"><?php echo date("l, d-m-Y", strtotime($production_date)) ?></td>
    <td width="200"><?php echo $mix_design_name ?></td>
    <td width="229"><?php echo $production_no ?></td>
    <td width="23"><?php echo $production_date ?></td>
    <td width="23"><?php  echo $report_no ?></td>
  </tr>
  <?php
  $i++;
  }
  ?>
</table>

</div>
</div>



<?php include ('../navigation/side_bar.php'); ?>

</body>

<?php } else {
	
$_SESSION['denied_return'] = $_SESSION['location'];	
include ("../navigation/quality_sidebar.php");?>
	<body onload="accessdenied(); return false">
	</body>
<?php }
?>


</html>