コード例 #1
0
 public static function getController($id, $query = null)
 {
     $inst = CalemReportMap::getInstance();
     $entry = $inst->getReportDef($id);
     require_once _CALEM_DIR_ . $entry['controller']['path'] . $entry['controller']['class'] . '.php';
     $obj = new $entry['controller']['class']();
     $obj->init($id, $entry['module'], $query);
     return $obj;
 }
コード例 #2
0
 public function addFormItem($fmId, $link = null)
 {
     $fm = CalemReportMap::getController($fmId);
     if ($link) {
         //Build up link relationship between forms.
         $fm->setFormLink($link);
     }
     $this->forms[$fmId] = $fm;
     $model = $fm->getDataModel();
     $this->formsByModel[$model->getId()] = $fm;
 }
コード例 #3
0
ファイル: CalemReport.php プロジェクト: smartqubit/calemeam
//Report id
$rid = $_REQUEST['rid'];
//Locale info.
$lid = $_REQUEST['lid'];
if ($lid) {
    $lids = decodeUrlEx($lid);
    require_once _CALEM_DIR_ . 'server/include/JSON/JSON.php';
    //Pear's JSON
    $json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE);
    $loc_conf = $json->decode($lids);
}
if ($logger->isInfoEnabled()) {
    $logger->info('rid=' . $rid . ', query=' . var_export($query, true) . ', locInfo=' . var_export($loc_conf, true));
}
$calemImgCss = $calemRootUrl . '/client/themes/' . $theme . "/" . $theme . "_img.css";
$dwtImgCss = $calemRootUrl . '/client/themes/image/hiRes/dwtimgs.css';
$calemReportCss = $calemRootUrl . '/client/themes/' . $theme . "/" . $theme . "_print.css";
$customReportIcon = null;
$clg = $_CALEM_conf['report_conf']['custom_logo'] ? $_CALEM_conf['report_conf']['custom_logo'] : 'custom_logo.png';
if (is_file(_CALEM_DIR_ . 'client/themes/' . $clg)) {
    $customReportIcon = $calemRootUrl . '/client/themes/' . $clg;
}
$calemReportIcon = $calemRootUrl . '/client/themes/calemeam.png';
$calemReportPrintIcon = $calemRootUrl . '/client/themes/' . $theme . "/icons/printer.png";
//Identify controller
$controller = CalemReportMap::getController($rid, $query);
$doc = $controller->render();
$reportTitle = $controller->getReportTitle();
include _CALEM_DIR_ . 'server/modules/report/doc/CalemReportHeader.php';
print $doc;
include _CALEM_DIR_ . 'server/modules/report/doc/CalemReportFooter.php';