| Current Path : /var/www/html/mmishra/istore/ |
| Current File : /var/www/html/mmishra/istore/stconsumption.inc |
<h3>Consumption List</h3>
<center>
<table width='90%' border='1' style='border-collapse: collapse'>
<tr><th>No.</th><th>Particulars</th><th>Qty Out</th><th>Dated</th></tr>
<?php
$rs = mysql_query("select * from st_items where qty_out>0 order by category,subcategory,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->dateUpdation</td></tr>";
}
if (!$i) {
echo "<tr><td colspan='4'>No consumption</td></tr>";
}
?>
</table>
</center>