<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 } ?>