lcm_query($query); // } $ref_tag = "#line"; } if (_request('unselect_col')) { $query = "UPDATE lcm_report\n\t\t\tSET col_src_type = '',\n\t\t\t\tcol_src_name = ''\n\t\t\tWHERE id_report = " . $rep; lcm_query($query); $ref_tag = "#col"; } if (_request('unselect_line')) { $query = "UPDATE lcm_report\n\t\t\tSET line_src_type = '',\n\t\t\t\tline_src_name = ''\n\t\t\tWHERE id_report = " . $rep; lcm_query($query); $ref_tag = "#line"; } if (_request('filecustom')) { if (include_custom_report_exists(_request('filecustom'))) { include_custom_report(_request('filecustom')); $obj = new CustomReportSpecs(); $do_update = false; $query = "UPDATE lcm_report SET "; if ($info = $obj->getReportLine()) { $query .= "line_src_type = '" . $info['type'] . "',\n\t\t\t\t\t\tline_src_name = '" . $info['name'] . "'"; $do_update = true; } if ($info = $obj->getReportCol()) { if ($do_update) { $query .= ", "; } $query .= " col_src_type = '" . $info['type'] . "'"; // Ignore if name not set, or name restricts the choice (ex: keyword that applies to 'case') if (!$info['name'] || substr($info['name'], 0, 4) == 'FOR:') {
$_SESSION['form_data'][$key] = $value; } } //$admin = allowed($case,'a'); } else { // Set default values for the new report //$_SESSION['form_data']['public'] = read_meta('case_default_read'); //$_SESSION['form_data']['pub_write'] = read_meta('case_default_write'); //$admin = true; } } // Input validation if (_session('filecustom')) { if (!preg_match("/^[-_A-Za-z0-9]+\$/", _session('filecustom'))) { $_SESSION['errors']['filecustom'] = htmlspecialchars(_session('filecustom')) . ": " . "Report file name has illegal characters"; } elseif (!include_custom_report_exists(_session('filecustom'))) { $_SESSION['errors']['filecustom'] = htmlspecialchars(_session('filecustom')) . ": " . "Report file does not exist"; } // TRAD if ($_SESSION['errors']['filecustom']) { $_SESSION['form_data']['filecustom'] = ''; } } // Start the page with the proper title if (_session('id_report')) { lcm_page_start(_T('title_rep_edit') . " " . _session('title'), '', '', 'reports_intro'); } else { lcm_page_start(_T('title_rep_new'), '', '', 'reports_intro'); } echo show_all_errors(); if ($_SESSION['form_data']['filecustom']) {