当前位置: 首页>>代码示例>>PHP>>正文


PHP Security::get方法代码示例

本文整理汇总了PHP中Security::get方法的典型用法代码示例。如果您正苦于以下问题:PHP Security::get方法的具体用法?PHP Security::get怎么用?PHP Security::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Security的用法示例。


在下文中一共展示了Security::get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: init

 /**
  * init
  */
 public function init()
 {
     parent::init();
     if (!Security::get()->isAllowed('user_administration', Security::PRIVILEGE_VIEW)) {
         $this->_redirect('/zoolu');
     }
 }
开发者ID:BGCX261,项目名称:zoolu-svn-to-git,代码行数:10,代码来源:ResourceController.php

示例2: getTopNavigation

 /**
  * getTopNavigation
  * @param Zend_Db_Table_Rowset_Abstract $objRowset
  * @param integer $strModule
  * @author Thomas Schedler <tsh@massiveart.com>
  * @version 1.0
  */
 function getTopNavigation($objRowset, $intModuleId = 0)
 {
     $this->core->logger->debug('core->views->helpers->NavigationHelper->getTopNavigation()');
     $strOutput = '';
     if (count($objRowset) > 0) {
         foreach ($objRowset as $objRow) {
             if (Security::get()->isAllowed($objRow->resourceKey, Security::PRIVILEGE_VIEW)) {
                 $strItemClass = $objRow->id == $intModuleId ? 'navtoplink_on' : 'navtoplink';
                 $strOutput .= '
       <div class="' . $objRow->cssClass . '">
         <div class="' . $strItemClass . '" onmouseover="this.style.cursor=\'pointer\';" onclick="location.href=\'/zoolu/' . $objRow->title . '/\'">' . $this->core->translate->_($objRow->resourceKey) . '</div>
       </div>';
             }
         }
     }
     return $strOutput;
 }
开发者ID:BGCX261,项目名称:zoolu-svn-to-git,代码行数:24,代码来源:NavigationHelper.php

示例3: getOptionsOfSQL

 /**
  * getOptionsOfSQL
  * returns the result of a SQL-Statement in the valid output form
  * <option value=[VALUE] >[DISPLAY]</option>
  *
  * Version history (please keep backward compatible):
  * 1.0, 2008-11-17: Cornelius Hansjakob
  *
  * @param Core $core
  * @param string $strSQL SQL statment
  * @param string $strSelectedValue
  * @return string $strHtmlOutput
  * @return array $arrSecurityCheck
  * @author Cornelius Hansjakob <cha@massiveart.com>
  * @version 1.0
  */
 public static function getOptionsOfSQL(Core &$core, $strSQL, $strSelectedValue = '', $arrSecurityCheck = array())
 {
     $core->logger->debug('massiveart->utilities->HtmlOutput->getOptionsOfSQL: ' . $strSQL);
     $strHtmlOutput = '';
     try {
         foreach ($core->dbh->query($strSQL)->fetchAll() as $arrSQLRow) {
             if (count($arrSecurityCheck) == 0 || Security::get()->isAllowed(sprintf($arrSecurityCheck['ResourceKey'], $arrSQLRow['VALUE']), $arrSecurityCheck['Privilege'], $arrSecurityCheck['CheckForAllLanguages'], $arrSecurityCheck['IfResourceNotExists'])) {
                 if ($arrSQLRow['VALUE'] == $strSelectedValue) {
                     $strSelected = ' selected';
                 } else {
                     $strSelected = '';
                 }
                 $strHtmlOutput .= '<option value="' . $arrSQLRow['VALUE'] . '"' . $strSelected . '>' . htmlentities($arrSQLRow['DISPLAY'], ENT_COMPAT, $core->sysConfig->encoding->default) . '</option>' . chr(13);
             }
         }
     } catch (Exception $exc) {
         $core->logger->err($exc);
     }
     return $strHtmlOutput;
 }
开发者ID:BGCX261,项目名称:zoolu-svn-to-git,代码行数:36,代码来源:htmlOutput.class.php

示例4: deleteAction

 /**
  * deleteAction
  * @author Cornelius Hansjakob <cha@massiveart.com>
  * @version 1.0
  */
 public function deleteAction()
 {
     $this->core->logger->debug('media->controllers->FileController->deleteAction()');
     //FIXME where is the file delete ????
     if ($this->getRequest()->isPost() && $this->getRequest()->isXmlHttpRequest()) {
         $intRootLevelId = (int) $this->getRequest()->getParam('rootLevelId', 0);
         $blnAuthorizedToDelete = $intRootLevelId != 0 ? Security::get()->isAllowed(Security::RESOURCE_ROOT_LEVEL_PREFIX . $intRootLevelId, Security::PRIVILEGE_DELETE, true, false) : Security::get()->isAllowed('media', Security::PRIVILEGE_DELETE, false, false);
         if ($blnAuthorizedToDelete == true) {
             $this->getModelFiles();
             $objRequest = $this->getRequest();
             $strFileIds = $objRequest->getParam('fileIds');
             $this->objModelFiles->deleteFiles($strFileIds);
         }
     }
 }
开发者ID:BGCX261,项目名称:zoolu-svn-to-git,代码行数:20,代码来源:FileController.php

示例5: getNavigationElements

 /**
  * getNavigationElements
  * @author Cornelius Hansjakob <cha@massiveart.com>
  * @version 1.0
  */
 function getNavigationElements($objRowset, $currLevel)
 {
     $this->core->logger->debug('cms->views->helpers->NavigationHelper->getNavigationElements()');
     $strOutput = '';
     $strOutputStartpage = '';
     $counter = 1;
     if (count($objRowset) > 0) {
         foreach ($objRowset as $objRow) {
             $strPageTitle = $objRow->title;
             $strFolderTitle = $objRow->title;
             if ($objRow->pageLinkTitle != -1 && $objRow->pageType == $this->core->sysConfig->page_types->link->id) {
                 $strPageTitle = $objRow->pageLinkTitle != '' ? $objRow->pageLinkTitle : ($objRow->pageGuiLinkTitle != '' ? $objRow->pageGuiLinkTitle : $objRow->title);
             }
             // gui fallback title
             if ($strPageTitle == '' && $objRow->elementType == 'page') {
                 $strPageTitle = $objRow->guiTitle;
                 $objRow->pageType = $this->core->sysConfig->page_types->page->id;
                 $objRow->type = 'page';
                 $objRow->genericFormId = '';
                 $objRow->version = 'null';
                 $objRow->templateId = $objRow->isStartPage == 1 ? $this->core->sysConfig->page_types->page->startpage_templateId : $this->core->sysConfig->page_types->page->default_templateId;
             }
             // gui fallback title
             if ($strFolderTitle == '' && $objRow->elementType == 'folder') {
                 $strFolderTitle = $objRow->guiTitle;
                 $objRow->type = 'folder';
                 $objRow->genericFormId = $this->core->sysConfig->form->ids->folders->default;
                 $objRow->version = 'null';
                 $objRow->templateId = -1;
             }
             $objRow->version = $objRow->version != '' ? $objRow->version : 'null';
             $objRow->templateId = $objRow->templateId != '' ? $objRow->templateId : -1;
             if ($objRow->isStartPage == 1) {
                 /**
                  * overwrite type with 'page'
                  */
                 $objRow->type = 'page';
                 $strTitleAddonClass = '';
                 $strTitleAddon = '';
                 if ($objRow->pageType == $this->core->sysConfig->page_types->link->id) {
                     $strTitleAddonClass = ' italic';
                     $strTitleAddon = '&infin; ';
                 }
                 /**
                  * get values of the row and create startpage output
                  */
                 $strOutputStartpage .= '<div id="' . $objRow->type . $objRow->id . '" class="' . $objRow->type . '">
         <div class="icon img_startpage_' . ($objRow->idStatus == $this->core->sysConfig->status->live ? 'on' : 'off') . '"></div>
         <div id="divNavigationTitle_' . $objRow->type . $objRow->id . '" class="title' . $strTitleAddonClass . '" onclick="myNavigation.getEditForm(' . $objRow->id . ',\'' . $objRow->type . '\',\'' . $objRow->genericFormId . '\',' . $objRow->version . ',' . $objRow->templateId . '); return false;">' . $strTitleAddon . htmlentities($strPageTitle, ENT_COMPAT, $this->core->sysConfig->encoding->default) . '</div>
       </div>';
             } else {
                 if ($objRow->pageType == $this->core->sysConfig->page_types->page->id) {
                     /**
                      * get values of the row and create page output
                      */
                     $strOutput .= '<div id="' . $objRow->type . $objRow->id . '" class="' . $objRow->type . '">
         <div class="icon img_' . $objRow->type . '_' . ($objRow->idStatus == $this->core->sysConfig->status->live ? 'on' : 'off') . '"></div>
         <div class="navsortpos"><input class="iptsortpos" type="text" name="pos_' . $objRow->type . '_' . $objRow->id . '" id="pos_' . $objRow->type . '_' . $objRow->id . '" value="' . $counter . '" onfocus="myNavigation.toggleSortPosBox(\'pos_' . $objRow->type . '_' . $objRow->id . '\'); return false;" onkeyup="if(event.keyCode==13){ myNavigation.updateSortPosition(\'pos_' . $objRow->type . '_' . $objRow->id . '\',\'' . $objRow->type . '\',' . $currLevel . '); myNavigation.toggleSortPosBox(\'pos_' . $objRow->type . '_' . $objRow->id . '\'); return false; }" onblur="myNavigation.toggleSortPosBox(\'pos_' . $objRow->type . '_' . $objRow->id . '\'); return false;" /></div>
         <div id="divNavigationTitle_' . $objRow->type . $objRow->id . '" class="title" onclick="myNavigation.getEditForm(' . $objRow->id . ',\'' . $objRow->type . '\',\'' . $objRow->genericFormId . '\',' . $objRow->version . ',' . $objRow->templateId . '); return false;">' . htmlentities($strPageTitle, ENT_COMPAT, $this->core->sysConfig->encoding->default) . '</div>
       </div>';
                     $counter++;
                 } else {
                     if ($objRow->pageType == $this->core->sysConfig->page_types->link->id) {
                         /**
                          * overwrite type with 'page'
                          */
                         $objRow->type = 'page';
                         /**
                          * get values of the row and create page output
                          */
                         $strOutput .= '<div id="' . $objRow->type . $objRow->id . '" class="' . $objRow->type . '">
         <div class="icon img_' . $objRow->type . '_' . ($objRow->idStatus == $this->core->sysConfig->status->live ? 'on' : 'off') . '"></div>
         <div class="navsortpos"><input class="iptsortpos" type="text" name="pos_' . $objRow->type . '_' . $objRow->id . '" id="pos_' . $objRow->type . '_' . $objRow->id . '" value="' . $counter . '" onfocus="myNavigation.toggleSortPosBox(\'pos_' . $objRow->type . '_' . $objRow->id . '\'); return false;" onkeyup="if(event.keyCode==13){ myNavigation.updateSortPosition(\'pos_' . $objRow->type . '_' . $objRow->id . '\',\'' . $objRow->type . '\',' . $currLevel . '); myNavigation.toggleSortPosBox(\'pos_' . $objRow->type . '_' . $objRow->id . '\'); return false; }" onblur="myNavigation.toggleSortPosBox(\'pos_' . $objRow->type . '_' . $objRow->id . '\'); return false;" /></div>
         <div id="divNavigationTitle_' . $objRow->type . $objRow->id . '" class="title italic" onclick="myNavigation.getEditForm(' . $objRow->id . ',\'' . $objRow->type . '\',\'' . $objRow->genericFormId . '\',' . $objRow->version . ',' . $objRow->templateId . '); return false;">&infin; ' . htmlentities($strPageTitle, ENT_COMPAT, $this->core->sysConfig->encoding->default) . '</div>
       </div>';
                         $counter++;
                     } else {
                         if ($objRow->pageType == $this->core->sysConfig->page_types->external->id) {
                             /**
                              * overwrite type with 'page'
                              */
                             $objRow->type = 'page';
                             /**
                              * get values of the row and create page output
                              */
                             $strOutput .= '<div id="' . $objRow->type . $objRow->id . '" class="' . $objRow->type . '">
         <div class="icon img_' . $objRow->type . '_' . ($objRow->idStatus == $this->core->sysConfig->status->live ? 'on' : 'off') . '"></div>
         <div class="navsortpos"><input class="iptsortpos" type="text" name="pos_' . $objRow->type . '_' . $objRow->id . '" id="pos_' . $objRow->type . '_' . $objRow->id . '" value="' . $counter . '" onfocus="myNavigation.toggleSortPosBox(\'pos_' . $objRow->type . '_' . $objRow->id . '\'); return false;" onkeyup="if(event.keyCode==13){ myNavigation.updateSortPosition(\'pos_' . $objRow->type . '_' . $objRow->id . '\',\'' . $objRow->type . '\',' . $currLevel . '); myNavigation.toggleSortPosBox(\'pos_' . $objRow->type . '_' . $objRow->id . '\'); return false; }" onblur="myNavigation.toggleSortPosBox(\'pos_' . $objRow->type . '_' . $objRow->id . '\'); return false;" /></div>
         <div id="divNavigationTitle_' . $objRow->type . $objRow->id . '" class="title" onclick="myNavigation.getEditForm(' . $objRow->id . ',\'' . $objRow->type . '\',\'' . $objRow->genericFormId . '\',' . $objRow->version . ',' . $objRow->templateId . '); return false;">' . htmlentities($strPageTitle, ENT_COMPAT, $this->core->sysConfig->encoding->default) . '</div>
       </div>';
                             $counter++;
                         } else {
                             if ($objRow->pageType == $this->core->sysConfig->page_types->sitemap->id) {
                                 /**
                                  * overwrite type with 'page'
//.........这里部分代码省略.........
开发者ID:BGCX261,项目名称:zoolu-svn-to-git,代码行数:101,代码来源:NavigationHelper.php

示例6: rootnavigationAction

 /**
  * rootnavigationAction
  * @author Cornelius Hansjakob <cha@massiveart.com>
  * @version 1.0
  */
 public function rootnavigationAction()
 {
     $this->core->logger->debug('cms->controllers->NavigationController->rootnavigationAction()');
     $objRequest = $this->getRequest();
     $intCurrLevel = $objRequest->getParam("currLevel");
     $this->setPortalId($objRequest->getParam("rootLevelId"));
     if (Security::get()->isAllowed(Security::RESOURCE_ROOT_LEVEL_PREFIX . $this->intPortalId, Security::PRIVILEGE_VIEW)) {
         /**
          * get navigation
          */
         $this->getModelFolders();
         $objRootelements = $this->objModelFolders->loadRootNavigation($this->intPortalId);
         $this->view->assign('rootelements', $objRootelements);
         $this->view->assign('currLevel', $intCurrLevel);
         $this->view->assign('return', true);
     } else {
         $this->view->assign('return', false);
     }
 }
开发者ID:BGCX261,项目名称:zoolu-svn-to-git,代码行数:24,代码来源:NavigationController.php

示例7: getNavigationElements

 /**
  * getNavigationElements 
  * @author Cornelius Hansjakob <cha@massiveart.com>
  * @version 1.0
  */
 function getNavigationElements($objRowset, $currLevel)
 {
     $this->core->logger->debug('media->views->helpers->NavigationHelper->getNavigationElements()');
     $strOutput = '';
     if (count($objRowset) > 0) {
         foreach ($objRowset as $strField => $objRow) {
             if (Security::get()->isAllowed(Security::RESOURCE_FOLDER_PREFIX . $objRow->id, Security::PRIVILEGE_VIEW)) {
                 $strFolderTitle = $objRow->title;
                 // gui fallback title
                 if ($strFolderTitle == '' && $objRow->elementType == 'folder') {
                     $strFolderTitle = $objRow->guiTitle;
                     $objRow->type = 'folder';
                     $objRow->genericFormId = $this->core->sysConfig->form->ids->folders->default;
                     $objRow->version = 'null';
                     $objRow->templateId = -1;
                 }
                 /**
                  * get values of the row and create default output
                  */
                 $strOutput .= '<div id="' . $objRow->type . $objRow->id . '" class="' . $objRow->type . '">
         <div id="divNavigationEdit_' . $objRow->id . '" class="icon img_' . $objRow->type . '_on" ondblclick="myNavigation.getEditForm(' . $objRow->id . ',\'' . $objRow->type . '\',\'' . $objRow->genericFormId . '\',' . $objRow->version . '); return false;"></div>
         <div id="divNavigationTitle_' . $objRow->type . $objRow->id . '" class="title" onclick="myNavigation.selectNavigationItem(' . $currLevel . ', \'' . $objRow->type . '\',' . $objRow->id . '); myMedia.getMediaFolderContent(' . $objRow->id . '); return false;">' . htmlentities($strFolderTitle, ENT_COMPAT, $this->core->sysConfig->encoding->default) . '</div>
       </div>';
             }
         }
     }
     return $strOutput;
 }
开发者ID:BGCX261,项目名称:zoolu-svn-to-git,代码行数:33,代码来源:NavigationHelper.php

示例8: getNavigationElements

 /**
  * getNavigationElements
  * @author Thomas Schedler <tsh@massiveart.com>
  * @version 1.0
  */
 function getNavigationElements($objRowset, $currLevel, $strGroupKey)
 {
     $this->core->logger->debug('cms->views->helpers->NavigationHelper->getNavigationElements()');
     $strOutput = '';
     $strOutputStartElement = '';
     $counter = 1;
     $strGroupKeyOverview = $strGroupKey . '_overview';
     if (count($objRowset) > 0) {
         foreach ($objRowset as $objRow) {
             $intSortRowId = $objRow->linkGlobalId > 0 ? $objRow->linkGlobalId : $objRow->id;
             $strGlobalTitle = $objRow->title;
             $strFolderTitle = $objRow->title;
             // gui fallback title
             if ($strGlobalTitle == '' && $objRow->elementType == 'global') {
                 $strGlobalTitle = $objRow->guiTitle;
                 $objRow->type = 'global';
                 $objRow->genericFormId = '';
                 $objRow->version = 'null';
                 $objRow->templateId = $objRow->isStartGlobal == 1 ? $this->core->sysConfig->global_types->{$strGroupKeyOverview}->default_templateId : $this->core->sysConfig->global_types->{$strGroupKey}->default_templateId;
             }
             // gui fallback title
             if ($strFolderTitle == '' && $objRow->elementType == 'folder') {
                 $strFolderTitle = $objRow->guiTitle;
                 $objRow->type = 'folder';
                 $objRow->genericFormId = $this->core->sysConfig->form->ids->folders->default;
                 $objRow->version = 'null';
                 $objRow->templateId = -1;
             }
             $objRow->version = $objRow->version != '' ? $objRow->version : 'null';
             $objRow->templateId = $objRow->templateId != '' ? $objRow->templateId : -1;
             if ($objRow->isStartGlobal == 1) {
                 /**
                  * overwrite type with 'global'
                  */
                 $objRow->type = 'global';
                 /**
                  * get values of the row and create startproduct output
                  */
                 $strOutputStartElement .= '<div id="' . $objRow->type . $objRow->id . '" class="' . $objRow->type . '">
         <div class="icon img_start_' . ($objRow->idStatus == $this->core->sysConfig->status->live ? 'on' : 'off') . '"></div>
         <div class="title" onclick="myNavigation.getEditForm(' . $objRow->id . ',\'' . $objRow->type . '\',\'' . $objRow->genericFormId . '\',' . $objRow->version . ',' . $objRow->templateId . ',' . $intSortRowId . '); return false;">' . htmlentities($strGlobalTitle, ENT_COMPAT, $this->core->sysConfig->encoding->default) . '</div>
       </div>';
             } else {
                 if ($objRow->elementType == 'global') {
                     /**
                      * overwrite type with 'global'
                      */
                     $objRow->type = 'global';
                     /**
                      * get values of the row and create global output
                      */
                     $strOutput .= '<div id="' . $objRow->type . $objRow->id . '" class="' . $objRow->type . '">
         <div class="icon img_' . $objRow->type . '_' . ($objRow->idStatus == $this->core->sysConfig->status->live ? 'on' : 'off') . '"></div>
         <div class="navsortpos"><input class="iptsortpos" type="text" name="pos_' . $objRow->type . '_' . $intSortRowId . '" id="pos_' . $objRow->type . '_' . $intSortRowId . '" value="' . $counter . '" onfocus="myNavigation.toggleSortPosBox(\'pos_' . $objRow->type . '_' . $intSortRowId . '\'); return false;" onkeyup="if(event.keyCode==13){ myNavigation.updateSortPosition(\'pos_' . $objRow->type . '_' . $intSortRowId . '\',\'' . $objRow->type . '\',' . $currLevel . '); myNavigation.toggleSortPosBox(\'pos_' . $objRow->type . '_' . $intSortRowId . '\'); return false; }" onblur="myNavigation.toggleSortPosBox(\'pos_' . $objRow->type . '_' . $intSortRowId . '\'); return false;" /></div>
         <div class="title" onclick="myNavigation.getEditForm(' . $objRow->id . ',\'' . $objRow->type . '\',\'' . $objRow->genericFormId . '\',' . $objRow->version . ',' . $objRow->templateId . ',' . $intSortRowId . '); return false;">' . htmlentities($strGlobalTitle, ENT_COMPAT, $this->core->sysConfig->encoding->default) . '</div>
       </div>';
                     $counter++;
                 } else {
                     if (Security::get()->isAllowed(Security::RESOURCE_FOLDER_PREFIX . $objRow->id, Security::PRIVILEGE_VIEW)) {
                         /**
                          * get values of the row and create default output
                          */
                         $strOutput .= '<div id="' . $objRow->type . $objRow->id . '" class="' . $objRow->type . '">
           <div id="divNavigationEdit_' . $objRow->id . '" class="icon img_' . $objRow->type . '_' . ($objRow->idStatus == $this->core->sysConfig->status->live ? 'on' : 'off') . '" ondblclick="myNavigation.getEditForm(' . $objRow->id . ',\'' . $objRow->type . '\',\'' . $objRow->genericFormId . '\',' . $objRow->version . ',' . $objRow->templateId . '); return false;"></div>
           <div class="navsortpos"><input class="iptsortpos" type="text" name="pos_' . $objRow->type . '_' . $objRow->id . '" id="pos_' . $objRow->type . '_' . $objRow->id . '" value="' . $counter . '" onfocus="myNavigation.toggleSortPosBox(\'pos_' . $objRow->type . '_' . $objRow->id . '\'); return false;" onkeyup="if(event.keyCode==13){ myNavigation.updateSortPosition(\'pos_' . $objRow->type . '_' . $objRow->id . '\',\'' . $objRow->type . '\',' . $currLevel . '); myNavigation.toggleSortPosBox(\'pos_' . $objRow->type . '_' . $objRow->id . '\'); return false; }" onblur="myNavigation.toggleSortPosBox(\'pos_' . $objRow->type . '_' . $objRow->id . '\'); return false;"/></div>
           <div id="divNavigationTitle_' . $objRow->type . $objRow->id . '" class="title" onclick="myNavigation.selectNavigationItem(' . $currLevel . ', \'' . $objRow->type . '\',' . $objRow->id . '); return false;">' . htmlentities($strFolderTitle, ENT_COMPAT, $this->core->sysConfig->encoding->default) . '</div>
         </div>';
                     }
                     $counter++;
                 }
             }
         }
         if ($strOutputStartElement != '') {
             $strOutputStartElement .= '<div class="linegray"></div>';
         }
     }
     return $strOutputStartElement . $strOutput;
 }
开发者ID:BGCX261,项目名称:zoolu-svn-to-git,代码行数:83,代码来源:NavigationHelper.php

示例9: getItemLanguageId

 /**
  * getItemLanguageId
  * @param integer $intActionType
  * @return integer
  * @author Cornelius Hansjakob <cha@massiveart.com>
  * @version 1.0 
  */
 protected function getItemLanguageId($intActionType = null)
 {
     if ($this->intItemLanguageId == null) {
         if (!$this->objRequest->getParam("languageId")) {
             $this->intItemLanguageId = $this->objRequest->getParam("rootLevelLanguageId") != '' ? $this->objRequest->getParam("rootLevelLanguageId") : $this->core->intZooluLanguageId;
             $intRootLevelId = $this->objRequest->getParam("rootLevelId");
             $PRIVILEGE = $intActionType == $this->core->sysConfig->generic->actions->add ? Security::PRIVILEGE_ADD : Security::PRIVILEGE_UPDATE;
             $arrLanguages = $this->core->config->languages->language->toArray();
             foreach ($arrLanguages as $arrLanguage) {
                 if (Security::get()->isAllowed(Security::RESOURCE_ROOT_LEVEL_PREFIX . $intRootLevelId . '_' . $arrLanguage['id'], $PRIVILEGE, false, false)) {
                     $this->intItemLanguageId = $arrLanguage['id'];
                     break;
                 }
             }
         } else {
             $this->intItemLanguageId = $this->objRequest->getParam("languageId");
         }
     }
     return $this->intItemLanguageId;
 }
开发者ID:BGCX261,项目名称:zoolu-svn-to-git,代码行数:27,代码来源:MemberController.php

示例10: rootnavigationAction

 /**
  * rootnavigationAction
  * @author Cornelius Hansjakob <cha@massiveart.com>
  * @version 1.0
  */
 public function rootnavigationAction()
 {
     $this->core->logger->debug('contacts->controllers->NavigationController->rootnavigationAction()');
     $objRequest = $this->getRequest();
     $intCurrLevel = $objRequest->getParam('currLevel');
     $this->setRootLevelId($objRequest->getParam('rootLevelId'));
     $intRootLevelTypeId = $objRequest->getParam('rootLevelTypeId');
     $intRootLevelGroupId = $objRequest->getParam('rootLevelGroupId');
     $strRootLevelGroupKey = $objRequest->getParam('rootLevelGroupKey');
     $strRenderScript = '';
     if (Security::get()->isAllowed(Security::RESOURCE_ROOT_LEVEL_PREFIX . $this->intRootLevelId, Security::PRIVILEGE_VIEW, true, false)) {
         $objRootelements = new stdClass();
         if ($intRootLevelTypeId != '' && $intRootLevelTypeId > 0) {
             switch ($intRootLevelTypeId) {
                 case $this->core->sysConfig->root_level_types->contacts:
                     /**
                      * get contacts root navigation
                      */
                     $this->getModelContacts();
                     $objRootelements = $this->objModelContacts->loadNavigation($this->intRootLevelId, 0);
                     $strRenderScript = 'contactnavigation.phtml';
                     break;
                 case $this->core->sysConfig->root_level_types->locations:
                     /**
                      * get locations root navigation
                      */
                     $this->getModelLocations();
                     $objRootelements = $this->objModelLocations->loadNavigation($this->intRootLevelId, 0, true);
                     $strRenderScript = 'locationnavigation.phtml';
                     break;
                 case $this->core->sysConfig->root_level_types->members:
                     /**
                      * get members root navigation
                      */
                     $this->getModelMembers();
                     $objRootelements = $this->objModelMembers->loadNavigation($this->intRootLevelId, 0);
                     $strRenderScript = 'membernavigation.phtml';
                     break;
             }
         }
         $this->view->assign('rootelements', $objRootelements);
         $this->view->assign('currLevel', $intCurrLevel);
         $this->view->assign('rootLevelId', $this->intRootLevelId);
         $this->view->assign('rootLevelTypeId', $intRootLevelTypeId);
         $this->view->assign('unitFormDefaultId', $this->core->sysConfig->form->ids->units->default);
         $this->view->assign('contactFormDefaultId', $this->core->sysConfig->form->ids->contacts->default);
         $this->view->assign('return', true);
         if ($strRenderScript != '') {
             $this->renderScript('navigation/' . $strRenderScript);
         }
     } else {
         $this->view->assign('return', false);
     }
 }
开发者ID:BGCX261,项目名称:zoolu-svn-to-git,代码行数:59,代码来源:NavigationController.php

示例11: getMainNavigation

 /**
  * getMainNavigation
  * @author Thomas Schedler <tsh@massiveart.com>
  * @version 1.0
  */
 public function getMainNavigation(NavigationTree $rootLevelNavigation, $rootLevelId, $strViewType = '')
 {
     $this->core->logger->debug('contacts->views->helpers->NavigationHelper->getMainNavigation(): rootLevelId: ' . $rootLevelId . ' - strViewType: ' . $strViewType);
     $strOutput = '';
     foreach ($rootLevelNavigation as $objNavigationTree) {
         if (count($objNavigationTree) == 1) {
             foreach ($objNavigationTree as $objNavigation) {
                 /**
                  * get values of the row and create output
                  */
                 $strJsClickFunc = '';
                 $strRootLevelIconCss = '';
                 $strRootLevelType = '';
                 switch ($objNavigation->getTypeId()) {
                     case $this->core->sysConfig->root_level_types->contacts:
                         $strRootLevelType = 'contact';
                         $strJsClickFunc = 'myNavigation.selectContacts(' . $objNavigation->getId() . ', ' . $objNavigationTree->getTypeId() . ', \'' . $objNavigation->getUrl() . '\', true, \'' . $strViewType . '\'); return false;';
                         $strRootLevelIconCss = 'usericon';
                         break;
                     case $this->core->sysConfig->root_level_types->locations:
                         $strRootLevelType = 'location';
                         $strJsClickFunc = 'myNavigation.selectLocations(' . $objNavigation->getId() . ', ' . $objNavigationTree->getTypeId() . ', \'' . $objNavigation->getUrl() . '\', true, \'' . $strViewType . '\'); return false;';
                         $strRootLevelIconCss = 'locationicon';
                         break;
                     case $this->core->sysConfig->root_level_types->members:
                         $strRootLevelType = 'member';
                         $strJsClickFunc = 'myNavigation.selectMembers(' . $objNavigation->getId() . ', ' . $objNavigationTree->getTypeId() . ', \'' . $objNavigation->getUrl() . '\', \'' . $strViewType . '\', \'' . $strRootLevelType . '\'); return false;';
                         $strRootLevelIconCss = 'usericon';
                         break;
                     case $this->core->sysConfig->root_level_types->companies:
                         $strRootLevelType = 'company';
                         $strJsClickFunc = 'myNavigation.selectCompanies(' . $objNavigation->getId() . ', ' . $objNavigationTree->getTypeId() . ', \'' . $objNavigation->getUrl() . '\', \'' . $strViewType . '\', \'' . $strRootLevelType . '\'); return false;';
                         $strRootLevelIconCss = 'locationicon';
                         break;
                 }
                 if (Security::get()->isAllowed(Security::RESOURCE_ROOT_LEVEL_PREFIX . $objNavigation->getId(), Security::PRIVILEGE_VIEW, true, false)) {
                     $strSelected = '';
                     if ($rootLevelId == $objNavigation->getId()) {
                         $strSelected = ' selected';
                         $strOutput .= '
           <script type="text/javascript">//<![CDATA[
             var preSelectedNaviItem = \'naviitem' . $objNavigation->getId() . '\';
           </script>';
                     }
                     $strOutput .= '
           <div class="naviitemcontainer">
             <div id="naviitem' . $objNavigation->getId() . 'top" class="top' . $strSelected . '"><img src="/zoolu-statics/images/main/bg_box_230_top.png" width="230" height="4"/></div>
             <div id="naviitem' . $objNavigation->getId() . '" class="naviitem' . $strSelected . '" onclick="' . $strJsClickFunc . '">
               <div class="' . $strRootLevelIconCss . '"></div>
               <div id="divRootLevelTitle_' . $objNavigation->getId() . '" class="itemtitle">' . htmlentities($objNavigation->getTitle(), ENT_COMPAT, $this->core->sysConfig->encoding->default) . '</div>
               <div class="clear"></div>
               <input type="hidden" value="' . $objNavigationTree->getItemId() . '" id="rootLevelGroupKey' . $objNavigationTree->getTypeId() . '"/>
               <input type="hidden" value="' . $objNavigation->getLanguageId() . '" id="rootLevelLanguageId' . $objNavigation->getId() . '"/> 
               <input type="hidden" value="' . $strRootLevelType . '" id="rootLevelType' . $objNavigation->getId() . '"/>             
             </div>
             <div id="naviitem' . $objNavigation->getId() . 'bottom" class="bottom' . $strSelected . '"><img src="/zoolu-statics/images/main/bg_box_230_bottom.png" width="230" height="4"/></div>
             <div class="clear"></div>
       </div>';
                 }
             }
         } else {
             $strSubNavi = '';
             $strDisplaySubNavi = ' style="display:none;"';
             $strSubNaviSelected = '';
             foreach ($objNavigationTree as $objNavigation) {
                 /**
                  * get values of the row and create output
                  */
                 $strJsClickFunc = '';
                 $strRootLevelIconCss = '';
                 $strRootLevelType = '';
                 switch ($objNavigation->getTypeId()) {
                     case $this->core->sysConfig->root_level_types->contacts:
                         $strRootLevelType = 'contact';
                         $strJsClickFunc = 'myNavigation.selectContacts(' . $objNavigation->getId() . ', ' . $objNavigationTree->getTypeId() . ', \'' . $objNavigation->getUrl() . '\', true, \'' . $strViewType . '\'); return false;';
                         $strRootLevelIconCss = 'portalcontenticon';
                         break;
                     case $this->core->sysConfig->root_level_types->locations:
                         $strRootLevelType = 'location';
                         $strJsClickFunc = 'myNavigation.selectLocations(' . $objNavigation->getId() . ', ' . $objNavigationTree->getTypeId() . ', \'' . $objNavigation->getUrl() . '\', true, \'' . $strViewType . '\'); return false;';
                         $strRootLevelIconCss = 'portalcontenticon';
                         break;
                     case $this->core->sysConfig->root_level_types->members:
                         $strRootLevelType = 'member';
                         $strJsClickFunc = 'myNavigation.selectMembers(' . $objNavigation->getId() . ', ' . $objNavigationTree->getTypeId() . ', \'' . $objNavigation->getUrl() . '\', \'' . $strViewType . '\', \'' . $strRootLevelType . '\'); return false;';
                         $strRootLevelIconCss = 'portalcontenticon';
                         break;
                     case $this->core->sysConfig->root_level_types->companies:
                         $strRootLevelType = 'company';
                         $strJsClickFunc = 'myNavigation.selectCompanies(' . $objNavigation->getId() . ', ' . $objNavigationTree->getTypeId() . ', \'' . $objNavigation->getUrl() . '\', \'' . $strViewType . '\', \'' . $strRootLevelType . '\'); return false;';
                         $strRootLevelIconCss = 'portalcontenticon';
                         break;
                 }
                 if (Security::get()->isAllowed(Security::RESOURCE_ROOT_LEVEL_PREFIX . $objNavigation->getId(), Security::PRIVILEGE_VIEW, true, false)) {
                     $strSelected = '';
//.........这里部分代码省略.........
开发者ID:BGCX261,项目名称:zoolu-svn-to-git,代码行数:101,代码来源:NavigationHelper.php

示例12: init

 /**
  * init
  * @author Thomas Schedler <tsh@massiveart.com>
  * @version 1.0
  * @return void
  */
 public function init()
 {
     parent::init();
     Security::get()->addFoldersToAcl($this->getModelFolders());
     Security::get()->addRootLevelsToAcl($this->getModelFolders(), $this->core->sysConfig->modules->media);
 }
开发者ID:BGCX261,项目名称:zoolu-svn-to-git,代码行数:12,代码来源:NavigationController.php

示例13: rootnavigationAction

 /**
  * rootnavigationAction
  * @author Thomas Schedler <tsh@massiveart.com>
  * @version 1.0
  */
 public function rootnavigationAction()
 {
     $this->core->logger->debug('global->controllers->NavigationController->rootnavigationAction()');
     $objRequest = $this->getRequest();
     $intCurrLevel = $objRequest->getParam("currLevel");
     $this->setRootLevelId($objRequest->getParam("rootLevelId"));
     $intRootLevelGroupId = $objRequest->getParam('rootLevelGroupId');
     $strRootLevelGroupKey = $objRequest->getParam('rootLevelGroupKey', 'content');
     if (Security::get()->isAllowed(Security::RESOURCE_ROOT_LEVEL_PREFIX . $this->intRootLevelId, Security::PRIVILEGE_VIEW, true, false)) {
         /**
          * get navigation
          */
         $this->getModelFolders();
         $objRootelements = $this->objModelFolders->loadGlobalRootNavigation($this->intRootLevelId, $intRootLevelGroupId);
         $this->view->assign('rootelements', $objRootelements);
         $this->view->assign('currLevel', $intCurrLevel);
         $this->view->assign('folderFormDefaultId', $this->core->sysConfig->form->ids->folders->default);
         $this->view->assign('elementFormDefaultId', $this->core->sysConfig->global_types->{$strRootLevelGroupKey}->default_formId);
         $this->view->assign('elementTemplateDefaultId', $this->core->sysConfig->global_types->{$strRootLevelGroupKey}->default_templateId);
         $this->view->assign('elementTypeDefaultId', $this->core->sysConfig->global_types->{$strRootLevelGroupKey}->id);
         $this->view->assign('rootLevelId', $this->intRootLevelId);
         $this->view->assign('rootLevelGroupId', $intRootLevelGroupId);
         $this->view->assign('rootLevelGroupKey', $strRootLevelGroupKey);
         $this->view->assign('return', true);
     } else {
         $this->view->assign('return', false);
     }
 }
开发者ID:BGCX261,项目名称:zoolu-svn-to-git,代码行数:33,代码来源:NavigationController.php

示例14: assignSecurityOptions

 /**
  * assignSecurityOptions
  * @author Thomas Schedler <cha@massiveart.com>
  * @version 1.0
  */
 protected function assignSecurityOptions()
 {
     $intRootLevelId = (int) $this->getRequest()->getParam('rootLevelId', 0);
     if ($intRootLevelId != 0) {
         $this->view->authorizedAdd = Security::get()->isAllowed(Security::RESOURCE_ROOT_LEVEL_PREFIX . $intRootLevelId, Security::PRIVILEGE_ADD, true, false);
         $this->view->authorizedDelete = Security::get()->isAllowed(Security::RESOURCE_ROOT_LEVEL_PREFIX . $intRootLevelId, Security::PRIVILEGE_DELETE, true, false);
         $this->view->authorizedUpdate = Security::get()->isAllowed(Security::RESOURCE_ROOT_LEVEL_PREFIX . $intRootLevelId, Security::PRIVILEGE_UPDATE, true, false);
     } else {
         $this->view->authorizedAdd = Security::get()->isAllowed('media', Security::PRIVILEGE_ADD, false, false);
         $this->view->authorizedDelete = Security::get()->isAllowed('media', Security::PRIVILEGE_DELETE, false, false);
         $this->view->authorizedUpdate = Security::get()->isAllowed('media', Security::PRIVILEGE_UPDATE, false, false);
     }
 }
开发者ID:BGCX261,项目名称:zoolu-svn-to-git,代码行数:18,代码来源:ViewController.php

示例15: checkZonePrivileges

 /**
  * checkZonePrivileges
  * @return boolean
  * @author Thomas Schedler <tsh@massiveart.com>
  * @version 1.0
  */
 public function checkZonePrivileges()
 {
     $blnAuthorized = true;
     Security::get()->addFoldersToAcl($this->getModelFolders(), Security::ZONE_WEBSITE);
     if (count($this->ParentFolders()) > 0) {
         foreach ($this->ParentFolders() as $objParentFolderData) {
             if ($objParentFolderData->isSecure == 1 && !Security::get()->isAllowed(Security::RESOURCE_FOLDER_PREFIX . $objParentFolderData->id, Security::PRIVILEGE_VIEW, true, false, Security::ZONE_WEBSITE) && !Security::get()->isAllowed(Security::RESOURCE_FOLDER_PREFIX . $objParentFolderData->id . '_' . $this->intLanguageId, Security::PRIVILEGE_VIEW, true, false, Security::ZONE_WEBSITE)) {
                 $blnAuthorized = false;
                 break;
             }
         }
     }
     return $blnAuthorized;
 }
开发者ID:BGCX261,项目名称:zoolu-svn-to-git,代码行数:20,代码来源:navigation.class.php


注:本文中的Security::get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。