<?php

$page_security = 'SA_JOB_CARD_ACTIVITIES_INQ';
$path_to_root = "../..";

include_once($path_to_root . "/includes/db_pager.inc");
include_once($path_to_root . "/includes/session.inc");
include_once($path_to_root . "/includes/ui/ui_input.inc"); 
include_once($path_to_root . "/services/includes/ui/job_activities_ui.inc"); 
include_once($path_to_root . "/services/includes/db/job_activities_db.inc"); 
include_once($path_to_root . "/includes/ui/ui_lists_custom.inc"); 
include_once($path_to_root . "/includes/ui/ui_view_custom.inc"); 

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

page(_($help_context = "Job Card Activities Inquiry"), false, false, "", $js);

start_form();

    start_table(TABLESTYLE_NOBORDER);
        start_row();
            ref_cells(_("Job Card #:"), 'jo_id', '', null, '', true); 
            value_list_cells('Activity Type:', 'activity_type', 'JOB_ACTIVITY_TYPES', null, '', true);
            date_cells(_("From Date:"), 'from_date', null, null, 0, -1);
            date_cells(_("To Date:"), 'to_date');
            submit_cells('Search', _("Search"),'',_('Search'), 'default');
        end_row();

    end_table(1);
    
    display_job_activities_inquiry($_POST['jo_id'], $_POST['activity_type'], $_POST['from_date'], $_POST['to_date']);

end_form(2);
end_page();

?>