<? session_start(); ?>

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

}

?>

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