| Current Path : /var/www/html/mmishra/ilight/ |
| Current File : /var/www/html/mmishra/ilight/stconsumption.inc |
<h3>Consumption Summary</h3>
<center>
<table width='90%' border='1' style='border-collapse: collapse'>
<tr><th>No.</th><th>Item Description</th><th>Qty Out</th><th>Dated</th></tr>
<?php
$rs = mysql_query("select * from st_utilization where qty_our > 0 order by code");
/*
if (mysql_num_rows($rs)) {
$colHeads = mysql_num_fields($rs);
echo "<table border='1' width='90%' align='center'>
<tr><th>No.</th>";
for ($i=0; $i < $colHeads; $i++) { // Header
echo "<th>".ucwords(str_replace("_"," ",mysql_field_name($rs, $i)))."</th>";
}
echo "</tr>";
$no++;
while ($row = mysql_fetch_row($rs)) { //data
$j++;
if ($j % 2 == 0)
echo "<tr bgcolor='lightpink'><td>$j</td><td>".implode($row,'</td><td>')."</td></tr>";
else
echo "<tr><td>$j</td><td>".implode($row,'</td><td>')."</td></tr>\n";
}
echo "</table>";
} else {
echo "---";
}
*/
while ($o = mysql_fetch_object($rs)) {
$i++;
echo "<tr><th>$i</th><td>".item_category($o->category).' ('.item_subcategory($o->subcategory).') '.item_detail($o->id)."</td>";
echo ($o->qty_out==0 ? "<th>$o->qty_out</th>" : "<td>$o->qty_out</td>")."<td nowrap>$o->dated</td></tr>";
}
?>
</table>
</center>