(root)/admin/all-projects.php - Rev 226
Rev 219 |
Go to most recent revision |
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 . '">' . $project->author->name . '</a></td>');
write
('<td>' . $project->title . '</td>');
write
('<td>' . str_replace("\n", '<br />', $project->description) . '</td>');
write
('<td><img src="' . $project->logoURL . '" /></td>');
write
('<td><a href="' . $project->downloadURL . '">Link</a></td>');
write
('<td><a href="' . $project->websiteURL . '">Link</a></td>');
write
('<td>' . $project->latestVersion . '</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();
?>