forked from PHPFusion/PHPFusion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
error.php
58 lines (54 loc) · 2.06 KB
/
error.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) PHP-Fusion Inc
| https://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: errors.php
| Author: Joakim Falk (Domi)
| Author: Robert Gaudyn (Wooya)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "maincore.php";
require_once THEMES."templates/header.php";
include LOCALE.LOCALESET."error.php";
if (isset($_GET['code']) && $_GET['code'] == "401") {
header("HTTP/1.1 401 Unauthorized");
$text = $locale['err401'];
$img = "401.png";
} elseif (isset($_GET['code']) && $_GET['code'] == "403") {
header("HTTP/1.1 403 Forbidden");
$text = $locale['err403'];
$img = "403.png";
} elseif (isset($_GET['code']) && $_GET['code'] == "404") {
header("HTTP/1.1 404 Not Found");
$text = $locale['err404'];
$img = "404.png";
} elseif (isset($_GET['code']) && $_GET['code'] == "500") {
header("HTTP/1.1 500 Internal Server Error");
$text = $locale['err500'];
$img = "500.png";
} else {
$text = $locale['errunk'];
$img = "unknown.png";
}
opentable($text);
echo "<table class='table table-responsive' width='100%' style='text-center'>";
echo "<tr>";
echo "<td width='30%' align='center'><img class='img-responsive' src='".IMAGES."error/".$img."' alt='".$text."' border='0'></td>";
echo "<td style='font-size:16px;color:red' align='center'>".$text."</td>";
echo "</tr>";
echo "<tr>";
echo "<td colspan='2' align='center'><b><a class='button' href='".BASEDIR."index.php'>".$locale['errret']."</a></b></td>";
echo "</tr>";
echo "</table>";
closetable();
require_once THEMES."templates/footer.php";
?>