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

include("../opendb.php");
include("../test.php");
if($del && $pswd=='delspare')
{
$sq="delete from tdstrans where tdsno='$tdsno' and brcode='$brcode'";
mysqli_query($db,$sq) or die('jv err'.mysqli_error());

log_entry($brcode,$user,$REMOTE_ADDR,"Del spareinvoice:$invno,invtype:$invtype,vatorcst:$vatorcst , Journal: $jvrow[0]");
print "<script> alert('Record has been deleted'); document.location='invrepo.php';</script>";
}
else 
 print "Invalid Password";

?>
<form action='<?print $PHP_SELF?>'>
<input type=hidden name='tdsno' value='<?print $tdsno?>'>

Enter Password <input type=password name='pswd'>
<input type=submit value='Del' name='del'>
</form>
 
