<?php
include("../include/session.php");
if(!$session->isRadstoneReceptionUser() && !$session->isAdmin() && !$session->isRadstoneStoreUser()){
	header("Location: ../HR/employeeMenu.php");
}else{
	include "../header.php";
//	include("../include/db.php");
	require_once('classes/tc_calendar.php');
	$q = "SELECT empId, empFName, empLName FROM employees ORDER BY empFName ASC";
	$arrId = array();
	$arrName = array();
	$result = execsql($q);
	$num = mysql_num_rows($result);
	$b = 0;
	while($b < $num){
		$arrId[mysql_result($result, $b, "empId")] = mysql_result($result, $b, "empFName") ." ". mysql_result($result, $b, "empLName");
		$b++;
	}
	?>
<link
	href="calendar.css" rel="stylesheet" type="text/css" />
<script
	language="javascript" src="../include/calendar.js"></script>
<style type="text/css">
<!--
.style1 {
	font-size: small;
	font-family: Arial, Helvetica, sans-serif;
}
.style2 {
	color: #0033FF;
	font-size: large;
	font-weight: bold;
	font-family: Arial, Helvetica, sans-serif;
}
-->
</style>
<link href="../css/all.css" rel="stylesheet" type="text/css" />
<script type="text/JavaScript">
<!--
function MM_popupMsg(msg) { //v1.0
  alert(msg);
}
//-->
</script>
<div class="headerbox">Employee details</div><br /><br /><br />
<form name="form">
	Select an Employee to show personal sheet:&nbsp;&nbsp;
	<select name="URL" onchange="window.location.href= this.form.URL.options[this.form.URL.selectedIndex].value">
			<option value="">select</option>
			<?php 
			foreach($arrId as $key=>$value){
				echo "<option value=\"searchAndDisplayE.php?empId=$key\">$value</option>";	
			}?>
						

  </select>
</form>



<p>or select a pre defined list below:
<p><img src="../../Images/Employee_Search_Menu.jpg" width="380" height="150" border="0" usemap="#Map" />
<map name="Map" id="Map"><area shape="rect" coords="23,42,177,66" href="employeeList.php" />
<area shape="rect" coords="185,54,340,76" href="employeeSizeList.php" />

<?php if($session->isAdmin() || $session->isRadstoneReceptionUser()) { ?>
<area shape="rect" coords="21,102,177,128" href="employeeBankList.php" />
<?php } else { ?>
<area shape="rect" coords="21,102,177,128" href="#" onclick="MM_popupMsg('Not allowed.')" />
<?php } ?>
<?php if($session->isAdmin() || $session->isRadstoneReceptionUser()) { ?>
<area shape="rect" coords="183,119,340,142" href="employeeRate.php" />
<?php } else { ?>
<area shape="rect" coords="183,119,340,142" href="#" onclick="MM_popupMsg('Not allowed')" />
<?php } ?>
</map>
<p>
  <?php
	include "../footer.php";
}
?>
<p>
<strong></strong>
<p>&nbsp;</p>
