예제 #1
0
 /**
  * Executes a task
  *
  * @return  void
  */
 public function execute()
 {
     $this->registerTask('add', 'edit');
     $this->registerTask('orderup', 'reorder');
     $this->registerTask('orderdown', 'reorder');
     parent::execute();
 }
예제 #2
0
 /**
  * Execute a task
  *
  * @return  void
  */
 public function execute()
 {
     $this->banking = Component::params('com_members')->get('bankAccounts');
     $this->registerTask('add', 'edit');
     $this->registerTask('apply', 'save');
     parent::execute();
 }
예제 #3
0
 /**
  * Determine task and execute it
  *
  * @return  void
  */
 public function execute()
 {
     if (!Permissions::getActions('component')->get('core.admin')) {
         App::redirect(Route::url('index.php?option=com_members', false), Lang::txt('Not authorized'), 'warning');
     }
     parent::execute();
 }
예제 #4
0
 /**
  * Execute a task
  *
  * @return  void
  */
 public function execute()
 {
     Lang::load($this->_option . '.notes', dirname(__DIR__));
     $this->registerTask('add', 'edit');
     $this->registerTask('apply', 'save');
     parent::execute();
 }
예제 #5
0
 /**
  * Execute a task
  *
  * @return  void
  */
 public function execute()
 {
     define('WIKI_SUBPAGE_SEPARATOR', $this->config->get('subpage_separator', '/'));
     define('WIKI_MAX_PAGENAME_LENGTH', $this->config->get('max_pagename_length', 100));
     $this->registerTask('add', 'edit');
     $this->registerTask('apply', 'save');
     parent::execute();
 }
예제 #6
0
 /**
  * Determine task and execute it
  *
  * @return  void
  */
 public function execute()
 {
     if (!User::authorize('core.manage', $this->_option)) {
         App::redirect(Route::url('index.php?option=' . $this->_option, false));
         return;
     }
     parent::execute();
 }
예제 #7
0
 /**
  * Determine task and execute it
  *
  * @return  void
  */
 public function execute()
 {
     if (!Permissions::getActions('component')->get('core.admin')) {
         App::redirect(Route::url('index.php?option=com_members', false), Lang::txt('Not authorized'), 'warning');
     }
     Lang::load($this->_option . '.export', dirname(__DIR__));
     parent::execute();
 }
예제 #8
0
 /**
  * Execute a task
  *
  * @return  void
  */
 public function execute()
 {
     $this->registerTask('add', 'edit');
     $this->registerTask('apply', 'save');
     $this->registerTask('publish', 'state');
     $this->registerTask('unpublish', 'state');
     parent::execute();
 }
예제 #9
0
 /**
  * Executes a task
  *
  * @return     void
  */
 public function execute()
 {
     // Publishing enabled?
     $this->_publishing = Plugin::isEnabled('projects', 'publications') ? 1 : 0;
     // Include scripts
     $this->_includeScripts();
     parent::execute();
 }
예제 #10
0
 /**
  * Execute a task
  *
  * @return  void
  */
 public function execute()
 {
     $this->registerTask('add', 'edit');
     $this->registerTask('apply', 'save');
     $this->registerTask('accesspublic', 'access');
     $this->registerTask('accessregistered', 'access');
     $this->registerTask('accessspecial', 'access');
     parent::execute();
 }
예제 #11
0
 /**
  * Execute a task
  *
  * @return  void
  */
 public function execute()
 {
     Lang::load($this->_option . '.passwords', dirname(__DIR__));
     $this->registerTask('add', 'edit');
     $this->registerTask('apply', 'save');
     $this->registerTask('orderup', 'order');
     $this->registerTask('orderdown', 'order');
     parent::execute();
 }
예제 #12
0
 /**
  * Determine task and execute it
  *
  * @return  void
  */
 public function execute()
 {
     if (!User::authorize('core.manage', $this->_option)) {
         App::redirect(Route::url('index.php?option=' . $this->_option, false));
     }
     $this->registerTask('add', 'edit');
     $this->registerTask('apply', 'save');
     parent::execute();
 }
예제 #13
0
 /**
  * Determines task being called and attempts to execute it
  *
  * @return	void
  */
 public function execute()
 {
     if (!$this->config->get('zones')) {
         App::redirect(Route::url('index.php?option=' . $this->_option, false));
         return;
     }
     $this->registerTask('add', 'edit');
     $this->registerTask('apply', 'save');
     parent::execute();
 }
예제 #14
0
 /**
  * Determines task being called and attempts to execute it
  *
  * @return	void
  */
 public function execute()
 {
     $task = Request::getVar('task', '');
     $plugin = Request::getVar('plugin', '');
     if ($plugin && $task && $task != 'manage') {
         Request::setVar('action', $task);
         Request::setVar('task', 'manage');
     }
     $this->_folder = 'members';
     parent::execute();
 }
예제 #15
0
 /**
  * Execute a task
  *
  * @return  void
  */
 public function execute()
 {
     Lang::load($this->_option . '.members', dirname(__DIR__));
     $this->registerTask('modal', 'display');
     $this->registerTask('add', 'edit');
     $this->registerTask('apply', 'save');
     $this->registerTask('confirm', 'state');
     $this->registerTask('unconfirm', 'state');
     $this->registerTask('applyprofile', 'saveprofile');
     $this->registerTask('unblock', 'block');
     parent::execute();
 }
예제 #16
0
 /**
  * Override Execute Method
  *
  * @return 	void
  */
 public function execute()
 {
     // Incoming
     $this->gid = Request::getVar('gid', '');
     // Ensure we have a group ID
     if (!$this->gid) {
         App::redirect(Route::url('index.php?option=' . $this->_option . '&controller=manage', false), Lang::txt('COM_GROUPS_MISSING_ID'), 'error');
         return;
     }
     $this->group = Group::getInstance($this->gid);
     parent::execute();
 }
예제 #17
0
 /**
  * Executes a task
  *
  * @return  void
  */
 public function execute()
 {
     $this->registerTask('applyDescription', 'saveDescription');
     $this->registerTask('applydescription', 'savedescription');
     $this->registerTask('accesspublic', 'access');
     $this->registerTask('accessprivate', 'access');
     // Publishing enabled?
     $this->_publishing = Plugin::isEnabled('projects', 'publications') ? 1 : 0;
     // Include scripts
     $this->_includeScripts();
     parent::execute();
 }
예제 #18
0
 /**
  * Execute a task
  *
  * @return  void
  */
 public function execute()
 {
     // Here we're aliasing the task 'add' to 'edit'. When examing
     // this controller, you should not find any method called 'addTask'.
     // Instead, we're telling the controller to execute the 'edit' task
     // whenever a task of 'add' is called.
     $this->registerTask('add', 'edit');
     $this->registerTask('apply', 'save');
     // Call the parent execute() method. Important! Otherwise, the
     // controller will never actually execute anything.
     parent::execute();
 }
예제 #19
0
 /**
  * Determine task and execute it
  *
  * @return  void
  */
 public function execute()
 {
     // Value = 0
     $this->registerTask('unpublish', 'publish');
     // Value = 2
     $this->registerTask('archive', 'publish');
     // Value = -2
     $this->registerTask('trash', 'publish');
     $this->registerTask('apply', 'save');
     $this->registerTask('save2new', 'save');
     $this->registerTask('save2copy', 'save');
     parent::execute();
 }
예제 #20
0
 /**
  * Override Execute Method
  *
  * @return  void
  */
 public function execute()
 {
     $id = Request::getInt('gidNumber');
     // Load the group page
     $this->group = Group::getInstance($id);
     // Ensure we found the group info
     if (!$this->group || !$this->group->get('gidNumber')) {
         App::abort(404, Lang::txt('COM_GROUPS_ERROR_NOT_FOUND'));
     }
     //build path to the group folder
     $this->path = PATH_APP . DS . trim($this->config->get('uploadpath', '/site/groups'), DS) . DS . $this->group->get('gidNumber');
     //continue with parent execute method
     parent::execute();
 }
예제 #21
0
 /**
  * Executes a task
  *
  * @return     void
  */
 public function execute()
 {
     $this->registerTask('accesspublic', 'access');
     $this->registerTask('accessregistered', 'access');
     $this->registerTask('accessspecial', 'access');
     $this->registerTask('accessprotected', 'access');
     $this->registerTask('accessprivate', 'access');
     //$this->registerTask('publish', 'state');
     //$this->registerTask('unpublish', 'state');
     $this->registerTask('add', 'edit');
     $this->registerTask('orderup', 'reorder');
     $this->registerTask('orderdown', 'reorder');
     parent::execute();
 }
예제 #22
0
 /**
  * Determines task being called and attempts to execute it
  *
  * @return  void
  */
 public function execute()
 {
     $task = Request::getVar('task', '');
     $plugin = Request::getVar('plugin', '');
     if ($plugin && $task && $task != 'manage') {
         Request::setVar('action', $task);
         Request::setVar('task', 'manage');
     }
     $this->registerTask('add', 'edit');
     $this->registerTask('publish', 'state');
     $this->registerTask('unpublish', 'state');
     $this->registerTask('orderup', 'order');
     $this->registerTask('orderdown', 'order');
     parent::execute();
 }
예제 #23
0
 /**
  * Determines task being called and attempts to execute it
  *
  * @return  void
  */
 public function execute()
 {
     $task = Request::getVar('task', '');
     $plugin = Request::getVar('plugin', '');
     if ($plugin && $task && $task != 'manage') {
         Request::setVar('action', $task);
         Request::setVar('task', 'manage');
     }
     $this->registerTask('add', 'edit');
     $this->registerTask('apply', 'save');
     $this->registerTask('publish', 'state');
     $this->registerTask('unpublish', 'state');
     $this->registerTask('orderup', 'order');
     $this->registerTask('orderdown', 'order');
     $this->registerTask('accesspublic', 'access');
     $this->registerTask('accessspecial', 'access');
     $this->registerTask('accessregistered', 'access');
     $this->_folder = 'resources';
     parent::execute();
 }
예제 #24
0
 /**
  * Determine task and attempt to execute it
  *
  * @return     void
  */
 public function execute()
 {
     $this->config = new Configs($this->database);
     $this->config->load();
     $tables = $this->database->getTableList();
     $table = $this->database->getPrefix() . 'events_respondent_race_rel';
     if (!in_array($table, $tables)) {
         $this->database->setQuery("CREATE TABLE `#__events_respondent_race_rel` (\n\t\t\t  `respondent_id` int(11) default NULL,\n\t\t\t  `race` varchar(255) default NULL,\n\t\t\t  `tribal_affiliation` varchar(255) default NULL\n\t\t\t) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
         if (!$this->database->query()) {
             echo $this->database->getErrorMsg();
             return false;
         }
     }
     /**
      * Start day
      */
     define('_CAL_CONF_STARDAY', $this->config->getCfg('starday'));
     /**
      * Nav bar color
      */
     define('_CAL_CONF_DEFCOLOR', $this->config->getCfg('navbarcolor'));
     parent::execute();
 }
예제 #25
0
 /**
  * Determine task and execute it.
  *
  * @return  void
  */
 public function execute()
 {
     // Define standard task mappings.
     // Value = 0
     $this->registerTask('unpublish', 'publish');
     // Value = 2
     $this->registerTask('archive', 'publish');
     // Value = -2
     $this->registerTask('trash', 'publish');
     // Value = -3
     $this->registerTask('report', 'publish');
     $this->registerTask('orderup', 'reorder');
     $this->registerTask('orderdown', 'reorder');
     // Apply, Save & New, and Save As copy should be standard on forms.
     $this->registerTask('apply', 'save');
     $this->registerTask('save2new', 'save');
     $this->registerTask('save2copy', 'save');
     // Guess the message prefix. Defaults to the option.
     if (empty($this->text_prefix)) {
         $this->text_prefix = strtoupper($this->_option);
     }
     parent::execute();
 }
예제 #26
0
 /**
  * Execute a task
  *
  * @return     void
  */
 public function execute()
 {
     $upconfig = Component::params('com_members');
     $this->banking = $upconfig->get('bankAccounts');
     parent::execute();
 }
예제 #27
0
 /**
  * Determines task and attempts to execute it
  *
  * @return     void
  */
 public function execute()
 {
     $this->config = new Configs($this->database);
     $this->config->load();
     parent::execute();
 }
예제 #28
0
 /**
  * Controller execute method, used for selecting the correct function based on task.
  * Defaults to the host stats view
  *
  * @return void
  */
 public function execute()
 {
     // Get the task
     $this->_task = Request::getVar('task', '');
     // Set the version id
     $this->VERSION = '$Id: apc.php 271315 2008-12-16 07:15:07Z shire $';
     // Read optional configuration file (if it exists)
     if (file_exists(dirname(dirname(__DIR__)) . DS . 'helpers' . DS . 'apc.conf.php')) {
         include_once dirname(dirname(__DIR__)) . DS . 'helpers' . DS . 'apc.conf.php';
     }
     // Set some defaults
     $this->_defaults('DATE_FORMAT', 'Y/m/d H:i:s');
     // US time format
     $this->_defaults('GRAPH_SIZE', 200);
     // Image size
     // Rewrite $PHP_SELF to block XSS attacks
     $PHP_SELF = isset($_SERVER['PHP_SELF']) ? htmlentities(strip_tags($_SERVER['PHP_SELF'], ''), ENT_QUOTES, 'UTF-8') : '';
     // Get current time
     $this->time = time();
     // Set the host info
     $host = php_uname('n');
     if ($host) {
         $this->host = '(' . $host . ')';
     }
     if ($_SERVER['SERVER_ADDR']) {
         $this->host .= ' (' . $_SERVER['SERVER_ADDR'] . ')';
     }
     // Operation constants
     define('OB_HOST_STATS', 1);
     define('OB_SYS_CACHE', 2);
     define('OB_USER_CACHE', 3);
     define('OB_SYS_CACHE_DIR', 4);
     define('OB_VERSION_CHECK', 9);
     // Check validity of input variables
     $vardom = array('OB' => '/^\\d+$/', 'CC' => '/^[01]$/', 'DU' => '/^.*$/', 'SH' => '/^[a-z0-9]+$/', 'IMG' => '/^[123]$/', 'LO' => '/^1$/', 'COUNT' => '/^\\d+$/', 'SCOPE' => '/^[AD]$/', 'SORT1' => '/^[AHSMCDTZ]$/', 'SORT2' => '/^[DA]$/', 'AGGR' => '/^\\d+$/', 'SEARCH' => '~^[a-zA-Z0-1/_.-]*$~');
     // Set default cache mode
     $cache_mode = 'opcode';
     // Set cache scope
     $this->scope_list = array('A' => 'cache_list', 'D' => 'deleted_list');
     // Handle POST and GET requests
     if (empty($_REQUEST)) {
         if (!empty($_GET) && !empty($_POST)) {
             $_REQUEST = array_merge($_GET, $_POST);
         } else {
             if (!empty($_GET)) {
                 $_REQUEST = $_GET;
             } else {
                 if (!empty($_POST)) {
                     $_REQUEST = $_POST;
                 } else {
                     $_REQUEST = array();
                 }
             }
         }
     }
     // Check parameter syntax
     foreach ($vardom as $var => $dom) {
         if (!isset($_REQUEST[$var])) {
             $MYREQUEST[$var] = NULL;
         } else {
             if (!is_array($_REQUEST[$var]) && preg_match($dom . 'D', $_REQUEST[$var])) {
                 $MYREQUEST[$var] = $_REQUEST[$var];
             } else {
                 $MYREQUEST[$var] = $_REQUEST[$var] = NULL;
             }
         }
     }
     // Check parameter sematics
     if (empty($MYREQUEST['SCOPE'])) {
         $MYREQUEST['SCOPE'] = "A";
     }
     if (empty($MYREQUEST['SORT1'])) {
         $MYREQUEST['SORT1'] = "H";
     }
     if (empty($MYREQUEST['SORT2'])) {
         $MYREQUEST['SORT2'] = "D";
     }
     if (empty($MYREQUEST['OB'])) {
         $MYREQUEST['OB'] = OB_HOST_STATS;
     }
     if (!isset($MYREQUEST['COUNT'])) {
         $MYREQUEST['COUNT'] = 20;
     }
     if (!isset($this->scope_list[$MYREQUEST['SCOPE']])) {
         $MYREQUEST['SCOPE'] = 'A';
     }
     $task = !empty($this->_task) ? "&task={$this->_task}" : '';
     $this->MY_SELF = "{$PHP_SELF}" . "?option=" . $this->_option . $task . "&SCOPE=" . $MYREQUEST['SCOPE'] . "&SORT1=" . $MYREQUEST['SORT1'] . "&SORT2=" . $MYREQUEST['SORT2'] . "&COUNT=" . $MYREQUEST['COUNT'];
     $this->MY_SELF_WO_SORT = "{$PHP_SELF}" . "?option=" . $this->_option . $task . "&SCOPE=" . $MYREQUEST['SCOPE'] . "&COUNT=" . $MYREQUEST['COUNT'];
     // Select cache mode
     if ($MYREQUEST['OB'] == OB_USER_CACHE) {
         $cache_mode = 'user';
     }
     if (!empty($MYREQUEST['DU'])) {
         apc_delete($MYREQUEST['DU']);
     }
     if (!function_exists('apc_cache_info') || !($this->cache = @apc_cache_info($cache_mode))) {
         $this->setError(Lang::txt('No cache info available.  APC does not appear to be running.'));
         Request::setVar('task', 'error');
         parent::execute();
         return;
     }
     // Avoid division by 0 errors on a cache clear
     if (!$this->cache['num_hits']) {
         $this->cache['num_hits'] = 1;
         $this->time++;
     }
     // Make a few things available to everyone
     $this->MYREQUEST = $MYREQUEST;
     $this->cache_user = apc_cache_info('user', 1);
     $this->mem = apc_sma_info();
     $this->cache_mode = $cache_mode;
     $this->registerTask('__default', 'host');
     parent::execute();
 }
예제 #29
0
 /**
  * Determine a task and execute it
  *
  * @return  void
  */
 public function execute()
 {
     $this->model = new \Components\Checkin\Models\Checkin();
     parent::execute();
 }
예제 #30
0
 /**
  * Execute a task
  *
  * @return  void
  */
 public function execute()
 {
     $this->registerTask('add', 'edit');
     parent::execute();
 }