<?
session_start();
if(strlen($brcode)<=0)
{
 print "<script> alert('Session timed out'); parent.document.location='../ind.php'; </script>";
 return;
}

$sql="update ledger set grp='$grp',op='$opb',drcr='$drcr',brcode='$brcode' where led='$led' and (brcode='$brcode' or brcode='1')";

include("../opendb.php");
include("../test.php");

mysqli_query($db,$sql) or die('err'.mysqli_error($db));

log_entry($brcode,$user,$REMOTE_ADDR,"ledger update: $led");
print "Data has been changed";
?>
<script>
 document.location="sealedge.php";
</script>
