| Current Path : /var/www/html/mmishra/icure/staff/ |
| Current File : /var/www/html/mmishra/icure/staff/weblogs.inc |
<h3 align='left'>Activity Logs</h3>
<center>
<?php
$dated = $_REQUEST["dated"];
if (!$dated) $dated = date("Y-m-d");
$dated1 = date('Y-m-d', strtotime($dated .' -1 day'));
$dated2 = date('Y-m-d', strtotime($dated .' +1 day'));
echo "<a href='?pg=$pg&dated=$dated1'>$dated1</a>
<font size='+1' color='red'>[ $dated ]</font>";
if ($dated != date("Y-m-d")) echo "<a href='?pg=$pg&dated=$dated2'>$dated2</a>";
$sql = "select userID as user,referer,webURL as URL,remoteIP as clientPC,dateCreation as dated from weblogs where date(dateCreation)='$dated'";
if ($role != 'admin') {
$sql .= " and userid='$user'";
}
$sql .= " order by dateCreation desc";
$rs = mysql_query($sql);
if (mysql_num_rows($rs)) {
$colHeads = mysql_num_fields($rs);
echo "<table border='1' width='90%'>\n<tr><th>Sr</th>";
for ($i=0; $i < $colHeads; $i++) { // Header
$fld = ucwords(str_replace("_"," ",mysql_field_name($rs, $i)));
echo "<th>$fld</th>";
}
echo "</tr>\n";
$j = $pgno;
while ($row = mysql_fetch_row($rs)) { //data
$j++;
echo "<tr><td>$j</td><td>".implode($row,"</td><td>")."</td></tr>\n";
}
echo "</table>\n";
} else {
echo "<h3>None</h3>";
}
?>
</center>