public function renderReport($file, $data = null, $return = false) { $report = new Report(); $filePath = $this->getReportFile($file); $output = $report->load($filePath, $data); if (($layoutFile = $this->getLayoutFile($this->reportLayout)) !== false) { $output = $this->renderFile($layoutFile, array('content' => $output), true); } $output = $this->processOutput($output); $report->createPdf($output); }
} else { $tab = 'reports'; } if ($tab != 'opac') { require_once "../shared/logincheck.php"; } assert('ereg("^[-_A-Za-z0-9]+\\$", $_REQUEST["name"])'); $filename = '../layouts/' . $_REQUEST["name"] . '.php'; if (!is_readable($filename)) { $filename = '../layouts/default/' . $_REQUEST["name"] . '.php'; } assert('is_readable($filename)'); $classname = 'Layout_' . $_REQUEST["name"]; require_once $filename; assert('class_exists($classname)'); $rpt = Report::load($_REQUEST['rpt']); assert('$rpt != NULL'); // Rendering a large layout can take a while. set_time_limit(90); $l = new $classname(); if (method_exists($l, 'paramDefs')) { $defs = $l->paramDefs(); } else { $defs = array(); } if (empty($defs) or isset($_REQUEST['filled'])) { $params = new Params(); $errs = $params->loadCgi_el($defs, 'lay_'); if (empty($errs)) { if (method_exists($l, 'init')) { $l->init($params);
/** * @access public * @return void */ public function index() { $reports = new Report(); $this->data['reports'] = $reports->load(); $this->load->view('reports/index', $this->data); }
} else { echolink($i, $i); echo ' '; } } if ($currPage < $pageCount) { echolink($currPage + 1, $loc->getText("Next»")); echo ' '; } } if (!$_REQUEST['type']) { header('Location: ../reports/index.php'); exit(0); } if ($_REQUEST['type'] == 'previous') { $rpt = Report::load('Report'); } else { list($rpt, $err) = Report::create_e($_REQUEST['type'], 'Report'); if ($err) { $rpt = NULL; } } if (!$rpt) { header('Location: ../reports/index.php'); exit(0); } if ($_REQUEST['type'] == 'previous') { if (isset($_REQUEST['rpt_order_by'])) { list($rpt, $errs) = $rpt->variant_el(array('order_by' => $_REQUEST['rpt_order_by'])); assert('empty($errs)'); }