Rev 485 |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
<?php
require '../_taios.php';
$page = new Taios_Page
('Projects', '../');
$page->drawHeader();
$page->drawMiddle();
write
('<p class="bold">Here you can find all the projects that are created by members of Tim32!</p><br />');
if ($page->isUserGM($page->getLoggedInUser()))
{
write
('<p class="bold"><a href="add-project.php">Add Project</a></p>');
write
('<br />');
}
$ids = $page->findIDs('Projects', 'ORDER BY LastUpdate DESC');
for ($i = 0; $i < count($ids); $i++)
{
$id = $ids[$i];
$project = $page->getProject($id);
write
('<h3>' . htmlentities($project->title, ENT_QUOTES) . '</h3>');
write
('<table style="border: 0px;">');
write
('<tr>');
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>');
write
('<td style="border: 0px;">');
if (empty($project->latestVersion))
{
write
('<h4>No Releases</h4>');
}
else
{
write
('<h4>Latest Version: ' . htmlentities($project->latestVersion, ENT_QUOTES) . '</h4>');
}
write
('<p>Project Author: ' . htmlentities($project->author->name, ENT_QUOTES) . '</p>');
write
('<p>' . $page->replaceBBCode($project->description) . '</p>');
write
('<p>');
if (!empty($project->websiteURL))
{
write
('<a href="' . htmlentities($project->websiteURL, ENT_QUOTES) . '">Website</a>');
}
if (!empty($project->downloadURL))
{
write
(' · <a href="' . htmlentities($project->downloadURL, ENT_QUOTES) . '">Download</a>');
}
write
('</p>');
write
('</td>');
write
('</tr>');
write
('</table>');
if ($page->isUserAdmin($page->getLoggedInUser()) || $user->ID == $project->author->ID)
{
write
('<p class="bold"><a href="edit-project.php?id=' . $project->ID . '">Edit Project</a> · <a href="delete-project-do.php?id=' . $project->ID . '">Delete Project</a></p>');
}
write
('<br />');
}
$page->drawFooter();
?>