public function __construct() { parent::__construct(); if (!Session::get('autenticado')) { $this->redireccionar('error/access/5050'); } $this->_menu = $this->loadModel('menu'); }
/** * Allow updating the list of spam providers manually. * * @param settingsController $sender Instance of the calling class. * @package mailchecker * @since 0.2 * @return void. */ public function settingsController_mailchecker_create($sender) { $sender->permission('Garden.Settings.Manage'); $sender->addSideMenu('dashboard/settings/plugins'); $sender->setData('Title', t('Mailchecker Settings')); $sender->setData('Description', t('You can update the list from time to time but it is not needed at all since the plugin comes with an initial list.')); // Fetch new list and give feedback abut the number of providers. $sender->Form = new Gdn_Form(); if ($sender->Form->authenticatedPostBack()) { $count = $this->updateList(); if ($count) { saveToConfig('mailchecker.LastUpdate', date(time())); $sender->informMessage(sprintf(t('There are currently %1s spam providers in the list'), $count)); } } $sender->render($this->getView('settings.php')); }
if (!empty($_GET['page'])) { switch ($_GET['page']) { case 'item': $item = new itemController(); $item->view(); break; case 'search': $search = new searchController(); $search->view(); break; case 'profile': $profile = new profileController(); $profile->view(); break; case 'settings': $settings = new settingsController(); $settings->view(); break; case 'loan': $loan = new loanController(); $loan->view(); break; case 'message': $message = new messageController(); $message->view(); break; default: $home = new homeController(); $home->view(); break; }
public function __construct() { parent::__construct(); $this->_menu = $this->loadModel('menu'); }