<?php
    include("../include/session.php");
    if(!$session->isAdmin() && !$session->isRadstoneReceptionUser()){
		header("Location: ../Store/productionMenu.php");
    }
    else {
    	include("../reportHeader.php");
//        include("../include/db.php");
        $date = date("Y-m-d");
    	$q = "SELECT * FROM nam_production WHERE date = '$date'";
    	$result = execsql($q);
    	$i = 0;
    	$num = mysql_num_rows($result);
    	
?>
<h3>Todays Production</h3><br /><br />

<table id="test1" cellpadding="0" cellspacing="0" border="0" class="rowstyle-alt colstyle-alt no-arrow">
    <thead>
      <tr>
        <th class="sortable-numeric">Product Id</th>
        <th class="sortable-date-ymd">Date</th>
        <th class="sortable-numeric">Skips</th>
        <th class="sortable-numeric">Cost</th>
        <th class="sortable-numeric">Wet Tiles Produced</th>
        <th class="sortable-numeric">Depaleted Tiles Produced</th>

      </tr>
    </thead>
    <tbody>
        <?php 
    	while($i < $num){
	       $b1 = mysql_result($result, $i, "productionId");
	       $b2 = mysql_result($result, $i, "date");
	       $b3 = mysql_result($result, $i, "skips");
	       $b4 = mysql_result($result, $i, "cost");

	       $b7 = mysql_result($result, $i, "wet");
	       $b8 = mysql_result($result, $i, "depalet");
    ?>
        <tr class="alt"><td><?php echo $b1?></td>
        <td><?php echo $b2?></td>
        <td><?php echo $b3?></td>
        <td><?php echo $b4?></td>
        <td><?php echo $b7?></td>
        <td><?php echo $b8?></td>
        </tr> 
    
<?php 
		$i++;
    	}
    	?></tbody>
    	</table>
    	    	<?php 
    	include("../footer.html");
    }
//    
	
?>