deadjournal/views/admin/hidden.php

32 lines
1019 B
PHP
Raw Normal View History

2025-01-08 22:46:44 +05:00
<h2>Hidden Posts</h2>
<p><a href="/your_blog/index.php?url=admin/index">Back to Admin Panel</a></p>
<?php if (!empty($posts)): ?>
<table border="1" cellpadding="5" cellspacing="0">
<tr>
<th>ID</th>
<th>Title</th>
<th>Date</th>
<th>Actions</th>
</tr>
<?php foreach ($posts as $post): ?>
<tr>
<td><?= e($post['id']) ?></td>
<td><?= e($post['title']) ?></td>
<td><?= e($post['created_at']) ?></td>
<td>
<a href="/your_blog/index.php?url=admin/restore/<?= e($post['id']) ?>">
Restore
</a> |
<a href="/your_blog/index.php?url=admin/delete/<?= e($post['id']) ?>"
onclick="return confirm('Are you sure? This is permanent.')">
Delete
</a>
</td>
</tr>
<?php endforeach; ?>
</table>
<?php else: ?>
<p>No hidden posts.</p>
<?php endif; ?>