 
 <?php 
 
     include("../include/session.php");
	 
	 
	 $_SESSION['delivery_address']='';
	 $_SESSION['driver']='';
	 $_SESSION['vehicle']='';
	 $_SESSION['hour']='';
	 $_SESSION['min']='';
	 
	 $_SESSION['deliver_date'] = date("Y-m-d");
 
     $_SESSION['order_reference'] = $_GET['order_reference'];
	 
	 
	 $_SESSION['store_item_id'] = '';
	 $_SESSION['store_item_name'] = '';
	 
	 
	 
	 
	$table_name = $_SESSION['db_prefix']."_orders";
	$order_query = "SELECT order_no, cust_id, order_date, delivery_date, del_col, project_no, project_place FROM $table_name WHERE order_reference = '".$_SESSION['order_reference']."'";
	$order_result = $con->query($order_query);
	$row = mysqli_fetch_assoc($order_result);
	$_SESSION['order_no'] = $row["order_no"];
	$_SESSION['cust_id']= $row["cust_id"];
	$_SESSION['order_date']= $row["order_date"];
	$_SESSION['delivery_date']= $row["delivery_date"];
	$_SESSION['del_col']= $row["del_col"];
	$_SESSION['delivery_address'] =  $row["project_no"].' '. $row["project_place"];
		
	$table_name2 = $_SESSION['db_prefix']."_customer";
	$customer_query = "SELECT comp_name FROM $table_name2 WHERE cust_id ='".$_SESSION['cust_id']."' ";
	$customer_result = $con->query($customer_query);
	$row = mysqli_fetch_assoc($customer_result);
	$cust_name = $row["comp_name"];
	
	
	$table_name = $_SESSION['db_prefix']."_deliver_product_lines_temp";
	$delete2_query = "DELETE FROM $table_name WHERE  user_name =  '".$_SESSION['username']."'"; 
	$delete2_result = $con->query($delete2_query);
	
	 
?>


<script language="javascript" type="text/javascript">
        <!--
		  window.location="deliver_product_Wizbase.php?error=0&p=1&s=0";
        -->
</script>

