setPage("Information"); $resp->assign('content', 'info_base.html'); $resp->assign('info_top', 'info_text.html'); $resp->assign('info_text', gettext($text)); $this->setLayout("forum_base.html"); } function redirectInformation(&$reg, &$req, &$resp, $text, $path, $time = 3) { $this->textInformation($reg, $req, $resp, $text); $resp->assign('redirect_path', k4_url($path)); $resp->assign('redirect_time_sec', $time); $resp->assign('redirect_time_milli', $time * 1000); $resp->assign('info_mid', 'info_redirect.html'); } function loginRequired(&$reg, &$req, &$resp) { $this->setPage("Please log in"); $resp->assign('content', 'info_base.html'); $resp->assign('info_top', 'info_login_form.html'); $resp->assign('info_bottom', 'info_links_login.html'); $this->setLayout("forum_base.html"); } function permsRequired(&$reg, &$req, &$resp) { $this->setPage("Information"); $resp->assign('content', 'info_base.html'); $resp->assign('info_top', 'info_perm_reasons.html'); $resp->assign('info_bottom', 'info_links_login.html'); $this->setLayout("forum_base.html"); } function logoutRequired(&$reg, &$req, &$resp) { $this->setPage("Please log out"); $resp->assign('content', 'info_base.html'); $resp->assign('info_top', 'info_logout_form.html'); $this->setLayout("forum_base.html"); } function karmaRequired(&$reg, &$req, &$resp) { $this->setPage("You need karma"); $resp->assign('content', 'info_base.html'); $resp->assign('info_top', 'info_karma_needed.html'); $resp->assign('info_bottom', 'info_links_karma.html'); $this->setLayout("forum_base.html"); } function loginDisabled(&$reg, &$req, &$resp) { $this->setPage("Login Disabled"); $resp->assign('content', 'info_base.html'); $resp->assign('info_top', 'info_login_disabled.html'); $resp->assign('info_bottom', 'info_links_account.html'); $this->setLayout("forum_base.html"); } function accountLocked(&$reg, &$req, &$resp) { $this->setPage("Account Locked"); $resp->assign('content', 'info_base.html'); $resp->assign('info_top', 'info_account_locked.html'); $resp->assign('info_bottom', 'info_links_account.html'); $this->setLayout("forum_base.html"); } function profileSaved(&$reg, &$req, &$resp) { $this->redirectInformation($reg, $req, $resp, '', '/dashboard/profile/', 3); $this->setPage("Save Profile"); $resp->assign('content', 'info_base.html'); $resp->assign('info_top', 'info_profile_saved.html'); $this->setLayout("forum_base.html"); } } class InformationDisplay { var $_info; function InformationDisplay(&$reg, &$req, &$resp) { $this->_info = &new InformationController($reg, $req, $resp); } function display($method) { // make sure our method even exits if(method_exists($this->_info, $method)) { // get the vars $reg = &$this->_info->getRegistry(); $req = &$this->_info->getRequest(); $resp = &$this->_info->getResponse(); // this is here as a way to tell the history post // filter to ignore this page as a referer $reg->set('controller', $controller_name = 'InformationDisplay'); // execute the event $this->_info->$method($reg, $req, $resp); // render the template $resp->render(FA_VIEW_DIR . '/' . $this->_info->getLayout()); } exit(); } function text($text, $path = FALSE, $time = FALSE) { $reg = &$this->_info->getRegistry(); $req = &$this->_info->getRequest(); $resp = &$this->_info->getResponse(); // this is here as a way to tell the history post // filter to ignore this page as a referer $reg->set('controller', $controller_name = 'InformationDisplay'); if($path || $time) { $this->_info->redirectInformation($reg, $req, $resp, $text, $path, $time); } else { $this->_info->textInformation($reg, $req, $resp, $text); } // render the template $resp->render(FA_VIEW_DIR . '/' . $this->_info->getLayout()); exit(); } } ?>