<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php
include('../include/session.php');
include ("../navigation/header.php");
include ("../navigation/hr_sidebar.php");

	
	$s = $_GET['s'];
	$p = $_GET['p'];
	$error = $_SESSION['error'];
	$_SESSION['p']=$p;
	$_SESSION['s']=$s;
	
	
	if (isset($_POST['prev_button']) )
	   {
		 $_SESSION['p']= $_SESSION['p']-1;
	   }
		 
	if (isset($_POST['next_button']) )
	  {
		$_SESSION['p']=$_SESSION['p']+1;
	  }
	
		
	
	if ($s==1) {
		 $_SESSION['emp_no'] = $_POST['emp_no_text'];
		 $_SESSION['first_name'] = $_POST['first_name_text'];
		 $_SESSION['last_name'] = $_POST['last_name_text'];
		 $_SESSION['group'] = $_POST['group'];
	}
		
	if($s==2) {
	 $_SESSION['gender'] = $_POST['gender_select'];
	 $_SESSION['birth_date'] = $_POST['birth_date'];
	 $_SESSION['id_number'] = $_POST['id_number_text'];
	 $_SESSION['marital_status'] = $_POST['marital_status_select'];
	 $_SESSION['employ_date'] = $_POST['employ_date'];
	 $_SESSION['position'] = $_POST['position_select'];
	 $_SESSION['rate'] = $_POST['rate_text'];
	 $_SESSION['allowance'] = $_POST['allowance_text'];
	 $_SESSION['scale'] = $_POST['scale_select'];
	 $_SESSION['department'] = $_POST['department_select'];
	 $_SESSION['pay_unit'] = $_POST['pay_unit_select'];
	 $_SESSION['pay_period'] = $_POST['pay_period_select'];
	 $_SESSION['leave_days'] = $_POST['leave_select'];
	 $_SESSION['time_keeping'] = $_POST['time_keeping_select'];
	 $_SESSION['time_zone'] = $_POST['time_zone'];
	 
	 $_SESSION['nationality'] = $_POST['nationality_select'];
	 $_SESSION['expiry_date'] = $_POST['expiry_date'];
	 
	 if(isset($_POST['exp_checkbox']) ) { $_SESSION['exp'] = 'yes'; } else { $_SESSION['exp'] = 'no'; }
	 if(isset($_POST['exp_checkbox']) ) { 
	     $_SESSION['permit_date'] = $_POST['permit_date'];
	     $_SESSION['permit'] = $_POST['permit_text'];
	 }
	 if(isset($_POST['cv_checkbox']) ) { $_SESSION['cv'] = 'yes'; } else { $_SESSION['cv'] = 'no'; }
	 if(isset($_POST['reference_checkbox']) ) { $_SESSION['file_reference'] = 'yes'; } else { $_SESSION['file_reference'] = 'no'; }
	};
	
	if($s==3) {
	 $_SESSION['bag_box'] = $_POST['bag_box_select'];
	 $_SESSION['box_no'] = $_POST['box_no_text'];
	 $_SESSION['post_place'] = $_POST['post_place_select'];
	 $_SESSION['phys_address'] = $_POST['phys_address_text'];
	 $_SESSION['phys_place'] = $_POST['phys_place_select'];
	 $_SESSION['country'] = $_POST['country_select'];
	 $_SESSION['phone'] = $_POST['phone_text'];
	 $_SESSION['cell'] = $_POST['cell_text'];
	 $_SESSION['email'] = $_POST['email_text'];
	 $_SESSION['emergency_name'] = $_POST['emergency_name_text'];
	 $_SESSION['emergency_phone'] = $_POST['emergency_phone_text'];
	 
	};
	
	if($s==4) {
	 $_SESSION['clothing_size'] = $_POST['clothing_size_select'];
	 $_SESSION['shoe_size'] = $_POST['shoe_size_select'];
	 $_SESSION['bank'] = $_POST['bank_select'];
	 $_SESSION['branch'] = $_POST['branch_select'];
	 $_SESSION['bank_account'] = $_POST['bank_account_text'];
	 $_SESSION['notes'] = $_POST['notes_text'];
	}
	
	?>
    
<!--style sheets-->
<link href="../css/main.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="../css/wizard.css" />
<link rel="stylesheet" href="../window/dhtmlwindow.css" type="text/css" />
<link rel="stylesheet" href="../window/modal.css" type="text/css" />
<link href="../css/wait.css" rel="stylesheet" type="text/css">

<!--jscript-->
<script type="text/javascript" src="../window/dhtmlwindow.js"></script>
<script type="text/javascript" src="../window/modal.js"></script>
<script type="text/javascript" src="../jscript/jquery.1.4.2.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>
<script language="JavaScript" src="../jscript/gen_validatorv4.js"  type="text/javascript" xml:space="preserve"></script>   
<script language="JavaScript" src="../jscript/lower_case.js"  type="text/javascript"></script>
<script language="JavaScript" src="../jscript/upper_case.js"  type="text/javascript"></script>  
<script language="JavaScript" src="../jscript/capitalize_textbox.js"  type="text/javascript"></script> 
<script language="JavaScript" src="../jscript/numbers_only_decimal.js"  type="text/javascript"></script> 


<div class="main_frame" >

<div class="page_head_frame">
<label class="label_page_head">New Employee</label><label class="label_page_head_2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $_SESSION['first_name']." ".$_SESSION['last_name']?></label>
</div>
<br />
<br />
<br>
<br />
     
      <table >
      <tr>
      <td >
      <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>
      <div class="active_step_label">
      Name</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">
      Name</div>
      <?php } ?>
      </td>
      <td>
      <?php if ($_SESSION['p']==2) { ?>
      <div class="active_step_frame"><div class="active_step_head_label">&nbsp;2</div></div>
      <div class="active_step_label">
      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">
      Details</div>
      <?php } ?>
     </td>
      <td>
      <?php if ($_SESSION['p']==3) { ?>
      <div class="active_step_frame"><div class="active_step_head_label">&nbsp;3</div></div>
      <div class="active_step_label">
      Address</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">
      Address</div>
      <?php } ?>
      </td>
      <td>
      <?php if ($_SESSION['p']==4) { ?>
      <div class="active_step_frame"><div class="active_step_head_label">&nbsp;4</div></div>
      <div class="active_step_label">
      Additional</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">
      Additional</div>
      <?php } ?>
       </td>
      <td>
      <?php if ($_SESSION['p']==5) { ?>
      <div class="active_step_frame"><div class="active_step_head_label">&nbsp;5</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;5</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("employeeWiz1.php"); }
	if ($_SESSION['p']==2) { include("employeeWiz2.php"); }
	if ($_SESSION['p']==3) { include("employeeWiz3.php"); }
	if ($_SESSION['p']==4) { include("employeeWiz4.php"); }
	if ($_SESSION['p']==5) { include("employeeWiz5.php"); }
    ?>
    </td>
    </tr>
    </table>
    </div>
    





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

