Version 0.7.1

- Min. Änderungen

Signed-off-by: erik <micheler@steinbeis.schule>
This commit is contained in:
Erik M 2025-02-24 22:15:30 +01:00
parent 65c6d9a45c
commit 1d79822346
2 changed files with 11 additions and 2 deletions

View file

@ -172,10 +172,13 @@ if(!isset($_SESSION['user_id'])) {
<?php endif; ?>
<p><small>Erstellt am: <?php echo $post['created_at']; ?></small></p>
<?php if ($userId == $post['user_id']): ?>
<form action="upload-post/delete-post.php" method="post">
<input type="hidden" name="post_id" value="<?php echo htmlspecialchars($post['id']); ?>">
<button type="submit">Delete</button>
<input type="hidden" name="post_id" value="<?= htmlspecialchars($post['id']) ?>">
<button type="submit">Löschen</button>
</form>
<?php endif; ?>
</div>
<?php endforeach; ?>

View file

@ -132,6 +132,12 @@ try {
<?php endif; ?>
<p><small>Erstellt am: <?php echo $post['created_at']; ?></small></p>
<?php if ($userId == $post['user_id']): ?>
<form action="upload-post/delete-post.php" method="post">
<input type="hidden" name="post_id" value="<?= htmlspecialchars($post['id']) ?>">
<button type="submit">Löschen</button>
</form>
<?php endif; ?>
</div>
<?php endforeach; ?>