/blog/del-post.php |
---|
0,0 → 1,11 |
<?php |
require '../_taios.php'; |
$page = new Taios_Page('Blog Posts', '../'); |
if (!$page->isUserAdmin($page->getLoggedInUser())) |
$page->delBlogPost($_GET['id']); |
$page->redirect("index.php"); |
?> |
/_taios.php |
---|
125,6 → 125,8 |
if ($this->isUserNormal($this->getLoggedInUser())) |
{ |
write('<p class="bold"><a href="add-post.php?id=' . $id . '">Add Comment</a></p>'); |
if ($this->isUserAdmin($this->getLoggedInUser())) |
write(' | <p class="bold"><a href="del-post.php?id=' . $id . '">Delete Post</a></p>'); |
write('<br />'); |
} |
325,6 → 327,15 |
$this->drawError('Cannot find blog post, #' . $id); |
} |
function delBlogPost($id) |
{ |
$ids = $this->findIDs('BlogPosts', 'WHERE ParentID=' . $id); |
for ($i = 0; $i < count($ids); $i++) |
$this->delBlogPost($ids[$i]); |
$this->query('delete from BlogPosts where ID=' . $id); |
} |
function getGetID() |
{ |
$id = $_GET['id']; |
/admin/index.php |
---|
15,6 → 15,7 |
{ |
write('<h4><a href="all-accounts.php">Manage All Accounts</a></h4>'); |
write('<h4><a href="all-blog-posts.php">Manage All Blog Posts</a></h4>'); |
write('<h4><a href="all-projects.php">Manage All Projects</a></h4>'); |
write('<h4><a href="all-forum-categories.php">Manage All Forum Categories</a></h4>'); |
write('<h4><a href="all-forum-topics.php">Manage All Forum Topics</a></h4>'); |
write('<h4><a href="all-forum-posts.php">Manage All Forum Posts</a></h4>'); |
/admin/all-blog-posts.php |
---|
32,7 → 32,7 |
write('<td><a href="../blog/edit-post.php?id=' . $post->ID . '">' . $post->ID . '</a></td>'); |
if ($post->parent == -1) |
{ |
write('<td>No Parent</td>'); |
write('<td style="color: #444444;">No Parent</td>'); |
} |
else |
{ |
/projects/index.php |
---|
0,0 → 1,13 |
<?php |
require '../_taios.php'; |
$page = new Taios_Page('Projects', '../'); |
$page->drawHeader(); |
$page->drawMiddle(); |
write('<br /><p class="bold">This page is currently under construction.</p>'); |
$page->drawFooter(); |
?> |