(root)/admin/all-projects.php - Rev 522
Rev 220 |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
<?php
require '../_taios.php';
$page = new Taios_Page
('Manage All Projects', '../');
$page->drawHeader();
$page->drawMiddle();
$page->checkLoggedIn();
if ($page->isUserAdmin($page->getLoggedInUser()))
{
write
('<p class="bold">Use this to manage all the projects on the Tim32 Website.</p><br />');
write
('<table>');
write
('<tr>');
write
('<td class="bold">ID</td>');
write
('<td class="bold">Author</td>');
write
('<td class="bold">Title</td>');
write
('<td class="bold">Description</td>');
write
('<td class="bold">Logo</td>');
write
('<td class="bold">Download</td>');
write
('<td class="bold">Website</td>');
write
('<td class="bold">Latest Version</td>');
write
('<td class="bold">Last Update</td>');
write
('</tr>');
$ids = $page->findIDs('Projects');
for ($i = 0; $i < count($ids); $i++)
{
$project = $page->getProject($ids[$i]);
write
('<tr>');
write
('<td><a href="../projects/edit-project.php?id=' . $project->ID . '">' . $project->ID . '</a></td>');
write
('<td><a href="account.php?id=' . $project->author->ID . '">' . htmlentities($project->author->name, ENT_QUOTES) . '</a></td>');
write
('<td>' . htmlentities($project->title, ENT_QUOTES) . '</td>');
write
('<td>' . str_replace("\n", '<br />', htmlentities($project->description, ENT_QUOTES)) . '</td>');
write
('<td><img src="' . htmlentities($project->logoURL, ENT_QUOTES) . '" /></td>');
write
('<td><a href="' . htmlentities($project->downloadURL, ENT_QUOTES) . '">Link</a></td>');
write
('<td><a href="' . htmlentities($project->websiteURL, ENT_QUOTES) . '">Link</a></td>');
write
('<td>' . htmlentities($project->latestVersion, ENT_QUOTES) . '</td>');
write
('<td>' . date('j/m/Y H:i', $project->lastUpdate) . '</td>');
write
('</tr>');
}
write
('</table>');
}
else
{
$page->drawError('You do not have permission to access this page.');
}
$page->drawFooter();
?>