<?
session_start();
$brcode=$_SESSION['brcode'];
$user=$_SESSION['user'];
if(strlen($brcode)<=0)
{
 print "<script> alert('Session timed out'); parent.document.location='../index.php'; </script>";
 return;
}
include("../opendb.php");
include("../test.php");
?>
<head>
<link rel="stylesheet" href="../style.css" type="text/css" />
<script type="text/javascript" src="../scripts/jquery-latest.js"></script>
<link type="text/css" href="../includes/style1.css" rel="stylesheet" />
<link type="text/css" href="../css/form.css" rel="stylesheet" />
</head>
<?php include('top.php'); ?>
<hr>
<center>
<FORM name='f1' ACTION='attendance.php' method='post'>
<table width=50%>
 <th>Branch
<?
$result=mysqli_query($db,"select * from br_master where brcode='$brcode' order by brname");
$i=1;
print "<center><select name='br'>";
while($row=mysqli_fetch_array($result))
{
 print "\n<option>$row[brname]</option>";
}
print "</select>";
print "<tr><td height='35'><center>MONTH<select name='monthfrm'>
<option>12</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option>10</option>
<option>11</option>
</select>";
print "&nbsp;&nbsp;YEAR<select name='yearfrm'>
<option>2017</option>
<option>2016</option>
<option>2015</option>
<option>2014</option>
<option>2013</option>
<option>2012</option>
<option>2011</option>
<option>2010</option>
</select>";
print "<tr><td align=center colspan='2'><input type=submit value='ATTENDANCE '></td></tr>";
?>
</table>
</form>

<HR>
<br>&nbsp;
