<?php
/**********************************************************************
***********************************************************************/
$page_security = 'SA_ATTENDANCE_VIEW';
$path_to_root = "../..";

include_once($path_to_root . "/includes/session.inc");
include_once($path_to_root . "/includes/ui.inc");
include_once($path_to_root . "/payroll/includes/db/employee_attendances_db.inc");
include_once($path_to_root . "/payroll/includes/db/employee_attendance_inquiry_db.inc");
include_once($path_to_root . "/payroll/includes/db/employees_db.inc");
include_once($path_to_root . "/admin/db/list_values_db.inc");
include_once($path_to_root . "/payroll/includes/db/employee_shifts_db.inc");
include_once($path_to_root . "/payroll/includes/db/shifts_db.inc");
include_once($path_to_root . "/includes/db/module_settings_db.inc");
include_once($path_to_root . "/payroll/includes/ui/view_employee_attendance_ui.inc"); 

$js = "";
$js .= get_js_open_window(900, 500);
$js .= get_js_date_picker();

page(_($help_context = "View Employee Attendance"), true, false, "", $js);

//-------------------------------------------------------------------------------------------------

if ($_GET['date']) {
    $date = $_GET['date'];
}


function get_shifts_array() {
    $shifts_array = array();
    
        $shifts = get_all_list_values('EMPLOYEE_SHIFTS');
            while ($row = db_fetch($shifts)) {
                $shifts_array[$row['id']] = $row['value_name'];
            }
            
            return $shifts_array;
}

br();
display_employees_attendance_details($date);

end_page(true, false, false, ST_POINTSUPDATE, 1);

?>