Example #1
0
 private function _redirect()
 {
     $registry = Registry::getInstance();
     if ($registry->has('router') && $registry->get('router')->getRequestType() != 'page') {
         $router = new ARouter($registry);
         $router->processRoute('error/ajaxerror');
         $registry->get('response')->output();
         exit;
     }
     header('Location: static_pages/index.php');
     exit;
 }
Example #2
0
 public function showErrorPage()
 {
     if ($this->registry && $this->registry->has('router') && $this->registry->get('router')->getRequestType() != 'page') {
         $router = new ARouter($this->registry);
         $router->processRoute('error/ajaxerror');
         $this->registry->get('response')->output();
         exit;
     }
     $url = "static_pages/index.php";
     $url .= IS_ADMIN === true ? '?mode=admin' : '';
     header("Location: {$url}");
     exit;
 }