<?php
/**********************************************************************
***********************************************************************/

$page_security = 'SA_PROJECT_STATUS_VIEW';

if (!@$_GET['popup'])
    $path_to_root = "../..";
else	
    $path_to_root = "../..";

include_once($path_to_root . "/includes/session.inc");
include_once($path_to_root . "/includes/ui.inc");
include_once($path_to_root . "/projects/includes/db/employee_projects_daily_view_db.inc");
include_once($path_to_root . "/projects/includes/db/projects_db.inc"); 
include_once($path_to_root . "/projects/includes/ui/employee_projects_daily_view_ui.inc"); 
include_once($path_to_root . "/payroll/includes/db/employees_db.inc"); 
include_once($path_to_root . "/payroll/includes/db/calendars_db.inc"); 

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

page(_($help_context = "Employees Projects Daily View"), false, false, "", $js);

simple_page_mode(true);

global $Ajax;

start_form();

start_table(TABLESTYLE_NOBORDER);
    start_row(); 
        employees_simple_list_cells(_("Employee:"), 'employee_code', null, '', true);
    end_row();
end_table();
start_table(TABLESTYLE_NOBORDER);
    start_row();        
        date_cells("From Date:", "from_date", '', null, -21);      
        date_cells("To Date:", "to_date", '', null, +1);
        submit_cells('SearchOrders', _("Display"),'',_('Search'), 'process');
    end_row();
end_table(1);

$Ajax->activate('proj_boq_item_status');
div_start('proj_boq_item_status');
    if (isset($_POST['SearchOrders'])) {
        display_employee_projects_daily_view(get_post('employee_code'), get_post('from_date'), get_post('to_date'));
    }
div_end();

end_form(2);
end_page(@$_GET['popup'], false, false);

?>