/_taios.php |
---|
51,7 → 51,7 |
write('<br />'); |
if ($this->isLoggedIn()) |
{ |
$this->drawMenuItem('Manage Account', 'admin/account.php?id=' . $this->getLoggedInUser()->ID); |
$this->drawMenuItem('Administration', 'admin/'); |
$this->drawMenuItem('Logout', 'logout-do.php'); |
} |
else |
112,15 → 112,19 |
} |
} |
function drawBlogPostTree($id) |
function drawBlogPostTree($id, $first = false) |
{ |
$post = $this->getBlogPost($id); |
write('<a href="' . $this->url . 'blog/post.php?id=' . $id . '"><h3>' . $post->title. '</h3></a>'); |
if ($first) |
write('<h3><a href="post.php?id=' . $id . '">' . $post->title. '</a> <a href="post.php?id=' . $post->parentID . '">^</a></h3>'); |
else |
write('<a href="post.php?id=' . $id . '"><h3>' . $post->title. '</h3></a>'); |
write('<h5 style="color: #666666;">Posted On ' . date('l j F Y', $post->datePosted) . ' by ' . $post->user->name . ' (' . $post->user->username . ')</h5>'); |
write('<p>' . $post->content . '</p>'); |
if ($this->isUserNormal($page->getLoggedInUser())) |
write('<br />'); |
if ($this->isUserNormal($this->getLoggedInUser())) |
{ |
write('<p class="bold"><a href="add-commend.php?id="' . $id . '">Add Comment</a></p>'); |
write('<p class="bold"><a href="post-add.php?id=' . $id . '">Add Comment</a></p>'); |
write('<br />'); |
} |
/blog/post.php |
---|
1,5 → 1,8 |
<?php |
if ($_GET['id'] == -1) |
$page->redirect('index.php'); |
require '../_taios.php'; |
$page = new Taios_Page('Blog Posts', '../'); |
11,7 → 14,7 |
$page->drawBlogCategoriesMenu(); |
$page->drawMiddle(); |
$page->drawBlogPostTree($_GET['id']); |
$page->drawBlogPostTree($_GET['id'], true); |
$page->drawFooter(); |
/admin/all-accounts.php |
---|
0,0 → 1,51 |
<?php |
require '../_taios.php'; |
$page = new Taios_Page('Manage All Accounts', '../'); |
$page->drawHeader(); |
$page->drawMiddle(); |
$page->checkLoggedIn(); |
if ($page->isUserAdmin($page->getLoggedInUser())) |
{ |
write('<p class="bold">Use this to manage all the accounts on the Tim32 Website.</p><br />'); |
write('<table>'); |
write('<tr>'); |
write('<td class="bold">ID</td>'); |
write('<td class="bold">AccessID</td>'); |
write('<td class="bold">Username</td>'); |
write('<td class="bold">Password</td>'); |
write('<td class="bold">Name</td>'); |
write('<td class="bold">Email Address</td>'); |
write('<td class="bold">Challenge ID</td>'); |
write('</tr>'); |
$ids = $page->findIDs('Users'); |
for ($i = 0; $i < count($ids); $i++) |
{ |
$user = $page->getUserByID($ids[$i]); |
write('<tr>'); |
write('<td>' . $user->ID . '</td>'); |
write('<td>' . $user->accessID . '</td>'); |
write('<td>' . $user->username . '</td>'); |
write('<td>' . $user->password . '</td>'); |
write('<td>' . $user->name . '</td>'); |
write('<td>' . $user->emailAddress . '</td>'); |
write('<td>' . $user->challengeID . '</td>'); |
write('</tr>'); |
} |
write('</table>'); |
} |
else |
{ |
drawError('You do not have permission to access this page.'); |
} |
$page->drawFooter(); |
?> |
/styles.css |
---|
63,6 → 63,15 |
background-color: #B5D7FF; |
} |
table { |
border: 1px solid #222222; |
} |
td { |
padding: 3px; |
border: 1px solid #888888; |
} |
.sidebar { |
left: 0px; |
top: 0px; |
102,7 → 111,6 |
left: 200px; |
top: 0px; |
position: absolute; |
width: 720px; |
margin-right: 32px; |
} |
/index.php |
---|
34,12 → 34,6 |
write('<br />'); |
} |
if ($page->isLoggedIn()) |
{ |
write('<h3>Actions</h3>'); |
write('<h4><a href="admin/account.php?id=' . $page->getLoggedInUser()->ID . '">Manage Account</a></h4>'); |
} |
$page->drawFooter(); |
?> |