* '' - user have an empty token * Any other (string) value - the token * * See Dot_Auth::checkUserToken() */ $userToken = isset($_POST['userToken']) ? $_POST['userToken'] : null; /** * From this point , the control is taken by the Action specific controller * call the Action specific file, but check first if exists */ $actionControllerPath = CONTROLLERS_PATH . '/' . $registry->requestModule . '/' . $registry->requestControllerProcessed . 'Controller.php'; if (file_exists($actionControllerPath)) { $dotAuth = Dot_Auth::getInstance(); $dotAuth->checkIdentity('user'); require $actionControllerPath; } else { Dot_Route::pageNotFound(); } // set menus $tpl->setMenu(); // set SEO html tags from dots/seo.xml file $tpl->setSeoValues($pageTitle); // display message (error, warning, info) $tpl->displayMessage(); // parse the main content block $tpl->parse('MAIN_CONTENT', 'tpl_main'); // show debugbar $debug = new Dot_Debug($tpl); $debug->show(); // parse and print the output $tpl->pparse('OUTPUT', 'tpl_index');
/** * Display widgets content * @access public * @param Zend_Config $value * @return void */ public function displayWidgets($value) { $tpl = View::getInstance(TEMPLATES_PATH . '/' . $this->requestModule); $tpl->init(); $debug = new Dot_Debug($tpl); // if we have only one widget, Zend_Config_Xml return a simple array, not an array with key 0(zero) if (is_null($value->{0})) { $value = new Zend_Config(array(0 => $value)); } $widgets = $value->toArray(); foreach ($widgets as $key => $val) { if ($this->varExists($val['token'])) { // initialize the template file where is the widget content $this->setFile('tpl_widget', 'blocks/' . strtolower($val['token']) . '.tpl'); switch ($val['token']) { case 'WIDGET_MEMORY': $debug->generateMemoryPiechart($val); break; case 'WIDGET_KEYS': $debug->generateKeysPiechart($val); break; case 'WIDGET_HITS': $debug->generateHitsPiechart($val); break; case 'WIDGET_USER_LOGINS': $this->_displayUserLoginsPiechart($val); break; case 'WIDGET_TOP_USERS': $this->_displayTopUsersColumnchart($val); break; case 'WIDGET_TIME_ACTIVITY': $this->_displayTimeActivityLinechart($val); break; } // parse the widget content $this->parse(strtoupper($val['token']), 'tpl_widget'); $this->unsetVar('tpl_widget'); } } }