Subversion Repositories taios

Compare Revisions

Ignore whitespace Rev 361 → Rev 305

/_recaptchalib.php
File deleted
/wiki/index.php
10,8 → 10,6
 
$page = new Taios_Page('Wiki - ' . $pageName, '../');
$page->drawHeader();
write('<h3>Wiki</h3>');
$page->drawMenuItem('Special', 'specialpage.php');
$page->drawMiddle();
 
write('<p><i>The wiki is still under construction.</i></p>');
/photos/album.php
39,68 → 39,29
 
write('<p class="bold"><a href="index.php">Back to Photos</a></p><br />');
 
if (file_exists("albums/" . $dirName . "/description.txt"))
{
write('<p>' . $page->replaceBBCode(file_get_contents("albums/" . $dirName . "/description.txt")) . '</p><br />');
}
 
write('<table>');
write('<tr>');
 
$directory = "albums/" . $dirName . "/";
$sortOrder = "newestFirst";
$i = 0;
 
$results = array();
$handler = opendir($directory);
while ($file = readdir($handler))
$dir = dir('albums/' . $dirName);
while (($file = $dir->read()) !== false)
{
if ($file != '.' && $file != '..' && $file != "robots.txt" && $file != ".htaccess" && getimagesize($directory . $file))
if ($file[0] != '.')
{
$currentModified = filectime($directory . $file);
$file_names[] = $file;
$file_dates[] = $currentModified;
}
}
 
closedir($handler);
 
if ($sortOrder == "newestFirst")
{
arsort($file_dates);
}
else
{
asort($file_dates);
}
if ($i >= 4)
{
write('</tr><tr>');
$i = 0;
}
$file_names_Array = array_keys($file_dates);
foreach ($file_names_Array as $idx => $name) $name=$file_names[$name];
$file_dates = array_merge($file_dates);
$filename = 'albums/' . $dirName . '/' . $file;
$size = getImageSizes($filename, 200, 200);
$i = 0;
 
$indexInArray = 0;
$i = 0;
 
foreach ($file_dates as $$file_dates)
{
$j = $file_names_Array[$indexInArray];
$file = $file_names[$j];
if ($i >= 3)
{
write('</tr><tr>');
$i = 0;
write('<td><a href="' . $filename . '"><img width="' . $size[0] . '" height="' . $size[1] . '" src="' . $filename . '" /></a></td>');
$i++;
}
$filename = $directory . $file;
$size = getImageSizes($filename, 300, 300);
 
write('<td><a href="' . $filename . '"><img width="' . $size[0] . '" height="' . $size[1] . '" src="' . $filename . '" /></a></td>');
$i++;
$indexInArray++;
}
 
write('</tr>');
/photos/index.php
8,17 → 8,9
 
write('<p>Here we have all sorts of photos from Tim32.</p><br />');
 
$dirs = array();
$dir = dir('albums/');
while (($file = $dir->read()) !== false)
{
array_push($dirs, $file);
}
 
asort($dirs);
 
foreach ($dirs as $file)
{
if ($file[0] != '.')
{
write('<p><a href="album.php?dir=' . $file . '">' . $file . '</a></p>');
/_taios.php
169,9 → 169,7
function replaceBBCode($str)
{
$newstr = str_replace("<", "[", $str);
$newstr = str_replace(">", "]", $newstr);
$newstr = str_replace("\n", '</p><p>', $newstr);
$newstr = str_replace("\n", '</p><p>', $str);
$newstr = str_replace(' ', '&nbsp;&nbsp;', $newstr);
$newstr = str_replace(' :)', ' <img src="' . $this->url . 'data/smilies/face-smile.png" class="smiley" />', $newstr);
$newstr = str_replace(' :p', ' <img src="' . $this->url . 'data/smilies/face-raspberry.png" class="smiley" />', $newstr);
191,7 → 189,6
'/\[i\](.+?)\[\/i\]/is',
'/\[u\](.+?)\[\/u\]/is',
'/\[url\](.+?)\[\/url\]/is',
'/\[url=(.+?)\](.+?)\[\/url\]/is',
'/\[code\](.+?)\[\/code\]/is',
'/\[img\](.+?)\[\/img\]/is'
);
201,7 → 198,6
'<i>$1</i>',
'<u>$1</u>',
'<a href="$1">$1</a>',
'<a href="$1">$2</a>',
'<div class="code">$1</div>',
'<img src="$1" />'
);
/styles.css
4,22 → 4,19
font-family: Droid Sans, Tahoma, sans-serif;
font-size: 11pt;
margin: 0px;
padding: 0px;
}
 
h1 {
font-size: 28pt;
margin: 8px;
margin: 6px;
margin-top: 0px;
color: #FFFFFF;
border-bottom: 1px solid #FFFFFF;
color: #000089;
border-bottom: 1px solid #000000;
}
 
h2 {
font-size: 20pt;
margin: 8px;
margin: 6px;
margin-left: 8px;
color: #00004B;
}
26,7 → 23,7
 
h3 {
font-size: 16pt;
margin: 8px;
margin: 6px;
margin-left: 10px;
color: #000055;
}
33,7 → 30,7
 
h4 {
font-size: 12pt;
margin: 8px;
margin: 6px;
margin-left: 12px;
color: #00005F;
}
40,7 → 37,7
 
h5 {
font-size: 10pt;
margin: 8px;
margin: 6px;
margin-left: 14px;
color: #000069;
}
47,7 → 44,7
 
p, table, span {
font-size: 11pt;
margin: 8px;
margin: 6px;
margin-left: 16px;
}
 
91,16 → 88,21
}
 
.sidebar {
float: left;
width: 146px;
left: 0px;
top: 0px;
position: fixed;
padding: 0px;
padding-left: 32px;
border-right: 0px solid #000089;
background-color: #032865;
color: #FFFFFF;
border-right: 1px solid #000089;
background-color: #FFFF73;
background-image: url('data/sidebar-gradient.png');
background-repeat: repeat-x;
background-position: center bottom;
}
 
.sidebar-header {
left: 0px;
width: 140px;
padding: 6px;
text-align: right;
109,12 → 111,10
.sidebar-menu {
text-align: right;
padding: 6px;
color: #FFFFFF;
}
 
.sidebar-menu h3 {
margin: 6px;
color: #FFFFFF;
}
 
.sidebar-menu p {
122,13 → 122,9
margin: 4px;
}
 
.sidebar-menu a {
color: #FFFFFF;
}
 
.content {
left: 200px;
top: 0px;
left: 180px;
position: absolute;
margin-right: 32px;
}
148,16 → 144,3
font-family: Droid Sans Mono, Monospace, Fixed;
}
 
.recaptchatable .recaptcha_image_cell, #recaptcha_table {
background-color: #4B9DE0 !important; //reCaptcha widget background color
}
#recaptcha_table {
border-color: #3874A4 !important; //reCaptcha widget border color
}
#recaptcha_response_field {
border-color: #000000 !important; //Text input field border color
background-color:#FFFFFF !important; //Text input field background color
}
 
/admin/all-accounts.php
17,7 → 17,7
write('<td class="bold">ID</td>');
write('<td class="bold">AccessID</td>');
write('<td class="bold">Username</td>');
write('<td class="bold">SHA1 Password</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>');
/index.php
6,10 → 6,10
$page->drawHeader();
write('<h3>Pages</h3>');
$page->drawMenuItem('Biggles', '/~biggles/');
$page->drawMenuItem('Freddie (FredFace)', '/~freddie/');
$page->drawMenuItem('Freddie', '/~freddie/');
$page->drawMenuItem('Muzer', '/~muzer/');
$page->drawMenuItem('Sh4rk', '/~szabot/');
$page->drawMenuItem('Tom (TomMan)', '/~tom/');
$page->drawMenuItem('Tom', '/~tom/');
$page->drawMiddle();
 
?>
/404.php
2,7 → 2,7
 
require '_taios.php';
 
$page = new Taios_Page('404 - Pagee not found', '/');
$page = new Taios_Page('404');
$page->drawHeader();
write('<h3>Pages</h3>');
$page->drawMenuItem('Biggles', '/~biggles/');
16,7 → 16,6
 
<p class="bold">404 - Page not found</p>
<p>The page you requested could not be found.</p>
<br />
 
<h4>Useful Links</h4>
 
23,7 → 22,6
<?php
 
$page->drawMenuItem('Tim32 Homepage', 'index.php');
$page->drawMenuItem('Youfail.org', 'http://youfail.org');
 
$page->drawFooter();
 
/register-do.php
1,7 → 1,6
<?php
 
require '_taios.php';
require_once '_recaptchalib.php';
 
$page = new Taios_Page('Login');
 
28,15 → 27,6
$page->redirect('register.php?error=Passwords do not match');
}
 
$resp = recaptcha_check_answer(RECAPTCHA_PRIVATEKEY, $_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);
 
if (!$resp->is_valid)
{
$page->redirect('register.php?error=Incorrect reCAPTCHA response');
}
 
$page->query('INSERT INTO Users (AccessID, Username, Password, EmailAddress, Name, ChallengeID) VALUES (2, "' . $username . '", "' . sha1($password) . '", "' . $email . '", "' . $name . '", 0)');
 
$page->redirect('login.php');
/register.php
1,7 → 1,6
<?php
 
require '_taios.php';
require_once '_recaptchalib.php';
 
$page = new Taios_Page('Register');
$page->drawHeader();
21,12 → 20,6
 
?>
 
<script type="text/javascript">
var RecaptchaOptions = {
theme : 'clean'
};
</script>
 
<form action="register-do.php" method="POST">
<table>
<tr>
51,10 → 44,6
</tr>
<tr>
<td class="bold"></td>
<td><?php echo recaptcha_get_html(RECAPTCHA_PUBLICKEY); ?></td>
</tr>
<tr>
<td class="bold"></td>
<td><input type="submit" value="Register" /></td>
</tr>
</table>