Subversion Repositories taios

Compare Revisions

Ignore whitespace Rev 431 → Rev 456

/styles.css
91,6 → 91,9
}
 
.sidebar {
top: 0px;
left: 0px;
position: fixed;
float: left;
width: 156px;
padding: 0px;
98,6 → 101,7
border-right: 0px solid #000089;
background-color: #032865;
color: #FFFFFF;
height: 100%;
}
 
.sidebar-header {
/_taios.php
88,7 → 88,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">&copy; 2011 Tim32 &middot;</p>');
write('</div>');
write('</body>');
write('</html>');
170,10 → 170,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 → 212,8
'/\[img\](.+?)\[\/img\]/is',
'/\[ul\](.+?)\[\/ul\]/is',
'/\[ol\](.+?)\[\/ol\]/is',
'/\[li\](.+?)\[\/li\]/is'
'/\[li\](.+?)\[\/li\]/is',
'/\[mono\](.+?)\[\/mono\]/is'
);
 
$html = array(
213,7 → 226,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 → 526,7
public $password;
public $emailAddress;
public $name;
 
public $challengeID;
}
 
534,6 → 549,7
public $title;
public $description;
 
 
public $logoURL;
public $downloadURL;
public $websiteURL;
/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();
 
?>
/index.php
8,7 → 8,6
$page->drawMenuItem('Biggles', '/~biggles/');
$page->drawMenuItem('Freddie (FredFace)', '/~freddie/');
$page->drawMenuItem('Muzer', '/~muzer/');
$page->drawMenuItem('Sh4rk', '/~szabot/');
$page->drawMenuItem('Tom (TomMan)', '/~tom/');
write('<br /><h3>Downtime-o-meter</h3>');
write('<p>No planned down.</p>');
/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>');
}
 
/wiki/index.php
42,7 → 42,7
 
if ($page->isUserGM($page->getLoggedInUser()))
{
write('<p><a href="edit.php?page=' . $pageName . '">Edit Page</a></p><br />');
write('<p class="bold"><a href="edit.php?page=' . $pageName . '">Edit Page</a></p><br />');
}
 
$filename = 'pages/' . $pageName . '.txt';