| Current Path : /var/www/html/mmishra/icure/ |
| Current File : /var/www/html/mmishra/icure/index.php~ |
<?php
require("init.inc.php");
echo $header;
?>
<br>
<center>
<?php
if (!$user) {
echo "<table border='9'><tr><td>
UID <input type='text' name='txtID' value='' size='15'>
PWD <input type='password' name='txtPWD' value='' size='15'>
<input type='submit' name='login' value='LOGIN'>
</td></tr></table>";
}
$sqls = array("select reg_datetime dated, pat_name patient, dr_name doctor from patients group by pat_name",
"select med_name medicine, qty_inhand no from medicines group by med_name"
);
?>
[ <a href='guest/'>Guest access</a> ]
</center>
<h3>Meta Data - <?php echo $no; ?> iCure Distribution</h3>
<center>
<?php
echo "<table width='80%' border='1'><tr valign='top'>";
foreach ($sqls as $sql) {
$rs = mysql_query($sql);
if (mysql_num_rows($rs)) {
$colHeads = mysql_num_fields($rs);
echo "<th width='33%'>
<table border='0' width='90%' align='center'><tr>";
for ($i=0; $i < $colHeads; $i++) { // Header
$fld = ucwords(str_replace("_"," ",mysql_field_name($rs, $i)));
echo "<th>$fld</th>";
}
echo "</tr>";
while ($row = mysql_fetch_row($rs)) { //data
$j++;
if ($j % 2 == 0)
echo "<tr bgcolor='lightpink'><td>".implode($row,'</td><td>')."</td></tr>";
else
echo "<tr><td>".implode($row,'</td><td>')."</td></tr>\n";
}
echo "</table></th>";
} else {
echo "<td>Sorry! record could not be found.</td>";
}
$k++;
if ($k % 3 == 0) echo "</tr><tr valign='top'>";
}
echo "</tr></table>
</center>";
echo $footer;
?>