diff options
author | Frankie B <git@diskfloppy.me> | 2024-06-11 18:02:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-11 18:02:01 +0100 |
commit | 0f52d80ca67a49258b235f5831163dd72fbd54cf (patch) | |
tree | 9c5cd36b6e0a233e09ac88a4409fb68c63e4781a /resources/views/pages/guestbook.blade.php | |
parent | a64bcc2c4639d5804b6dada23151bfcb8b198121 (diff) |
Merge MVC rewrite into master (#21)
* Just commit it all
* Require auth
* crap
* Update homepage
* Block AI scrapers
* Update cache update script
* Add dummy file
* Remove unnecessary lastfm config var
* Use withQueryParameters for LastFM API
* Fix embeds
* Update example env
* Smard
Diffstat (limited to 'resources/views/pages/guestbook.blade.php')
-rw-r--r-- | resources/views/pages/guestbook.blade.php | 102 |
1 files changed, 0 insertions, 102 deletions
diff --git a/resources/views/pages/guestbook.blade.php b/resources/views/pages/guestbook.blade.php deleted file mode 100644 index a2c39fb..0000000 --- a/resources/views/pages/guestbook.blade.php +++ /dev/null @@ -1,102 +0,0 @@ -@extends('layouts.default') -@section('title', 'Guestbook') -@section('content') - @php - use UAParser\Parser; - $parser = Parser::create(); - $db_alive = true; - try { - DB::connection()->getPdo(); - } catch (Exception $e) { - $db_alive = false; - } - @endphp - @if (!$db_alive) - @include('components.errors.db-error') - @else - <br> - <table class="gb-entry-form-container" role="presentation"> - <tr> - <td> - <form method="POST" action="/guestbook"> - @csrf - <x-honeypot/> - <table class="gb-entry-form" role="presentation"> - <tr> - <td> - <label for="name"><strong>Name:</strong></label> - </td> - <td> - <input name="name" type="text" id="name"> - </td> - <td> - <span class="text-danger">{{ $errors->first('name') }}</span> - </td> - </tr> - <tr> - <td> - <label for="message"><strong>Message:</strong></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></td> - <td> - <button type="submit">Submit</button> - </td> - </tr> - </table> - </form> - </td> - <td> - <p><i>A few things to note:</i></p> - <ul> - <li>You can submit an entry <u>once every hour</u>.</li> - <li>Your IP address is logged but <u>not</u> publicly displayed.</li> - <li>Any entries that appear to be spam <u>will</u> be removed.</li> - </ul> - </td> - </tr> - </table> - - - <hr> - @php - $entries = DB::select(' - SELECT name, timestamp, message, agent - FROM guestbook__entries - ORDER BY id DESC - '); - @endphp - <h2>Entries <small>({{ count($entries) }} total)</small></h2> - @foreach ($entries as $entry) - @php - $user_agent = $parser->parse($entry->agent); - @endphp - <table class="gb-entry" role="presentation"> - <tr> - <td> - Submitted by <strong>{{ $entry->name }}</strong> - on <strong>{{ gmdate('Y-m-d', $entry->timestamp) }}</strong> - at <strong>{{ gmdate('h:i:s A (e)', $entry->timestamp) }}</strong> - <hr> - {{ $entry->message }} - <hr> - @if($entry->agent === "Agent Unavailable") - <address>Agent unavailable</address> - @else - <address>Posted using <strong>{{ $user_agent->ua->toString() }}</strong> - on <strong>{{ $user_agent->os->toString() }}</strong></address> - @endif - </td> - </tr> - </table> - <br> - @endforeach - @endif -@stop |