Subversion Repositories taios

Rev

Rev 261 | Go to most recent revision | Details | Compare with Previous | 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>');
261 tom 28
        write('<td><a href="../forums/index.php?parentID=' . $cat->ID . '">' . $cat->ID . '</a></td>');
260 tom 29
        if (!$cat->parent)
258 tom 30
        {
31
            write('<td style="color: #444444;">No Parent</td>');
32
        }
33
        else
34
        {
522 muzer 35
            write('<td>' . htmlentities($cat->parent->title, ENT_QUOTES) . '</td>');
258 tom 36
        }
522 muzer 37
        write('<td>' . htmlentities($cat->title, ENT_QUOTES) . '</td>');
38
        write('<td>' . htmlentities($cat->description, ENT_QUOTES) . '</td>');
258 tom 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