Ejemplo n.º 1
0
if ($user_rights['expiration'] != "" && $user_rights['expiration'] < TODAY) {
    exitWithMessage('Your user account has expired for this project.');
    exit;
}
// Check configuration of report store project
$check = LongitudinalReports::checkReportStoreProjectConfig();
if ($check !== true) {
    exitWithMessage('There is a problem with the configuration of the report store project:<br>' . $check);
    exit;
}
// Place all HTML here
$html = "";
## CREATE NEW REPORT
if (isset($_GET['addedit'])) {
    // Hidden dialog for help with filters and AND/OR logic
    $html .= LongitudinalReports::renderFilterHelpDialog();
    // Hidden dialog for error popup when field name entered is not valid
    $html .= RCView::div(array('id' => 'VarEnteredNoExist_dialog', 'class' => 'simpleDialog'), $lang['report_builder_72']);
    // Add the actual "create report" table's HTML at the very bottom since we're doing a direct print. So output the buffer and disable buffering.
    ob_end_flush();
} elseif (!isset($_GET['report_id'])) {
    $html .= RCView::p(array('style' => 'max-width:810px;margin:5px 0 15px;'), $lang['report_builder_117']) . RCView::div(array('id' => 'report_list_parent_div'), LongitudinalReports::renderReportList());
} elseif (isset($_GET['report_id']) && (is_numeric($_GET['report_id']) || in_array($_GET['report_id'], array('ALL', 'SELECTED')))) {
    // Get report name
    $report_name = LongitudinalReports::getReportNames($_GET['report_id'], !$user_rights['reports']);
    // If report name is NULL, then user doesn't have Report Builder rights AND doesn't have access to this report
    if ($report_name === null) {
        $html .= RCView::div(array('class' => 'red'), $lang['global_01'] . $lang['colon'] . " " . $lang['data_export_tool_180']);
    } else {
        // Display progress while report loads via ajax
        $html .= RCView::div(array('id' => 'report_load_progress', 'style' => 'display:none;margin:5px 0 25px 20px;color:#777;font-size:18px;'), RCView::img(array('src' => 'progress_circle.gif', 'class' => 'imgfix2')) . $lang['report_builder_60'] . " \"" . RCView::span(array('style' => 'color:#800000;font-size:18px;'), $report_name) . "\"" . RCView::span(array('id' => 'report_load_progress_pagenum_text', 'style' => 'display:none;margin-left:10px;color:#777;font-size:14px;'), "({$lang['global_14']} " . RCView::span(array('id' => 'report_load_progress_pagenum'), '1') . ")")) . RCView::div(array('id' => 'report_load_progress2', 'style' => 'display:none;margin:5px 0 0 20px;color:#999;font-size:18px;'), RCView::img(array('src' => 'hourglass.png', 'class' => 'imgfix2')) . $lang['report_builder_115']);