<?
session_start();
$brcode=$_SESSION['brcode'];
$user=$_SESSION['user'];
if(strlen($brcode)<=0)
{
  print "<script> alert('Invalid User'); parent.document.location='../ind.php' </script>";
  return;
}
?>

<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>khadi</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" />
<link rel="stylesheet" href="../cal/jquery-ui.css" />
<script src="../cal/jquery-1.9.1.js"></script>
<script src="../cal/jquery-ui1.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css" />
    <script type="text/javascript">
$(function() {
$( "#ref_date" ).datepicker("destroy");
     var fyr=document.getElementById('f_yr').value;
     var splv=fyr.explode("-");
     var syr=splv[0];
     var eyr='20'.concat(splv[1]);
     var syr1='01-04-';
     var eyr1='31-03-';
     var stfnyr=syr1.concat(syr);
     var efnyr=eyr1.concat(eyr);
     $("#ref_date").datepicker({ dateFormat: 'dd-mm-yy', minDate: stfnyr, maxDate: efnyr});

$( "#ref_date1" ).datepicker("destroy");
     var fyr=document.getElementById('f_yr').value;
     var splv=fyr.explode("-");
     var syr=splv[0];
     var eyr='20'.concat(splv[1]);
     var syr1='01-04-';
     var eyr1='31-03-';
     var stfnyr=syr1.concat(syr);
     var efnyr=eyr1.concat(eyr);
     $("#ref_date1").datepicker({ dateFormat: 'dd-mm-yy', minDate: stfnyr, maxDate: efnyr});
        });
    </script>
<body onLoad=document.f1.d.focus()>
<background="../back_ground.jpg">

<?php include_once('top.php'); ?>
<table class="container"><tr><td>
<center>
<font face=verdana size=4>
<form name=f1>
<table border=1 class='form'>
<tr bgcolor='green'><td colspan=2 align=center><font color=white size=3><b>Bank Report for the Period</font></td></tr>
<tr><td> From <input type=hidden name='f_yr' id='f_yr' value='<? echo $fin_year ?>'></td>
<td><input type="text" id="ref_date" value="<?echo date('d-m-Y');?>" name="fromdt" readonly></td>
</tr>
<tr><td> To </td><td><input type="text" id="ref_date1" value="<?echo date('d-m-Y');?>" name="todt" readonly></td>
</tr><tr><td colspan=2  align=center><input type=button value="Show" onclick=showfn()><input type=button value="Print Pdf" onclick=pdffn()>
<input type=button value="Print" onclick=printfun()>
</td></tr>
</table>
</form>
</td></tr></table>
<script>
 function showfn()
 {
   var dfrom=document.f1.fromdt.value;
   var dto=document.f1.todt.value;
   document.location="bbook-rpt.php?dfrom="+dfrom+"&&dto="+dto,true;
 }
 function pdffn()
 {
   var dfrom=document.f1.fromdt.value;
   var dto=document.f1.todt.value;
   window.open("../paypdf/bbook-rpt-pdf.php?dfrom="+dfrom+"&&dto="+dto,true);
 }
  function printfun()
 {
   var dfrom=document.f1.fromdt.value;
   var dto=document.f1.todt.value;
   document.location="bbook-rpt-prn.php?dfrom="+dfrom+"&&dto="+dto,true;
 }
</script>