<?
session_start();
if(strlen($brcode)>0)
{
 print "<script> alert('You are already logged in as $user'); </script>";
 print "<center>[<a href='logout.php'>Logout</a>] ";
 print "<br><font color=red><blink><b>Warning </b></font></blink><br>Logout properly in future <br> Multiple login is not allowed";
 return;
}
?>
<link rel="stylesheet" href="style.css" type="text/css" />
<script>
var x = navigator;
if(x.appCodeName!='Mozilla')
{
 alert('Invalid Browser, Use only Mozilla');
 document.location='blank.html'
}
function valid()
{
 if(document.f.branchcde.selectedIndex<=0)
  { alert('Invalid Branch'); return false;}

 if(document.f.uname.value.length<=0)
  { alert('Invalid Username'); return false;}
 if(document.f.pswd.value.length<=0)
  { alert('Invalid Password'); return false;}

}
</script>

<body onLoad=document.f.uname.focus()>
<p>&nbsp;<p>&nbsp;<p>&nbsp;
<table  border=0 bgcolor=ivory>
<tr><td width=120></td><td align=center>

<form name='f' action='login.php' method='post' onSubmit="return valid()">
<table width=100% border=0>
<tr><td align=right>
<table cellspacing=1 cellpadding=4 bgcolor='#FACC2E' width=300>
<th colspan=2>2012 - 2013 </TH>
<tr bgcolor='aliceblue'><td>Branch </td><td>

<select name='branchcde'>
<option></option>
<?
include("opendb.php");
$re=mysqli_query($db,"select brcode,brname from branch order by brname")or die(mysqli_error($db));
while($row=mysqli_fetch_array($re))
{
 print "<option value='$row[brcode]'>$row[brname]</option>";
 }
?>
</select>
</td></tr>
<tr bgcolor='aliceblue'><td>User Name </td><td><input type=text name='uname'></td></tr>
<tr><td bgcolor='aliceblue'>Password </td><td><input type=password name='pswd'></td></tr>
<th colspan=2><input type=submit value='LOGIN'> </th>

</table>
</form>
</td></tr>

</table>
</td>

<td align=left valign=bottom> <img src='images/EX40-sml.jpg'></td></tr>
<tr bgcolor=white><td colspan=3 align=center><br><span style={font-family:arial;color:333333;font-size:11}>


Use only Mozilla web browser <br><a href='59./downloads' style="color:red">Download Mozilla</a><br>
Software by <a href='http://www.vcmtech.com' target='x'>VCM Technologies</a></span></td></tr>
</table>

