Subversion Repositories taios

Rev

Rev 220 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
217 tom 1
<?php
2
 
3
require '../_taios.php';
4
 
5
$page = new Taios_Page('Manage All Projects', '../');
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 projects 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">Author</td>');
19
    write('<td class="bold">Title</td>');
20
    write('<td class="bold">Description</td>');
21
    write('<td class="bold">Logo</td>');
220 tom 22
    write('<td class="bold">Download</td>');
23
    write('<td class="bold">Website</td>');
217 tom 24
    write('<td class="bold">Latest Version</td>');
25
    write('<td class="bold">Last Update</td>');
26
    write('</tr>');
27
 
28
    $ids = $page->findIDs('Projects');
29
    for ($i = 0; $i < count($ids); $i++)
30
    {
31
        $project = $page->getProject($ids[$i]);
32
        write('<tr>');
33
        write('<td><a href="../projects/edit-project.php?id=' . $project->ID . '">' . $project->ID . '</a></td>');
522 muzer 34
        write('<td><a href="account.php?id=' . $project->author->ID . '">' . htmlentities($project->author->name, ENT_QUOTES) . '</a></td>');
35
        write('<td>' . htmlentities($project->title, ENT_QUOTES) . '</td>');
36
        write('<td>' . str_replace("\n", '<br />', htmlentities($project->description, ENT_QUOTES)) . '</td>');
37
        write('<td><img src="' . htmlentities($project->logoURL, ENT_QUOTES) . '" /></td>');
38
        write('<td><a href="' . htmlentities($project->downloadURL, ENT_QUOTES) . '">Link</a></td>');
39
        write('<td><a href="' . htmlentities($project->websiteURL, ENT_QUOTES) . '">Link</a></td>');
40
        write('<td>' . htmlentities($project->latestVersion, ENT_QUOTES) . '</td>');
219 tom 41
        write('<td>' . date('j/m/Y H:i', $project->lastUpdate) . '</td>');
217 tom 42
        write('</tr>');
43
    }
44
 
45
    write('</table>');
46
}
47
else
48
{
49
    $page->drawError('You do not have permission to access this page.');
50
}
51
 
52
$page->drawFooter();
53
 
54
?>
55