Example #1
0
 function run($reportID, $lStartRec = null, $lRecsPerPage = null)
 {
     //---------------------------------------------------------------------
     //
     //---------------------------------------------------------------------
     if (!bTestForURLHack('allowExports')) {
         return;
     }
     $displayData = array();
     $this->load->helper('reports/report_util');
     $this->load->dbutil();
     $this->load->helper('download');
     if (!isset($_SESSION[CS_NAMESPACE . 'Reports'][$reportID])) {
         $this->session->set_flashdata('error', 'The report you requested is no longer available. Please run the report again.');
         redirect_Reports();
     }
     $sRpt = $_SESSION[CS_NAMESPACE . 'Reports'][$reportID];
     $sRpt->timeStamp = time();
     modelLoadViaRptType($this, $sRpt);
     $strExport = $this->strExportPage($sRpt);
     force_download($this->strExportFN($sRpt), $strExport);
 }
 function run($reportID, $lStartRec = null, $lRecsPerPage = null, $v1 = null, $v2 = null, $v3 = null)
 {
     //---------------------------------------------------------------------
     //
     //---------------------------------------------------------------------
     $displayData = array();
     $this->load->helper('reports/report_util');
     $this->load->model('reports/mreports', 'clsReports');
     $displayData['contextSummary'] = '';
     if (!isset($_SESSION[CS_NAMESPACE . 'Reports'][$reportID])) {
         $this->session->set_flashdata('error', 'The report you requested is no longer available. Please run the report again.');
         redirect_Reports();
     }
     $sRpt = $_SESSION[CS_NAMESPACE . 'Reports'][$reportID];
     $sRpt->timeStamp = time();
     // clear out stale reports
     if (rand(1, 10) % 10 == 1) {
         $this->testStaleReports();
     }
     modelLoadViaRptType($this, $sRpt);
     //---------------------------------------------------
     // for screen reports, set the record navigation
     //---------------------------------------------------
     $this->screenRpt($reportID, $sRpt, $lStartRec, $lRecsPerPage, $v1, $v2, $v3);
 }