/challenge/index.php |
---|
File deleted |
/challenge/00-do.php |
---|
File deleted |
/challenge/00.php |
---|
File deleted |
/challenge/01.php |
---|
File deleted |
/blog/add-post.php |
---|
40,7 → 40,7 |
} |
else |
{ |
if ($page->getLoggedInUser()->accessID >= 2 && $parentID == -1) |
if (($page->getLoggedInUser()->accessID >= 2 && $parentID == -1) || $page->getLoggedInUser()->accessID > 2) |
{ |
$page->drawError('You do not have permission to access this page.'); |
} |
/blog/del-post.php |
---|
7,7 → 7,7 |
$id = $_GET['id']; |
if ($id) |
{ |
if ($page->isUserAdmin($page->getLoggedInUser()) || $page->getLoggedInUser()->ID == $page->getBlogPost($id)->author->ID) |
if ($page->isUserAdmin($page->getLoggedInUser()) || $page->getLoggedInUser()->ID == $page->getBlogPost($id)->author->ID && $page->isUserNormal($page->getLoggedInUser())) |
{ |
$page->delBlogPost($id); |
} |
/blog/edit-post.php |
---|
20,7 → 20,7 |
$page->checkLoggedIn(); |
$post = $page->getBlogPost($id); |
if (!$page->isUserAdmin($page->getLoggedInUser()) && $page->getLoggedInUser()->ID != $post->author->ID) |
if ((!$page->isUserAdmin($page->getLoggedInUser()) && $page->getLoggedInUser()->ID != $post->author->ID) || !$page->isUserNormal($page->getLoggedInUser())) |
{ |
$page->drawError('You do not have permission to access this page.'); |
} |
/admin/account-do.php |
---|
13,7 → 13,7 |
$name = $_POST['name']; |
$user = $page->getUserByID($userID); |
if (($page->getLoggedInUser()->ID == $userID || $page->isUserAdmin($page->getLoggedInUser())) && $user) |
if (($page->getLoggedInUser()->ID == $userID || $page->isUserAdmin($page->getLoggedInUser())) && $user && $page->isUserNormal($page->getLoggedInUser())) |
{ |
if (isset($accessID) && $page->isUserAdmin($page->getLoggedInUser())) |
{ |
/admin/account.php |
---|
11,7 → 11,7 |
$userID = $page->getGetID(); |
$user = $page->getUserByID($userID); |
if (($page->getLoggedInUser()->ID == $userID || $page->isUserAdmin($page->getLoggedInUser())) && $user) |
if (($page->getLoggedInUser()->ID == $userID || $page->isUserAdmin($page->getLoggedInUser())) && $user && $page->isUserNormal($page->getLoggedInUser())) |
{ |
?> |
/admin/index.php |
---|
9,7 → 9,14 |
$page->checkLoggedIn(); |
$user = $page->getLoggedInUser(); |
if ($page->isUserNormal($user)) |
{ |
write('<h4><a href="account.php?id=' . $user->ID. '">Manage Account</a></h4>'); |
} |
else |
{ |
$page->drawError('You do not have permission to access this page.'); |
} |
if ($page->isUserAdmin($user)) |
{ |
/admin/all-blog-posts.php |
---|
27,7 → 27,10 |
$ids = $page->findIDs('BlogPosts', 'ORDER BY DatePosted DESC'); |
for ($i = 0; $i < count($ids); $i++) |
{ |
$post = $page->getBlogPost($ids[$i]); |
$id_str = $ids[$i]; |
if (!empty($id_str)) |
{ |
$post = $page->getBlogPost($id_str); |
write('<tr>'); |
write('<td><a href="../blog/edit-post.php?id=' . $post->ID . '">' . $post->ID . '</a></td>'); |
if ($post->parent == -1) |
46,6 → 49,7 |
write('<td>' . $post->spam . '</td>'); |
write('</tr>'); |
} |
} |
write('</table>'); |
} |
/_taios.php |
---|
34,7 → 34,8 |
write('<head>'); |
write('<meta http-equiv="Content-Type" content="text/html;charset=utf-8">'); |
write('<title>Tim32 · ' . $this->title . '</title>'); |
write('<link href="' . $this->url . 'styles.css" rel="stylesheet" type="text/css" media="screen">'); |
write('<link href="' . $this->url . 'styles.css" rel="stylesheet" type="text/css" media="screen" />'); |
write('<link rel="shortcut icon" href="' . $this->url . 'data/favicon.png" />'); |
write('</head>'); |
write('<body>'); |
write('<div class="sidebar">'); |
49,11 → 50,17 |
$this->drawMenuItem('Wiki', 'wiki/'); |
$this->drawMenuItem('Photos', 'photos/'); |
write('<br />'); |
if ($this->isLoggedIn()) |
if ($this->isLoggedIn() && $this->isUserNormal($this->getLoggedInUser())) |
{ |
$this->drawMenuItem('Administration', 'admin/'); |
$this->drawMenuItem('Logout', 'logout-do.php'); |
} |
else if ($this->isLoggedIn()) |
{ |
$this->drawMenuItem('Logout', 'logout-do.php'); |
if ($this->getLoggedInUser()->username != "cake") |
$this->drawMenuItem('You are banned', NULL); |
} |
else |
{ |
$this->drawMenuItem('Login', 'login.php'); |
60,7 → 67,6 |
$this->drawMenuItem('Register', 'register.php'); |
} |
write('<br />'); |
$this->drawnHeader = true; |
} |
} |
67,8 → 73,15 |
function drawMenuItem($t, $u) |
{ |
if($u == NULL) |
{ |
write('<p style="color:red">' . $t . '</p>'); |
} |
else |
{ |
write('<p><a href="' . $this->url . $u . '">' . $t . '</a></p>'); |
} |
} |
function drawMiddle() |
{ |
88,7 → 101,7 |
{ |
if (!$this->drawnFooter) |
{ |
write('<br /><p class="copyright">© 2011 Tim32 ·</p>'); |
write('<br /><p class="copyright">Tim32</p>'); |
write('</div>'); |
write('</body>'); |
write('</html>'); |
212,7 → 225,8 |
'/\[img\](.+?)\[\/img\]/is', |
'/\[ul\](.+?)\[\/ul\]/is', |
'/\[ol\](.+?)\[\/ol\]/is', |
'/\[li\](.+?)\[\/li\]/is' |
'/\[li\](.+?)\[\/li\]/is', |
'/\[mono\](.+?)\[\/mono\]/is' |
); |
$html = array( |
225,7 → 239,8 |
'<img src="$1" />', |
'<ul>$1</ul>', |
'<ol>$1</ol>', |
'<li>$1</li>' |
'<li>$1</li>', |
'<span style="font-family: Droid Sans Mono, monospace, fixed; margin-left: 1em; margin-right: 1em;">$1</span>', |
); |
$newstr = preg_replace($bbcode, $html, $newstr); |
297,6 → 312,19 |
return false; |
} |
function isUserBanned() |
{ |
if ($this->isLoggedIn()) |
{ |
if ($this->getLoggedInUser()->accessID >= 3) |
{ |
return true; |
} |
} |
return false; |
} |
function checkChallengeStatus($challengeID, $previous, $next) |
{ |
$currentChallengeID = $this->getLoggedInUser()->challengeID; |
/forums/add-post-do.php |
---|
20,6 → 20,11 |
$title = $_POST['title']; |
$content = $_POST['content']; |
if (!$page->isUserNormal($page->getLoggedInUser())) |
{ |
$page->redirect('add-post.php?error=You do not have permission to access this page'); |
} |
if (empty($title)) |
{ |
$page->redirect('add-post.php?error=No Title Specified'); |
/forums/add-post.php |
---|
20,7 → 20,7 |
$categoryID = -1; |
} |
if ($page->isLoggedIn()) |
if ($page->isLoggedIn() && $page->isUserNormal($page->getLoggedInUser)) |
{ |
if (isset($_GET['error'])) |
/forums/delete-post-do.php |
---|
9,7 → 9,7 |
$id = $page->getGetID(); |
$post = $page->getForumPost($id); |
if (($page->isUserAdmin($page->getLoggedInUser()) || $post->author->ID == $page->getLoggedInUser()->ID) && $post) |
if (($page->isUserAdmin($page->getLoggedInUser()) || $post->author->ID == $page->getLoggedInUser()->ID) && $post && $page->isUserNormal($page->getLoggedInUser())) |
{ |
$page->query('DELETE FROM ForumPosts WHERE ID = ' . $id); |
$page->redirect('index.php'); |
/forums/index.php |
---|
24,7 → 24,7 |
{ |
write('<a href="index.php?parentID=-1">Back to root</a>'); |
} |
if ($page->isLoggedIn()) |
if ($page->isLoggedIn() && $page->isUserNormal($page->getLoggedInUser())) |
{ |
if ($parentID != -1) |
{ |
/wiki/pages/Index.txt |
---|
File deleted |
Property changes: |
Deleted: svn:executable |
## -1 +0,0 ## |
-* |
\ No newline at end of property |
Index: styles.css |
=================================================================== |
--- styles.css (revision 443) |
+++ styles.css (revision 471) |
@@ -91,13 +91,18 @@ |
} |
.sidebar { |
+ top: 0px; |
+ left: 0px; |
+ position: fixed; |
float: left; |
width: 156px; |
padding: 0px; |
padding-left: 32px; |
- border-right: 0px solid #000089; |
+ border-right: 2px solid #000049; |
background-color: #032865; |
color: #FFFFFF; |
+ height: 100%; |
+ z-index: 50; |
} |
.sidebar-header { |
/data/favicon.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/data/favicon.png |
---|
Property changes: |
Added: svn:mime-type |
## -0,0 +1 ## |
+application/octet-stream |
\ No newline at end of property |
Index: index.php |
=================================================================== |
--- index.php (revision 443) |
+++ index.php (revision 471) |
@@ -6,12 +6,9 @@ |
$page->drawHeader(); |
write('Pages'); |
$page->drawMenuItem('Biggles', '/~biggles/'); |
-$page->drawMenuItem('Freddie (FredFace)', '/~freddie/'); |
+$page->drawMenuItem('FredFace', '/~freddie/'); |
$page->drawMenuItem('Muzer', '/~muzer/'); |
-$page->drawMenuItem('Sh4rk', '/~szabot/'); |
-$page->drawMenuItem('Tom (TomMan)', '/~tom/'); |
-write('Downtime-o-meter'); |
-write(' No planned down. '); |
+$page->drawMenuItem('TomMan', '/~tom/'); |
$page->drawMiddle(); |
?> |
/register.php |
---|
54,6 → 54,10 |
<td><?php echo recaptcha_get_html(RECAPTCHA_PUBLICKEY); ?></td> |
</tr> |
<tr> |
<td class="bold">3 + 9 * 8</td> |
<td><input type="text" name="maths" /></td> |
</tr> |
<tr> |
<td class="bold"></td> |
<td><input type="submit" value="Register" /></td> |
</tr> |
/register-do.php |
---|
10,6 → 10,7 |
$password2 = $_POST['password2']; |
$email = $_POST['email']; |
$name = $_POST['name']; |
$maths = $_POST['maths']; |
if (empty($username)) |
{ |
27,6 → 28,10 |
{ |
$page->redirect('register.php?error=Passwords do not match'); |
} |
if ($maths != '75') |
{ |
$page->redirect('register.php?error=Incorrect maths answer'); |
} |
$resp = recaptcha_check_answer(RECAPTCHA_PRIVATEKEY, $_SERVER["REMOTE_ADDR"], |
$_POST["recaptcha_challenge_field"], |
/photos/album.php |
---|
28,8 → 28,6 |
} |
$page = new Taios_Page('Photo Albums', '../'); |
$page->drawHeader(); |
$page->drawMiddle(); |
$dirName = $_GET['dir']; |
if (empty($dirName)) |
37,6 → 35,11 |
$page->redirect('index.php'); |
} |
$page->drawHeader(); |
write('<br /><h3>RSS</h3>'); |
$page->drawMenuItem('RSS Feed', 'photos/rss.php?dir=' . $dirName); |
$page->drawMiddle(); |
write('<p class="bold"><a href="index.php">Back to Photos</a></p><br />'); |
if (file_exists("albums/" . $dirName . "/description.txt")) |
44,8 → 47,6 |
write('<p>' . $page->replaceBBCode(file_get_contents("albums/" . $dirName . "/description.txt")) . '</p><br />'); |
} |
write('<p><a href="rss.php?dir=' . $dirName . '">RSS Feed</a></p>'); |
write('<table>'); |
write('<tr>'); |
/photos/rss.php |
---|
15,7 → 15,7 |
write('<?xml version="1.0" encoding="UTF-8" ?>'); |
write('<rss version="2.0">'); |
write('<channel>'); |
write('<title>Tim32 Photo RSS ' . $dirName . '</title>'); |
write('<title>Tim32 Photo RSS - ' . $dirName . '</title>'); |
write('<description>This is the RSS feed for the Tim32 Photos.</description>'); |
write('<link>http://tim32.org/photos/album.php?dir=' . $dirName . '</link>'); |
62,7 → 62,7 |
write('<item>'); |
write('<title>' . $file . '</title>'); |
write('<link>http://tim32.org/photos/' . str_replace(" ", "%20", $filename) . '</link>'); |
write('<guid>' . $indexInArray . '</guid>'); |
write('<guid>id_' . $file . '</guid>'); |
write('<pubDate>' . date('D, d M Y H:i:s O', $date). '</pubDate>'); |
write('<description><![CDATA[<img src="http://tim32.org/photos/' . str_replace(" ", "%20", $filename) . '" />]]></description>'); |
write('</item>'); |
/404.php |
---|
1,15 → 1,16 |
<?php |
header('Status: 404 Not Found'); |
require '_taios.php'; |
$page = new Taios_Page('404 - Pagee not found', '/'); |
$page = new Taios_Page('404 - Page not found', '/'); |
$page->drawHeader(); |
write('<h3>Pages</h3>'); |
$page->drawMenuItem('Biggles', '/~biggles/'); |
$page->drawMenuItem('Freddie', '/~freddie/'); |
$page->drawMenuItem('Muzer', '/~muzer/'); |
$page->drawMenuItem('Sh4rk', '/~szabot/'); |
$page->drawMenuItem('Tom', '/~tom/'); |
$page->drawMenuItem('Biggles', '~biggles/'); |
$page->drawMenuItem('Freddie (FredFace)', '~freddie/'); |
$page->drawMenuItem('Muzer', '~muzer/'); |
$page->drawMenuItem('Tom (TomMan)', '~tom/'); |
$page->drawMiddle(); |
?> |