示例#1
0
 public function __construct($id)
 {
     $this->db = new DBService();
     $result = $this->db->query("SELECT reportName, reportDatabaseName FROM Report WHERE reportID = '{$id}' LIMIT 1")->fetchRow(MYSQLI_ASSOC);
     $this->id = $id;
     $this->name = $result['reportName'];
     $this->dbname = $result['reportDatabaseName'];
     ReportNotes::init($this->dbname);
     if (isset($_REQUEST['titleID']) && $_REQUEST['titleID'] !== null && $_REQUEST['titleID'] !== '') {
         $this->titleID = $_REQUEST['titleID'];
         FormInputs::addVisible('titleID', $this->titleID);
     }
     if (isset($_REQUEST['sortColumn'])) {
         $this->sortData['column'] = $_REQUEST['sortColumn'];
     }
     if (isset($_REQUEST['sortOrder'])) {
         $this->sortData['order'] = $_REQUEST['sortOrder'];
     }
     FormInputs::addVisible('reportID', $this->id);
     FormInputs::addHidden('useHidden', 1);
     FormInputs::addHidden('sortColumn', $this->sortData['column']);
     FormInputs::addHidden('sortOrder', $this->sortData['order']);
     Config::init();
     if (Config::$settings->baseURL) {
         if (strpos(Config::$settings->baseURL, '?') > 0) {
             $this->baseURL = Config::$settings->baseURL . '&';
         } else {
             $this->baseURL = Config::$settings->baseURL . '?';
         }
     }
 }
示例#2
0
 public function process()
 {
     if ($this->value !== null && trim("{$this->value}") !== '') {
         $this->value = strtoupper($this->value);
         Parameter::$report->addWhere[$this->addWhereNum] .= " AND " . preg_replace('/PARM/', $this->value, $this->addWhereClause);
         FormInputs::addVisible("prm_{$this->id}", $this->value);
         Parameter::$display .= $this->description();
     }
 }
示例#3
0
 public function process()
 {
     if ($this->value !== null) {
         Parameter::$report->addWhere[0] = '';
         // changed from $add_where. Assumed mistake.
         ReportTable::$maxRows = $this->value;
         FormInputs::addVisible("prm_{$this->id}", $this->value);
         Parameter::$display .= $this->description();
     }
 }
示例#4
0
 public function process()
 {
     if ($this->value !== null) {
         Parameter::$report->addWhere[$this->addWhereNum] .= " AND {$this->addWhereClause}";
         Parameter::$report->applyDateRange($this->value);
         FormInputs::addVisible("prm_{$this->id}", $this->encode($this->value));
         $this->value = $this->value['m0'] . '/' . $this->value['y0'] . '-' . $this->value['m1'] . '/' . $this->value['y1'];
         Parameter::$display .= $this->description();
     }
 }
示例#5
0
 public function process()
 {
     if ($this->value === 'on' || $this->value === 'Y') {
         FormInputs::addVisible("prm_{$this->id}", 'Y');
         Parameter::$display .= $this->description();
         if ($flag = $this->flagName()) {
             Parameter::$report->{$flag} = true;
         }
     }
 }
示例#6
0
 public function process()
 {
     if ($this->value !== null) {
         Parameter::$report->addWhere[$this->addWhereNum] .= " AND " . preg_replace('/PARM/', $this->value, $this->addWhereClause);
         FormInputs::addVisible("prm_{$this->id}", $this->value);
         Parameter::$display .= $this->description();
     } else {
         if (!$this->requiredInd) {
             Parameter::$display .= "<b>{$this->prompt}:</b> all<br/>";
         }
     }
 }