<?php
include ("../include/session.php");
if (!$session->logged_in) {
	header("Location: ../../main.php");
} else {
	include ("../header.php");
//	include ("../include/db.php");
	}

	
	
	$query = "SELECT empID, empFName, empLName, empIDNo, empRate FROM nam_employees ORDER BY empLName Asc";
	$result = mySQL_query($query) or die ("Error in query:   $Query . * ". mySQL_error());
	$i = 0;
	$num = mysql_num_rows($result);
	
	
	
?>
<link href="../css/styles.css" rel="stylesheet" type="text/css" />
<link href="../css/all.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style6 {font-size: small;
	font-family: Arial, Helvetica, sans-serif;
}
.style9 {font-size: x-small}
.style10 {
	font-size: small;
	font-weight: bold;
}
-->
</style>
 
<div class="headerbox">Employee rates</div>
<div class="menubox"><div align="right"><a href="employeeList.php"><img src="../../Images/Employee list_btn.png" width="110" height="25" border="0" /></a></div>      <div align="right"><span class="style6"><a href="employeeSizeList.php"><img src="../../Images/Size_list_btn.png" alt="." width="110" height="25" border="0" /></a><a href="employeeBankList.php"></a></span></div>      <div align="right"><a href="employeeRate.php"><span class="style6">
        <?php if($session->isAdmin() || $session->isRadstoneReceptionUser()){
			?>
    </span></a><a href="employeeBankList.php"><img src="../../Images/Bank_list_btn.png" alt=" " width="110" height="25" border="0" /></a></div>
      <div align="right"><a href="searchAndDisplay.php"><img src="../../Images/employees_back_btn.png" width="110" height="25" border="0" /></a>
        <input name="image" type ="image" onclick="JavaScript:printPreviewDiv('top-bar');" src="../../Images/print_btn.png" alt="Click  to print" align="right" width="75" height="25" border ="0" />
      </a></div> 
</div> <?php } ?>
    <div class="subheaderbox">
      Employee rates list  as per : <?php echo date("d-m-Y");
?>
      <br />Number in list:<?php echo $num;?></div><br /><br /><br /><br /><br />


<br />
    <table border="0" align="left" cellpadding="0" cellspacing="0"
	class="rowstyle-alt colstyle-alt no-arrow" id="test1">
	<thead>
		<tr>
			<th class="sortable-text"><div align="left">Name, First Name</div></th>
			<th class="sortable-numeric">ID Number</th>
			<th class="sortable-numeric">Rate</th>
		</tr>
	</thead>
	<tbody>
	<?php 
	while ($i < $num) {
	    $b0 = mysql_result($result, $i, "empID");
		$b1 = mysql_result($result, $i, "empLName");
	    $b2 = mysql_result($result, $i, "empFName");
	    $b3 = mysql_result($result, $i, "empIDNo");
	    $b4 = mysql_result($result, $i, "empRate");
		
	?>
	
	<tr class="alt">
		<td><a href="searchAndDisplayE.php?id=<?php echo$b0?>">  <?php echo $b1. ", " .$b2 ?></td>
		<td><?php echo $b3 ?></td>
		<td><?php echo $b4 ?></td>
		
	</tr>
	<?php 
	$i++;
	}
	?>
	
		
	</tbody>
	
</table>

	<?php
	include("../footer.php");

?>


