Disable guestbook submission

This commit is contained in:
Frankie B 2023-05-25 20:12:25 +01:00
parent 4fc4589738
commit 466fdd60ed

View file

@ -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> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
@ -24,23 +24,7 @@
<legend>Add Entry</legend> <legend>Add Entry</legend>
<table class="form"> <table class="form">
<tr> <tr>
<td class="form"><label for="name">Name: </label></td> <td class="form"><i>Form temporarily disabled</i></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>
</tr> </tr>
</table> </table>
</fieldset> </fieldset>
@ -53,7 +37,7 @@
$count = $count_query->fetch()[0]; $count = $count_query->fetch()[0];
echo '<h1>Entries <small>(' . $count . ' total)</small></h1>'; echo '<h1>Entries <small>(' . $count . ' total)</small></h1>';
// Prepare SELECT statement. // 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); $stmt = $db->prepare($select);
// Execute statement. // Execute statement.