<!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 href="../css/main.css" rel="stylesheet" type="text/css" />

<?php
include('../include/session.php');
?>

</head>
<body>
<?php
$_SESSION['current_page']   = "admin";
include ("../navigation/header.php");

$page_name = "AD-user list";
include ("../navigation/access.php");

$table_name = $_SESSION['db_prefix']."_users";
$user_query = "SELECT username  FROM  $table_name WHERE username <> 'system_manager'";
$user_result = mySQL_query($user_query);
$user_num = mysql_num_rows($user_result);


?>


<?php 
if ($permission_num==1) {
	include ("../navigation/admin_sidebar.php");
?>



<div class="main_frame">
  <div class="page_head_frame">
        <table width="600" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="385"><label class="label_page_head">Users</label></td>
            <td align="right">&nbsp;</td>
            </tr>
        </table>
      </div><br />
<div class="page_middle_frame">
     <table width="680" id="table_list" class="sortable-onload-0 rowstyle-alt no-arrow "  >
      <tr>
        <th class="sortable-text">Name</th>
        <th class="sortable-numeric">Id number</th>
        <th class="sortable-date-dmy">Date of birth</th>
        <th class="sortable-date-dmy">Employment date</th>
        <th class="sortable-text">Company</th>
        <th class="sortable-text">Gender</th>
      </tr>
      <?php 
$i=0;
while ($i<$user_num) {
	$a0 = mysql_result($user_result, $i, "username");
	//$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");
	//$a5 = mysql_result($employee_result, $i, "company");
	//$a6 = mysql_result($employee_result, $i, "gender");
	?>
      <tr>
        <td width="103" align="left"><?php echo $a0 ?></td>
        <td width="104" align="left">&nbsp;</td>
        <td width="103" align="left">&nbsp;</td>
        <td width="120" align="left">&nbsp;</td>
        <td width="86" align="left">&nbsp;</td>
        <td width="206" align="left">&nbsp;</td>
      </tr>
      <?php
  $i++;
}
?>
    </table>
    
</div>    
  
</div>


<?php include ('../navigation/side_bar.php'); ?>

<?php } else {
$_SESSION['denied_return'] = "hr_module/hr_main.php?period=day";		
include ("../navigation/hr_sidebar.php");?>
	<body onload="accessdenied(); return false">
	</body>
<?php }
?>

</body>
</html>