Exemplo n.º 1
0
}
if (count(@$HTTP_POST_VARS["display_sections"]) < 1) {
    $HTTP_POST_VARS["display_sections"] = array_keys(Customer_Stats_Report::getDisplaySections());
    unset($HTTP_POST_VARS["display_sections"][4]);
}
$support_levels = array('Aggregate' => 'Aggregate');
$grouped_levels = Customer::getGroupedSupportLevels($prj_id);
foreach ($grouped_levels as $level_name => $level_ids) {
    $support_levels[$level_name] = $level_name;
}
if (count(@$HTTP_POST_VARS["support_level"]) < 1) {
    $HTTP_POST_VARS["support_level"] = array('Aggregate');
}
// XXX: internal only - Remove all mentions of InnoDB
$prj_id = Auth::getCurrentProject();
$tpl->assign(array("has_support_levels" => Customer::doesBackendUseSupportLevels($prj_id), "project_name" => Auth::getCurrentProjectName(), "support_levels" => $support_levels, "support_level" => @$HTTP_POST_VARS["support_level"], "start_date" => $start_date, "end_date" => $end_date, "sections" => Customer_Stats_Report::getDisplaySections(), "display_sections" => $HTTP_POST_VARS["display_sections"], "split_innoDB" => @$HTTP_POST_VARS["split_innoDB"], "include_expired" => @$HTTP_POST_VARS["include_expired"], "graphs" => Customer_Stats_Report::getGraphTypes()));
// only set customers if user has role of manager or above
if (Auth::getCurrentRole() >= User::getRoleID('manager')) {
    $tpl->assign(array("customers" => Customer::getAssocList($prj_id), "customer" => @$HTTP_POST_VARS["customer"]));
}
// loop through display sections
$display = array();
foreach ($HTTP_POST_VARS["display_sections"] as $section) {
    $display[$section] = 1;
}
$tpl->assign("display", $display);
if (@$HTTP_POST_VARS["cat"] == "Generate") {
    if ($start_date == "0000-00-00") {
        $start_date = '';
    }
    if ($end_date == "0000-00-00") {