blob: e3af7badbdc66d84ce17a73e6a68079440fa78db (
plain)
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
|
<div class="header">
<div class="header_guestbook">
<div class="header_text">Guestbook</div>
</div>
</div>
<?php
include_once($UTIL_DIR . "/guestbook.php");
include_once($UTIL_DIR . "/convert.php");
if($action == "post") {
// Check is the message is SPAM
if(filtermessage($name, $email, $message, $name_hidden, $email_hidden, $message_hidden)) {
// It was not... now add it to the book.
$entry = new GuestbookEntry($name_hidden,
$email_hidden,
time(),
$_SERVER['REMOTE_ADDR'],
convert($message_hidden));
$guestbook = new Guestbook($DATA_DIR . "/guestbook.xml");
$guestbook->add($entry);
$guestbook->write();
}
}
?>
<div class="small_header">Post new entry</div>
<div class="guestbook_form">
<form action="?page=guestbook&action=post" method="post">
<p>
Name: <input style="display: none" name="name"/><input name="name_hidden"/>
Email: <input style="display: none" name="email"/><input name="email_hidden"/><br/>
Message:<br/>
<textarea style="display: none" rows="2" cols="74" name="message"></textarea>
<textarea rows="2" cols="74" name="message_hidden"></textarea><br/>
<button type="submit">Post</button><br/>
</p>
<p>
<strong>Note</strong>:<br/>
<em>Inappropriate, unwarranted or self-aggrandizementing comments may suffer
redaction. Or, deletion.</em>
</p>
</form>
</div>
<div class="small_header">Entries</div>
<?php
$guestbook = new Guestbook($DATA_DIR . "/guestbook.xml");
if($show == "all") {
$guestbook->show(-1);
} else {
$guestbook->show(6);
?>
<div class="more">
<a href="?page=guestbook&show=all">more >></a>
</div>
<?php
}
?>
|