public static function run($debug = FALSE) { new TSession(); if ($_REQUEST) { parent::run($debug); } }
public static function run($debug = FALSE) { new TSession(); $lang = TSession::getValue('language') ? TSession::getValue('language') : 'en'; TAdiantiCoreTranslator::setLanguage($lang); TApplicationTranslator::setLanguage($lang); if ($_REQUEST) { $class = isset($_REQUEST['class']) ? $_REQUEST['class'] : ''; if (!TSession::getValue('logged') and $class !== 'LoginForm') { echo TPage::getLoadedCSS(); echo TPage::getLoadedJS(); new TMessage('error', 'Not logged'); return; } parent::run($debug); } }
public static function run($debug = FALSE) { new TSession(); if ($_REQUEST) { $class = isset($_REQUEST['class']) ? $_REQUEST['class'] : ''; if (!TSession::getValue('logged') and $class !== 'LoginForm') { new TMessage('error', _t('Permission denied'), new TAction(array('LoginForm', 'onLogout'))); } else { if ($class and $class !== 'LoginForm') { $programs = (array) TSession::getValue('programs'); $default_programs = array('TStandardSeek' => TRUE, 'TFileUploader' => TRUE, 'EmptyPage' => TRUE); $programs = array_merge($programs, $default_programs); if (!isset($programs[$class])) { new TMessage('error', _t('Permission denied')); return false; } } parent::run($debug); } } }
/** * Pack a class inside the application window * @param $callback */ public function run($callback) { if (TSession::getValue('logged')) { $this->scroll->show_all(); } else { $this->scroll->hide(); } $class = is_array($callback) ? $callback[0] : $callback; if ($class == 'SetupPage') { $this->configureMenu(); } return parent::run($callback); }