<?
session_start();
$brcode=$_SESSION['brcode'];
$user=$_SESSION['user'];
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");
$ordno=$_REQUEST['ordno'];

$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($db));
print "<script> alert('Order has been closed'); document.location='porderpnd.php' </script>";

?>
