<?
session_start();
if(strlen($brcode)<=0)
{
 print "<script> alert('Session timed out'); parent.document.location='../ind.php'; </script>";
 return;
}
include("opendb.php");
include("test.php");
?>
<style>
td{font-family:'arial narrow';letter-spacing:1}
th{background-color:c1d799}
body{font-family:'arial narrow';letter-spacing:1;}
</style>
<body bgcolor=ivory>
<center>
<font size=4><b>USER LOG </font><hr>
<table cellspacing=2 cellpadding=1 bgcolor=white>
<th>User <th> I.P  <th>Date <th>Action
<?
$re=mysqli_query($db,"select brcode,upper(user),ip,date_format(date,'%d-%m-%Y %H:%i:%s'),action from log where brcode='$brcode' order by date desc")or die(mysqli_error());
while($row=mysqli_fetch_array($re))
{
 print "<tr><td>$row[1]</td><td>$row[2]</td><td>$row[3]</td><td>$row[4]</td>";
}
?>
<tr><td colspan=5 bgcolor=c1d799></td></tr>
</table>
