<?php
include("../include/session.php");
if(!$session->isAdmin()) {
	header("Location: ../main.php");
}
else {
		include("../reportHeader.php");
//	include("../include/db.php");
	$section = mysql_real_escape_string($_POST['empSection']);
	$q = "SELECT * FROM nam_employees WHERE empSection = '$section'";
	$result = execsql($q);
	$num = mysql_num_rows($result);
	$i = 0;

	?>
<script
	type="text/javascript" src="classes/tablesort.js"></script>

<table id="test1" cellpadding="0" cellspacing="0" border="0"
	class="rowstyle-alt colstyle-alt no-arrow">
	<thead>
		<tr>
			<th class="sortable-numeric">Employee Id</th>
			<th class="sortable-text">First Name</th>
			<th class="sortable-text">Last Name</th>
			<th class="sortable-text">Age</th>
			<th class="sortable-date-ymd">Date Employed</th>
			<th class="sortable-text">Position</th>
			<th class="sortable-numeric">Rate of Pay</th>

		</tr>
	</thead>
	<?php
	while($i < $num){
		$f1=mysql_result($result, $i, "empId");
		$f2=mysql_result($result,$i,"empFName");
		$f3=mysql_result($result,$i,"empLName");
		//			$f4=mysql_result($result,$i,"empContact");
		$f5=mysql_result($result,$i,"empAge");
		//		    $f6=mysql_result($result, $i, "empSex");
		$f7=mysql_result($result, $i, "empPos");
		//		    $f8=mysql_result($result, $i, "empSection");
		$f9=mysql_result($result, $i, "empDateEmp");
		$f10=mysql_result($result, $i, "empRate");
		//		    $f11=mysql_result($result, $i, "vioDate");

		?>


	<tbody>
		<tr>
			<td><a href="../HR/searchAndDisplayE.php?id=<?php echo $f1?>"><?php echo $f1?></a></td>
			<td><?php echo $f2?></td>
			<td><?php echo $f3?></td>
			<td><?php echo $f5?></td>
			<td><?php echo $f9?></td>
			<td><?php echo $f7?></td>
			<td><?php echo $f10?></td>

		</tr>
		<?php
		$i++;
	}
	?>
	</tbody>
</table>
	<?php
	include("../footer.html");
}
?>