<?php
include("../include/session.php");
if(!$session->isRadstoneReceptionUser() && !$session->isAdmin()){
	header("Location: ../HR/employeeMenu.php");
}else{
	include("../header.php");
	require_once('classes/tc_calendar.php');
		$d = date("d");
	$m = date("m");
	$y = date("Y");
	?>



<script language="javascript">
<!--
function validate() {
var ErrorString='';
	if(document.inputForm.firstName.value==''){
    ErrorString+='Please enter the First name\n';
	}

	if(document.inputForm.empLName.value==''){
    ErrorString+='Please enter the Last name\n';
	}

    if(document.inputForm.empContact.value==''){
		ErrorString+='Please enter the Contact Number\n';
	}


    if(document.inputForm.empSex.value==''){
        ErrorString+='Please enter the Sex\n';
    }

    if(document.inputForm.empIdNo.value==''){
		ErrorString+='Please enter the national ID number\n';
	}

    if(document.inputForm.empPost.value==''){
		ErrorString+='Please enter the Postal address\n';
	}

	if( ErrorString == '' ){
    return true;
     }else{
	alert(ErrorString);
	return false;
	}
}
//-->
</script>
<link
	href="calendar.css" rel="stylesheet" type="text/css" />
<script
	language="javascript" src="../include/calendar.js"></script>
<h3>Add Employee</h3>

<form name="inputForm" method="post" action="addEmployeeOne.php">
<table>
	<tr>
		<td id="row1">First Name:</td>
		<td><input name="firstName" value="" type="text" maxlength="100"
			size="25" /></td>

		<td id="row1">Last Name:</td>
		<td><input name="empLName" value="" type="text" maxlength="100"
			size="25" /></td>
	</tr>

	<tr>
		<td id="row1">Contact Number:</td>
		<td><input name="empContact" value="" type="text"
			maxlength="100" size="25" /></td>
		<td id="row1">Address:</td>
		<td><input name="empPost" value="" type="text" maxlength="100"
			size="25"></td>
	</tr>

	<tr>
		<td id="row1">Date of Birth:</td>
		<td colspan="2"><?php
		$myCalendar = new tc_calendar("date1", true);
		$myCalendar->setIcon("../img/iconCalendar.gif");
		$myCalendar->setDate($d, $m, $y);
		$myCalendar->setPath("./");
		$myCalendar->setYearInterval(1930, 2030);
	 // $myCalendar->dateAllow('2008-05-13', '2010-03-01', false);
		//$myCalendar->setHeight(350);
		//$myCalendar->autoSubmit(true, "form1");
		$myCalendar->writeScript();

		?></td>
	</tr>

	<tr>
		<td id="row1">Sex:</td>
		<td><select name="empSex">
			<option value="">Choose Me</option>
			<option value="Male">Male</option>
			<option value="Female">Female</option>
		</select></td>

		<td id="row1">Omang ID Number:</td>
		<td><input name="empIdNo" value="" type="text" maxlength="100"
			size="25"></td>
	</tr>

	<tr>
		<td id="row1">Citizen:</td>
		<td><select name="empCountry">
			<option value="">Choose Me</option>
			<option value="Yes">Yes</option>
			<option value="No">No</option>
		</select></td>
	</tr>


</table>

<br />
<input type="submit" name="submitok" onclick="return validate();"
	value="   Add Employee   " /></form>
<?php
    include "../footer.php";
}
?>
