2023-07-16 00:49:09 +00:00
|
|
|
@extends('layouts.default')
|
|
|
|
@section('title', 'guestbook')
|
|
|
|
@section('content')
|
|
|
|
<br/>
|
|
|
|
<form method="POST" action="/guestbook">
|
|
|
|
@csrf
|
|
|
|
<x-honeypot />
|
|
|
|
<table class="gb_entryform">
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<label for="name">Name:</label>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<input name="name" type="text" id="name" placeholder="John Doe">
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<span class="text-danger">{{ $errors->first('name') }}</span>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<label for="message">Message:</label>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<textarea name="message" id="message" rows="3"></textarea>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<span class="text-danger">{{ $errors->first('message') }}</span>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td colspan="2">
|
|
|
|
<button type="submit">Submit</button>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</form>
|
2023-07-16 13:59:31 +00:00
|
|
|
<p>A few things to note:</p>
|
|
|
|
<ul>
|
|
|
|
<li>You can submit an entry <u>once every hour</u>.</li>
|
|
|
|
<li>Your IP address <u>will</u> be logged but <u>will not</u> be publically displayed.</li>
|
|
|
|
<li>Any entries that appear to be spam <u>will</u> be removed.</li>
|
|
|
|
</ul>
|
2023-07-16 00:49:09 +00:00
|
|
|
<hr/>
|
|
|
|
@php
|
2023-07-19 00:58:32 +00:00
|
|
|
$entries = DB::select('
|
|
|
|
SELECT name, timestamp, message
|
|
|
|
FROM guestbook__entries
|
2023-07-19 00:59:22 +00:00
|
|
|
ORDER BY id DESC
|
2023-07-19 00:58:32 +00:00
|
|
|
');
|
2023-07-16 00:49:09 +00:00
|
|
|
@endphp
|
|
|
|
<h1>Entries <small>({{ count($entries) }} total)</small></h1>
|
|
|
|
@foreach ($entries as $entry)
|
|
|
|
<table class="gb_entry"><tr><td>
|
|
|
|
Name: {{ $entry->name }}<br/>
|
|
|
|
Date: {{ gmdate("H:i:s - Y-m-d", $entry->timestamp) }}<br/><br/>
|
2023-07-16 21:02:54 +00:00
|
|
|
{{ $entry->message }}
|
2023-07-16 00:49:09 +00:00
|
|
|
</td></tr></table>
|
|
|
|
@endforeach
|
|
|
|
@stop
|
|
|
|
|