Subversion Repositories taios

Compare Revisions

Ignore whitespace Rev 432 → Rev 469

/challenge/index.php
File deleted
/challenge/00-do.php
File deleted
/challenge/00.php
File deleted
/challenge/01.php
File deleted
/wiki/pages/Index.txt
1,4 → 1,9
[b]Welcome to the Tim32 Wiki![/b]
 
Here you can talk about pretty much anything!
 
[b]Welcome to the Tim32 Wiki![/b]
 
Here you can talk about pretty much anything!
 
 
[b]Some interesting links[/b]
[ul]
[li][url=index.php?page=Comics]Comics[/url][/li]
[/ul]
/admin/all-blog-posts.php
27,24 → 27,28
$ids = $page->findIDs('BlogPosts', 'ORDER BY DatePosted DESC');
for ($i = 0; $i < count($ids); $i++)
{
$post = $page->getBlogPost($ids[$i]);
write('<tr>');
write('<td><a href="../blog/edit-post.php?id=' . $post->ID . '">' . $post->ID . '</a></td>');
if ($post->parent == -1)
$id_str = $ids[$i];
if (!empty($id_str))
{
write('<td style="color: #444444;">No Parent</td>');
$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)
{
write('<td style="color: #444444;">No Parent</td>');
}
else
{
write('<td>' . $post->parent->title . '</td>');
}
write('<td><a href="account.php?id=' . $post->author->ID . '">' . $post->author->name . '</a></td>');
write('<td>' . $post->title . '</td>');
write('<td>' . str_replace("\n", '<br />', $post->content) . '</td>');
write('<td>' . date('j/m/Y H:i', $post->datePosted) . '</td>');
write('<td>' . $post->category . '</td>');
write('<td>' . $post->spam . '</td>');
write('</tr>');
}
else
{
write('<td>' . $post->parent->title . '</td>');
}
write('<td><a href="account.php?id=' . $post->author->ID . '">' . $post->author->name . '</a></td>');
write('<td>' . $post->title . '</td>');
write('<td>' . str_replace("\n", '<br />', $post->content) . '</td>');
write('<td>' . date('j/m/Y H:i', $post->datePosted) . '</td>');
write('<td>' . $post->category . '</td>');
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 &middot; ' . $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">');
88,7 → 89,7
{
if (!$this->drawnFooter)
{
write('<br /><p class="copyright">&copy; 2011 Tim32 &middot; <a href="http://validator.w3.org/check?uri=http%3A%2F%2Ftim32.org%2F">HTML5 Valid</a></p>');
write('<br /><p class="copyright">Tim32</p>');
write('</div>');
write('</body>');
write('</html>');
170,10 → 171,22
function replaceBBCode($str)
{
$newstr = str_replace("<", "[", $str);
/*$newstrarray = explode("\n", $str);
$newstr = "";
foreach ($newstrarray as $line)
{
if ($line == "\n" || $line == " \n" || $line == "\n " || $line == "\n\r")
{
$line = "</p><p>";
}
$newstr .= ($line . "\n");
}*/
$newstr = $str;
$newstr = str_replace("<", "[", $newstr);
$newstr = str_replace(">", "]", $newstr);
$newstr = str_replace("\n", '</p><p>', $newstr);
//$newstr = str_replace("\n", '<br />', $newstr);
$newstr = str_replace("\n", "</p><p>", $newstr);
$newstr = str_replace("\\'", "'", $newstr);
$newstr = str_replace("\\\"",'"', $newstr);
$newstr = str_replace(' ', '&nbsp;&nbsp;', $newstr);
200,7 → 213,8
'/\[img\](.+?)\[\/img\]/is',
'/\[ul\](.+?)\[\/ul\]/is',
'/\[ol\](.+?)\[\/ol\]/is',
'/\[li\](.+?)\[\/li\]/is'
'/\[li\](.+?)\[\/li\]/is',
'/\[mono\](.+?)\[\/mono\]/is'
);
 
$html = array(
213,7 → 227,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);
512,6 → 527,7
public $password;
public $emailAddress;
public $name;
 
public $challengeID;
}
 
534,6 → 550,7
public $title;
public $description;
 
 
public $logoURL;
public $downloadURL;
public $websiteURL;
/styles.css
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 432)
+++ index.php (revision 469)
@@ -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"))
/photos/rss.php
0,0 → 1,76
<?php
 
require '../_taios.php';
 
header("Content-type: application/rss+xml");
 
$page = new Taios_Page('Photos RSS Feed', '../');
 
$dirName = $_GET['dir'];
if (empty($dirName))
{
$dirName = "Lassitor";
}
 
write('<?xml version="1.0" encoding="UTF-8" ?>');
write('<rss version="2.0">');
write('<channel>');
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>');
$directory = "albums/" . $dirName . "/";
$sortOrder = "newestFirst";
 
$results = array();
$handler = opendir($directory);
while ($file = readdir($handler))
{
if ($file != '.' && $file != '..' && $file != "robots.txt" && $file != ".htaccess" && getimagesize($directory . $file))
{
$currentModified = filectime($directory . $file);
$file_names[] = $file;
$file_dates[] = $currentModified;
}
}
 
closedir($handler);
 
if ($sortOrder == "newestFirst")
{
arsort($file_dates);
}
else
{
asort($file_dates);
}
$file_names_Array = array_keys($file_dates);
foreach ($file_names_Array as $idx => $name) $name=$file_names[$name];
$file_dates = array_merge($file_dates);
 
$indexInArray = 0;
 
foreach ($file_dates as $date)
{
$j = $file_names_Array[$indexInArray];
$file = $file_names[$j];
$filename = $directory . $file;
write('<item>');
write('<title>' . $file . '</title>');
write('<link>http://tim32.org/photos/' . str_replace(" ", "%20", $filename) . '</link>');
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>');
$indexInArray++;
}
 
write('</channel>');
write('</rss>');
 
?>
/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();
 
?>
/blog/rss.php
2,6 → 2,8
 
require '../_taios.php';
 
header("Content-type: application/rss+xml");
 
$page = new Taios_Page('Blog RSS Feed', '../');
 
write('<?xml version="1.0" encoding="UTF-8" ?>');
22,7 → 24,7
write('<link>http://tim32.org/blog/post.php?id=' . $id . '</link>');
write('<guid>' . $id . '</guid>');
write('<pubDate>' . date('D, d M Y H:i:s O', $post->datePosted). '</pubDate>');
write('<description>' . str_replace(">", "&gt;", str_replace("<", "&lt;", $page->replaceBBCode($post->content))) . '</description>');
write('<description><![CDATA[' . $page->replaceBBCode($post->content) . ']]></description>');
write('</item>');
}