forked from darkalchemy/Pu-239
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherror.php
More file actions
73 lines (71 loc) · 2.13 KB
/
error.php
File metadata and controls
73 lines (71 loc) · 2.13 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
<?php
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'bittorrent.php';
require_once INCL_DIR . 'html_functions.php';
global $site_config;
$string = $_SERVER['QUERY_STRING'];
if ($string === '404') {
$page = 'Page Not Found - 404';
$text = 'Sorry, The page you are looking for cannot be found.';
}
if ($string === '401') {
$page = 'Authorization Required - 401';
$text = 'You need to be Authorized to access this page. You do not have the correct credentials.';
}
if ($string === '403') {
$page = 'Forbidden - 403';
$text = 'You do not have full permission to access this page.';
}
if ($string === '500') {
$page = 'Internal Server Error - 500';
$text = 'There seems to have been an error on this server. Please notify the webmaster of the site.';
}
if ($string === '400') {
$page = 'Bad Request - 400';
$text = 'There has been an error with the page you are trying to view. Please try again later.';
}
$domain = htmlsafechars($_SERVER['HTTP_HOST']);
$htmlout = doc_head() . "
<meta property='og:title' content='{$page}'>
<title>{$page}</title>
<style>
<!--
body {
margin: 4px;
background-color: rgb(255,255,255);
}
p
{
margin: 0;
font-family: Arial, Helvetica, sans-serif;
color: #000000;
font-size: 14px;
}
.style1 { color: #666666;
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
}
-->
</style>
</head>
<body>
<div>
<table width='300'>
<!--Error pic layout-->
<tr>
<td width='300' height='50'><!--Error 404 EmptyCell--> </td>
</tr>
<tr>
<td height='520'><img src='{$site_config['pic_baseurl']}error404.png' alt='Error Not Found' width='300' height='520' usemap='#Map'></td>
</tr>
<tr>
<td height='14'><div><span class='style1'></span></div></td>
</tr>
</table></div><map name='Map' id='map'>
<area shape='rect' coords='99,425,203,481' alt='Error Not Found'>
</map>
<p><b>{$page}</b></p>
<p>{$text}</p><br>
<p>You will be redirected back to {$domain} in 5 seconds</p>
</body>
</html>";
echo $htmlout;