<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />


<?php
include('../include/session.php');
include ("../navigation/header.php");
include ("../navigation/sales_sidebar.php");
	
	$s = $_GET['s'];
	$p = $_GET['p'];
	$error = $_SESSION['error'];
	$_SESSION['p']=$p;
	$_SESSION['s']=$s;
	
	
	if (isset($_GET['prev_button']) )
	   {
		 $_SESSION['p']= $_SESSION['p']-1;
	   }
		 
	if (isset($_GET['next_button']) )
	  {
		$_SESSION['p']=$_SESSION['p']+1;
	  }
	
		
	
	if ($s==1) {
		$_SESSION['quote_no'] = $_GET['quote_no'];
		$table_name2 = $_SESSION['db_prefix']."_customer";
		$customer_query = "SELECT * FROM $table_name2 WHERE cust_id ='".$_SESSION['cust_id']."' ";
		$customer_result = mySQL_query($customer_query);
		$customer_num = mysql_num_rows($customer_result);	
		$a1 = mysql_result($customer_result, 0, "account_type");
			if ($a1=="corporate") { 
				$_SESSION['name'] = mysql_result($customer_result, 0, "comp_name"); 
			} 
			else {
				$_SESSION['name'] = mysql_result($customer_result, 0, "title")." ".mysql_result($customer_result, 0, "name_2")." ".mysql_result($customer_result, 0, "comp_name");
 			}	
	}
		
	if($s==2) {
	 
	 
	};
	
	if($s==3) {
	 	 	 	
	 if ($_SESSION['type']=="corporate") {	
	 $_SESSION['comp_name'] = $_GET['comp_name_text'];
	 $_SESSION['cell_1'] = $_GET['cell_1_text'];
	 $_SESSION['email_1'] = $_GET['email_1_text'];
	 $_SESSION['contact_1'] = $_GET['contact_1_text'];
	 $_SESSION['contact_2'] = $_GET['contact_2_text'];
	 $_SESSION['cell_2'] = $_GET['cell_2_text'];
	 $_SESSION['email_2'] = $_GET['email_2_text'];
	 
	 $_SESSION['phone_2'] = $_GET['phone2_text'];
	 $_SESSION['vat_no'] = $_GET['vat_text'];
	 $_SESSION['web_site'] = $_GET['web_text'];
	 }
	 
	 if ($_SESSION['type']=="private") {	
	 $_SESSION['comp_name'] = $_GET['comp_name_text'];
	 $_SESSION['name_2'] = $_GET['first_name_text'];
	 $_SESSION['title'] = $_GET['title_select'];
	 $_SESSION['contact_1'] = $_GET['contact_1_text'];
	 $_SESSION['cell_1'] = $_GET['cell_1_text'];
	 $_SESSION['email_1'] = $_GET['email_1_text'];
	 
	 }
	 
	 
	 $_SESSION['bag_box'] = $_GET['bag_box_select'];
	 $_SESSION['box_no'] = $_GET['box_no_text'];
	 $_SESSION['post_place'] = $_GET['post_place_select'];
	 $_SESSION['phys_address'] = $_GET['phys_address_text'];
	 $_SESSION['phys_place'] = $_GET['phys_place_select'];
	 $_SESSION['country'] = $_GET['country_select'];
	 $_SESSION['phone'] = $_GET['phone_text'];
	 $_SESSION['fax'] = $_GET['fax_text'];
	 $_SESSION['notes'] = $_GET['notes_text'];
	 
	}
	
	
	if($s==4) {
	 $_SESSION['account'] = $_GET['account_group'];	
	 if ($_SESSION['account']=="cash") {
	   $_SESSION['receipt'] = $_GET['receipt_text'];
	 }
	 
	 if ($_SESSION['account']=="account") {
	   $_SESSION['order'] = $_GET['order_no_text'];
	 }
	 
	 $_SESSION['acceptor'] = $_GET['acceptor_select'];
	 $_SESSION['received'] = $_GET['received_text'];
	 $_SESSION['acceptance_date'] = $_GET['acceptance_date'];
	
	}
	
	?>
<!--style sheets-->
<link rel="stylesheet" type="text/css" href="../css/wizard.css" />
<link href="../css/wait.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="../window/dhtmlwindow.css" type="text/css" />
<link rel="stylesheet" href="../window/modal.css" type="text/css" />




<!--jscript-->
<script type="text/javascript" src="../window/dhtmlwindow.js"></script>
<script type="text/javascript" src="../window/modal.js"></script>
<script language="JavaScript" src="../jscript/cancel_confirmation.js"  type="text/javascript"></script> 
<script language="JavaScript" src="../jscript/confirm_exit.js"  type="text/javascript"></script>  
<script language="JavaScript" src="../jscript/show_hide_layers.js"  type="text/javascript"></script>  



<div class="main_frame" style="height:auto; min-height:550px;" >
<div class="page_head_frame">
      <table width="691" border="0">
        <tr>
          <td width="548"><label class="label_page_head">Create job</label><label class="label_page_head_2"> <?php echo $_SESSION['comp_name'] ?></label></td>
          <td width="122"> <label class="label_quote_no"><?php if ($_SESSION['quote_no']!="") { echo "Q".$_SESSION['quote_no']; } ?></label>
           </td>
        </tr>
      </table>
    </div>

<div class='wizard_paging_frame'>
      <table align="left">
      <tr>
      <td>
      <?php if ($_SESSION['p']==2) { ?>
      <div class="active_step_frame">
      <div class="active_step_head_label">&nbsp;1</div></div>
      <div class="active_step_label">Quotation details</div>
      <?php } else { ?>
      <div class="de_active_step_frame"><div class="de_active_step_head_label">&nbsp;1</div></div>
      <div class="de_active_step_label">Quotation details</div>
      <?php } ?>
      </td>
      <td>
      <?php if ($_SESSION['p']==3) { ?>
      <div class="active_step_frame">
      <div class="active_step_head_label">&nbsp;2</div></div>
      <div class="active_step_label">Contact details</div>
      <?php } else { ?>
      <div class="de_active_step_frame"><div class="de_active_step_head_label">&nbsp;2</div></div>
      <div class="de_active_step_label">Contact details</div>
      <?php } ?>
     </td>
      <td>
      <?php if ($_SESSION['p']==4) { ?>
      <div class="active_step_frame">
      <div class="active_step_head_label">&nbsp;3</div></div>
      <div class="active_step_label">Admin details</div>
      <?php } else { ?>
      <div class="de_active_step_frame"><div class="de_active_step_head_label">&nbsp;3</div></div>
      <div class="de_active_step_label">Admin details</div>
      <?php } ?>
      </td>
      <td>
      <?php if ($_SESSION['p']==5) { ?>
      <div class="active_step_frame">
      <div class="active_step_head_label">&nbsp;4</div></div>
      <div class="active_step_label">Finish</div>
      <?php } else { ?>
      <div class="de_active_step_frame"><div class="de_active_step_head_label">&nbsp;4</div></div>
      <div class="de_active_step_label">Finish</div>
      <?php } ?>
       </td>
     
      </tr>
      </table>
      </div>
      </td>
          </tr>
          <tr>
            <td><?php 
	if ($_SESSION['p']==1) { include("acceptanceWiz1.php"); }
	if ($_SESSION['p']==2) { include("acceptanceWiz2.php"); }
	if ($_SESSION['p']==3) { include("acceptanceWiz3.php"); }
	if ($_SESSION['p']==4) { include("acceptanceWiz4.php"); }
	if ($_SESSION['p']==5) { include("acceptanceWiz5.php"); }
    ?></td>
          </tr>
    </table>
      </div>
</div
></div>



<?php include ('../navigation/side_bar.php'); ?>  