Subversion Repositories taios

Rev

Rev 485 | 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
 
522 muzer 22
    write('<h3>' . htmlentities($project->title, ENT_QUOTES) . '</h3>');
194 tom 23
    write('<table style="border: 0px;">');
193 tom 24
    write('<tr>');
522 muzer 25
    write('<td style="border: 0px; vertical-align: top;"><img class="smiley" src="' . htmlentities($project->logoURL, ENT_QUOTES). '" alt="' . htmlentities($project->title, ENT_QUOTES) . ' 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
    {
522 muzer 33
        write('<h4>Latest Version: ' . htmlentities($project->latestVersion, ENT_QUOTES) . '</h4>');
209 tom 34
    }
522 muzer 35
    write('<p>Project Author: ' . htmlentities($project->author->name, ENT_QUOTES) . '</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
    {
522 muzer 40
        write('<a href="' . htmlentities($project->websiteURL, ENT_QUOTES) . '">Website</a>');
197 tom 41
    }
199 tom 42
    if (!empty($project->downloadURL))
197 tom 43
    {
522 muzer 44
        write(' &middot; <a href="' . htmlentities($project->downloadURL, ENT_QUOTES) . '">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