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

include($path_to_root . "/includes/session.inc");
include($path_to_root . "/includes/ui/ui_input.inc"); 
include_once($path_to_root . "/dashboard/includes/ui/view_dashboard_project_cash_flow_ui.inc"); 
include_once($path_to_root . "/dashboard/includes/db/view_dashboard_project_cash_flow_db.inc"); 
include_once($path_to_root . "/dashboard/includes/db/dashboard_project_cash_flow_db.inc"); 
include_once($path_to_root . "/projects/includes/db/projects_db.inc"); 

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

page(_($help_context = "Dashboard Project Cash Flow View"), true, false, "", $js);

$from_date = $to_date = '';
$type = $project_id = 0;

if (isset($_GET['pid'])) {
    $project_id = $_GET['pid'];
}
if (isset($_GET['type'])) {
    $type = $_GET['type'];
}
if (isset($_GET['from_date'])) {
    $from_date = $_GET['from_date'];
}
if (isset($_GET['to_date'])) {
    $to_date = $_GET['to_date'];
}

dashboard_view_project_cash_flow($project_id, $type, $from_date, $to_date);

end_page(true, false, false, DASH_SC_PROJECT_CASH_FLOW, $_GET['type']);

?>