<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<?php
include ("../navigation/header.php");
include ("../navigation/store_sidebar.php");

	$s = $_GET['s'];
	$p = $_GET['p'];
	$_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['category'] = $_GET['cat_group'];
		 $_SESSION['subCategory'] = $_GET['sub_cat_group'];
			     
	};
	
	if($s==2) {
	 $_SESSION['store_item_id'] = $_GET['store_item_select'];
	 $table_name = $_SESSION['db_prefix']."_store_items";
     $item_query = "SELECT item_name, price FROM $table_name WHERE store_item_id = '".$_SESSION['store_item_id']."' ";
     $item_result = mySQL_query($item_query);
     $_SESSION['store_item_name'] = mysql_result($item_result, 0, "item_name");
	 $_SESSION['price']  = mysql_result($item_result, 0, "price"); 
	 $_SESSION['quantity'] = $_GET['quantityText'];
	 $_SESSION['deliver_date'] = $_GET['deliver_date'];
	 $_SESSION['order_no'] = $_GET['order_text'];
	}
	
	if($s==3) {
	   $_SESSION['selected']  = $_GET['select_group'];
	   if ($_SESSION['selected']=="department") {
	           $_SESSION['department'] = $_GET['department_select'];}	
	   if ($_SESSION['selected']=="employee") {	   
	           $_SESSION['emp_id'] = $_GET['employee_select'];
			   
		$table_name = $_SESSION['db_prefix']."_employee";
		$employee_query = "SELECT  emp_first_name, emp_last_name FROM $table_name WHERE emp_id = '".$_SESSION['emp_id']."' ";
		$employee_result = mySQL_query($employee_query);
		$_SESSION['employee_name']  = mysql_result($employee_result, 0, "emp_first_name")." ".mysql_result($employee_result, 0, "emp_last_name");	   
	   }
	   
	  
	 
	};
	
	if($s==4) {
	 
	}
	
	?>
    
<!--style sheets-->
<link rel="stylesheet" type="text/css" href="../css/wizard.css" />
<!--reference to main.css removed-->
<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 language="JavaScript" src="../jscript/gen_validatorv4.js"  type="text/javascript" xml:space="preserve"></script>
<script type="text/javascript" src="../window/dhtmlwindow.js"></script>
<script type="text/javascript" src="../window/modal.js"></script>
<script language="JavaScript" src="../jscript/confirm_exit.js"  type="text/javascript"></script>  
<script language="JavaScript" src="../jscript/cancel_confirmation.js"  type="text/javascript"></script>  
<script language="JavaScript" src="../jscript/show_hide_layers.js"  type="text/javascript"></script>  


<div class="main_frame">
<table id="tableMain" width="595">
  <!--begin of tableMain-->
  <tr>
    <td ><div class="page_head_frame">
      <label class="label_page_head">Deliver store items</label>&nbsp;&nbsp;<label class="label_page_head_2"><?php echo $_SESSION['store_item_name'] ?></label></div>
      <br /><br />
<br /><br />
<div class="wizard_paging_frame">
<table align="left">
      <tr>
      <td>
      <?php if ($_SESSION['p']==1) { ?>
      <div class="active_step_frame"><div class="active_step_head_label">&nbsp;1</div>
      <div class="active_step_label"><br /><br /><br />Select category</div></div>
      <?php } else { ?>
      <div class="de_active_step_frame"><div class="de_active_step_head_label">&nbsp;1</div>
      <div class="de_active_step_label"><br /><br /><br />Select category</div></div>
      <?php } ?>
      
      </td>
      <td>
      <?php if ($_SESSION['p']==2) { ?>
      <div class="active_step_frame"><div class="active_step_head_label">&nbsp;2</div>
      <div class="active_step_label"><br /><br /><br />Item name</div></div>
      <?php } else { ?>
      <div class="de_active_step_frame"><div class="de_active_step_head_label">&nbsp;2</div>
      <div class="de_active_step_label"><br /><br /><br />Item name</div></div>
      <?php } ?>
     </td>
      <td>
      <?php if ($_SESSION['p']==3) { ?>
      <div class="active_step_frame"><div class="active_step_head_label">&nbsp;3</div>
      <div class="active_step_label"><br /><br /><br />Issued to</div></div>
      <?php } else { ?>
      <div class="de_active_step_frame"><div class="de_active_step_head_label">&nbsp;3</div>
      <div class="de_active_step_label"><br /><br /><br />Issued to</div></div>
      <?php } ?>
      </td>
      <td>
      <?php if ($_SESSION['p']==4) { ?>
      <div class="active_step_frame"><div class="active_step_head_label">&nbsp;4</div>
      <div class="active_step_label"><br /><br /><br />Finish</div></div>
      <?php } else { ?>
      <div class="de_active_step_frame"><div class="de_active_step_head_label">&nbsp;4</div>
      <div class="de_active_step_label"><br /><br /><br />Finish</div></div>
      <?php } ?>
       </td>
      
      </tr>
      </table>
      </div>
        </td>
    <!--center of tableMain-->
  </tr>
  <tr>
    <td><!--center of tableMain-->
      <?php 
	if ($_SESSION['p']==1) { include("deliverWiz1.php"); }
	if ($_SESSION['p']==2) { include("deliverWiz2.php"); }
	if ($_SESSION['p']==3) { include("deliverWiz3.php"); }
	if ($_SESSION['p']==4) { include("deliverWiz4.php"); }
	if ($_SESSION['p']==5) { include("deliverWiz5.php"); }
    ?></td>
  </tr>
</table>
</div>

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

</body>
