Subversion Repositories taios

Rev

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

Rev Author Line No. Line
169 tom 1
<?php
2
 
3
require '../_taios.php';
4
 
5
$page = new Taios_Page('Projects', '../');
6
$page->drawHeader();
7
$page->drawMiddle();
8
 
196 tom 9
write('<p class="bold">Here you can find all the projects that are created by members of Tim32!</p><br />');
201 tom 10
if ($page->isUserGM($page->getLoggedInUser()))
11
{
12
    write('<p class="bold"><a href="add-project.php">Add Project</a></p>');
13
    write('<br />');
14
}
196 tom 15
 
191 tom 16
$ids = $page->findIDs('Projects', 'ORDER BY LastUpdate DESC');
17
for ($i = 0; $i < count($ids); $i++)
18
{
19
    $id = $ids[$i];
20
    $project = $page->getProject($id);
21
 
22
    write('<h3>' . $project->title . '</h3>');
194 tom 23
    write('<table style="border: 0px;">');
193 tom 24
    write('<tr>');
485 muzer 25
    write('<td style="border: 0px; vertical-align: top;"><img class="smiley" src="' . $project->logoURL . '" alt="' . $project->title . ' logo" /></td>');
195 tom 26
    write('<td style="border: 0px;">');
209 tom 27
    if (empty($project->latestVersion))
28
    {
29
        write('<h4>No Releases</h4>');
30
    }
31
    else
32
    {
33
        write('<h4>Latest Version: ' . $project->latestVersion . '</h4>');
34
    }
208 tom 35
    write('<p>Project Author: ' . $project->author->name . '</p>');
198 tom 36
    write('<p>' . $page->replaceBBCode($project->description) . '</p>');
197 tom 37
    write('<p>');
199 tom 38
    if (!empty($project->websiteURL))
197 tom 39
    {
199 tom 40
        write('<a href="' . $project->websiteURL . '">Website</a>');
197 tom 41
    }
199 tom 42
    if (!empty($project->downloadURL))
197 tom 43
    {
199 tom 44
        write(' &middot; <a href="' . $project->downloadURL . '">Download</a>');
197 tom 45
    }
46
    write('</p>');
195 tom 47
    write('</td>');
193 tom 48
    write('</tr>');
49
    write('</table>');
210 tom 50
    if ($page->isUserAdmin($page->getLoggedInUser()) || $user->ID == $project->author->ID)
51
    {
275 tom 52
        write('<p class="bold"><a href="edit-project.php?id=' . $project->ID . '">Edit Project</a> &nbsp;&nbsp; &middot; &nbsp;&nbsp; <a href="delete-project-do.php?id=' . $project->ID . '">Delete Project</a></p>');
210 tom 53
    }
191 tom 54
    write('<br />');
55
}
169 tom 56
 
57
$page->drawFooter();
58
 
59
?>
60