Source for file CMS_PAGE.phpclass
Documentation is available at CMS_PAGE.phpclass
* @project Open CSP-Management
* @author Peter Krebs <pitlinz@users.sourceforge.net>
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id: CMS_PAGE.phpclass,v 1.25 2008/12/17 16:28:51 peterkrebs Exp $
// ---------------------------------------------------------
// ---------------------------------------------------------
* @project Open CSP-Management
* @author Peter Krebs <pitlinz@users.sourceforge.net>
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id: CMS_PAGE.phpclass,v 1.25 2008/12/17 16:28:51 peterkrebs Exp $
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
* @constant string CLASS_SRC_FILE
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
/*** class vars ------------------------------------------------------ */
* array of loaded pages can be used as unit of work
* together with the getInstanceXxxx functions
* @staticvar array $loadedPages
protected static $loadedPages =
array();
/*** class methods --------------------------------------------------- */
* requires the class source file for $str_class
* @param string $str_class
public static function requirePageClass($str_class,$debug=
False)
if ($debug) echoDebugMethod(__FILE__
,"static","CMS_PAGE::requirePageClass({$str_class});");
// ------ unit of work -----
* returns an unit of work instance
public static function &getInstance($aId,$debug=
False)
if ($debug) echoDebugMethod(__FILE__
,"static","CMS_PAGE::getInstance({$aId})");
if (!isset
(self::$loadedPages[intval($aId)]) ||
!(self::$loadedPages[intval($aId)]))
self::$loadedPages[intval($aId)] =
self::factoryFromId($aId,False,$debug);
return self::$loadedPages[intval($aId)];
* sets an unit of work instance
public static function setInstance(&$aPage,$debug=
False)
self::$loadedPages[$aPage->getId()]=
$aPage;
* returns if a page is instanciated
public static function isInstanced($aId)
return (isset
(self::$loadedPages[intval($aId)]) &&
(self::$loadedPages[intval($aId)]));
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
/*** compostion --------------------------------------------------- */
* @var CMS_PAGE_TEMPLATE $myTemplate
protected $myTemplate =
Null;
* @var CMS_HTML_PAGE $myHTMLPage
protected $myHTMLPage =
Null;
* sorted array of chpater
* myChapterList[CHA_SHOWMODE][CHA_SORTORDER] = CMS_CHAPTER
protected $myChapterList =
array();
/*** attributes -------------------------------------------------- */
* @var string $myTable name of the table holding the data
* Id of the template to use if PTMP_ID is not used
protected $myTemplateId =
0;
* did we get the contents?
* if no OCSP_CMS_HTMLPAGE will set Templatevar PAGECONTENT
* @var boolean $contentWasCalled
protected $contentWasCalled =
False;
* timestamp the myChapterList has been populated
* @var double $chapterListPopulated
protected $chapterListPopulated =
0;
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
* factory a new page object form $_GET
* @param boolean $force (always return a page object even if no id is set)
public static function factoryFromQueryString($force=
false,$debug=
false)
if ($debug) echoDebugMethod(__FILE__
,'(static)','CMS_PAGE::factoryFromQueryString()');
if ((sizeof($arr_pages) ==
1) ||
$force)
return CMS_PAGE::factoryFromDBRow($arr_pages[0],$debug);
$obj_ret->setProjId($int_projId);
$obj_ret->setMenId($int_menId);
* factory a page object from an id
* @param boolean $force (always return a page object eaven if not found)
* @return CMS_PAGE | Null
public static function factoryFromId($aId,$force=
false,$debug=
false)
if ($debug) echoDebugMethod(__FILE__
,'(static)',"CMS_PAGE::factoryFromId();");
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"using cached value");
return self::factoryFromDBRow($arr_row,$debug);
return self::factoryFromDBRow($arr_row,$debug);
* factories a page and sets the project ?????
* @param CMS_PROJECT $aProj
public static function factoryProjectPage(&$aProj,$aId,$force=
False,$debug=
False)
if ($obj_ret =
self::factoryFromId($aId,False,$debug))
if ($obj_ret->getProjId() ==
$aProj->getId())
$obj_ret->setMyProject($aProj);
* faktories the page object form the db row
* @todo CMS_PAGE_V2 is used
public static function factoryFromDBRow($dbRow,$debug=
False)
if (!isset
($dbRow['PAG_OBJCLASS']) ||
($dbRow['PAG_OBJCLASS']==
'CMS_PAGE'))
$dbRow['PAG_OBJCLASS'] =
"CMS_PAGE_V2";
$obj_ret =
new $dbRow['PAG_OBJCLASS']();
$obj_ret->setDBRow($dbRow,True);
/*** getter / setter ---------------------------------------------- */
public function setId($aId)
public function getTitle($debug=
False)
* returns the page state id
public function getStateId()
* has the method getContent been called?
public function getContentCalled()
return $this->contentWasCalled;
public function setContentCalled($called=
'True')
$this->contentWasCalled=
$called;
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* returns a array of variables used by the page object
* [FLDCLASS] name of DBMS_FIELD* class
* [CLASSVALS] array of values of [FLDCLASS]
protected function getObjVarDef($debug=
False)
* returns a field => value array
* make sure to not include some special values
* and object columns are serialised
* @param boolean $withoutNull null values are not added to the array
* @param boolean $debug show debug info?
* @param boolean $withoutOV
* @param boolean $fldAutoPopulate
public function getDBRow($withoutNull=
True,$debug=
False,$withoutOV=
False,$fldAutoPopulate=
True)
if ($debug) echoDebugMethod(__FILE__
,get_class($this),"CMS_PAGE::getDBRow(".
($withoutNull ?
"without NULL" :
"with NULL").
")");
$arr_ret=
parent::getDBRow($withoutNull,$debug,$withoutOV,$fldAutoPopulate);
if (($arr_objVars=
$this->getObjVarDef()) &&
is_array($arr_objVars)) {
foreach($arr_objVars as $key =>
$descArr)
if ($debug) echo
"<p>Setting Key: $key</p>";
if (isset
($this->{$key}))
$arr_vars[$key]=
$this->{$key};
$arr_ret['PAG_OBJECTVARS']=
serialize($arr_vars);
* sets a database row to the object fields
* sets each key (=columname) value
* @param array $row the row form a select * from DBMS_TABLEOBJ::myTable
* @param bool $asPopulated set populateTS as if the object has been populated
public function setDBRow($row,$asPopulated=
True,$debug=
False)
if (parent::setDBRow($row,$asPopulated,$debug))
foreach($arr_objVarVals as $key =>
$val) {
if ($debug) ocsp_logError(__FILE__
,__LINE__
,"unserialize of <pre>--\n{$row['PAG_OBJECTVARS']}\n--</pre> failed",E_NOTICE);
* sets all fields of an array to the objcet
public function setDBVal($valArr,$debug=
False)
$arr_objVar=
$this->getObjVarDef();
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"setting PageObjVals");
foreach($arr_objVar as $key =>
$descArr) {
$this->{$key}=
$valArr[$key];
return parent::setDBVal($valArr,$debug);
* returns a field => value array for dbms
* use this in cms and dbms elements to get
* overwrite this and add some special values
* @param bool $setFIELDS if true $ret['_DBMS_FIELDS'] is filled
* @param bool $debug show debug info?
public function getDBVal($setFIELDS=
False,$debug=
False)
$arr_ret=
parent::getDBVal($setFIELDS,$debug);
$arr_objVar=
$this->getObjVarDef();
$c_sep=
(sizeof($arr_ret) ?
',' :
'');
foreach($arr_objVar as $key =>
$descArr)
if (isset
($this->{$key})) {
$arr_ret[$key]=
$this->{$key};
if (!isset
($arr_ret['PAG_OBJCLASS']) ||
empty($arr_ret['PAG_OBJCLASS']))
* @param boolean $debug show debug info
* @param boolean $ignorPopulated
function dbReplace($debug=
false,$ignorPopulated=
false) {
$this->setDBField('PAG_LASTCHANGE',"CURRENT_TIMESTAMP");
$str_storedClass=
$this->getDBField('PAG_OBJCLASS');
if (empty($str_storedClass))
} else if (!$str_storedClass ==
get_class($this)) {
return parent::dbReplace($debug,$ignorPopulated);
/*** form / editing ----------------------------------------------- */
* returns the page form name
* returns the form for the page
* @param int $mode (form mode)
* @param string $frmClass
* @requires CMS_PAGE_FORM
public function &getForm($mode=
FRM_MODE_READONLY,$frmName=
'',$frmClass=
'CMS_PAGE_FORM',$debug=
False)
if (empty($frmClass) ||
($frmClass ==
'CMS_PAGE_FORM'))
$frmClass=
'CMS_PAGE_FORM';
$obj_form=
OCSP_FORM::factory_from_Name($frmName,$frmClass,$debug);
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"generating new form");
if ($obj_form =
parent::getForm($mode,Null,$frmClass,$debug))
$obj_form->setName($frmName);
$arr_objVars=
$this->getObjVarDef();
foreach($arr_objVars as $str_key =>
$arr_descArr)
if (!($obj_form->getField("PAGEOBJVAL.".
$str_key,$debug)))
$arr_fldValues=
$arr_descArr['CLASSVALS'];
if (!isset
($arr_fldValues['myTable'])) $arr_fldValues['myTable']=
'PAGEOBJVAL';
if (!isset
($arr_fldValues['myTableAlias'])) $arr_fldValues['myTableAlias']=
'PAGEOBJVAL';
'TYPE' =>
$arr_descArr['TYPE'],
'TABLE' =>
$arr_fldValues['myTable'] // <pk-08-06-17 />
if ($obj_field=
$obj_form->factory_field($str_key,$arr_descArr['FLDCLASS'],$arr_dbDesc,$arr_fldValues,$debug))
$obj_block=
$obj_form->getBlock(0);
$obj_block->addFieldObj($obj_field,$debug);
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"Field ".
$obj_field->getKey().
" generated");
ocsp_logError(__FILE__
,__LINE__
,"opjVar Field: $str_key not in form: <strong>".
$obj_form->getName().
"</strong><pre>".
print_r($arr_descArr,True).
"</pre>");
$obj_form->storeToDb($debug);
$obj_form->setMyTblObj($this);
$obj_form->setTblObjInc($str_classSrc);
} else if (!empty($this->myClassSrcFile)) {
$obj_form->setTblObjInc($this->myClassSrcFile);
ocsp_logError(__FILE__
,__LINE__
,"no source file for " .
get_class($this) .
" (" .
$str_classSrc .
");",E_WARNING);
$obj_form->setMyTblObj($this);
$obj_form->setTblObjInc($str_classSrc);
} else if (!empty($this->myClassSrcFile)) {
$obj_form->setTblObjInc($this->myClassSrcFile);
ocsp_logError(__FILE__
,__LINE__
,"no source file for " .
get_class($this) .
" (" .
$str_classSrc .
");",E_WARNING);
$obj_form->setFrmMode($mode);
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
* returns a new chapter object
function getNewChapter($tmplId,$debug=
False)
$obj_chapter =
$this->getTemplate()->getChapterTemplate($tmplId,$debug)->getChaObj(0,$debug);
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* returns if the page is the current page
public function isCurrent($debug=
False)
* returns if the current page is online
* @global array $OCSP_CONF
public function isOnline($debug=
False)
$int_stateId =
$this->getStateId();
if (isset
($arr_states[$int_stateId]))
$arr_myState =
$arr_states[$int_stateId];
if (!($bol_chkShow =
$arr_myState['SHOW']))
$bol_chkShow =
($this->isCurrent() &&
$arr_myState['DIRECTSHOW']);
if ($debug) echoDebugLine(__FILE__
,__LINE__
,'page is not in online state');
$obj_date->setDbString($this->getDBField('PAG_SHOWFROM'));
if ($obj_date->isInFutur())
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"page will come in future");
$str_showQuery =
$this->getDBField('CHA_SHOWQUERY');
if (!empty($str_showQuery))
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"Show Query: <br />SELECT " .
$str_showQuery .
"<br /> failed");
* returns if the page is expired
public function isExpired($debug=
False)
$obj_date->setDbString($this->getDBField('PAG_SHOWTILL'));
if ($obj_date->isInPast())
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"page is out of date");
* returns if the current user can open the page
function curUserCanOpen($debug=
False)
$this->getMyMenuNode(); // ensure $this->myMenuNode is up to date;
return $this->curUserCanEdit();
* returns if the user can edit the page
function curUserCanEdit($debug=
False) {
* returns if the user can insert a new page
function curUserCanInsert($debug=
False)
* returns if the current user can delete the page
function curUserCanDelete($debug=
False)
if ($this->curUserCanEdit($debug))
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
/*** preview / editing ----------------------------------------------- */
* returns the preview uri
public function getPreviewUri()
if (file_exists($_SERVER['DOCUMENT_ROOT'].
"/index.php")) {
$str_ret .=
"/index.php";
} else if (file_exists($_SERVER['DOCUMENT_ROOT'].
"/content.php")) {
$str_ret .=
"/content.php";
$str_ret .=
"/cms/page.php";
$str_ret .=
"&PREVIEWMODE=1";
$str_ret .=
"&RL=" .
time() .
"-" .
rand(100,900);
* returns the link to the page without additional get params
* @version pk-05-11-30 $GLOBALS['OCSP_CMS']['PAGLINKTMPL'] if $GLOBALS['OCSP_CMS']['REWRITE']
* @version pk-07-02-16 just ask the menu
* @version pk-08-10-01 $arr_tmplVals for PAGLINKTMPL
function getMyLink($debug=
False) {
if (!empty($GLOBALS['OCSP_CMS']['PAGLINKTMPL'])) {
// we have a template for a page set use this
if ($debug) echoDebugLIne(__FILE__
,__LINE__
,"using \$GLOBALS['OCSP_CMS']['PAGLINKTMPL']: " .
htmlspecialchars($GLOBALS['OCSP_CMS']['PAGLINKTMPL']) .
"<pre>" .
print_r($arr_tmplVals,True) .
"</pre>");
$a_getVals['PAG_ID'] =
$this->getId();
foreach($a_getVals as $s_key =>
$s_val) {
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
* executes a prepend script before the page output starts
/*** HTML_PAGE --------------------------------------------------- */
* @param CMS_HTML_PAGE $aHTMLPage
function setMyHTMLPage(&$aHTMLPage)
$this->myHTMLPage=
$aHTMLPage;
return $this->myHTMLPage;
/*** templates ---------------------------------------------------- */
* returns the template id
* if col PTMP_ID is 0 the menu is asked for a template id
public function getTemplateId($debug=
False)
return $this->myTemplate->getId();
* returns the template object
* @return CMS_PAGE_TEMPLATE
public function &getTemplate($debug=
False)
//echoDebugLine(__FILE__,__LINE__,"no template set <pre>" . print_r($this->getDBRow(),True) . "</pre>");
return $this->myTemplate;
* returns an array of chapter template names with chapter template ID as index
* returns false if the page does not support chapter input
if ($this->getTemplate())
return $this->myTemplate->getChaTemplateNames($getAll,$debug);
/*** chapters ---------------------------------------------------- */
* returns a comma seperated list of chapter states to show
function getChapOnlineStates() {
foreach($arr_chaStates as $int_state =>
$arr_settings)
if ($arr_settings['SHOW'])
* populates $this->myChapterlist as sorted array
* @param unknown_type $debug
protected function populateChapterArr($debug=
False)
$str_query =
"SELECT * FROM T_CMS_CHAPTER";
$str_query.=
" WHERE PAG_ID = " .
$this->getId();
$str_query.=
" ORDER BY CHA_SHOWMODE,CHA_SORTORDER";
$this->myChapterList =
array();
$obj_pageTmpl =
$this->getTemplate($debug);
while($arr_row =
$obj_cursor->fetchArrayFld())
$int_sortOrder =
intval($arr_row['CHA_SORTORDER']);
while(isset
($this->myChapterList[$arr_row['CHA_SHOWMODE']][$int_sortOrder]))
$this->myChapterList[$arr_row['CHA_SHOWMODE']][$int_sortOrder] =
$obj_pageTmpl->getChapterTemplate($arr_row['CTMP_ID'])->getChaObjFromRow($arr_row);
$this->myChapterList[$arr_row['CHA_SHOWMODE']][$int_sortOrder]->setOrderNr($int_sortOrder);
$this->chapterListPopulated =
time();
* returns an array with the chapters
* @param boolean $onlineOnly
public function getChapterArr($showMode=
0,$onlineOnly=
True,$langId=
0,$debug=
False)
if ($this->chapterListPopulated <
(time() -
ini_get('max_execution_time')))
$this->populateChapterArr($debug);
return $this->myChapterList[$showMode];
foreach($this->myChapterList as $int_showMode =>
$arr_chapters)
foreach($arr_chapters as $int_sort =>
&$obj_chapter)
$arr_ret[$int_showMode .
"_" .
$int_sort] =
$obj_chapter;
/*** rendering ---------------------------------------------------- */
* returns the headline HTML tags
if (!intval($this->prevId)) {
$this->prevId=$this->getPreviousPage($debug);
if (!intval($this->nextId)) {
$this->nextId=$this->getNextPage($debug);
if (!is_object($this->myTemplate)) {
$this->loadTemplate($debug);
$txt =
$this->getTemplate()->getHeadLineTag().
"\n";
if ($this->prevId) $txt=str_replace("\$*PREVPAGE\$",$this->prevId,$txt);
if ($this->nextId) $txt=str_replace("\$*NEXTPAGE\$",$this->nextId,$txt);
if ($this->prevId) $str_ret=str_replace("\$*PREVPAGE\$",$this->prevId,$txt);
if ($this->nextId) $str_ret=str_replace("\$*NEXTPAGE\$",$this->nextId,$txt);
* returns all chapter with $mode
function renderChapters($mode=
0,$debug=
FALSE)
if ($debug) echoDebugMethod(__FILE__
,__LINE__
,"CMS_PAGE::getChapterTags({$mode})");
if ($this->chapterListPopulated <
(time() -
ini_get('max_execution_time')))
$this->populateChapterArr($debug);
if (isset
($this->myChapterList[$mode]) &&
is_array($this->myChapterList[$mode]))
foreach($this->myChapterList[$mode] as &$obj_chap)
if ($obj_chap->isOnline($debug))
if ($obj_chap->curUserCanShow($debug))
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"<p>SHOW CHAPTER " .
$obj_chap->getId() .
"</p>");
$str_ret .=
"\n<!-- START CHAPTER " .
$obj_chap->getId() .
" -->\n";
$str_ret .=
$obj_chap->render($debug);
$str_ret .=
"\n<!-- END CHAPTER ".
$obj_chap->getId() .
" -->\n\n";
if ($debug) echo "<p><b>CMS_PAGE_V2::getChapter($mode,...)</b> (".get_class($this).")</p>";
$GLOBALS['CHAMODE_COUNTER']=1; // <pk-06-02-21
require_once __OCSP_PHPINCPATH__."common/OCSP_DATE.phpclass";
if (!$this->isConnected(TRUE))
ocsp_logError(__FILE__,__LINE__,"no database connection",E_ERROR);
$query ="SELECT * FROM ".$this->cTable;
$query.=" WHERE ".$this->colPrevix."ID=".intval($this->getId());
$query.=" AND ".$this->myProjIdCol."=".intval($this->getProjId());
$query.=" AND LANG_ID=".intval($this->getLangId());
$query.=" AND ".$this->chapPrevix."STATE IN (".implode(",",$this->getChapOnlineStates()).")";
if (!intval($mode)) $query.=" AND ".$this->chapPrevix."SHOWMODE < 4";
else $query.=" AND ".$this->chapPrevix."SHOWMODE = $mode";
$query.=" ORDER BY ".$this->chapPrevix."SORTORDER";
if ($cursor=$this->myDBObj->query($query)) {
while($row=$cursor->fetchArray()) {
if ($debug) echo "<pre>".print_r($row,TRUE)."</pre>";
switch(intval($row[$this->chapPrevix.'SHOWGROUP'])) {
case -2: // only not logged in
if ((!is_object($GLOBALS['OCSP_OBJ']['USER'])) || (!$GLOBALS['OCSP_OBJ']['USER']->getId())) $show=TRUE;
case -1: // logged in user
if ($GLOBALS['OCSP_OBJ']['USER']->getId()) $show=TRUE;
$show=$GLOBALS['OCSP_OBJ']['USER']->isGroupMember(intval($row[$this->chapPrevix.'SHOWGROUP']));
if ($show && (!empty($row[$this->chapPrevix.'SHOWFROM']))) {
$o_ShowDate=new OCSP_DATE();
$o_ShowDate->setDateStr($row[$this->chapPrevix.'SHOWFROM']);
if ($o_ShowDate->isInFutur()) $show=FALSE;
if ($debug) echo "<p>SHOWFROM: ".$row[$this->chapPrevix.'SHOWFROM']." ".($show ? "OK" : "NOT OK")."</p>";
if ($show && (!empty($row[$this->chapPrevix.'SHOWTILL']))) {
$o_ShowDate=new OCSP_DATE();
$o_ShowDate->setDateStr($row[$this->chapPrevix.'SHOWTILL']);
if ($o_ShowDate->isInPast()) $show=FALSE;
if ($debug) echo "<p>SHOWTILL: ".$row[$this->chapPrevix.'SHOWTILL']." ".($show ? "OK" : "NOT OK")."</p>";
if (($show) && (!empty($row[$this->chapPrevix.'SHOWQUERY']))) {
require_once __OCSP_PHPINCPATH__."common/pcf_templates.phpinc";
$cmd=pcf_tmpl_parse($row[$this->chapPrevix.'SHOWQUERY'],$row,$debug);
// $debug=TRUE; echo "<tr><td>"; foreach($_SESSION as $key => $val) echo "<li>$key = $val</li>"; echo "</td></tr>";
if ($debug) echo "<p>checkShowChapter(".$row[$this->chapPrevix.'ID'].") SHOWQUERY: \n$query</p>";
$show=intval($GLOBALS[$this->gDBIDX]->quickQuery($query,0));
} else if (($this->curUserCanEdit()) && (intval($_GET['PREVIEWMODE']))) { // <pk-05-11-10>
$ret.="\n<div style=\"background-color: #AE3E2E; color:#FFFFFF\">\n";
$ret.="\n<p style=\"text-align:left;\">>>>>> OFFLINE ID: ".$row[$this->colPrevix."ID"]."</p>";
$ret.=$this->getChapterTag($row);
$GLOBALS['CHAMODE_COUNTER']++; // <pk-06-02-21>
$ret.="\n<div style=\"background-color: #AE3E2E; color:#FFFFFF\">\n";
$ret.="\n<p style=\"text-align:right;\"> OFFLINE ID: ".$row[$this->colPrevix."ID"]." <<<<<</p>";
* @param int $chaShowMode
function getContent($chaShowMode=
0,$debug=
False)
$debug=
($debug ||
(isset
($_GET['CONTENTDEBUG']) &&
intval($_GET['CONTENTDEBUG']) &&
($this->curUserCanEdit())));
if (($chaShowMode ==
0) &&
$this->getContentCalled())
throw
new Exception('content called twice');
$str_ret.=
$this->renderChapters($chaShowMode,$debug);
$this->setContentCalled(True);
Documentation generated on Thu, 08 Jan 2009 17:39:33 +0100 by phpDocumentor 1.4.0a2