-
Notifications
You must be signed in to change notification settings - Fork 4
/
error.php
77 lines (69 loc) · 2.11 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?php
/**
* Index page for regular (non-admin) users
*/
// load up your config file
require_once(filter_input(INPUT_SERVER, 'DOCUMENT_ROOT') . "/resources/config.php");
require_once(filter_input(INPUT_SERVER, 'DOCUMENT_ROOT') . "/dao/user_dao.php");
$PAGETYPE = "public";
require_once(RESOURCES_PATH . "/session.php");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>KEOPS</title>
<?php
require_once(TEMPLATES_PATH . "/head.php");
?>
<style>
.navbar {
box-shadow: 1px 0px 1em gray;
}
</style>
</head>
<body>
<?php require_once(TEMPLATES_PATH . "/header.php"); ?>
<div class="container" style="margin-top: -20px;">
<div class="row">
<div class="col-xs-12 col-sm-4">
<img src="/img/robot.svg" alt="Illustration of a broken robot" class="w-100" />
<small>
<a target="_blank" href="https://www.freepik.com/free-vector/hand-drawn-404-error_1587349.htm">Designed by Freepik</a>
</small>
</div>
<div class="col-xs-12 col-sm-8" style="padding: 20px;">
<h1>Oh, well...</h1>
<h2>Something went wrong</h2>
<?php if (isset($_REQUEST['code'])) { ?>
<div class="mt-5">
<span class="error-code label label-default text-increase mr-3">Error <?php echo $_REQUEST['code']; ?></span>
<span class="error-description">
<?php
switch ($_REQUEST['code']) {
case 500:
echo "Internal server error";
break;
case 404:
echo "File not found";
break;
default:
}
?>
</span>
</div>
<?php } ?>
<hr class="mt-5" />
<p class="mt-4">
<a class="btn btn-link pl-0" href="/"><span class="glyphicon glyphicon-home"></span> Home</a>
<a class="btn btn-link" href="/contact.php"><span class="glyphicon glyphicon-envelope"></span> Contact support</a>
</ul>
</p>
</div>
</div>
</div>
<?php
require_once(TEMPLATES_PATH . "/home-footer.php");
?>
</body>
</html>