
Public Member Functions | |
| simpleURL () | |
| doControl () | |
| getTemplateObject () | |
Static Public Member Functions | |
| static | getInstance () |
Protected Member Functions | |
| __construct () | |
| adminActiveUser () | |
| getComponentClass ($component) | |
Protected Attributes | |
| $prefix = 'admin' | |
| $core_item = '' | |
| $path_side = 'admin' | |
| $siteBaseURL = '' | |
Definition at line 3 of file aliroAdminRequest.php.
| aliroAdminRequest::__construct | ( | ) | [protected] |
Reimplemented from aliroAbstractRequest.
Definition at line 9 of file aliroAdminRequest.php.
References $_REQUEST, and aliroAbstractRequest::getParam().
00009 { 00010 parent::__construct(); 00011 if ($this->core_item = strtolower($this->getParam($_REQUEST, 'core'))) $this->component_name = $this->core_item; 00012 $this->siteBaseURL = $this->getCfg('admin_site'); 00013 }
| static aliroAdminRequest::getInstance | ( | ) | [static] |
Definition at line 15 of file aliroAdminRequest.php.
Referenced by aliroRequest::getInstance(), and aliroAdminPageNav::getPagesLinks().
00015 { 00016 if (self::$instance == null) self::$instance = new aliroAdminRequest(); 00017 return self::$instance; 00018 }
| aliroAdminRequest::simpleURL | ( | ) |
Definition at line 20 of file aliroAdminRequest.php.
00020 { 00021 return $this->siteBaseURL.'/index.php?'.($this->core_item ? 'core='.$this->core_item : 'option='.$this->option); 00022 }
| aliroAdminRequest::doControl | ( | ) |
Definition at line 25 of file aliroAdminRequest.php.
References $_REQUEST, adminActiveUser(), aliroAbstractRequest::fixPostItems(), aliroAdminAuthenticator::getInstance(), aliroExtensionHandler::getInstance(), aliroAbstractRequest::getParam(), aliroAbstractRequest::getStickyAliroParam(), and getTemplateObject().
00025 { 00026 aliroExtensionHandler::getInstance()->checkStarterPack(); 00027 if ($this->option == 'login' OR $this->option == 'logout') { 00028 $authenticator = aliroAdminAuthenticator::getInstance(); 00029 if ($this->option == 'logout') $authenticator->logout(); 00030 else { 00031 $this->user = $authenticator->login(); 00032 $this->alironoscript = $this->getStickyAliroParam($_POST, 'alironoscript'); 00033 if (count($_POST)) $this->fixPostItems(); 00034 $this->option = $this->component_name = strtolower($this->getParam($_REQUEST, 'option')); 00035 $this->core_item = strtolower($this->getParam($_REQUEST, 'core')); 00036 } 00037 } 00038 // Handle special admin side options 00039 // If this is not login, we should already have a valid admin session 00040 if (is_object($this->user) AND $this->user->id) $this->adminActiveUser(); 00041 // If a valid user was not set, the only possibility is to ask for an admin side login 00042 else { 00043 // Flush any diagnostic output 00044 ob_end_flush(); 00045 $template = $this->getTemplateObject(); 00046 $template->login(); 00047 } 00048 }
| aliroAdminRequest::adminActiveUser | ( | ) | [protected] |
Definition at line 50 of file aliroAdminRequest.php.
References $_REQUEST, aliroAbstractRequest::getParam(), getTemplateObject(), aliroAbstractRequest::invokeComponent(), and aliroScreenArea::prepareTemplate().
Referenced by doControl().
00050 { 00051 if ($this->core_item OR $this->option) $this->invokeComponent (); 00052 else { 00053 $moduleid = $this->getParam($_REQUEST, 'moduleid', 0); 00054 $template = $this->getTemplateObject(); 00055 aliroScreenArea::prepareTemplate($template); 00056 } 00057 00058 $diagnostics = ob_get_clean(); 00059 if ($this->do_gzip) ob_start('ob_gzhandler'); 00060 echo $diagnostics; 00061 @session_write_close(); 00062 00063 // If no_html is set, we avoid starting the template, and go straight to the component 00064 if ($this->getParam($_REQUEST, 'no_html', '')) { 00065 echo $this->chandler->mosMainBody(); 00066 exit; 00067 } 00068 else { 00069 $template = $this->getTemplateObject(); 00070 // aliroTemplate::prepareTemplate($template); 00071 $template->render(); 00072 } 00073 if ($this->do_gzip) ob_end_flush(); 00074 }
| aliroAdminRequest::getTemplateObject | ( | ) |
Definition at line 76 of file aliroAdminRequest.php.
References aliroTemplateHandler::getInstance().
Referenced by adminActiveUser(), and doControl().
00076 { 00077 if ($this->templateObject == null) { 00078 $templateclass = aliroTemplateHandler::getInstance()->getDefaultTemplateClass(); 00079 $this->templateObject = new $templateclass(); 00080 } 00081 return $this->templateObject; 00082 }
| aliroAdminRequest::getComponentClass | ( | $ | component | ) | [protected] |
aliroAdminRequest::$prefix = 'admin' [protected] |
Definition at line 4 of file aliroAdminRequest.php.
aliroAdminRequest::$core_item = '' [protected] |
Definition at line 5 of file aliroAdminRequest.php.
aliroAdminRequest::$path_side = 'admin' [protected] |
Definition at line 6 of file aliroAdminRequest.php.
aliroAdminRequest::$siteBaseURL = '' [protected] |
Definition at line 7 of file aliroAdminRequest.php.
1.5.5