Beispiel #1
0
$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);
        }
        $l->render($rpt);
        exit;
    } else {
        $_SESSION['postVars'] = mkPostVars();
        $_SESSION['pageErrors'] = $errs;
    }
}
# Must ask for parameters
$nav = "layoutparams";
$focus_form_name = "layoutparamform";
require_once "../classes/Localize.php";
Beispiel #2
0
 function initCgi_el($prefix = 'rpt_')
 {
     $p = new Params();
     $errs = $p->loadCgi_el($this->rpt->paramDefs(), $prefix);
     if (!empty($errs)) {
         return $errs;
     }
     return $this->_init_el($p);
 }