<? 
session_start();
$brcode=$_SESSION['brcode'];
$user=$_SESSION['user']; 
?>
<style>
td{font-family:'arial narrow';letter-spacing:1}
th{background-color:c1d799}
body{font-family:'arial narrow';letter-spacing:1;}
</style>
<?
if(isset($_POST['edit']))
{
$code=$_REQUEST['code'];
 print "<script>window.open('edituser.php?code=$code',menubar=false,resizeable=false); </script>";

}

?>

<body bgcolor=fcfff1>
<font color=green>
<h3>List of active users </h3></font>
<hr bgcolor=red>
<?
include("../opendb.php");
$result=mysqli_query($db,"select * from bruser where active='Y' order by brcode,username")or die(mysqli_error($db));
?>
<table border=0  cellspacing=2 cellpadding=5>
<th>No.<th>User Name <th>Level <th>Designation <th>Address <th>Branch <th>Password
<th>Type <th>Action
<?
$i=1;
while($row=mysqli_fetch_array($result))
{
 print "\n<form action='$PHP_SELF' method='POST'> <input type=hidden name='code' value='$row[sno]'>";
 print "\n<tr bgcolor='c1d7bf' onMouseOver=bgColor='Pink'; onMouseOut=bgColor='c1d7bf'; >".
"<td>".$i++."</td><td>$row[1]</td><td align=center>$row[2]</td><td>$row[desig]</td><td>$row[addr]</td>".
"<td>$row[brcode]</td>";
print "<td>$row[pswd]</td><td>$row[utype]</td>";
 print "<td><input type=submit name='edit' value='Edit'> \n</td> </tr></form>";
}
?>
</table>
