This repository was archived by the owner on Aug 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherror.php
More file actions
82 lines (79 loc) · 2.3 KB
/
error.php
File metadata and controls
82 lines (79 loc) · 2.3 KB
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
78
79
80
81
82
<?php
include 'include/header.php';
?>
<div class="container mt-3">
<?php
if ($_GET) {
$type = $_GET['type'];
$error = '';
if (empty($type)) {
$error = 'Podany typ błędu nie istnieje!';
}
if (empty($error)) {
if ($type === '400') {
?>
<div class="card">
<div class="card-body text-center">
<i class="fas fa-exclamation-circle text-danger" style="font-size: 128px;"></i>
<h1 class="mt-3">Błąd 400</h1>
<h5 class="mb-3">Wykonane zapytanie nie podwiodło się!</h5>
<a href="<?= $config['default']['link'] ?>index.php" class="btn btn-danger">Strona główna</a>
</div>
</div>
<?php
} else if ($type === '401') {
?>
<div class="card">
<div class="card-body text-center">
<i class="fas fa-exclamation-circle text-danger" style="font-size: 128px;"></i>
<h1 class="mt-3">Błąd 401</h1>
<h5 class="mb-3">Nie posiadasz dostępu!</h5>
<a href="<?= $config['default']['link'] ?>index.php" class="btn btn-danger">Strona główna</a>
</div>
</div>
<?php
} else if ($type === '403') {
?>
<div class="card">
<div class="card-body text-center">
<i class="fas fa-exclamation-circle text-danger" style="font-size: 128px;"></i>
<h1 class="mt-3">Błąd 403</h1>
<h5 class="mb-3">Nie posiadasz dostępu!</h5>
<a href="<?= $config['default']['link'] ?>index.php" class="btn btn-danger">Strona główna</a>
</div>
</div>
<?php
} else if ($type === '404') {
?>
<div class="card">
<div class="card-body text-center">
<i class="fas fa-exclamation-circle text-danger" style="font-size: 128px;"></i>
<h1 class="mt-3">Błąd 404</h1>
<h5 class="mb-3">Podana strona nie istnieje!</h5>
<a href="<?= $config['default']['link'] ?>index.php" class="btn btn-danger">Strona główna</a>
</div>
</div>
<?php
} else if ($type === '500') {
?>
<div class="card">
<div class="card-body text-center">
<i class="fas fa-exclamation-circle text-danger" style="font-size: 128px;"></i>
<h1 class="mt-3">Błąd 500</h1>
<h5 class="mb-3">Wykonane zapytanie nie podwiodło się!</h5>
<a href="<?= $config['default']['link'] ?>index.php" class="btn btn-danger">Strona główna</a>
</div>
</div>
<?php
}
} else {
alert('danger', $error);
}
} else {
alert('danger', 'Podany typ błędu nie istnieje!');
}
?>
</div>
<?php
include 'include/footer.php';
?>