<?php
include("../include/session.php");
if(!$session->isAdmin() && !$session->isRadstoneReceptionUser()){
	header("Location: ../Store/productionMenu.php");
}
else {
//	include("../../include/db.php");
	$d = date("d");
	$m = date("m");
	$y = date("Y");
	require_once('classes/tc_calendar.php');
	include("../reportHeader.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[$b] = mysql_result($result, $b, "empId");
		$arrName[$b] = 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>
<script
	type="text/javascript" src="../include/tablesort.js"></script>



<script language="javascript"
	src="calendar.js"></script>
<h3>Employee Reporting</h3>
<table>
	<form action="empSearch.php" method="Post">
	
	
	<tr>
		<td id="row1">Employee Name:</td>
		<td><select name="empId">
			<option value="">Choose Me</option>
			<?php
			for ($i = 0 ; $i < count($arrId) ; $i++) {

				echo "<option value=". "\"". $arrId[$i]. "\"" .">" . $arrName[$i] . "</option>";
			}

			?>
		</select></td>
		<td><input type="submit" name="submitok" value="   OK   " /></td>
	</tr>
	</form>

	<form action="secSearch.php" method="Post">
	
	
	<tr>
		<td>Search Via Section:</td>
		<td><select name="empSection">
			<option value="Office Staff">A: Office Staff</option>
			<option value="Workshop/Stones">B: Workshop / Stones</option>
			<option value="Aggregate/Mixing">C: Agrregate / Mixing</option>
			<option value="Extruding/Curing">D: Extruding / Curing</option>
			<option value="Depalleting/Palletting">E: Depalleting / Palletting</option>
		</select></td>
		<td><input type="submit" name="submitok" value="   OK   " /></td>
	</tr>
	</form>

	<form action="posSearch.php" method="Post">
	
	
	<tr>
		<td>Search By Position:</td>
		<td><input name="position" value="" /></td>
		<td><input type="submit" name="submitok" value="   OK   " /></td>
	</tr>
	</form>


	<form action="dateSearch.php" method="Post">
	
	
	<tr>
		<td>Search By Employment Date:</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(2000, 2030);
	 // $myCalendar->dateAllow('2008-05-13', '2010-03-01', false);
		//$myCalendar->setHeight(350);
		//$myCalendar->autoSubmit(true, "form1");
		$myCalendar->writeScript();

		?></td>
	</tr>
	<tr>
		<td>to</td>
		<td><?php
		$myCalendar = new tc_calendar("date2", true);
		$myCalendar->setIcon("../img/iconCalendar.gif");
		$myCalendar->setDate($d, $m, $y);
		$myCalendar->setPath("./");
		$myCalendar->setYearInterval(1970, 2030);
		//$myCalendar->dateAllow('2009-02-20', "", false);
		$myCalendar->writeScript();
			
		?></td>
		<td><input type="submit" name="submitok" value="   OK   " /></td>
	</tr>
	</form>



	<form action="shoeSearch.php" method="POST">
	
	
	<tr>
		<td>Search by shoe size:</td>
		<td><input name="shoe" value="" /></td>
		<td><input type="submit" name="submitok" value="   OK   " /></td>
	</tr>
	</form>
	<form action="overallSearch.php" method="Post"><tr><td>Search By overall size:</td>
	<td><input name="overall" value="" /></td><td><input type="submit" name="submitok"
		value="   OK   " /></td></tr>
	</form>

</table>

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