<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<!--style sheets-->
<link rel="stylesheet" type="text/css" href="../css/print.css" />
<script type="text/javascript" src="../jscript/tablesort.js"></script>


<?php
include('../include/session.php');
$today = date("Y-m-d");

$table_name2 = $_SESSION['db_prefix']."_employee";
$employee_query = "SELECT emp_id, emp_no, emp_first_name, emp_last_name, id_number, birth_date, employ_date,  gender, time_keeping, time_zone FROM $table_name2 WHERE end_employ_date > '".$today."' AND premature_end_date > '".$today."' ";
$employee_result = mySQL_query($employee_query);
$employee_num = mysql_num_rows($employee_result);	

?>
<?php 
$report_name='Employees list';
include('../include/print_report_header.php');?>
</head>

<body onload="window.print();" onFocus="window.close();">
   
<div class="print_standard_frame">       
      
          <table width="683" id="print_tableprint" class="sortable-onload-1 rowstyle-alt no-arrow " >
            <thead>
            <tr>
              <th>No</th>
              <th class="sortable-text">Name</th>
              <th>Id number</th>
              <th>Date of birth</th>
              <th>Empl. date</th>
              <th>Gender</th>
              <th>Time keeping</th>
              <th>Time zone</th>
              </tr>
          </thead>
            <?php 
$i=0;
while ($i<$employee_num) {
	$a =  mysql_result($employee_result, $i, "emp_id");
	$a0 = mysql_result($employee_result, $i, "emp_first_name");
	$a1 = mysql_result($employee_result, $i, "emp_last_name");
	$a2 = mysql_result($employee_result, $i, "id_number");
	$a3 = mysql_result($employee_result, $i, "birth_date");
	$a4 = mysql_result($employee_result, $i, "employ_date");
	$a6 = mysql_result($employee_result, $i, "gender");
	$a7 = mysql_result($employee_result, $i, "time_keeping");
	$a8 = mysql_result($employee_result, $i, "time_zone");
	$a9 = mysql_result($employee_result, $i, "emp_no");
	?>
            <tr>
              <td width="31" align="left"><?php echo $a9 ?>&nbsp;</td>
              <td width="198" align="left"><a href="employee_details.php?emp_id=<?php echo $a?>" onMouseover="ddrivetip(' Click for employee details.', 150)"; onMouseout="hideddrivetip()"><?php echo $a0." ".$a1 ?></a></td>
              <td width="71" align="left"><?php echo $a2 ?></td>
              <td width="86" align="left"><?php echo date("d-m-Y", strtotime($a3))?></td>
              <td width="86" align="left"><?php echo date("d-m-Y", strtotime($a4)) ?></td>
              <td width="72" align="left"><?php echo $a6 ?></td>
              <td width="55" align="left"><?php echo $a7 ?></td>
              <td width="48" align="left"><?php echo $a8 ?></td>
            </tr>
            <?php
  $i++;
}
?>
          </table>
          
</div>     




</body>
</html>