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

if($pswd=='clt')
{
 $sql1="delete from journal2 where partic='$led' and brcode='$brcode'";
 $sql2="delete from ledger where led='$led' and brcode='$brcode'";
print $sql1;

print $sql2;
}
else
{
 print "<center><blink><font face='verdana' color=red size=6>Invalid Password</font></blink>";
 return;
}
include("../opendb.php");
include("../test.php");
mysqli_query($db,$sql1) or die(mysqli_error($db));
mysqli_query($db,$sql2) or die(mysqli_error($db));
print "<font color=green face='verdana'>Transaction and Ledger ($led) has been deleted </font>";

log_entry($brcode,$user,$REMOTE_ADDR,"ledger delete: $led");
include("ledge.php");
?>
