<!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" />
<!--jscript-->
<script language="JavaScript" src="../jscript/go_to_url.js"  type="text/javascript"></script> 

</head>

<body>
<?php 
include ("../navigation/header.php");
$page_name = "HR-time recording";

$page_name = "HR-time recording";
include ("../navigation/access.php");


$today = date("Y-m-d");

$table_name1 = $_SESSION['db_prefix']."_employee";
$table_name2 = $_SESSION['db_prefix']."_time_record";


$record_query = "SELECT $table_name2.emp_id, emp_no, emp_first_name, emp_last_name, time_keeping  FROM $table_name1, $table_name2  WHERE $table_name1.emp_id = $table_name2.emp_id AND (status='N' OR status='U') AND checked='0' AND $table_name2.date = '".$_SESSION['record_date']."'  ORDER BY emp_no";

$record_result = execsql($record_query);
$record_num = mysql_num_rows($record_result);
if ($record_num==0) {
	$employee="No employees to be entered anymore";
	$emp_id = "";
	$emp_no = "";
	$time_keeping = "";
	
}
else {
	$message="";
    $emp_id = mysql_result($record_result, 0, "emp_id");
	$emp_no = mysql_result($record_result, 0, "emp_no");
    $employee = mysql_result($record_result, 0, "emp_first_name")." ".mysql_result($record_result, 0, "emp_last_name");
	$time_keeping = mysql_result($record_result, 0, "time_keeping");
}



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

<div class="main_frame">
<div class="page_head_frame">
        <table width="630" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="385"><label class="label_page_head">Time recording</label></td>
            <td align="right">&nbsp;</td>
          </tr>
        </table>
      </div>

<div class="page_middle_frame">
   <div class="page_inside_frame"></div>

</div>






</div>

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


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

</body>
</html>