diskfloppy.me/resources/views/pages/admin/guestbook.blade.php

33 lines
1 KiB
PHP
Raw Normal View History

2023-07-16 20:02:51 +00:00
@extends('layouts.default-admin')
2023-07-25 23:08:58 +00:00
@section('title', 'Guestbook')
2023-07-16 20:02:51 +00:00
@section('content')
@php
2023-07-19 00:58:32 +00:00
$entries = DB::select('
2023-07-20 02:33:04 +00:00
SELECT id, name, timestamp, message, ip_address
2023-07-19 00:58:32 +00:00
FROM guestbook__entries
ORDER BY id DESC
');
2023-07-16 20:02:51 +00:00
@endphp
<h1>Entries <small>({{ count($entries) }} total)</small></h1>
@foreach ($entries as $entry)
<table class="gb_admin">
<tr>
<td>
2023-07-25 23:08:58 +00:00
Name:&nbsp;{{ $entry->name }}<br>
IP:&nbsp;&nbsp;&nbsp;{{ $entry->ip_address }}<br>
2023-07-16 20:02:51 +00:00
Date:&nbsp;{{ gmdate("H:i:s - Y-m-d", $entry->timestamp) }}
</td>
<td class="gb_del">
<a href="/admin/guestbook/delete?id={{ $entry->id }}">del</a>
</td>
</tr>
<tr>
<td colspan="2" class="gb_message">
2023-07-25 23:08:58 +00:00
<br>
2023-07-16 20:02:51 +00:00
{{ htmlspecialchars($entry->message) }}
</td>
</tr></table>
@endforeach
@stop