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 . '?'; } } }
* ************************************************************************************************************************* */ session_start(); //require 'minify.php'; //ob_start('minify_output'); ob_start(); include_once 'directory.php'; if (isset($_REQUEST['outputType'])) { $outputType = $_REQUEST['outputType']; } else { $outputType = 'web'; } $report = ReportFactory::makeReport($_REQUEST['reportID']); Parameter::setReport($report); //FormInputs::init() and ReportNotes::init(..) are called by Report constructor FormInputs::addHidden('outputType', $outputType); if (!isset($_REQUEST['reportID'])) { error_log("missing reportID; redirecting to index.php"); header("location: index.php"); exit; } if ($outputType === 'web' && isset($_REQUEST['startPage'])) { $startRow = $_REQUEST['startPage']; } else { $startRow = 1; } if ($report->titleID) { Parameter::$display = '<b>Title:</b> ' . $report->getUsageTitle($report->titleID) . '<br/>'; } // loop through parameters foreach ($report->getParameters() as $parm) {