<?
session_start();
if(strlen($brcode)<=0)
{
 print "<script> alert('Session timed out'); parent.document.location='../index.html'; </script>";
 return;
}
?>
<link rel="stylesheet" href="../style.css" type="text/css" />
<style>
	tr{background-color:white}
	th{background-color:steelblue;color:white}
</style>
<center>
<?
include("../opendb.php");
include("../test.php");
$cldate=date("Y-m-d");
$sql="update purorder_spare set closed='Y',reas='Order Closed',cldate='$cldate' where orderno='$ordno' and brcode='$brcode'";

mysqli_query($db,$sql) or die(mysqli_error());
print "<script> alert('Order has been closed'); document.location='porderpnd.php' </script>";

?>
