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

?>
<style>
body,td{font-family:verdana;font-size:15}
</style>

<script>
window.resizeTo(380,600);
</script>
<body bgcolor='lightsteelblue'>
<center>
<?
 $gname=$_REQUEST['gname'];

$gname=str_replace('^','&',$gname);
 print "<b>Ledgers under <u>$gname</u>";
 include("opendb.php");
  $result=mysqli_query($db,"select led from ledger where grp='$gname' and brcode='$brcode' order by led");
?>
<table>
<?
$i=1;
while($row=mysqli_fetch_row($result))
{
 print "<tr><td>".$i++."</td><td>$row[0]</td></tr>";
}
?>
</table>
<br>
<input type=button value='Close' onClick=window.close()>

