 
 <?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 = mySQL_query($order_query);
	$_SESSION['order_no']=mysql_result($order_result, 0, "order_no");
	$_SESSION['cust_id']=mysql_result($order_result, 0, "cust_id");
	$_SESSION['order_date']=mysql_result($order_result, 0, "order_date");
	$_SESSION['delivery_date']=mysql_result($order_result, 0, "delivery_date");
	$_SESSION['del_col']=mysql_result($order_result, 0, "del_col");
	$_SESSION['delivery_address'] = mysql_result($order_result, 0, "project_no").' '.mysql_result($order_result, 0, "project_place");
		
	$table_name2 = $_SESSION['db_prefix']."_customer";
	$customer_query = "SELECT comp_name FROM $table_name2 WHERE cust_id ='".$_SESSION['cust_id']."' ";
	$customer_result = mySQL_query($customer_query);
	$customer_num = mysql_num_rows($customer_result);	
	$cust_name = mysql_result($customer_result, 0, "comp_name"); 
		 
	
	$table_name = $_SESSION['db_prefix']."_tile_deliver_lines_temp";
	$delete2_query = "DELETE FROM $table_name WHERE  user_name =  '".$_SESSION['username']."'"; 
	execsql($delete2_query);
	
	 
?>


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

