(root)/admin/all-blog-posts.php @ 98 - Rev 108
Rev 107 |
Rev 109 |
Go to most recent revision |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
<?php
require '../_taios.php';
$page = new Taios_Page
('Manage All Blog Posts', '../');
$page->drawHeader();
$page->drawMiddle();
$page->checkLoggedIn();
if ($page->isUserAdmin($page->getLoggedInUser()))
{
write
('<p class="bold">Use this to manage all the blog posts on the Tim32 Website.</p><br />');
write
('<table>');
write
('<tr>');
write
('<td class="bold">ID</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">Category</td>');
write
('<td class="bold">Spam</td>');
write
('</tr>');
$ids = $page->findIDs('BlogPosts');
for ($i = 0; $i < count($ids); $i++)
{
$post = $page->getBlogPost($ids[$i]);
write
('<tr>');
write
('<td><a href="../blog/edit-post.php?id=' . $post->ID . '">' . $post->ID . '</a></td>');
if ($post->parent == -1)
{
write
('<td>No Parent</td>');
}
else
{
write
('<td>' . $post->parent->title . '</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>' . date('l j F Y', $post->datePosted) . '</td>');
write
('<td>' . $post->category . '</td>');
write
('<td>' . $post->spam . '</td>');
write
('</tr>');
}
write
('</table>');
}
else
{
drawError
('You do not have permission to access this page.');
}
$page->drawFooter();
?>