/_taios.php |
---|
124,8 → 124,10 |
write('<br />'); |
if ($this->isUserNormal($this->getLoggedInUser())) |
{ |
write('<p class="bold"><a href="add-post.php?id=' . $id . '">Add Comment</a></p>'); |
write('<br />'); |
echo '<p class="bold"><a href="add-post.php?id=' . $id . '">Add Comment</a>'; |
if ($this->isUserAdmin($this->getLoggedInUser()) || $this->getLoggedInUser() == $post->author->ID) |
echo ' · <a href="del-post.php?id=' . $id . '">Delete Post</a>'; |
write('</p><br />'); |
} |
$ids = $this->findIDs('BlogPosts', 'WHERE ParentID=' . $id); |
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']; |
/projects/index.php |
---|
0,0 → 1,14 |
<?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(); |
?> |
/wiki/index.php |
---|
0,0 → 1,14 |
<?php |
require '../_taios.php'; |
$page = new Taios_Page('Wiki', '../'); |
$page->drawHeader(); |
$page->drawMiddle(); |
write('<br /><p class="bold">This page is currently under construction.</p>'); |
$page->drawFooter(); |
?> |
/forums/index.php |
---|
0,0 → 1,14 |
<?php |
require '../_taios.php'; |
$page = new Taios_Page('Forums', '../'); |
$page->drawHeader(); |
$page->drawMiddle(); |
write('<br /><p class="bold">This page is currently under construction.</p>'); |
$page->drawFooter(); |
?> |
/photos/index.php |
---|
0,0 → 1,14 |
<?php |
require '../_taios.php'; |
$page = new Taios_Page('Photos', '../'); |
$page->drawHeader(); |
$page->drawMiddle(); |
write('<br /><p class="bold">This page is currently under construction.</p>'); |
$page->drawFooter(); |
?> |
/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"); |
?> |
/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 |
---|
15,11 → 15,11 |
write('<table>'); |
write('<tr>'); |
write('<td class="bold">ID</td>'); |
write('<td class="bold">ParentID</td>'); |
write('<td class="bold">AuthorID</td>'); |
write('<td class="bold">Parent</td>'); |
write('<td class="bold">Author</td>'); |
write('<td class="bold">Title</td>'); |
write('<td class="bold">Content</td>'); |
write('<td class="bold">DatePosted</td>'); |
write('<td class="bold">Date Posted</td>'); |
write('<td class="bold">Category</td>'); |
write('<td class="bold">Spam</td>'); |
write('</tr>'); |
32,16 → 32,16 |
write('<td><a href="../blog/edit-post.php?id=' . $post->ID . '">' . $post->ID . '</a></td>'); |
if ($post->parent == -1) |
{ |
write('<td>' . $post->parent . '</td>'); |
write('<td style="color: #444444;">No Parent</td>'); |
} |
else |
{ |
write('<td>' . $post->parent->ID . '</td>'); |
write('<td>' . $post->parent->title . '</td>'); |
} |
write('<td>' . $post->user->ID . '</td>'); |
write('<td><a href="account.php?id=' . $post->author->ID . '">' . $post->author->name . '</a></td>'); |
write('<td>' . $post->title . '</td>'); |
write('<td>' . $post->content . '</td>'); |
write('<td>' . $post->datePosted . '</td>'); |
write('<td>' . date('j/m/Y H:i', $post->datePosted) . '</td>'); |
write('<td>' . $post->category . '</td>'); |
write('<td>' . $post->spam . '</td>'); |
write('</tr>'); |