/photos/albums/ArchLinux Wallpapers/archlinux-berry.jpg |
Property changes: |
Deleted: svn:mime-type |
## -1 +0,0 ## |
-application/octet-stream |
\ No newline at end of property |
Index: photos/albums/ArchLinux Wallpapers/archlinux-firestarter.jpg |
=================================================================== |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Index: photos/albums/ArchLinux Wallpapers/archlinux-firestarter.jpg |
=================================================================== |
--- photos/albums/ArchLinux Wallpapers/archlinux-firestarter.jpg (revision 234) |
+++ photos/albums/ArchLinux Wallpapers/archlinux-firestarter.jpg (nonexistent) |
/photos/albums/ArchLinux Wallpapers/archlinux-firestarter.jpg |
Property changes: |
Deleted: svn:mime-type |
## -1 +0,0 ## |
-application/octet-stream |
\ No newline at end of property |
Index: photos/album.php |
=================================================================== |
--- photos/album.php (nonexistent) |
+++ photos/album.php (revision 243) |
@@ -0,0 +1,72 @@ |
+ |
+ |
+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(' Back to Photos '); |
+ |
+write('');
+write(' |
---|
');
+ |
+$i = 0; |
+ |
+$dir = dir('albums/' . $dirName); |
+while (($file = $dir->read()) !== false) |
+{ |
+ if ($file[0] != '.') |
+ { |
+ if ($i >= 4) |
+ { |
+ write(' |
---|
');
+ } |
+ |
+ $filename = 'albums/' . $dirName . '/' . $file; |
+ $size = getImageSizes($filename, 200, 200); |
+ |
+ write(' | | ');
+ |
+ $i++; |
+ } |
+} |
+ |
+write(' | ');
+write('');
+ |
+$page->drawFooter(); |
+ |
+?> |
+ |
Index: photos/index.php |
=================================================================== |
--- photos/index.php (revision 234) |
+++ photos/index.php (revision 243) |
@@ -11,8 +11,11 @@ |
$dir = dir('albums/'); |
while (($file = $dir->read()) !== false) |
{ |
+ if ($file[0] != '.') |
+ { |
write(' ' . $file . ' '); |
} |
+} |
$page->drawFooter(); |
|
|
---|
|
---|