Subversion Repositories taios

Rev

Rev 261 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
258 tom 1
<?php
2
 
3
require '../_taios.php';
4
 
5
$page = new Taios_Page('Manage All Forum Categories', '../');
6
$page->drawHeader();
7
$page->drawMiddle();
8
 
9
$page->checkLoggedIn();
10
 
11
if ($page->isUserAdmin($page->getLoggedInUser()))
12
{
13
    write('<p class="bold">Use this to manage all the forum categories on the Tim32 Website.</p><br />');
14
 
15
    write('<table>');
16
    write('<tr>');
17
    write('<td class="bold">ID</td>');
18
    write('<td class="bold">Parent</td>');
19
    write('<td class="bold">Title</td>');
20
    write('<td class="bold">Description</td>');
21
    write('</tr>');
22
 
23
    $ids = $page->findIDs('ForumCategories');
24
    for ($i = 0; $i < count($ids); $i++)
25
    {
26
        $cat = $page->getForumCategory($ids[$i]);
27
        write('<tr>');
28
        write('<td><a href="index.php?parentID=' . $cat->ID . '">' . $cat->ID . '</a></td>');
29
        if ($cat->parent == -1)
30
        {
31
            write('<td style="color: #444444;">No Parent</td>');
32
        }
33
        else
34
        {
35
            write('<td>' . $cat->parent->title . '</td>');
36
        }
37
        write('<td>' . $cat->title . '</td>');
38
        write('<td>' . $cat->description . '</td>');
39
        write('</tr>');
40
    }
41
 
42
    write('</table>');
43
}
44
else
45
{
46
    $page->drawError('You do not have permission to access this page.');
47
}
48
 
49
$page->drawFooter();
50
 
51
?>
52