Ejemplo n.º 1
0
 public function execute()
 {
     $authClass = org_glizy_ObjectFactory::createObject(__Config::get('glizy.authentication'));
     $authClass->logout();
     org_glizy_helpers_Navigation::gotoUrl(GLZ_HOST);
     exit;
 }
Ejemplo n.º 2
0
 /**
  * Process
  *
  * @return	boolean	false if the process is aborted
  * @access	public
  */
 function process()
 {
     if (!$this->_application->canViewPage()) {
         org_glizy_Session::set('glizy.loginUrl', org_glizy_helpers_Link::scriptUrl());
         org_glizy_helpers_Navigation::gotoUrl(org_glizy_helpers_Link::makeUrl('accessDenied'));
     }
     $this->processChilds();
 }
Ejemplo n.º 3
0
 /**
  * Init
  *
  * @return	void
  * @access	public
  */
 function process()
 {
     $authClass = org_glizy_ObjectFactory::createObject(__Config::get('glizy.authentication'));
     if ($authClass) {
         $authClass->logout();
     }
     org_glizy_helpers_Navigation::gotoUrl(GLZ_HOST);
     exit;
 }
Ejemplo n.º 4
0
 function execute()
 {
     if (__Request::exists('next')) {
         $pageType = $this->application->getPageType();
         list($moduleName) = explode('.', $pageType);
         __Request::set('mbTable', $moduleName);
         $builder = org_glizy_ObjectFactory::createObject('movio.modules.modulesBuilder.builder.Builder');
         $builder->executeDelete();
         org_glizy_helpers_Navigation::gotoUrl(__Link::makeUrl('link', array('pageId' => 'glizycms_contentsedit')));
     }
 }
 function executeLater_deleteModule($oldState)
 {
     if (strtolower(__Request::get('action', '')) == 'next') {
         $pageType = $this->_parent->_application->getPageType();
         list($moduleName) = explode('.', $pageType);
         __Session::set('mbTable', $moduleName);
         glz_import('movio.modules.modulesBuilder.builder.*', array('Builder.php', 'AbstractCommand.php'));
         $builder = org_glizy_ObjectFactory::createObject('movio.modules.modulesBuilder.builder.Builder');
         $builder->executeDelete();
         glz_import('org.glizy.helpers.Navigation');
         org_glizy_helpers_Navigation::gotoUrl(__Link::makeUrl('link', array('pageId' => 'SiteMap')));
     }
 }
Ejemplo n.º 6
0
 protected function loadContentFromDB()
 {
     if (!$this->_application->canViewPage()) {
         //$this->setAttribute('templateFileName', 'accessDenaied' );
         org_glizy_Session::set('glizy.loginUrl', org_glizy_helpers_Link::scriptUrl());
         org_glizy_helpers_Navigation::gotoUrl(org_glizy_helpers_Link::makeUrl('accessDenied'));
     }
     // if ($this->_user->backEndAccess && org_glizy_Request::get( 'draft', '' ) == '1')
     // {
     // 	$versionStatus = 'DRAFT';
     // }
     // TODO gestire lo stato PUBLISHED E DRAFT
     $contentProxy = org_glizy_ObjectFactory::createObject('org.glizycms.contents.models.proxy.ContentProxy');
     $this->_content = $contentProxy->readContentFromMenu($this->_application->getPageId(), org_glizy_ObjectValues::get('org.glizy', 'languageId'));
 }
Ejemplo n.º 7
0
 function execute()
 {
     if ($this->user->isLogged()) {
         $siteMap = $this->application->getSiteMap();
         $siteMapIterator = org_glizy_ObjectFactory::createObject('org.glizy.application.SiteMapIterator', $siteMap);
         while (!$siteMapIterator->EOF) {
             $n = $siteMapIterator->getNode();
             $siteMapIterator->moveNext();
             if ($n->isVisible && $n->depth > 1 && !$n->select) {
                 org_glizy_helpers_Navigation::gotoUrl($n->id);
             }
         }
         $authClass = org_glizy_ObjectFactory::createObject(__Config::get('glizy.authentication'));
         $authClass->logout();
     }
 }
Ejemplo n.º 8
0
 function process()
 {
     $allowGroups = $this->getAttribute('allowGroups') != '' ? explode(',', $this->getAttribute('allowGroups')) : array();
     if ((!org_glizy_Session::get('glizy.userLogged') || !(count($allowGroups) ? in_array($this->_user->groupId, $allowGroups) : true)) && $this->getAttribute('enabled')) {
         if (org_glizy_helpers_Link::scriptUrl() != org_glizy_helpers_Link::makeUrl('link', array('pageId' => org_glizy_Config::get('START_PAGE')))) {
             if ($this->getAttribute('showErrorMessage')) {
                 org_glizy_Session::set('glizy.loginError', org_glizy_locale_Locale::get('GLZ_LOGIN_NOACCESS'));
             }
             org_glizy_Session::set('glizy.loginUrl', __Request::get('__url__'));
         }
         org_glizy_helpers_Navigation::gotoUrl(org_glizy_helpers_Link::makeUrl('link', array('pageId' => $this->getAttribute('accessPageId'))));
         exit;
     }
     if ($this->getAttribute('checkAcl') && !$this->_user->acl($this->_application->getPageId(), 'visible')) {
         header('HTTP/1.0 403 Forbidden');
         exit;
     }
 }
Ejemplo n.º 9
0
 function goHere()
 {
     /** @var org_glizy_application_Application $application */
     $application =& org_glizy_ObjectValues::get('org.glizy', 'application');
     org_glizy_helpers_Navigation::gotoUrl(org_glizy_helpers_Link::makeUrl('link', array('pageId' => $application->getPageId())));
 }
Ejemplo n.º 10
0
 private function checkSwitchLanguage()
 {
     $language = org_glizy_Request::get('language', NULL);
     if (!is_null($language) && $language != $this->_language) {
         // cambio lingua
         $this->log("change language", GLZ_LOG_SYSTEM);
         $ar = org_glizy_ObjectFactory::createModel('org.glizycms.core.models.Language');
         $ar->language_code = $language;
         $ar->find();
         org_glizy_Session::set('glizy.language', $ar->language_code);
         org_glizy_Session::set('glizy.languageId', $ar->language_id);
         org_glizy_ObjectValues::set('org.glizy', 'languageId', $ar->language_id);
         $this->_languageId = $ar->language_id;
         $this->_language = $ar->language_code;
         // ricarica la struttura del sito per avere i titoli aggiornati
         $this->_initSiteMap(true);
         // controlla se il routing ha definito un urlResolver
         $speakingUrlManager = $this->retrieveProxy('org.glizycms.speakingUrl.Manager');
         $urlResolver = $speakingUrlManager->getResolver(__Request::get('cms:urlResolver', 'org.glizycms.core.models.Content'));
         $url = $urlResolver->makeUrlFromRequest();
         org_glizy_helpers_Navigation::gotoUrl($url);
     }
 }
Ejemplo n.º 11
0
 function refreshToState($newState = '', $params = null)
 {
     $url = str_replace('&', '&', $this->changeStateUrl($newState));
     org_glizy_helpers_Navigation::gotoUrl($url, $params);
 }
Ejemplo n.º 12
0
 private function redirectAfterLogin()
 {
     $destPage = '';
     $accessPageId = $this->getAttribute('accessPageId');
     if ($accessPageId && $accessPageId != $this->_application->getPageId()) {
         $destPage = strpos($accessPageId, 'http') !== false ? $accessPageId : org_glizy_helpers_Link::makeUrl('link', array('pageId' => $this->getAttribute('accessPageId')));
     }
     $url = org_glizy_Session::get('glizy.loginUrl', $destPage);
     if ($url) {
         org_glizy_Session::remove('glizy.loginUrl');
         org_glizy_helpers_Navigation::gotoUrl($url);
     }
 }
Ejemplo n.º 13
0
 function _readPageId()
 {
     $this->log("readPageId", GLZ_LOG_SYSTEM);
     // legge il pageId della pagina da visualizzare
     $this->_pageId = org_glizy_Request::get('pageId', NULL);
     if (empty($this->_pageId)) {
         $this->_pageId = org_glizy_Config::get('REMEMBER_PAGEID') ? org_glizy_Session::get('glizy.pageId', org_glizy_Config::get('START_PAGE')) : org_glizy_Config::get('START_PAGE');
     }
     if (org_glizy_Config::get('REMEMBER_PAGEID')) {
         org_glizy_Session::set('glizy.pageId', $this->_pageId);
     }
     if (!is_numeric($this->_pageId) && $this->getClassName() == 'org_glizycms_core_application_application') {
         $this->siteMapMenu =& $this->siteMap->getMenuByPageType($this->_pageId);
         $this->_pageId = $this->siteMapMenu->id;
     } else {
         $this->siteMapMenu =& $this->siteMap->getNodeById($this->_pageId);
     }
     if (!is_object($this->siteMapMenu) || !$this->siteMapMenu->isVisible) {
         $report = array();
         $report['Request'] = var_export(__Request::getAllAsArray(), true);
         $report['_SERVER'] = var_export($_SERVER, true);
         $this->log($report, GLZ_LOG_SYSTEM, 'glizy.404');
         if (!$this->getCurrentUser()->acl($this->siteMapMenu->id, "visible")) {
             org_glizy_helpers_Navigation::gotoUrl(__Link::makeUrl('link', array('pageId' => __Config::get('START_PAGE'))));
         }
         $error404Page = __Config::get('ERROR_404');
         if (!empty($error404Page)) {
             org_glizy_helpers_Navigation::gotoUrl(__Link::makeUrl('link', array('pageId' => $error404Page)));
         }
         new org_glizy_Exception(__T('GLZ_ERR_404') . '</br>' . __Request::get('pageId'), GLZ_E_404);
     }
     if (!empty($this->siteMapMenu->select)) {
         if ($this->siteMapMenu->select == '*') {
             $menu = $this->siteMapMenu->firstChild(true);
         } else {
             $menu = $this->siteMap->getNodeById($this->siteMapMenu->select);
         }
         org_glizy_helpers_Navigation::gotoUrl(__Link::makeUrl('link', array('pageId' => $menu->id)));
     }
 }
Ejemplo n.º 14
0
 function changeBackPage()
 {
     $url = __Session::get('__backUrl__', '');
     org_glizy_helpers_Navigation::gotoUrl($url);
 }