Subversion Repositories taios

Compare Revisions

Ignore whitespace Rev 349 → Rev 357

/photos/album.php
47,29 → 47,70
write('<table>');
write('<tr>');
 
$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);
$i = 0;
 
/* //Loop through dates array and then echo the list
foreach ($file_dates as $$file_dates){
$date = $file_dates;
$j = $file_names_Array[$i];
$file = $file_names[$j];
$i++;
echo "File name: $file - Date Added: $date. <br/>";
}*/
 
$indexInArray = 0;
$i = 0;
 
$dir = dir('albums/' . $dirName);
while (($file = $dir->read()) !== false)
foreach ($file_dates as $$file_dates)
{
if (getimagesize('albums/' . $dirName . '/' . $file))
$j = $file_names_Array[$indexInArray];
$file = $file_names[$j];
if ($i >= 3)
{
if ($file[0] != '.')
{
if ($i >= 3)
{
write('</tr><tr>');
$i = 0;
}
write('</tr><tr>');
$i = 0;
}
$filename = 'albums/' . $dirName . '/' . $file;
$size = getImageSizes($filename, 300, 300);
write('<td><a href="' . $filename . '"><img width="' . $size[0] . '" height="' . $size[1] . '" src="' . $filename . '" /></a></td>');
$filename = 'albums/' . $dirName . '/' . $file;
$size = getImageSizes($filename, 300, 300);
 
write('<td><a href="' . $filename . '"><img width="' . $size[0] . '" height="' . $size[1] . '" src="' . $filename . '" /></a></td>');
$i++;
}
}
$i++;
$indexInArray++;
}
 
write('</tr>');
/register-do.php
28,6 → 28,15
$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');
/styles.css
148,3 → 148,16
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
}
 
/register.php
21,6 → 21,12
 
?>
 
<script type="text/javascript">
var RecaptchaOptions = {
theme : 'clean'
};
</script>
 
<form action="register-do.php" method="POST">
<table>
<tr>
45,7 → 51,7
</tr>
<tr>
<td class="bold"></td>
<td><?php echo recaptcha_get_html($recaptura_publickey); ?></td>
<td><?php echo recaptcha_get_html(RECAPTCHA_PUBLICKEY); ?></td>
</tr>
<tr>
<td class="bold"></td>