<?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/ui/boq_item_status_gantt_chart_ui.inc"); 
include_once($path_to_root . "/projects/includes/db/project_boq_item_details_view_db.inc");
include_once($path_to_root . "/projects/includes/db/project_boq_items_db.inc");
include_once($path_to_root . "/projects/includes/db/work_done_entry_details_db.inc"); 

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

page(_($help_context = "Project Timeline"), false, false, "", $js);

simple_page_mode(true);

global $Ajax;

start_form();

start_table(TABLESTYLE_NOBORDER);
    start_row();
        project_list_cells(_("Project:"), 'project_id', null, _('Select a project'), false);
        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_boq_item_status_gantt_chart(get_post('project_id'), 1);
    }
div_end();

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

?>