<?
session_start();
$brcode=$_SESSION['brcode'];
$user=$_SESSION['user'];
include_once("opendb.php");
if(strlen($brcode)<=0)
{
    print "<script> alert('Session timed out'); parent.document.location='index.php'; </script>";
    return;
}
include("test.php");
?>

<style>
 td{font-family:verdana;font-size:14;color:black;}
 th{font-family:verdana;font-size:14;color:white;background-color:#5b5858}
 body{background-color:ivory;}
 select
  {border-style:ridge;
   border-color:black;
   height:25px;
   width:170;
   border-size=1;
   font-family:verdana;
   color:black;
  }
 input
  {border-style:ridge;
   border-color:#22437f;
   background-color:white;
   height:25px;
//   font-weight:bold;
   border-size=1;
   font-family:sans-serif;
   color:BLACK;
  }
</style>
<title>AMPLC</title>
  <script src="../rightclick_deactive.js"></script>
    <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" />
    
<body onLoad=document.f1.d.focus()>
<background="../back_ground.jpg">

<?php include('includes/top.php'); ?>
<table class="container"><tr><td>
<center>
<font face=verdana size=4>
<form name=f1 action="print_bbook.php"  method='post' target="_blank">
<table border=1 class='form'>
<tr bgcolor='green'><td colspan=2 align=center><font color=white size=4><b>Bank Book for the Period</font></td></tr>
<tr><td> From </td>
    <td>dd<input type=text name=d size=1 value='1'>
	mm<input type=text name=m size=1 value='<?print date("m",time())?>'>
	yyyy<input type=text name=y size=3 value='<?print date("Y",time())?>'>
    </td>
</tr>
<tr><td> To </td>
    <td>dd<input type=text name=d1 size=1 value='<?print date("d",time())?>'>
	mm<input type=text name=m1 size=1 value='<?print date("m",time())?>'>
	yyyy<input type=text name=y1 size=3 value='<?print date("Y",time())?>'>
    </td>
</tr>
<tr><td>Bank</td> 
<td> <select name=bnk>
<?
 include("opendb.php");
 $result=mysqli_query($db,"select * from ledger where brcode='$brcode' and (grp='Bank Accounts' or grp='Bank O/d' or grp='BALANCE WITH BANKS')");
 while($row=mysqli_fetch_row($result))
 {
  print "<option>$row[0]</option>";
 }
?>
</select>
</td></tr>
  
<tr><td colspan=2  align=center>
  <input type=submit value="Print"></td>
</tr>
</table>
</form>
</td></tr></table>
