<head>
<!--jscript-->
<script language="JavaScript" src="../jscript/numbers_only.js"  type="text/javascript"></script>  

</head>
<?php 
$page_name = "HR-new employee";
include ("../navigation/access.php");

if ($permission_num==1) {
	 
	?>
    

<?php include('../include/wait.php') ?>

<body onLoad="MM_showHideLayers('wait','','hide')" onFocus="MM_showHideLayers('wait','','hide');">

<link href="../css/main.css" rel="stylesheet" type="text/css" />
<div class="wizard_page_middle_frame">
<form id="form1" name="form1" method="POST" action="employeeWizbase.php?p=1&s=1">
  <table width=595 border="0" align="center" cellpadding="10" cellspacing="0" bordercolor="#0066FF" border-collapse="collapse">
    <tr>
      <td width="525" height="243" valign="top" ><?php if ($_SESSION['error']==1) { ?>
        <div class="wizard_frame"><img src="../images/exclamation_mark_green_small.png" width="20" height="32">&nbsp;&nbsp;&nbsp;&nbsp;
          <label class="label_std">An employee with the name "<?php echo $_SESSION['first_name']." ".$_SESSION['last_name']?>" allready exists, please use another name.</label>
        </div>
        <?php } ?>
		<?php if ($_SESSION['error']==2) { ?>
        <div class="wizard_frame"><img src="../images/exclamation_mark_green_small.png" width="20" height="32">&nbsp;&nbsp;&nbsp;&nbsp;
          <label class="label_std">Employee number "<?php echo $_SESSION['emp_no'] ?>" is allready used, please use another number.</label>
        </div>
        <?php 
	// $_SESSION['gender'] = "";
//	 $_SESSION['birth_date'] = date('Y-m-d');
//	 $_SESSION['id_number'] = "";
//	 $_SESSION['marital_status'] = "";
//	 $_SESSION['bag_box'] = "";
//	 $_SESSION['box_no'] = "";
//	 $_SESSION['post_place'] = "";
//	 $_SESSION['phys_address'] = "";
//	 $_SESSION['phys_place'] = "";
//	 $_SESSION['country'] = "";
//	 $_SESSION['phone'] = "";
//	 $_SESSION['cell'] = "";
//	 $_SESSION['email'] = "";
//	 $_SESSION['emergency_name'] = "";
//	 $_SESSION['emergency_phone'] = "";
//	 $_SESSION['employ_date'] = date('Y-m-d');
//	 $_SESSION['position'] = "";
//	 $_SESSION['department'] = "";
//	 $_SESSION['company'] = "";
//	 $_SESSION['rate'] = "";
//	 $_SESSION['citizen'] = "";
//	 $_SESSION['nationality'] = "";
//	 $_SESSION['work_permit'] = "";
//	 $_SESSION['exp_work_permit'] = date('Y-m-d');
//	 $_SESSION['clothing_size'] = "";
//	 $_SESSION['shoe_size'] = "";
//	 $_SESSION['bank'] = "";
//	 $_SESSION['branch'] = "";
//	 $_SESSION['bank_account'] = "";
//	 $_SESSION['notes'] = "";
	 
	 } ?>
     
        <div class="wizard_frame">
          <label class="label_std">Employee number:</label>&nbsp;
          <label class="star">*</label>
&nbsp;&nbsp;&nbsp;<input name="emp_no_text" type="text" value="<?php echo $_SESSION['emp_no'] ?>" onKeyPress="return numbersonly(this, event)">
          <br>
          <br>
<label class="label_std">What is the employee's name?</label>
            <label class="star"> *</label>
            <br />
            
            <br />
            <label class="label_std">First name:</label>
            <input name="first_name_text" type="text" id="first_name_text" class="text200" onBlur="capitalize(this)" value="<?php echo $_SESSION['first_name'] ?>" "this.value='';" />
            &nbsp;&nbsp;
            <label class="label_std">Last name:</label>
            <input name="last_name_text" type="text" id="last_name_text" class="text200" onBlur="capitalize(this)" value="<?php echo $_SESSION['last_name'] ?>" "this.value='';" />
            <br>
            <input name="error" type="hidden" id="error" value="0" />
            <br>
            <br>
            <br>
            <input type="radio" name="group" value="E" id="group_0">
                Employee
                <input type="radio" name="group" value="M" id="group_1">
                Management
        </div></td>
    </tr>
    <tr>
      <td>
      <div class="page_inside_frame">
      <table width="660" height="50" align="left"  id="table_button_bar">
          <tr>
            <td width="117">&nbsp;</td>
            <td width="115">
              <input name="p" type="hidden" id="p" value="1" />
              <input name="s" type="hidden" id="s" value="1" />
            </td>
            <td width="99">&nbsp;</td>
            <td width="125"><input name="cancelbutton" type="button" class="imagebutton" id="cancelbutton" onClick="needToConfirm = false; cancel_confirmation(1, '../hr_module/hr_main.php?date=0');" value="Cancel" /></td>
            <td width="110"><input type="submit" name="next_button" class="imagebutton" value="Next" onClick="needToConfirm = false;  MM_showHideLayers('wait','','show');"/></td>
          </tr>
      </table>
      </div></td>
    </tr>
  </table>
 </form>
<!--form validation-->
<script language="JavaScript" type="text/javascript" xml:space="preserve">
  var frmvalidator  = new Validator("form1");
  frmvalidator.EnableMsgsTogether();
  frmvalidator.addValidation("emp_no_text","req","- employee number.");
  frmvalidator.addValidation("first_name_text","req","- first name of the employee.");
  frmvalidator.addValidation("last_name_text","req","- last name of the employee.");
  frmvalidator.addValidation("group","selone","- employee or management.");
</script>

</div>
  
<?php } else { 
    $_SESSION['denied_return'] = "hr_module/hr_main.php?date=";	?>
	<body onLoad="needToConfirm = false; accessdenied(); return false">
</body>
<?php }
?>

<html>