1
|
|
|
<? |
|
|
|
|
2
|
|
|
|
3
|
|
|
Loader::load('controller', '/PageController'); |
4
|
|
|
|
5
|
|
|
class Error404Controller extends PageController |
6
|
|
|
{ |
7
|
|
|
|
8
|
|
|
protected function set_head_data() |
9
|
|
|
{ |
10
|
|
|
$this->set_header_method('send404'); |
11
|
|
|
$this->add_css('normalize'); |
12
|
|
|
$this->add_css('404'); |
13
|
|
|
|
14
|
|
|
$this->set_title("Jacob Emerick's 404 Page"); |
15
|
|
|
$this->set_head('description', 'Global 404 page for sites under jacobemerick.com. Page not found!'); |
16
|
|
|
$this->set_head('keywords', ''); |
17
|
|
|
} |
18
|
|
|
|
19
|
|
|
protected function set_body_data() |
20
|
|
|
{ |
21
|
|
|
$this->set_body('site_list', $this->get_sites()); |
22
|
|
|
|
23
|
|
|
$this->set_body_view('/404'); |
24
|
|
|
} |
25
|
|
|
|
26
|
|
|
private function get_sites() |
27
|
|
|
{ |
28
|
|
|
return [ |
29
|
|
|
[ |
30
|
|
|
'url' => 'http://home.jacobemerick.com/', |
31
|
|
|
'title' => "Jacob Emerick's Home", |
32
|
|
|
'name' => 'Home' |
33
|
|
|
], |
34
|
|
|
[ |
35
|
|
|
'url' => 'http://blog.jacobemerick.com/', |
36
|
|
|
'title' => "Jacob Emerick's Blog", |
37
|
|
|
'name' => 'Blog' |
38
|
|
|
], |
39
|
|
|
[ |
40
|
|
|
'url' => 'http://lifestream.jacobemerick.com/', |
41
|
|
|
'title' => "Jacob Emerick's Lifestream", |
42
|
|
|
'name' => 'Lifestream' |
43
|
|
|
], |
44
|
|
|
[ |
45
|
|
|
'url' => 'http://map.jacobemerick.com/', |
46
|
|
|
'title' => "Jacob Emerick's Hiking Map", |
47
|
|
|
'name' => 'Map' |
48
|
|
|
], |
49
|
|
|
[ |
50
|
|
|
'url' => 'http://portfolio.jacobemerick.com/', |
51
|
|
|
'title' => "Jacob Emerick's Portfolio", |
52
|
|
|
'name' => 'Portfolio', |
53
|
|
|
], |
54
|
|
|
[ |
55
|
|
|
'url' => 'http://www.waterfallsofthekeweenaw.com/', |
56
|
|
|
'title' => 'Waterfalls of the Keweenaw', |
57
|
|
|
'name' => 'Waterfalls' |
58
|
|
|
] |
59
|
|
|
]; |
60
|
|
|
} |
61
|
|
|
|
62
|
|
|
} |
63
|
|
|
|
Short opening tags are disabled in PHP’s default configuration. In such a case, all content of this file is output verbatim to the browser without being parsed, or executed.
As a precaution to avoid these problems better use the long opening tag
<?php
.