Subversion Repositories taios

Rev

Rev 102 | 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">ParentID</td>');
    write('<td class="bold">AuthorID</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++)
    {
        $poast = $page->getBlog($ids[$i]);
        write('<tr>');
        write('<td>' . $post->ID . '</td>');
        if ($post->parent == -1)
        {
            write('<td>' . $post->parent . '</td>');
        }
        else
        {
            write('<td>' . $post->parent->ID . '</td>');
        }
        write('<td>' . $post->author->ID . '</td>');
        write('<td>' . $post->title . '</td>');
        write('<td>' . $post->content . '</td>');
        write('<td>' . $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();

?>