/photos/album.php |
---|
0,0 → 1,112 |
<?php |
require '../_taios.php'; |
function getImageSizes($sourceImageFilePath, $maxResizeWidth, $maxResizeHeight) { |
$size = getimagesize($sourceImageFilePath); |
$origWidth = $size[0]; |
$origHeight = $size[1]; |
$resizedWidth = $origWidth; |
$resizedHeight = $origHeight; |
if ($resizedWidth > $maxResizeWidth) |
{ |
$aspectRatio = $maxResizeWidth / $resizedWidth; |
$resizedWidth = round($aspectRatio * $resizedWidth); |
$resizedHeight = round($aspectRatio * $resizedHeight); |
} |
if ($resizedHeight > $maxResizeHeight) |
{ |
$aspectRatio = $maxResizeHeight / $resizedHeight; |
$resizedWidth = round($aspectRatio * $resizedWidth); |
$resizedHeight = round($aspectRatio * $resizedHeight); |
} |
return array($resizedWidth, $resizedHeight); |
} |
$page = new Taios_Page('Photo Albums', '../'); |
$page->drawHeader(); |
$page->drawMiddle(); |
$dirName = $_GET['dir']; |
if (empty($dirName)) |
{ |
$page->redirect('index.php'); |
} |
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"; |
$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; |
$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; |
} |
$filename = $directory . $file; |
$size = getImageSizes($filename, 300, 300); |
write('<td><a href="' . str_replace(" ", "%20", $filename) . '"><img width="' . $size[0] . '" height="' . $size[1] . '" src="' . str_replace(" ", "%20", $filename) . '" /></a></td>'); |
$i++; |
$indexInArray++; |
} |
write('</tr>'); |
write('<table>'); |
$page->drawFooter(); |
?> |
/photos/index.php |
---|
1,14 → 1,31 |
<?php |
require '../_taios.php'; |
$page = new Taios_Page('Photos', '../'); |
$page->drawHeader(); |
$page->drawMiddle(); |
write('<br /><p class="bold">This page is currently under construction.</p>'); |
$page->drawFooter(); |
?> |
<?php |
require '../_taios.php'; |
$page = new Taios_Page('Photo Albums', '../'); |
$page->drawHeader(); |
$page->drawMiddle(); |
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>'); |
} |
} |
$page->drawFooter(); |
?> |
/photos/albums/Lassitor/Lassitor.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/photos/albums/Lassitor/Lassitor.png |
---|
Property changes: |
Added: svn:mime-type |
## -0,0 +1 ## |
+application/octet-stream |
\ No newline at end of property |
Index: photos/albums/Lassitor/Lassitor-3d.png |
=================================================================== |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Index: photos/albums/Lassitor/Lassitor-3d.png |
=================================================================== |
--- photos/albums/Lassitor/Lassitor-3d.png (nonexistent) |
+++ photos/albums/Lassitor/Lassitor-3d.png (revision 378) |
/photos/albums/Lassitor/Lassitor-3d.png |
---|
Property changes: |
Added: svn:mime-type |
## -0,0 +1 ## |
+application/octet-stream |
\ No newline at end of property |
Index: styles.css |
=================================================================== |
--- styles.css (revision 136) |
+++ styles.css (revision 378) |
@@ -1,124 +1,174 @@ |
-body { |
- background-color: #FFFFFF; |
- color: #000000; |
- |
- font-family: Droid Sans, Tahoma, sans-serif; |
- font-size: 11pt; |
-} |
- |
-h1 { |
- font-size: 28pt; |
- margin: 6px; |
- margin-top: 0px; |
- color: #000089; |
- border-bottom: 1px solid #000000; |
-} |
- |
-h2 { |
- font-size: 20pt; |
- margin: 6px; |
- margin-left: 8px; |
- color: #00004B; |
-} |
- |
-h3 { |
- font-size: 16pt; |
- margin: 6px; |
- margin-left: 10px; |
- color: #000055; |
-} |
- |
-h4 { |
- font-size: 12pt; |
- margin: 6px; |
- margin-left: 12px; |
- color: #00005F; |
-} |
- |
-h5 { |
- font-size: 10pt; |
- margin: 6px; |
- margin-left: 14px; |
- color: #000069; |
-} |
- |
-p, table, span { |
- font-size: 11pt; |
- margin: 6px; |
- margin-left: 16px; |
-} |
- |
-a { |
- text-decoration: none; |
- color: #000050; |
-} |
- |
-a:hover { |
- text-decoration: underline; |
-} |
- |
-input { |
- border: 1px solid #000000; |
- color: #000000; |
- background-color: #B5D7FF; |
-} |
- |
-table { |
- border: 1px solid #222222; |
-} |
- |
-td { |
- padding: 3px; |
- border: 1px solid #888888; |
-} |
- |
-.sidebar { |
- left: 0px; |
- top: 0px; |
- position: fixed; |
- padding: 0px; |
- padding-left: 32px; |
- 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; |
-} |
- |
-.sidebar-menu { |
- text-align: right; |
- padding: 6px; |
-} |
- |
-.sidebar-menu h3 { |
- margin: 6px; |
-} |
- |
-.sidebar-menu p { |
- font-size: 12pt; |
- margin: 4px; |
-} |
- |
-.content { |
- left: 200px; |
- top: 0px; |
- position: absolute; |
- margin-right: 32px; |
-} |
- |
-.bold { |
- font-weight: bold; |
-} |
- |
-.indent { |
- margin-left: 14px; |
- border-left: 1px solid #BBBBBB; |
-} |
+body { |
+ background-color: #FFFFFF; |
+ color: #000000; |
+ |
+ font-family: Droid Sans, Tahoma, sans-serif; |
+ font-size: 11pt; |
+ |
+ margin: 0px; |
+ padding: 0px; |
+} |
+ |
+h1 { |
+ font-size: 28pt; |
+ margin: 8px; |
+ margin-top: 0px; |
+ color: #FFFFFF; |
+ border-bottom: 1px solid #FFFFFF; |
+} |
+ |
+h2 { |
+ font-size: 20pt; |
+ margin: 8px; |
+ margin-left: 8px; |
+ color: #00004B; |
+} |
+ |
+h3 { |
+ font-size: 16pt; |
+ margin: 8px; |
+ margin-left: 10px; |
+ color: #000055; |
+} |
+ |
+h4 { |
+ font-size: 12pt; |
+ margin: 8px; |
+ margin-left: 12px; |
+ color: #00005F; |
+} |
+ |
+h5 { |
+ font-size: 10pt; |
+ margin: 8px; |
+ margin-left: 14px; |
+ color: #000069; |
+} |
+ |
+p, table, span { |
+ font-size: 11pt; |
+ margin: 8px; |
+ margin-left: 16px; |
+} |
+ |
+a { |
+ text-decoration: none; |
+ color: #000050; |
+} |
+ |
+a:hover { |
+ text-decoration: underline; |
+} |
+ |
+input { |
+ border: 1px solid #000000; |
+ color: #000000; |
+ background-color: #B5D7FF; |
+ width: 500px; |
+} |
+ |
+table { |
+ border: 1px solid #222222; |
+} |
+ |
+td { |
+ padding: 3px; |
+ border: 1px solid #888888; |
+} |
+ |
+img { |
+ border: 2px solid #333333; |
+} |
+ |
+textarea { |
+ width: 500px; |
+ height: 300px; |
+} |
+ |
+.smiley { |
+ border: 0px; |
+ vertical-align: middle; |
+} |
+ |
+.sidebar { |
+ float: left; |
+ width: 146px; |
+ padding: 0px; |
+ padding-left: 32px; |
+ border-right: 0px solid #000089; |
+ background-color: #032865; |
+ color: #FFFFFF; |
+} |
+ |
+.sidebar-header { |
+ width: 140px; |
+ padding: 6px; |
+ text-align: right; |
+} |
+ |
+.sidebar-menu { |
+ text-align: right; |
+ padding: 6px; |
+ color: #FFFFFF; |
+} |
+ |
+.sidebar-menu h3 { |
+ margin: 6px; |
+ color: #FFFFFF; |
+} |
+ |
+.sidebar-menu p { |
+ font-size: 12pt; |
+ margin: 4px; |
+} |
+ |
+.sidebar-menu a { |
+ color: #FFFFFF; |
+} |
+ |
+.content { |
+ top: 0px; |
+ left: 180px; |
+ position: absolute; |
+ margin-right: 32px; |
+} |
+ |
+.bold { |
+ font-weight: bold; |
+} |
+ |
+.indent { |
+ margin-left: 14px; |
+ border-left: 1px solid #BBBBBB; |
+} |
+ |
+.code { |
+ border: 1px solid #333333; |
+ background-color: #DDDDDD; |
+ font-family: Droid Sans Mono, Monospace, Fixed; |
+} |
+ |
+.copyright { |
+ margin-top: 8px; |
+ color: #BBBBBB; |
+ text-align: left; |
+ font-size: 9pt; |
+} |
+ |
+.copyright a { |
+ color: #BBBBBB; |
+} |
+ |
+.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 |
+} |
+ |
Index: _taios.php |
=================================================================== |
--- _taios.php (revision 136) |
+++ _taios.php (revision 378) |
@@ -88,6 +88,7 @@ |
{ |
if (!$this->drawnFooter) |
{ |
+ write(' © 2011 Tim32 · HTML5 Valid '); |
write(''); |
write(' |
');