aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrankie B <floppydisk05@aol.com>2023-05-25 20:12:25 +0100
committerFrankie B <floppydisk05@aol.com>2023-05-25 20:14:34 +0100
commit466fdd60ed378d4cd39e04cef5077d2d5daceb64 (patch)
tree3cb51fb3fed0ceeeaa7b8509910c1212573fe461
parent4fc458973855f03a2dde6c45267b7290fb8ca354 (diff)
Disable guestbook submission
-rwxr-xr-xguestbook/index.php22
1 files changed, 3 insertions, 19 deletions
diff --git a/guestbook/index.php b/guestbook/index.php
index c1f0760..1bd827d 100755
--- a/guestbook/index.php
+++ b/guestbook/index.php
@@ -1,4 +1,4 @@
-<?php $db = new PDO("sqlite:/mnt/data1/webdata/floppydisk/guestbook.db"); ?>
+<?php $db = new PDO("sqlite:/srv/guestbook.db"); ?>
<!DOCTYPE html>
<html lang="en">
<head>
@@ -24,23 +24,7 @@
<legend>Add Entry</legend>
<table class="form">
<tr>
- <td class="form"><label for="name">Name: </label></td>
- <td class="form"><input type="text" name="name"></td>
- </tr>
- <tr>
- <td class="form"><label for="message">Message: </label></td>
- <td class="form"><textarea name="message"></textarea></td>
- </tr>
- <tr>
- <td class="form"><label for="showip">Show IP: </label></td>
- <td class="form"><input type="checkbox" name="showip" value="yes"></td>
- </tr>
- <tr>
- <td class="form"><label for="showinfo">Show info: </label></td>
- <td class="form"><input type="checkbox" name="showinfo" value="yes" checked></td>
- </tr>
- <tr>
- <td class="form" colspan="2"><input type="submit"></td>
+ <td class="form"><i>Form temporarily disabled</i></td>
</tr>
</table>
</fieldset>
@@ -53,7 +37,7 @@
$count = $count_query->fetch()[0];
echo '<h1>Entries <small>(' . $count . ' total)</small></h1>';
// Prepare SELECT statement.
- $select = "SELECT name, message, show_info, show_ip, ip, submitted, browser_info FROM Entries ORDER BY id DESC";
+ $select = "SELECT name, message, show_info, show_ip, ip, submitted, browser_info FROM Entries ORDER BY submitted DESC";
$stmt = $db->prepare($select);
// Execute statement.