-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherror.php
More file actions
110 lines (99 loc) · 2.51 KB
/
Copy patherror.php
File metadata and controls
110 lines (99 loc) · 2.51 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<?php
$status = isset($_GET['status']) ? intval($_GET['status']) : 404;
$messages = [
400 => "Bad Request",
401 => "Unauthorized",
403 => "Forbidden",
404 => "Page Not Found",
408 => "Request Timeout",
429 => "Too Many Requests",
500 => "Internal Server Error",
502 => "Bad Gateway",
503 => "Service Unavailable",
504 => "Gateway Timeout",
];
$message = $messages[$status] ?? "Unexpected Error";
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Error <?= $status ?> - <?= $message ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
html, body {
margin: 0;
padding: 0;
font-family: 'Segoe UI', sans-serif;
height: 100%;
overflow: hidden;
background: linear-gradient(to top right, tomato, white);
}
.parallax {
background-image: url('https://www.transparenttextures.com/patterns/inspiration-geometry.png');
height: 100%;
background-attachment: fixed;
background-position: center;
background-repeat: repeat;
background-size: cover;
display: flex;
align-items: center;
justify-content: center;
animation: fadeIn 2s ease-in;
}
.error-box {
background: rgba(255, 255, 255, 0.9);
padding: 40px;
border-radius: 20px;
box-shadow: 0 8px 20px rgba(0,0,0,0.2);
text-align: center;
animation: slideUp 1s ease-out;
max-width: 90%;
}
h1 {
font-size: 5em;
color: tomato;
margin: 0;
}
p {
font-size: 1.5em;
color: #444;
}
a {
display: inline-block;
margin-top: 20px;
padding: 10px 25px;
background: tomato;
color: white;
border-radius: 5px;
text-decoration: none;
transition: background 0.3s ease;
}
a:hover {
background: #d63d1f;
}
@keyframes slideUp {
from { transform: translateY(50px); opacity: 0; }
to { transform: translateY(0); opacity: 1; }
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
@media (max-width: 600px) {
h1 { font-size: 3em; }
p { font-size: 1.2em; }
}
</style>
</head>
<body>
<div class="parallax">
<div class="error-box">
<h1><?= $status ?></h1>
<p><?= $message ?></p>
<a href="/">🏠 Go Home</a>
<a href="/admin">🏠 Go Admin</a>
</div>
</div>
</body>
</html>