/** * Constructor -> Create the module-menu and an internal template-object * @global InitCMS * @global \Cx\Core\Html\Sigma * @global array */ function __construct() { global $objInit, $objTemplate, $_CORELANG; parent::__construct(); $this->_objTpl = new \Cx\Core\Html\Sigma(ASCMS_MODULE_PATH . '/Blog/View/Template/Backend'); \Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->_objTpl); $this->_objTpl->setErrorHandling(PEAR_ERROR_DIE); $this->_intLanguageId = FRONTEND_LANG_ID; $objFWUser = \FWUser::getFWUserObject(); $this->_intCurrentUserId = $objFWUser->objUser->getId(); $strNavigation = ''; $isAdmin = $objFWUser->objUser->getAdminStatus(); //if(in_array(120, $objFWUser->objUser->getStaticPermissionIds()) || $isAdmin) { $strNavigation .= '<a href="index.php?cmd=Blog" class="' . ($_GET['act'] == '' ? 'active' : '') . '">' . $_CORELANG['TXT_BLOG_ENTRY_MANAGE_TITLE'] . '</a>'; //} if (in_array(121, $objFWUser->objUser->getStaticPermissionIds()) || $isAdmin) { $strNavigation .= '<a href="index.php?cmd=Blog&act=addEntry" class="' . (in_array($_GET['act'], array('addEntry', 'editEntry')) ? 'active' : '') . '">' . $_CORELANG['TXT_BLOG_ENTRY_ADD_TITLE'] . '</a>'; } if (in_array(122, $objFWUser->objUser->getStaticPermissionIds()) || $isAdmin) { $strNavigation .= '<a href="index.php?cmd=Blog&act=manageCategory" class="' . (in_array($_GET['act'], array('manageCategory', 'manageCategory')) ? 'active' : '') . '">' . $_CORELANG['TXT_BLOG_CATEGORY_MANAGE_TITLE'] . '</a>'; } if (in_array(125, $objFWUser->objUser->getStaticPermissionIds()) || $isAdmin) { $strNavigation .= '<a href="index.php?cmd=Blog&act=networks" class="' . (in_array($_GET['act'], array('networks', 'editNetwork')) ? 'active' : '') . '">' . $_CORELANG['TXT_BLOG_NETWORKS_TITLE'] . '</a>'; } if (in_array(124, $objFWUser->objUser->getStaticPermissionIds()) || $isAdmin) { $strNavigation .= '<a href="index.php?cmd=Blog&act=settings" class="' . (in_array($_GET['act'], array('settings')) ? 'active' : '') . '">' . $_CORELANG['TXT_BLOG_SETTINGS_TITLE'] . '</a>'; } $objTemplate->setVariable('CONTENT_NAVIGATION', $strNavigation); }
/** * Constructor php5 */ function __construct($strPageContent) { global $_LANGID; parent::__construct(); $this->_strPageContent = $strPageContent; $this->_objTpl = new \Cx\Core\Html\Sigma('.'); \Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->_objTpl); $this->_intLanguageId = intval($_LANGID); $this->_arrSettings = $this->createSettingsArray(); }
/** * Constructor -> Call parent-constructor, set language id and create local template-object * * @global integer */ function __construct($strPageContent) { global $_LANGID; parent::__construct(); $this->_intLanguageId = intval($_LANGID); $this->_intCurrentUserId = 0; $this->_objTpl = new \Cx\Core\Html\Sigma('.'); \Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->_objTpl); $this->_objTpl->setErrorHandling(PEAR_ERROR_DIE); $this->_objTpl->setTemplate($strPageContent); }