1 <?php
defined('SYSPATH') OR die('No direct access allowed.');
4 * Show errors like 404 etc
6 * op5, and the op5 logo are trademarks, servicemarks, registered servicemarks
7 * or registered trademarks of op5 AB.
8 * All other trademarks, servicemarks, registered trademarks, and registered
9 * servicemarks mentioned herein may be the property of their respective owner(s).
10 * The information contained herein is provided AS IS with NO WARRANTY OF ANY
11 * KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY, AND FITNESS FOR A
14 class Error_Controller
extends Ninja_Controller
{
15 public function __construct()
18 parent
::__construct();
19 } catch (Exception
$ex) {}
22 public function show_403() {
23 header('HTTP/1.1 403 Forbidden');
24 $this->template
->content
= $this->add_view('403');
25 $this->template
->title
= _('Forbidden');
28 public function show_404() {
29 header('HTTP/1.1 404 Not Found');
30 $this->template
->content
= $this->add_view('404');
31 $this->template
->title
= _('Page Not Found');
34 public function show_livestatus($exception) {
35 if (PHP_SAPI
=== 'cli') {
36 print("Livestatus error\n");
40 $this->template
->content
= $this->add_view('livestatus');
41 $this->template
->title
= _('Livestatus error');
43 $this->template
->content
->exception
= $exception;