<?php

	include("../include/session.php");
	if(!$session->isRadstoneReceptionUser() && !$session->isAdmin()){
	header("Location: ../HR/employeeMenu.php");
	}else{
//		include("../include/db.php");
		include("../header.php");
		$q = "SELECT empId, empFName, empLName FROM nam_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++;
		}
		
	
?>
	<h3>Modify Employee</h3>
	<form name="form">
	Select an employee:<select name="URL" onchange="window.location.href= this.form.URL.options[this.form.URL.selectedIndex].value">
			<option value="">Choose me</option>
			<?php 
			foreach($arrId as $key=>$value){
				echo "<option value=\"findModify.php?empId=$key\">$value</option>";	
			}?>
						

		</select>
	</form>

<?php
    include "../footer.html";
	}
?>
