0,0 → 1,30 |
<?php |
|
require '../_taios.php'; |
|
$page = new Taios_Page('Delete Post', '../'); |
|
$page->checkLoggedIn(); |
|
$id = $page->getGetID(); |
$post = $page->getForumPost($id); |
|
if (($page->isUserAdmin($page->getLoggedInUser()) || $post->author->ID == $page->getLoggedInUser()->ID) && $post) |
{ |
$page->query('DELETE FROM ForumCategories WHERE ID = ' . $id); |
$page->redirect('index.php'); |
} |
else |
{ |
if (!$post) |
{ |
$page->drawError('No such forum post, #' . $id); |
} |
else |
{ |
$page->drawError('You do not have permission to access this page.'); |
} |
} |
|
?> |
|