Rev 262 |
Rev 264 |
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 Forum Posts', '../');
$page->drawHeader();
$page->drawMiddle();
$page->checkLoggedIn();
if ($page->isUserAdmin($page->getLoggedInUser()))
{
write
('<p class="bold">Use this to manage all the forum categories on the Tim32 Website.</p><br />');
write
('<table>');
write
('<tr>');
write
('<td class="bold">ID</td>');
write
('<td class="bold">Author</td>');
write
('<td class="bold">Category</td>');
write
('<td class="bold">Parent</td>');
write
('<td class="bold">Title</td>');
write
('<td class="bold">Content</td>');
write
('<td class="bold">Date Posted</td>');
write
('<td class="bold">Spam</td>');
write
('</tr>');
$ids = $page->findIDs('ForumPosts');
for ($i = 0; $i < count($ids); $i++)
{
$post = $page->getForumPost($ids[$i]);
write
('<tr>');
write
('<td><a href="../forums/post.php?id=' . $post->ID . '">' . $post->ID . '</a></td>');
write
('<td><a href="account.php?id=' . $post->author->ID . '">' . $post->author->name . '</a></td>');
if (!$post->category)
{
write
('<td style="color: #444444;">No Category</td>');
}
else
{
write
('<td>' . $post->category->title . '</td>');
}
if (!$post->parent)
{
write
('<td style="color: #444444;">No Parent</td>');
}
else
{
write
('<td>' . $post->parent->title . '</td>');
}
write
('<td>' . $post->title . '</td>');
write
('<td>' . str_replace("\n", ' ', $post->description) . '</td>');
write
('<td>' . date('j/m/Y H:i', $post->datePosted) . '</td>');
write
('<td>' . $post->spam . '</td>');
write
('</tr>');
}
write
('</table>');
}
else
{
$page->drawError('You do not have permission to access this page.');
}
$page->drawFooter();
?>