-
Notifications
You must be signed in to change notification settings - Fork 1
/
404.php
65 lines (57 loc) · 1.82 KB
/
404.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
<?php
require_once $_SERVER['DOCUMENT_ROOT'] . '/commons/init.php';
$require_login = 'no';
$invisible = 'yes';
require_once 'commons/dbconnect.php';
require_once 'commons/sessions.php';
require_once 'commons/rpgfunctions.php';
require_once 'commons/encryption.php';
require_once 'commons/formatting.php';
require_once 'commons/userlib.php';
require_once 'commons/messages.php';
$npc = array(
'graphic' => 'npcs/receptionist.png',
'width' => 350,
'height' => 275,
'name' => 'Claire Silloway',
);
$npc['dialog'] = '
<p>The requested page was not found!</p>
<ul>
<li><p>If a link within ' . $SETTINGS['site_name'] . ' lead you to this page, that\'s almost certainly an error! <a href="/writemail.php?sendto=' . $SETTINGS['author_resident_name'] . '">Let ' . $SETTINGS['author_resident_name'] . ' know, so he can fix it up</a> :)</p></li>
<li><p>If a link from somewhere else entirely lead you here, it might be nice to let that site\'s administrator or editor know that their links are incorrect or out of date.</p></li>
</ul>
';
$redirect_url = $_SERVER['SCRIPT_URL'] ? $_SERVER['SCRIPT_URL'] : $_SERVER['REQUEST_URI'];
$database->FetchNone('
UPDATE psypets_404_log
SET count=count+1,lastlog=' . time() . '
WHERE url=' . quote_smart($redirect_url) . '
LIMIT 1
');
if($database->AffectedRows() == 0)
{
$database->FetchNone('
INSERT INTO psypets_404_log
(url, count, lastlog)
VALUES
(' . quote_smart($redirect_url) . ', 1, ' . time() . ')
');
}
//include 'commons/html.php';
?>
<!DOCTYPE html>
<html>
<head>
<title><?= $SETTINGS['site_name'] ?> > Plaza > Search</title>
<?php include 'commons/head.php'; ?>
</head>
<body>
<?php include 'commons/header_2.php'; ?>
<h4>Four-oh-four!</h4>
<?php
require WEB_ROOT . '/views/_template/npc.php';
?>
<?php include 'commons/footer_2.php'; ?>
</body>
</html>