Source for file CMS_MENU_NODE.phpclass
Documentation is available at CMS_MENU_NODE.phpclass
* Class file CMS_MENU_NODE.phpclass
* @project Open CSP-Management
* @author Peter Krebs (pk) <pitlinz@users.sourceforge.net>
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id: CMS_MENU_NODE.phpclass,v 1.43 2008/12/03 09:47:56 pitlinz Exp $
// ---------------------------------------------------------
// ---------------------------------------------------------
//pcf_require_class('CMS_MENU_V2',dirname(__FILE__)."/CMS_MENU_V2.phpclass");
* @project Open CSP-Management
* @author Peter Krebs (pk) <pitlinz@users.sourceforge.net>
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id: CMS_MENU_NODE.phpclass,v 1.43 2008/12/03 09:47:56 pitlinz Exp $
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
* @constant string CLASS_SRC_FILE
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
/*** class vars ------------------------------------------------------ */
* array with key -> project association
* @staticvar array $menuProjectLst
protected static $menuProjectLst =
array();
/*** class methods ---------------------------------------------- */
if (isset
(self::$menuProjectLst[$aKey]) &&
intval(self::$menuProjectLst[$aKey]))
return CMS_MENU::getInstance(self::$menuProjectLst[$aKey])->getNode($aKey,False,$debug);
list
($int_menId,$str_subKey) =
$explode("-",$aKey,2);
// ~~~~~~~~~~~~~~~~~~~~~~~~~~ static ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* @staticvar string $myClassSrcFile if is set the DBMS_FORM get the class object
/** -----------------------------------------------------
/** -----------------------------------------------------
* @var CMS_PROJECT $myProjObj
* @var CMS_PAGE $myCurrentPage
* array of the menu pages
/** -----------------------------------------------------
* @staticvar string $myTreeClass
* @staticvar string $myIdFld id column = root
* @staticvar string $myParentFld name of the parent column
* @staticvar string $mySortFld name of the sort field
* @staticvar strint $myChildKeys comma sperated list of keys the children have to fit to
* @var string $myChildClass
* @var string $myChildTbl table where childrens are stored
* @staticvar string $myPageTable
* @var double $hasChildrenToShowTS
* @var string $HTML_TitlePrepend
* @var string $HTML_TitleAppend
* @staticvar string $CLASSVARIABLES
protected $CLASSVARIABLES=
"MEN_OBJCLASS,myTreeClass,myIdFld,myParentFld,mySortFld,myTable,myChildKeys,myChildClass,myPageTable,myPageTable";
* Id of the template to use if PTMP_ID is not used
* @var array $myOnlinePageList
* timestamp the page list has been populated
* @var double $pageListPopulateTS
* METHODS _____________________________________________
/** -----------------------------------------------------
* Constructors and factory methods
* cunstructor checks if we have a key of $this->mytable or a composed one
* and populates the menu node from T_CMS_MENU if $auto_populate is true
* composed keys consists of at least 2 parts seperated by "-"
* @param mixed $myTree @see DBMS_TREE_NODE::DBMS_TREE_NODE()
* @param boolean $auto_populate
* @deprecated since pk-08-06-19
function CMS_MENU_NODE($aId=
Null,$myTree=
"",$auto_populate=
True,$debug=
False) {
// we have a composed key -> extract MEN_ID
* fakotry the propper menu node from the key
* the key can be seperated with a _ in this case
* the first element is the MEN_ID and the second one
* is passed to the new node
if ($debug) echoDebugMethod(__FILE__
,"static call","CMS_MENU_NODE::factoryFromKey({$projId},{$key})");
// --------------------------------------------------------------------------
// class validateion methods
// --------------------------------------------------------------------------
* checks if the object has the rigth class (type of $this->MEN_OBJCLASS)
* and returns the proper object
* @return CMS_MENU_NODE or child instance
if (($str_className =
$this->getDBField('MEN_OBJCLASS')) &&
($str_className !=
get_class($this)))
$o_ret->setTreeObj($this->getTree(True),$debug);
// replace the object in the global tree
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"node is already of of the right class");
* checks if the object is the current menu
* and returns the proper object
* @return CMS_MENU_NODE or child instance
if ($debug) echo
"<p><b>CMS_MENU_NODE::validateCurrentMenu(".
$this->MEN_OBJCLASS.
")</b> (".
get_class($this).
")</p>";
* abstract class to get the cms menu node for special menu objects
* overwrite in this classes
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
* returns a array of variables used by the menu object
* [FLDCLASS] name of DBMS_FIELD* class
* [CLASSVALS] array of values of [FLDCLASS]
* returns the cms menu node id
* the menu key is a '-' separeted string where the first part is the
* @version pk-07-01-18 parse template
* @version pk-08-06-18 langId added
function getTitle($langId=
0,$debug=
False)
* returns the language id
* call parent::setParentObj and sets the project from the parent
* @param CMS_MENU_NODE $aParent
$this->setDBField('MEN_PARENT',$aParent->getId());
* returns the include file (if set)
* @global array $OCSP_CONF
$str_ret=
$OCSP_CONF['PROJECTPATH'].
$str_ret;
* returns the template id set in menu or project
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
* @param boolean $useCache
* @param boolean $checkParent (if false $this->getParentObj is not called)
function &getTree($useCache=
True,$debug=
False,$checkParent=
True)
/*** parent ------------------------------------ */
* returns the parent object or null if parent is root
* @param boolean $useCache
//} else if ($this->getId()) {
// $this->myParent=new CMS_MENU_NODE();
// $this->myParent->setMyProject($this->getMyProject($debug,True));
/*** children ------------------------------------ */
* returns a array of pointers to the child objects
* if filtered $this->myFilterArr is used to check the child
* @param boolean $useCache
* @param boolean $filtered
* @global array $OCSP_VAL
* @param boolean $useCache
if ($debug) echoDebugMethod(__FILE__
,get_class($this),"CMS_MENU_NODE::populateChildren()","MEN_ID: ".
$this->getId().
($useCache ?
"USECACHE" :
""));
foreach($arr_childRows as $arr_row)
$int_sort =
((isset
($arr_row['MEN_SORTORDER']) &&
intval($arr_row['MEN_SORTORDER'])) ?
intval($arr_row['MEN_SORTORDER']) :
1);
while(isset
($this->myChildren[$int_sort])) $int_sort++
; // fix order
$arr_row['MEN_SORTORDER'] =
$int_sort;
$this->myChildren[$int_sort]->setParentObj($this);
'MEN_PARENT' =>
$this->getId()
foreach($arr_childRows as $arr_row)
$int_sort =
((isset
($arr_row['MEN_SORTORDER']) &&
intval($arr_row['MEN_SORTORDER'])) ?
intval($arr_row['MEN_SORTORDER']) :
1);
while(isset
($this->myChildren[$int_sort])) $int_sort++
; // fix order
$arr_row['MEN_SORTORDER'] =
$int_sort;
$this->myChildren[$int_sort]->setParentObj($this);
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
* sets the project object of the page
* NOTE: does not set the current project ID
* the values of $this->PROJ_ID and $this->myProjObj->getId() can differ
* @param CMS_PROJECT $aProjObj
ocsp_logError(__FILE__
,__LINE__
,"project does not support getId()",E_WARNING);
//if ($debug) {echo "<pre style=\"font-size: 80%;\">";debug_zval_dump($this->myProjObj);echo "</pre>";}
* returns the Project Object
* @param boolean $forceObj (if false no new object will be instanciated)
* @param boolean $setAsCurrent (if true call $this->setAsCurrent())
* @version pk-06-05-16 bugfix for default project (PROJ_ID=0) wihich is not in the database
* @global array $OCSP_OBJ
function &getMyProject($debug=
False,$forceObj=
True,$setAsCurrent=
False)
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"returning \$this->myProjObj");
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"returning \$this->myProjObj");
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"returning \$OCSP_OBJ['CUR_CMSPROJ']");
* sets the node as current menu node
* checks if the menu is the current menu
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
* returns a database form
* @param int $mode dbms form show mode
* @param string $frmName dbms form name
* @version pk-05-01-12 store the page object to the database
* @version pk-05-02-17 add objects if TYPE == "__FRMFIELD__"
* @deprecated since pk-07-08-21
function &dbGetForm($mode=
FRM_MODE_READONLY,$frmName=
"",$debug=
FALSE)
throw
new Exception('deprecated call');
if ($debug) echo "<p><b>CMS_MENU_NODE::dbGetForm($mode,$frmName,...)</b> (".get_class($this).")</p>";
if (empty($frmName)) $frmName="MENUFORM_".strtoupper(get_class($this));
if (($frmObj=&parent::dbGetForm($mode,$frmName,$debug)) && (pcf_is_instance_of($frmObj,"DBMS_FORM"))) {
if ($debug) echo "<blockquote><p>generating new form</p></blockquote>";
if (($frmObj=&parent::dbGetForm($mode,"",$debug)) && (pcf_is_instance_of($frmObj,"DBMS_FORM"))) {
$frmObj->frmName=$frmName;
if ($debug) echo "<p style=\"color:red\">ERROR NO FORM FOR MENU OBJECT FOUND</p>";
if (pcf_is_instance_of($frmObj,"DBMS_FORM")) {
if (is_array($objVars)) {
if ($debug) echo "<p><b>Adding MENU Fields</b></p>"; //<blockquote><pre>".htmlspecialchars(print_r($objVars,TRUE))."</pre></blockquote>";
if ($debug) echo "<p>FORMOBJECT:</p><pre style=\"font-size:8px;padding-left:50px;backgorund-color:#C0C0C0;\">".pcf_object_info($frmObj,1)."</pre><blockquote>";
if ($objVars['TYPE']=="__FRMFIELD__") {
require_once $GLOBALS['OCSP']['PHPINCPATH']."common/pcf.phpinc";
if (pcf_is_instance_of($objVars['OBJ'],"DBMS_FIELD")) {
$frmObj->addFieldObj($objVars['OBJ'],TRUE,$debug);
foreach($objVars as $key => $descArr) {
if (!($frmObj->getField($key,$descArr['TABLE'],$debug))) { // </pk-06-02-01> $descArr['TABLE']
$fld=&$frmObj->addNoDbClassField($descArr['FLDCLASS'],$key,$key,$descArr['TABLE'],$debug);
$fld->dbDesc['TYPE']=$descArr['TYPE'];
$fld->dbDesc['NULL']=TRUE;
$fild->setObjectVars($descArr['CLASSVALS']);
if ($debug) echo "<p>Field: $key exists</p>";
// if ($debug) echo "<blockquote><pre>";pcf_object_info($fld,2);echo "</pre></blockquote>";
if ($debug) echo "</blockquote>";
if ($debug) echo "<blockquote><pre>";pcf_object_info($frmObj,2);echo "</pre></blockquote>";
if ($saveForm && $frmObj->frmName=="MENUFORM_".strtoupper(get_class($this))) {
if ($debug) echo "<p>saveing form: ".$frmObj->frmName."</p><blockquote>";
if (empty($frmObj->frmDesc)) $frmObj->frmDesc="Created by CMS_MENU_NODE";
$frmObj->storeToDb($debug);
if ($debug) echo "</blockquote>";
* returns the required form name
* normaly this function return Null to let $this->getForm decide
* which form ($this->getMyTable()) to use. In some subclasses it can
* be useful to overwrite this methode to get a special form
* This is also a way to tell ajax reloads to change form. in jOCSP/formRPC.php
* is checked wether the currently loaded form (from the environment) fits to
* the forms tableobject if this function returns a value.
* returns the form class name to use
* if you overwrite this method make sure the returned form
* class source has been included
* returns the form used for manipulating the node
* replaces dbGetForm and returns a OCSP_FORM
* @param mixed $form (string) form name (int) form id
* @param string $frmClass
* @requires __OCSP_PHPINCPATH__/db/forms/OCSP_FORM.phpclass
public function &getForm($mode=
FRM_MODE_READONLY,$form=
Null,$frmClass=
'CMS_MENU_FORM',$debug=
False)
if (empty($frmClass) ||
($frmClass =
"OCSP_FORM"))
$obj_form=
OCSP_FORM::factory_from_Name($form,$frmClass,$debug);
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"Form : " .
$form .
" not found");
$obj_srcForm=
parent::getForm($mode,'MENUFORM_CMS_MENU_NODE',$frmClass,$debug);
if (!empty($frmName) &&
($frmName !=
'MENUFORM_CMS_MENU_NODE'))
$obj_form=
new $frmClass(0,$frmName,$debug);
$arr_values=
$obj_srcForm->getMyDBRow();
unset
($arr_values['FRM_ID']);
$arr_values['FRM_NAME']=
$frmName; // <pk-08-06-15 />
$obj_form->setMyDBRow($arr_values);
if (!$obj_form->storeToDb($debug))
ocsp_logError(__FILE__
,__LINE__
,"could not generate form $form",E_ERROR);
$arr_blocks=
$obj_srcForm->getBlocks($debug);
foreach($arr_blocks as &$obj_block)
$obj_form->copyBlock($obj_block->getId(),$debug);
foreach($arr_objVars as $str_key =>
$arr_descArr)
if (!isset
($arr_descArr['TABLE']))
switch($arr_descArr['TYPE'])
$arr_descArr['TABLE'] =
"OBJVALS_" .
$this->myTable;
if (!($obj_form->getField($arr_descArr['TABLE'] .
"." .
$str_key,$debug)))
$arr_fldValues=
$arr_descArr['CLASSVALS'];
if (!isset
($arr_fldValues['myTable'])) $arr_fldValues['myTable']=
$arr_descArr['TABLE'];
if (!isset
($arr_fldValues['myTableAlias'])) $arr_fldValues['myTableAlias']=
$arr_descArr['TABLE'];
'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>");
//$debug=True;echoDebugLine(__FILE__,__LINE__,"debug On");
$obj_form->setMyTblObj($this,$debug);
$obj_form->setFrmMode($mode);
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
* returns an array of db default values
$arr_ret =
parent::getDefaults($debug);
$arr_ret['PROJ_ID']=
$int_id;
$arr_ret['MEN_PARENT'] =
$int_id;
* sets all fields of an array to the objcet
* if $valArr['PEARCACHE_TS'] isset this will become the populateTS
function setDBVal($valArr,$debug=
FALSE) {
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"\$valArr is not an array");
if (isset
($valArr['PEARCACHE_TS']))
unset
($valArr['PEARCACHE_TS']);
parent::setDBVal($valArr,$debug);
* ensures that LANG_ID is set and
* sets $this->mySortFld to IFNULL(MAX(".$this->mySortFld."),1)
* @param boolean $debug show debug info
* @return int returns the autoIncFld ID if exists or 1 on success
return parent::dbInsert($debug);
* ensures that LANG_ID is set
* @param boolean $debug show debug info
* @param boolean $ignorPopulated (if false the table MUST have been populated)
* @return int returns the autoIncFld ID if exists or 1 on success
function dbReplace($debug=
False,$ignorPopulated=
False) {
return parent::dbReplace($debug,$ignorPopulated);
* deletes a node from the database
* @param boolean $backupData
* @todo CMS_MENU_NODE::dbDelete() inline SQL
function dbDelete($backupData=
FALSE,$debug=
FALSE) {
if ($debug) echo
"<p><b>CMS_MENU_NODE::dbDelete($gDBIDX,$backupData)</b> (".
get_class($this).
")</p>";
$s_query=
"SELECT * FROM T_CMS_PAGE WHERE MEN_ID=".
$this->getId();
if (!$this->isConnected(TRUE,$debug)) // ensure $this->myDBObj is set
ocsp_logError(__FILE__
,__LINE__
,"no database connection",E_ERROR);
if ($o_cursor=
$this->myDBObj->query($s_query)) {
//require_once $GLOBALS['CMS']['PHPINCPATH']."page/function.phpinc";
if ($debug) echo
"<blockquote><h2>Deleting Pages</h2>";
while($a_row=
$o_cursor->fetchArrayFld()) {
$obj_page->setDBRow($a_row);
$obj_page->dbDelete($backupData,$debug);
if ($debug) echo
"</blockquote>";
return parent::dbDelete($backupData,$debug);
* adds a node to childArray($key)
* @param DBMS_TREE_NODE $aNode
* copies the childs from the menu with id $sourceId
* @param mixed &$source MEN_ID or menu object of sourcemenu
* @param boll $copypage if true pages will be copied, else only menu sructure
* @param bool $outdated if true copy only pages with show till > now
function copyChildsFrom(&$source,$copypage=
TRUE,$outdated=
FALSE,$debug=
FALSE) {
if (is_object($source)) return FALSE; // schould be a special menu child node licke a product group
ocsp_logError(__FILE__
,__LINE__
,"don't know what to do with <pre>".
print_r($source,TRUE).
"</pre>",E_WARNING);
if (!pcf_is_instance_of($obj_src,'CMS_MENU_NODE')) return FALSE; // schould be a special menu child node licke a product group
if (!intval($obj_src->getId()))
ocsp_logError(__FILE__
,__LINE__
,"source node is not populated",E_WARNING);
if ($arr_srcChildren=
$obj_src->getChildrenList(TRUE,$debug,FALSE))
foreach($arr_srcChildren as &$obj_srcChild)
if (intval($obj_srcChild->checkShowDate($debug)) ||
$outdated)
$arr_childVals=
$obj_srcChild->getDBVal();
unset
($arr_childVals[$this->myIdFld]);
$str_cmd=
"\$obj_newChild = new ".
get_class($obj_srcChild).
"();";
$obj_newChild->setDBObj($this->getDBObj());
$obj_newChild->setDBVal($arr_childVals);
$obj_newChild->setParentObj($this);
$obj_newChild->copyChildsFrom($obj_srcChild,$copypage,$outdated,$debug);
$obj_newChild->copyPagesFrom($obj_srcChild->getId());
* copies the pages from the menu with id $sourceId
* @param mixed $source MEN_ID of sourcemenu or menu object
* @param boll $copypage if true pages will be copied, else only menu sructure
* @param bool $outdated if true copy only pages with show till > now
if (is_object($source)) return FALSE; // schould be a special menu child node licke a product group
ocsp_logError(__FILE__
,__LINE__
,"don't know what to do with <pre>".
print_r($source,TRUE).
"</pre>",E_WARNING);
if (!pcf_is_instance_of($obj_src,'CMS_MENU_NODE')) return FALSE; // schould be a special menu child node licke a product group
if (!intval($obj_src->getId()))
ocsp_logError(__FILE__
,__LINE__
,"source node is not populated",E_WARNING);
if ($arr_pageList=
$obj_src->getPageList(TRUE,FALSE,$debug))
foreach($arr_pageList as &$obj_srcPage)
$str_cmd=
"\$obj_newPage=new ".
get_class($obj_srcPage).
"();";
$obj_newPage->setDBObj($this->getDBObj());
$obj_newPage->setMyMenuNode($this,$debug);
$arr_pagVal=
$obj_srcPage->getDBVal();
unset
($arr_pagVal['PAG_ID']);
$arr_pagVal['MEN_ID'] =
$this->getId();
$obj_newPage->setDBVal($arr_pagVal,$debug);
$obj_newPage->dbSave($debug);
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"<pre>".
print_r($obj_newPage->getDBRow(),TRUE).
"</pre>");
$obj_newPage->copyChaptersFrom($obj_srcPage->getId(),FALSE,$debug);
* returns if MEN_SHOW is on
* returns the group id allowed for the page
* checks if the node is on
* @param boolean $checkDate
* @param boolean $checkGroup
* @version pk-06-01-30 checkShow added
function isToShow($checkDate=
True,$checkGroup=
True,$debug=
False,$checkShow=
True) {
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"<p>turned off</p>");
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"<p>not in group</p>");
if (!empty($this->MEN_SHOWQUERY)) {
if ($debug) echoDebug(__FILE__
,"<p>checkShowNode(".
$this->getId().
") SHOWQUERY: \n$s_query</p>");
ocsp_logError(__FILE__
,__LINE__
,"no database connection to check: ".
$this->MEN_SHOWQUERY,E_WARNING);
if (!(intval($this->myDBObj->quickQuery($s_query,0)))) return FALSE;
* returns if the object is to echo in the tree when creating the html-code
* or only children are to show
* returns if html-code should add an intend statement
* before children(list) is outputed
* checks if the node has children which are on
* @param boolean $filtered use filter
* @param boolean $checkDate
* @param boolean $checkGroup
* @version pk-06-01-30 checkShow added
function hasChildrenToShow($filtered=
FALSE,$checkDate=
TRUE,$checkGroup=
TRUE,$debug=
FALSE,$checkShow=
TRUE) {
if ($debug) echo
"<p><b>CMS_MENU_NODE::hasChildrenToShow(\$filtered=$filetered,\$checkDate=$checkDate,\$checkGroup=$checkGroup,...)</b> (".
get_class($this).
")</p>";
if ($debug) echo
"<blockquote>Cached</blockquote>\n";
foreach($childArr as $child) {
if ($child->isToShow($checkDate,$checkGroup,$debug,$checkShow)) {
if ($debug) echo
"<blockquote style=\"background-color: green;\">CMS_MENU_NODE::hasChildrenToShow returns TRUE</blockquote>";
* checks if the menu is to show from date
* - 0: showtill is outdate
* - -2: showfrom is not reached
$obj_Date->setDbString($this->getDBField('MEN_SHOWFROM'));
if ($obj_Date->isInFutur())
$obj_Date->setDbString($this->getDBField('MEN_SHOWTILL'));
if ($obj_Date->isInPast())
* returns a array back to the root
* if we have MEN_LINKTYPE 10 ($page->subMenu()) the page menu
* is included in the rootPath if $GLOBALS['CURRENT_PROJ']->curMen
* @param boolean $useCache
$arr_ret =
$this->myParent->getRootPath($useCache,$debug);
* creates a child object out of database row
* checks $dbRow['MEN_OBJCLASS'] to determine the class of the new object
* NOTE does not add the object to the tree only sets objects parent
if (empty($dbRow['MEN_OBJCLASS'])) {
// unknown object class asume default
$s_menuClass=
$dbRow['MEN_OBJCLASS'];
// <pk-08-06-11><pk-08-06-13 />
$s_cmd=
"\$o_tmpObj=new ".
$s_menuClass.
"();";
$o_tmpObj->setDBRow($dbRow,TRUE);
if (intval($o_tmpObj->getId()))
$o_tmpObj->setTreeObj($this->getTree());
$o_tmpObj->setParentObj($this);
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"\$o_tmpObj is not an instance of $s_menuClass ".
get_type($o_tmpObj));
* returns the previos menu (sibling)
* first check if we have a menu node with the same parent and MEN_SORTORDER < $this->MEN_SORTORDER
* then go up in the tree if $goUp
* @param boolean $isOnline return only a menu node which is currently online
* @param boolean $useCache
function &getPrevSibling($goUp=
TRUE,$isOnline=
TRUE,$useCache=
TRUE,$debug=
FALSE) {
$a_nodeLst=
$o_parent->getChildrenList(TRUE,$debug);
reset ($a_nodeLst);$b_reached=
FALSE;$o_prevNode=
NULL;
while (!$b_reached &&
(list
(,$o_node) =
each ($a_nodeLst))) {
if ($o_node->getId()==
$this->getId()) {
if ($isOnline &&
$o_node->isToShow()) {
if ($o_parent->isToShow()) {
return $o_parent->getPrevSibling($goUp,$isOnline,$debug);
* returns the next menu (sibling)
* first check if we have a menu node with the same parent and MEN_SORTORDER > $this->MEN_SORTORDER
* if not then go down in the tree if $goDown
* @param boolean $isOnline return only a menu node which is currently online
* @param boolean $useCache
function &getNextSibling($goDown=
TRUE,$isOnline=
TRUE,$useCache=
TRUE,$debug=
FALSE) {
$a_nodeLst=
$o_parent->getChildrenList(TRUE,$debug);
reset ($a_nodeLst);$o_nextNode=
NULL;
while (list
(,$o_node) =
each ($a_nodeLst)) {
if ($o_node->getId()==
$this->getId()) {
if ($isOnline &&
$o_node->isToShow()) {
} else if ($goDown &&
($o_node=
$this->getFirstChild($isOnline,$useCache,$debug))) {
* returns the first child
* @param boolean $isOnline
* @param boolean $useCache
function &getFirstChild($isOnline=
TRUE,$useCache=
TRUE,$debug=
FALSE) {
while (list
(,$o_node) =
each ($a_nodeLst)) {
if ($isOnline &&
$o_node->isToShow()) {
// ----------------------------------------------------------
// ----------------------------------------------------------
* returns if the node is deletable or not
if ($debug) echo
"<p><b>CMS_MENU_NODE::isDeleteable()</b> (".
get_class($this).
")</p>\n";
* returns if the node is editable
* return if the menu type can have editable pages
* if not the menu generates it's page object himself
* users are not able to add pages to the menu
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* returns if the current user can open the menu
* @version pk-06-11-15 return $this->curUserCanEdit($debug) instead of FALSE
$this->getMyProject(); // to ensure we have the right project object
if ($debug) echoDebug(__FILE__
,"<p>Project check failed</p>");
if ($GLOBALS['USER']->isGroupMember(intval($this->getDBField('MEN_SHOWGROUP')))) {
if ($debug) echoDebug(__FILE__
,"<p>check passed</p>");
* returns if the current user can add a childmenu
if ($debug) echoDebug(__FILE__
,"<p><b>CMS_MENU_NODE::userCanAddChild($userId)</b> (".
get_class($this).
")</p>");
$this->getMyProject(); // to ensure we have the right project object
* returns if the current user can add a page
if ($debug) echoDebug(__FILE__
,"<p><b>CMS_MENU_NODE::curUserCanAddPage($userId)</b> (".
get_class($this).
")</p>");
$this->getMyProject(); // to ensure we have the right project object
* returns if the current user can delete the menu
if ($debug) echoDebug(__FILE__
,"<p><b>CMS_MENU_NODE::curUserCanDelete($userId)</b> (".
get_class($this).
")</p>");
$this->getMyProject(); // to ensure we have the right project object
// menu is hidden and show from is in future
// the page is online or in the archive
} else if ($debug) echoDebug(__FILE__
,"<blockquote>MENU IS NOT DELETEABLE</blockquote>");
* returns if the current user can edit the menu
$this->getMyProject(); // to ensure we have the right project object
// -----------------------------------------------------------------
// -----------------------------------------------------------------
* checks if the object is in the rootPath $rPath
* if $rPath is not an array $GLOBALS['CURRENT_ROOTPATH'] is checked
function isInPath($rPath=
NULL,$debug=
FALSE) {
if (!is_array($GLOBALS['CURRENT_ROOTPATH'])) {
$rPath=
$GLOBALS['CURRENT_ROOTPATH'];
foreach($rPath as $o_node) {
if ($o_node->getId()==
$this->getId()) return TRUE;
* returns the html-code for the sidemenu link
if (empty($this->pageUrl)) {
$this->pageUrl=
$_SERVER['SCRIPT_NAME'];
unset
($getVar['MEN_ID']);
unset
($getVar['MEN_PARENT']);
unset
($getVar['PROJ_ID']);
unset
($getVar['LANG_ID']);
unset
($getVar['PGP_ID']);
unset
($getVar['NORELOAD']);
$ret=
"<a class='".
$class.
"' href=";
$menParam=
"PROJ_ID=".
$this->PROJ_ID.
"&MEN_ID=".
$this->MEN_ID.
"&LANG_ID=".
$this->LANG_ID;
switch($this->MEN_LINKTYPE) {
if (!strstr($this->MEN_LINK,"PROJ_ID")) $url.=
(strstr($url,"?") ?
"&" :
"?").
"PROJ_ID=".
$this->PROJ_ID;
if (!strstr($this->MEN_LINK,"MEN_ID")) $url.=
(strstr($url,"?") ?
"&" :
"?").
"MEN_ID=".
$this->MEN_ID;
if (!strstr($this->MEN_LINK,"LANG_ID")) $url.=
(strstr($url,"?") ?
"&" :
"?").
"LANG_ID=".
$this->LANG_ID;
$target=
$this->MEN_TARGET;
// case 2: PAGE is default
if (empty($GLOBALS['PROJECT']['PRODGRPURL'])) {
$ret.=
"\"/cms/prodgrp.php";
$ret.=
"\"".
$GLOBALS['PROJECT']['PRODGRPURL'];
$ret.=
"?".
$menParam.
"&PGP_ID=".
$this->MEN_LINKFK;
unset
($getVar['PGP_ID']);
foreach($getVar as $key =>
$val) $ret.=
"&$key=$val";
$ret.=
"\""; // " for editor layout :-)
$target=
$this->MEN_TARGET;
$ret.=
"\"mailto:".
$this->MEN_LINK.
"\"";
$ret.=
"\"http://".
$_SERVER['SERVER_NAME'].
"\"";
$ret.=
"\"#\" onClick=\"popup_window('".
$url.
"',200,400);\"";
$ret.=
"\"#\" onClick=\"".
$url.
"\"";
$ret.=
"\"".
$GLOBALS['PROJECT']['BASKETURL'].
$menParam;
foreach($getVar as $key =>
$val) $ret.=
"&$key=$val";
return $page->getSubMenu($debug);
$ret.=
"\"".
$this->pageUrl.
"?".
$menParam;
foreach($getVar as $key =>
$val) $ret.=
"&$key=$val";
$target=
$node['MEN_TARGET'];
if (!empty($target)) $ret.=
" target=\"".
$target.
"\"";
* @param string $class css-style class to use for <a>
if ($debug) echo
"<p><b>CMS_MENU_NODE::writeSideMenuRow($class,$debug)</b> (".
get_class($this).
")</p>";
* writes a sidemneu row on Path to the selected node
* @param string $class css-style class to use for <a>
if ($debug) echo
"<tr><td><b>CMS_MENU_NODE::writeSideMenuRowOnPath($path,$class,$debug)</b> (".
get_class($this).
")</td></tr>";
echo
"<tr><td align=\"right\">";
echo
$this->subtblTag.
"\n";
array_shift($treePath); // remove the first id (points to $this)
$node->subtblTag=
$this->subtblTag;
$node->trTag =
"\t".
$this->trTag;
$node->tdTag =
$this->tdTag;
$node->pageUrl =
$this->pageUrl;
if ((!is_object($treePath[0])) ||
($id !=
$treePath[0]->getId())) {
if ($node->isToShow(TRUE,TRUE,$debug)) {
$node->writeSideMenuRow("",$debug);
$node->writeSideMenuRowOnPath($treePath,"",$debug);
echo
"</table></td></tr>\n";
// -----------------------------------------------------------------
// -----------------------------------------------------------------
* converts the title to a dirname this can be used with url-rewriting
$s_dirName =
preg_replace('/<.*>/i',"",$s_dirName); // replace html tags
* @version pk-06-08-07 bugfix
* @version pk-06-09-28 $GLOBALS['OCSP_CMS']['MENLINKTMPL'] added
$str_menParams =
"PROJ_ID=".
$this->getProjId();
$str_menParams.=
"&MEN_ID=".
$this->getKey();
if (isset
($valArr['PAG_ID'])) $str_menParams.=
"&PAG_ID=".
$valArr['PAG_ID'];
if (!isset
($valArr['PROJ_ID'])) $valArr['PROJ_ID']=
$this->getProjId();
if (!isset
($valArr['MEN_ID'])) $valArr['MEN_ID'] =
$this->getKey();
switch($this->MEN_LINKTYPE) {
case 10:
// $page->getSubMenu();
$str_linkUrl =
$obj_conf->getValue('MENLINKURL');
$str_linkTmpl =
$obj_conf->getValue('MENLINKTMPL');
$bol_rewrite =
$obj_conf->getValue('REWRITE');
if (empty($str_linkUrl) &&
empty($str_linkTmpl))
$str_ret =
"/index.php?".
$str_menParams;
if (!empty($str_linkTmpl) &&
!$bol_rewrite)
$str_linkUrl =
(empty($str_linkUrl) ?
"/" :
$str_linkUrl);
$cha_sep =
($obj_conf->getValue('MENLINKSEP') ?
$obj_conf->getValue('MENLINKSEP') :
"/" );
$str_ret.=
(isset
($valArr['PROJ_ID']) ?
$valArr['PROJ_ID'] :
$this->getProjId()) .
$cha_sep;
$str_ret.=
$valArr['MEN_ID'] .
$cha_sep;
$str_ret.=
((isset
($valArr['PAG_ID']) &&
!empty($valArr['PAG_ID'])) ?
$valArr['PAG_ID'] :
0);
if (intval($obj_conf->getValue('APPENDHTML')))
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"rewrite url: " .
$str_ret .
"<pre>" .
print_r($valArr,True) .
"</pre>");
$str_ret =
"/index.php?" .
$str_menParams;
if (empty($GLOBALS['PROJECT']['PRODGRPURL'])) {
$str_ret=
"/cms/prodgrp.php";
$str_ret=
$GLOBALS['PROJECT']['PRODGRPURL'];
$str_ret.=
"?".
$str_menParams.
"&PGP_ID=".
$this->MEN_LINKFK;
foreach($_GET as $key =>
$val) if (!strstr($str_ret,$key)) $str_ret.=
"&$key=$val";
return "mailto:".
$this->MEN_LINK;
if ($pjUrl=
OCSP_OBJ::defaultReadDBObj()->quickQuery("SELECT PROJ_URL FROM T_CMS_PROJECT WHERE PROJ_ID=".
$this->PROJ_ID,0)) {
return "javscript:{popup_window('".
$url.
"',200,400);}";
$str_ret=
$GLOBALS['PROJECT']['BASKETURL'].
"?".
$str_menParams;
foreach($_GET as $key =>
$val) if (!strstr($str_ret,$key)) $str_ret.=
"&$key=$val";
foreach($this->myKeys as $key =>
$val) {
$str_ret.=
$sep.
$key.
"=".
str_replace("\"","",$this->{$key});
if (isset
($GLOBALS['MENU_ADD_GET']) &&
is_array($GLOBALS['MENU_ADD_GET'])) {
foreach($GLOBALS['MENU_ADD_GET'] as $s_key =>
$m_val) {
* returns the <a ... </a> tag for the menu link
* @param boolean $addGetArr array with get values to add to the link KEY=NAME
function getHTMLLink($valArr=
NULL,$aAddTag=
"",$debug=
FALSE,$add_GETarr=
NULL) {
if ($debug) echo
"<p><b>CMS_MENU_NODE::getHTMLLink($valArr,...)</b> (".
get_class($this).
")</p>";
if (!is_array($valArr)) $valArr=
array();
foreach($this->getDBVal() as $str_name =>
$mix_val)
if (!isset
($valArr[$str_name])) $valArr[$str_name]=
$mix_val;
if (!isset
($valArr['PAG_ID'])) {
if (!empty($this->MEN_TARGET) &&
($this->MEN_TARGET !=
"_SELF") &&
(!strstr(strtoupper($aAddTag),"TARGET"))) { // pk-05-07-13
// there is an error in the older database version default for MEN_TARGET was _SELF instead of _self
$target =
" target=\"".
$this->MEN_TARGET.
"\" ";
$ret =
"<a href=\"".
$this->getLinkUrl($valArr,$debug).
"\""; // <pk-06-09-06 />
$ret.=
" ".
$target.
" $aAddTag>".
$this->getTitle().
"</a>"; // <pk-06-10-20 />
* returns the link url to other projekts coresponding page
if ($debug) echo
"<p><b>CMS_MENU_NODE::getCrossProjLink($aProjId,...)</b> (".
get_class($this).
")</p>";
if (!($project=
$GLOBALS[$this->get_gDBIDX()]->quickQuery("SELECT * FROM T_CMS_PROJECT WHERE PROJ_ID=".
intval($aProjId)))) {
if (empty($this->MEN_PROJCROSSLNK)) {
return "/index.php?PROJ_ID=".
intval($aProjId);
if ($debug) echo
"<pre>".
print_r($xLinks[$aProjId],TRUE).
"</pre>";
$query =
"SELECT * FROM T_CMS_MENU ";
$query.=
" WHERE PROJ_ID=".
intval($aProjId);
$query.=
" AND MEN_ID=".
intval($xLinks[$aProjId]['LINK']);
if ($menArr=
$GLOBALS[$this->get_gDBIDX()]->quickQuery($query)) {
$menObj->setDbRow($menArr);
// -------------------------------------------------------------------------
// -------------------------------------------------------------------------#
* populates the pages from the database
'MEN_ID' =>
$this->getId()
foreach($arr_pageRows as $arr_row)
$int_sortorder =
$arr_row['PAG_SORTORDER'];
while(isset
($this->myPages[$int_sortorder])) $int_sortorder++
;
if (CMS_PAGE::isInstanced($arr_row['PAG_ID']))
$this->myPages[$int_sortorder] =
CMS_PAGE::getInstance($arr_row['PAG_ID']);
$this->myPages[$int_sortorder] =
CMS_PAGE::factoryFromDBRow($arr_row,$debug);
* returns an array with some page vales of the node
* NOTE if $xtraConditions is set caching is disabled
* @param boolean $online (check if the page is online if false all pages are returned)
* @param array $xtraConditions (array of columns to check to)
* @return array (or null if the menu has no page)
function getPageKeyArr($online=
TRUE,$xtraConditions=
NULL,$debug=
FALSE)
ocsp_logError(__FILE__
,__LINE__
,"could not connect to the database",E_ERROR);
$str_query =
"SELECT p.*,UNIX_TIMESTAMP(PAG_SHOWFROM) AS SHOWFROM,UNIX_TIMESTAMP(PAG_SHOWTILL) AS SHOWTILL";
$str_query.=
" FROM T_CMS_PAGE p";
foreach($xtraConditions as $str_col =>
$m_val)
$str_query.=
" AND ".
$str_col.
"=".
$this->myDBObj->qs_getSlashedValue($m_val);
$str_query.=
" ORDER BY PAG_SORTORDER";
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"page query: $str_query");
if (!$arr_pages=
$this->myDBObj->queryArray($str_query,0,-
1))
foreach($arr_pages as $i_pagId =>
$arr_pagVal)
if (($arr_pagVal['SHOWFROM'] <
time()) &&
($arr_pagVal['SHOWTILL'] >
time()))
if (isset
($GLOBALS['OCSP_CMS']['PAGESTATE'][intval($arr_pagVal['PAG_STATE'])]['SHOW'])
&&
$GLOBALS['OCSP_CMS']['PAGESTATE'][intval($arr_pagVal['PAG_STATE'])]['SHOW'])
if (intval($arr_pagVal['PAG_SHOWGROUP']))
if ($GLOBALS['OCSP_OBJ']['USER']->isGroupMember($arr_pagVal['PAG_SHOWGROUP']))
$arr_ret[$i_pagId]=
$arr_pagVal;
$arr_ret[$i_pagId]=
$arr_pagVal;
echoDebugLine(__FILE__
,__LINE__
,"not adding page $i_pagId because of show date ".
time().
"<br />".
print_r($arr_pagVal,TRUE));
* get the where clause to select the menu pages
* @param boolean $showAll
* @param string $whereAdd
* @global array $OCSP_OBJ (['USER'])
* @version pk-06-11-12 only use language if set
function getPageWhere($showAll=
FALSE,$whereAdd=
"",$debug=
FALSE) {
if ($debug) echoDebugMethod(__FILE__
,get_class($this),"CMS_MENU_NODE::getPageWhere()",($showAll ?
"SHOWALL" :
"ONLINEMODUS").
"\n\$whereAdd: $whereAdd");
$query =
" WHERE PROJ_ID=".
$this->getProjId();
$query.=
" AND MEN_ID =".
$this->getId();
$query.=
" AND PAG_STATE IN (";
foreach($GLOBALS['OCSP_CMS']['PAGESTATE'] as $key =>
$sArr) {
$query.=
" AND PAG_SHOWFROM <= NOW()";
$query.=
" AND PAG_SHOWTILL >= NOW()";
if (!$OCSP_OBJ['USER']->isAdmin($debug)) { // <pk-05-11-01 />
$query.=
" AND PAG_SHOWGROUP IN (";
$query.=
$OCSP_OBJ['USER']->getGroups(",",FALSE,$debug);
$query.=
" ORDER BY PAG_SORTORDER ";
* gets an array of page database rows
* 2 additional "colums" are calculated:
* @param boolean $showAll
* @param string $whereAdd
* @param string $orderBy (without keyword ORDER BY)
* @version pk-08-01-08 ($orderBy added)
* @todo CMS_MENU_NODE::getPageArray() inline SQL
function getPageArray($showAll=
FALSE,$whereAdd=
"",$debug=
FALSE,$orderBy=
"") {
ocsp_logError(__FILE__
,__LINE__
,"no database connection",E_ERROR);
$str_query =
"SELECT (PAG_SHOWFROM < NOW()) AS SHOWFROM_OK, (PAG_SHOWTILL > NOW()) AS SHOWTILL_OK, p.* FROM T_CMS_PAGE p";
if (strstr($str_query,"ORDER BY"))
$str_query=
str_replace("ORDER BY","ORDER BY ".
$orderBy.
",",$str_query);
$str_query.=
" ORDER BY ".
$orderBy;
if ($obj_cursor=
$this->myDBObj->query($str_query))
while($arr_row=
$obj_cursor->fetchArrayFld())
$int_sortOrder=
intval($arr_row['PAG_SORTORDER']);
while (isset
($arr_ret[$int_sortOrder])) {$int_sortOrder++
;}
$arr_ret[$int_sortOrder]=
$arr_row;
* @param boolean $useCache (pages are stored in $GLOBALS['OCSP_VAL']['DBMS_TREE'][$this->getGlobalTreeKey()]['PAGES'])
* @param boolean $online (if true only pages to be shown online are returned)
* @return array of CMS_PAGE_V2*
function getPageList($useCache=
True,$online=
True,$debug=
False)
foreach($this->myPages as &$obj_page)
if ($obj_page->isOnline())
global $OCSP_CONF,$OCSP_VAL;
if ($useCache && isset($OCSP_VAL['PAGEOBJCACHE'][$this->getGlobalTreeKey()][$this->getId()]))
foreach($OCSP_VAL['PAGEOBJCACHE'][$this->getGlobalTreeKey()][$this->getId()] as &$obj_page)
if ($obj_page->isOnline($debug)) $arr_ret[]=$obj_page;
return $OCSP_VAL['PAGEOBJCACHE'][$this->getGlobalTreeKey()][$this->getId()];
require_once __OCSP_CMS_PHPINCPATH__."page"._OCSP_DIRSEP_."CMS_PAGE_V2.phpclass";
$b_showAll=($useCache || (!$online));
if ($arr_pageRows=$this->getPageArray($b_showAll,"",$debug))
foreach($arr_pageRows as $arr_row)
$arr_ret[]=CMS_PAGE_V2::CMS_PAGE_FROM_DBROW($arr_row,$debug);
if ($useCache || (!$online))
$OCSP_VAL['PAGEOBJCACHE'][$this->getGlobalTreeKey()][$this->getId()]=$arr_ret;
if ($useCache && $online)
return $this->getPageList($useCache,$online,$debug);
* returns the current Page
* this is the first page found and the user has rights to show
* @param boolean $goDown (check children if the node has no page to show)
* @param boolean $online (check if the page is online if false all pages are returned)
* @param array $xtraConditions (array of columns to check to)
* @version pk-08-02-16 return pointer (&)
function &getCurrentPage($goDown=
False,$online=
True,$xtraConditions=
Null,$debug=
False)
if ($debug) echoDebugMethod(__FILE__
,get_class($this),"CMS_MENU_NODE::getCurrentPage(".
($goDown ?
"goDown" :
"strict").
" ".
($online ?
"online only" :
"all").
")",$this->getTitle().
"(".
$this->getId().
")");
$str_query =
"SELECT * FROM T_CMS_PAGE ";
$str_query.=
" WHERE MEN_ID = " .
$this->getId();
$str_query.=
" AND PROJ_ID = " .
$this->getProjId();
$str_query .=
" AND UNIX_TIMESTAMP(PAG_SHOWFROM) <= " .
time();
$str_query .=
" AND UNIX_TIMESTAMP(PAG_SHOWTILL) >= " .
time();
foreach($xtraConditions as $str_col =>
$m_val)
if (substr($str_col,0,1)==
'?')
$str_query .=
" AND " .
$m_val;
$str_query .=
" ORDER BY PAG_SORTORDER";
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"Page Query: " .
$str_query);
while($arr_row =
$obj_cursor->fetchArrayFld())
foreach($arr_children as &$obj_child)
if (!$online ||
$obj_child->isToShow(TRUE,TRUE,$debug,TRUE)) // isToShow($checkDate=TRUE,$checkGroup=TRUE,$debug=FALSE,$checkShow=TRUE)
//$obj_page = new CMS_PAGE();
* returns the first pageId
* if $goDown and no page is found for the menu childs are asked for a page
* @param boolean $showAll
* @param string $whereAdd
* @requires common/OCSP_DATE.phpclass
function getPageId($goDown=
FALSE,$showAll=
FALSE,$whereAdd=
"",$debug=
FALSE) {
if ($debug) echoDebugMethod(__FILE__
,get_class($this),"CMS_MENU_NODE::getPageId()",($godown ?
"GODOWN," :
"STRICT,").
($showAll ?
"SHOWALL" :
"ONLINEMODUS").
"\n\$whereAdd: $whereAdd");
$online=
($showAll ?
FALSE :
TRUE);
foreach($arr_pVals as $arr_pKeys)
if (intval($arr_pKeys['PAG_ID'])) return intval($arr_pKeys['PAG_ID']);
foreach($arr_children as &$obj_child)
if (!$online ||
$obj_child->isToShow(TRUE,TRUE,$debug,TRUE)) // isToShow($checkDate=TRUE,$checkGroup=TRUE,$debug=FALSE,$checkShow=TRUE)
if ($i_ret=
$obj_child->getPageId($goDown,$showAll,NULL,$debug))
* returns a link url to use in project tabs
* the links are stored in column MEN_PROJCROSSLNK
* @todo get parent link if not set
if ($debug) echo
"<p><b>CMS_MENU_NODE::getProjCrossLink($projId, ...)</b> (".
get_class($this).
")</p>";
if (!empty($crossLinks[$projId]['LINK'])) {
switch($crossLinks[$projId]['TYPE']) {
$ret.=
"\" target=\"".
$crossLinks[$projId]['TARGET'].
"\" $aAddTag>";
if (empty($GLOBALS['CMS']['MENLINKURL'])) {
$GLOBALS['CMS']['MENLINKURL']=
"/index.php?";
$GLOBALS['CMS']['REWRITE']=
FALSE;
$ret=
"<a href=\"".
$GLOBALS['CMS']['MENLINKURL'];
if ($GLOBALS['CMS']['REWRITE']) {
$ret.=
$projId.
"/".
$crossLinks[$projId]['LINK'];
$ret.=
"PROJ_ID=".
$projId.
"&MEN_ID=".
$crossLinks[$projId]['LINK'];
$ret.=
"\" target=\"".
$crossLinks[$projId]['TARGET'].
"\" $aAddTag>";
$ret.=
"\"#\" onClick=\"popup_window('".
$url.
"',200,400);\" $aAddTag>";
$ret.=
"\"#\" onClick=\"".
$url.
"\"";
$ret=
"<a href=\"/index.php?PROJ_ID=".
$projId;
$ret.=
"\" target=\"".
$crossLinks[$projId]['TARGET'].
"\" $aAddTag>";
* returns the page template Id for the subpages
Documentation generated on Thu, 08 Jan 2009 17:39:21 +0100 by phpDocumentor 1.4.0a2