-
Notifications
You must be signed in to change notification settings - Fork 0
/
msgall.php
44 lines (37 loc) · 1.51 KB
/
msgall.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
<?php
/*==================================================
GONE FISHING
v1.0 April 2001
Nigel Gilbert
====================================================*/
/* write and send a message to all players (sent by administration, but appears to come from OFFISH). */
include("common.inc");
html_header("Gone Fishing! Administration");
echo "<H1>Gone Fishing! Administration</H1>";
if ($_POST['password'] <> "firma") { /* rather low security password feature! */
alert("Bad password");
exit;
}
if (isset($_POST['submit']) and $_POST['submit'] == "Send") {
$msg = $_POST['msg'];
if ($msg) {
$db = db_open();
db_write("INSERT INTO msgs (sender, recipient, timesent, timeread, msg)
VALUES(NULL, 'All', now(), NULL, '$msg')");
echo "<H3>Message has been broadcast to all</H3>";
}
echo "<P>
<form method=get action=\"admin.html\">
<input type=submit value=\"Return to main page\">
</form>";
}
else {
echo "<form method=post action=\"msgall.php\">
Enter the message to send to all players:<p>
<textarea name=msg cols=100 rows=5></textarea>
<input type=hidden name=password value=\"firma\">
<input type=submit name=submit value=\"Send\">
</form>";
}
html_footer();