<?
session_start();
$brcode=$_SESSION['brcode'];
$user=$_SESSION['user'];
if(strlen($brcode)<=0)
{
 print "<script> alert('Session timed out'); parent.document.location='ind.php'; </script>";
 return;
}
$grp=$_REQUEST['grp'];
$opb=$_REQUEST['opb'];
$drcr=$_REQUEST['drcr'];
$led=$_REQUEST['led'];
$sql="update ledger set grp='$grp',op='$opb',drcr='$drcr' where led='$led' and brcode='$brcode'";

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

mysqli_query($db,$sql) or die(mysqli_error());
log_entry($brcode,$user,$REMOTE_ADDR,"ledger update: $led",$db);
print "<script> document.location='sealedge.php'; </script>";

?>

