-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlogout.inc
61 lines (51 loc) · 1.75 KB
/
logout.inc
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
<?php
/*==================================================
GONE FISHING
v1.0 April 2001
Nigel Gilbert
====================================================*/
/*
bids goodbye to the user who has exceeded his or her idletime
Included by index.php
*/
global $idleTime;
$idlemins = round($idleTime / 60);
$url_array = parse_url($_SERVER['REQUEST_URI']);
$url = "http://" . $_SERVER['SERVER_NAME'] . dirname($url_array["path"]) . "/";
/* send an email to player to say they have been logged out */
$query = new query("SELECT email FROM people WHERE name = '$name'");
$query->next_rec();
$email = $query->field('email');
if ($email) {
mail($email, "Gone Fishing! Your boat has returned to port",
"You have been inactive for $idlemins minutes and so your boat has returned to port.
You may go back to fishing any time, at <$url>.
The Fishing Authority");
}
html_header("Au revoir!");
?>
<table width="100%" border="0" cellspacing="0" cellpadding="10">
<tr BGCOLOR="#003333" HEIGHT="50">
<td ALIGN=left VALIGN=middle><font SIZE=5> <b>Gone Fishing!</b></font></td>
<td ALIGN=right VALIGN=middle><font SIZE=4><?php echo date("g:ia, l j F Y"); ?> </font></td></tr>
<tr>
<td>
<H2>Au revoir!</H2>
</td>
</tr>
<tr>
<td>
<img src="images/fishing-boat-red-buoys.jpg" width="384" height="512">
</td>
<td>
<?php
echo "You have been inactive for $idlemins minutes and so your boat has returned to port. <p>
You may go back to fishing any time, at <b>";
echo "<a href=\"$url\">$url</a></b>";
?>
</td>
</tr>
</table>
</body>
</html>