| 1 |
mjordaan |
1 |
<?php
|
|
|
2 |
class ControllerErrorNotFound extends Controller {
|
|
|
3 |
public function index() {
|
|
|
4 |
$this->load->language('error/not_found');
|
|
|
5 |
|
|
|
6 |
$this->document->setTitle($this->language->get('heading_title'));
|
|
|
7 |
|
|
|
8 |
$data['breadcrumbs'] = array();
|
|
|
9 |
|
|
|
10 |
$data['breadcrumbs'][] = array(
|
|
|
11 |
'text' => $this->language->get('text_home'),
|
|
|
12 |
'href' => $this->url->link('common/home')
|
|
|
13 |
);
|
|
|
14 |
|
|
|
15 |
if (isset($this->request->get['route'])) {
|
|
|
16 |
$url_data = $this->request->get;
|
|
|
17 |
|
|
|
18 |
unset($url_data['_route_']);
|
|
|
19 |
|
|
|
20 |
$route = $url_data['route'];
|
|
|
21 |
|
|
|
22 |
unset($url_data['route']);
|
|
|
23 |
|
|
|
24 |
$url = '';
|
|
|
25 |
|
|
|
26 |
if ($url_data) {
|
|
|
27 |
$url = '&' . urldecode(http_build_query($url_data, '', '&'));
|
|
|
28 |
}
|
|
|
29 |
|
|
|
30 |
$data['breadcrumbs'][] = array(
|
|
|
31 |
'text' => $this->language->get('heading_title'),
|
|
|
32 |
'href' => $this->url->link($route, $url, $this->request->server['HTTPS'])
|
|
|
33 |
);
|
|
|
34 |
}
|
|
|
35 |
|
|
|
36 |
$data['continue'] = $this->url->link('common/home');
|
|
|
37 |
|
|
|
38 |
$data['column_left'] = $this->load->controller('common/column_left');
|
|
|
39 |
$data['column_right'] = $this->load->controller('common/column_right');
|
|
|
40 |
$data['content_top'] = $this->load->controller('common/content_top');
|
|
|
41 |
$data['content_bottom'] = $this->load->controller('common/content_bottom');
|
|
|
42 |
$data['footer'] = $this->load->controller('common/footer');
|
|
|
43 |
$data['header'] = $this->load->controller('common/header');
|
|
|
44 |
|
|
|
45 |
$this->response->addHeader($this->request->server['SERVER_PROTOCOL'] . ' 404 Not Found');
|
|
|
46 |
|
|
|
47 |
$this->response->setOutput($this->load->view('error/not_found', $data));
|
|
|
48 |
}
|
|
|
49 |
}
|