Up to parent folder | Jump to files | Script: /var/images/photos/public_html/blog/2018/index.php ( source code )
Icon | Name | Filesize | Timestamp |
![]() |
Florence-2.1.png (1764x1442) | 1.21 MB | Sun, 16 Sep 2018 13:46:23 +0000 |
![]() |
Florence-track.png (1768x1458) | 1.33 MB | Fri, 14 Sep 2018 21:45:24 +0000 |
IMG_0010.JPG (1728x2048) | 664.24 KB | Thu, 14 Jun 2018 20:00:53 +0000 | |
IMG_0011.JPG (2048x2037) | 783.9 KB | Thu, 14 Jun 2018 20:01:00 +0000 | |
IMG_0244.JPG (4032x3024) | 1.96 MB | Sat, 14 Jul 2018 22:13:48 +0000 | |
![]() |
IMG_0248.jpg (1810x1067) | 1.44 MB | Sat, 14 Jul 2018 22:13:49 +0000 |
![]() |
IMG_0251.jpg (1810x993) | 969.28 KB | Sat, 14 Jul 2018 22:13:53 +0000 |
IMG_0253.JPG (4032x3024) | 1.36 MB | Sat, 14 Jul 2018 22:14:01 +0000 | |
![]() |
IMG_0254.jpg (4032x3024) | 1.82 MB | Sat, 14 Jul 2018 22:20:21 +0000 |
![]() |
IMG_0758.jpg (4032x3024) | 2.11 MB | Fri, 19 Jan 2018 01:38:18 +0000 |
IMG_1580a.JPG (4032x3024) | 1.4 MB | Tue, 24 Jul 2018 14:32:20 +0000 | |
![]() |
IMG_6412.jpg (527x412) | 76.69 KB | Fri, 19 Jan 2018 01:41:46 +0000 |
![]() |
IMG_7938.jpg (3264x2448) | 1.37 MB | Mon, 22 Jan 2018 14:14:05 +0000 |
![]() |
IMG_7940.jpg (3264x2448) | 1.85 MB | Mon, 22 Jan 2018 14:14:12 +0000 |
IMG_8664.JPG (3264x2448) | 2.06 MB | Tue, 10 Apr 2018 13:05:19 +0000 | |
IMG_8665.JPG (3264x2448) | 1.92 MB | Tue, 10 Apr 2018 13:05:19 +0000 | |
IMG_8670.JPG (3264x2448) | 2.12 MB | Tue, 10 Apr 2018 13:05:13 +0000 | |
IMG_8680.JPG (3264x2448) | 2 MB | Tue, 10 Apr 2018 13:05:26 +0000 | |
![]() |
IMG_9044.jpg (4032x3024) | 3.01 MB | Tue, 24 Jul 2018 14:33:31 +0000 |
![]() |
IMG_9201.jpg (4032x3024) | 1.88 MB | Sat, 14 Jul 2018 22:14:03 +0000 |
![]() |
IMG_9204.m4v | 48.24 MB | Sat, 14 Jul 2018 22:21:16 +0000 |
![]() |
IMG_9205.jpg (4032x3024) | 2.28 MB | Sat, 14 Jul 2018 22:14:09 +0000 |
![]() |
IMG_9206.m4v | 39.01 MB | Sat, 14 Jul 2018 22:18:58 +0000 |
![]() |
IMG_9248.jpg (3024x4032) | 1.46 MB | Tue, 24 Jul 2018 14:32:20 +0000 |
![]() |
IMG_9249.jpg (3024x4032) | 1.18 MB | Tue, 24 Jul 2018 14:32:13 +0000 |
![]() |
IMG_9250.jpg (3024x4032) | 1.73 MB | Tue, 24 Jul 2018 14:32:20 +0000 |
![]() |
IMG_9252.jpg (3024x4032) | 1.24 MB | Tue, 24 Jul 2018 14:32:14 +0000 |
![]() |
IMG_9299.jpg (3024x3024) | 1.09 MB | Sat, 18 Aug 2018 13:15:29 +0000 |
![]() |
IMG_9301.jpg (3024x3024) | 1.04 MB | Sat, 18 Aug 2018 13:18:15 +0000 |
![]() |
IMG_9362.jpg (4032x3024) | 2.29 MB | Fri, 17 Aug 2018 21:03:20 +0000 |
![]() |
IMG_9367.jpg (4032x3024) | 2.04 MB | Fri, 17 Aug 2018 21:03:31 +0000 |
![]() |
IMG_9370.jpg (3024x4032) | 1.75 MB | Fri, 17 Aug 2018 21:03:27 +0000 |
![]() |
IMG_9373.jpg (4032x3024) | 1.64 MB | Fri, 17 Aug 2018 21:03:30 +0000 |
![]() |
IMG_9379.m4v | 31.89 MB | Fri, 17 Aug 2018 21:04:15 +0000 |
![]() |
IMG_9382.jpg (3024x4032) | 1.82 MB | Fri, 17 Aug 2018 21:03:33 +0000 |
![]() |
IMG_9383.jpg (3024x4032) | 1.78 MB | Fri, 17 Aug 2018 21:03:32 +0000 |
![]() |
IMG_9385.jpg (4032x3024) | 2.5 MB | Fri, 17 Aug 2018 21:03:36 +0000 |
![]() |
IMG_9390.jpg (4032x3024) | 2.33 MB | Fri, 17 Aug 2018 21:03:27 +0000 |
![]() |
IMG_9406.jpg (3024x4032) | 2.51 MB | Mon, 20 Aug 2018 17:35:41 +0000 |
![]() |
IMG_9619.jpg (4032x3024) | 1.94 MB | Sat, 15 Sep 2018 16:59:25 +0000 |
![]() |
IMG_9620.jpg (4032x3024) | 2.46 MB | Sat, 15 Sep 2018 16:59:26 +0000 |
![]() |
IMG_9623.jpg (4032x3024) | 3.63 MB | Sat, 15 Sep 2018 16:59:22 +0000 |
![]() |
P under Les ownership.jpg (1280x960) | 535.46 KB | Wed, 11 Jul 2018 15:44:17 +0000 |
![]() |
Screen Shot 2018-01-22 at 8.43.59 AM.png (2904x1904) | 5.28 MB | Mon, 22 Jan 2018 15:08:52 +0000 |
![]() |
inv-scope-4 - 1.jpg (192x256) | 15.05 KB | Sun, 16 Sep 2018 13:39:09 +0000 |
![]() |
mast-1-1.jpg (4032x3024) | 3.01 MB | Sun, 02 Sep 2018 22:20:48 +0000 |
![]() |
mast-1-2.jpg (4032x3024) | 2.87 MB | Sun, 02 Sep 2018 22:21:19 +0000 |
![]() |
mast-1-3.jpg (4032x3024) | 2.91 MB | Sun, 02 Sep 2018 22:21:14 +0000 |
![]() |
mast-1-4.jpg (4032x3024) | 4.97 MB | Sun, 02 Sep 2018 22:20:59 +0000 |
![]() |
mast-1-5.jpg (4032x3024) | 3.67 MB | Sun, 02 Sep 2018 22:21:08 +0000 |
![]() |
mast-1-6.jpg (3024x4032) | 2.1 MB | Sun, 02 Sep 2018 22:20:57 +0000 |
![]() |
mast-1-7.jpg (4032x3024) | 2.9 MB | Sun, 02 Sep 2018 22:21:08 +0000 |
![]() |
mast-1-8.jpg (3024x4032) | 2.39 MB | Sun, 02 Sep 2018 22:21:07 +0000 |
![]() |
mast-1-9.jpg (4032x3024) | 2.27 MB | Sun, 02 Sep 2018 22:21:17 +0000 |
![]() |
mast-2-1.jpg (4032x3024) | 2.92 MB | Sun, 02 Sep 2018 22:20:56 +0000 |
![]() |
mast-2-2.jpg (4032x3024) | 5.17 MB | Sun, 02 Sep 2018 22:21:20 +0000 |
![]() |
mast-2-3.jpg (4032x3024) | 5.5 MB | Sun, 02 Sep 2018 22:20:45 +0000 |
![]() |
mast-2-4.jpg (4032x3024) | 3.57 MB | Sun, 02 Sep 2018 22:21:07 +0000 |
![]() |
mast-2-5.jpg (4032x3024) | 1.98 MB | Sun, 02 Sep 2018 22:21:17 +0000 |
![]() |
mast-3-1.jpg (3024x4032) | 3.16 MB | Sun, 02 Sep 2018 22:42:34 +0000 |
![]() |
nd026_1.jpg (300x312) | 18.17 KB | Sun, 16 Sep 2018 13:27:38 +0000 |
![]() |
p_under_les_ownership.jpg (1280x960) | 535.46 KB | Wed, 11 Jul 2018 15:46:09 +0000 |
![]() |
pool.jpg (4032x3024) | 3.01 MB | Tue, 24 Jul 2018 14:33:43 +0000 |
![]() |
yamaha.jpg (4032x3024) | 2.92 MB | Mon, 22 Jan 2018 13:55:28 +0000 |
![]() |
yamaha_2.png (1404x1502) | 3.57 MB | Mon, 22 Jan 2018 14:00:06 +0000 |
Image | Name | Filesize | Timestamp |
<?php
// 2002-06-25 17:44 by Chris Snyder (csnyder@chxo.com)
// 2002-07-28 16:44 added paging ($skip and $perpage)
// 2002-08-16 11:50 updated for REGISTER_GLOBALS turned off
// 2002-08-25 20:11 listing directories first
// 2003-01-06 12:56 alphabetize folders and files, use apache icons, and don't show thumbs over 500k
// 2003-01-09 18:08 skip-to-files link
// 2003-01-22 18:20 fix alt/title tags for filetype icons, add .zip
// 2003-02-14 10:50 add $filepath suggestion on line 78
// 2003-03-15 19:49 urlencode foldernames
//
// find and list images in path (a folder) as thumbnails
// drop in replacement for fancyindexing -> either drop into an image directory as index.php
// -OR- point to script in Apache DirectoryIndex directive:
// DirectoryIndex index.html index.htm /cgi-bin/image-list.php
/*
image-list.php -- fancy image indexing using PHP
Copyright (C) 2003 by Chris Snyder (csnyder@chxo.com)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
$thumbwidth=180;
$thumbheight=160;
$thumblimit= 10000; // (Max filesize in KB for displaying thumbnail)
$skip= $_REQUEST["skip"];
$perpage= $_REQUEST["perpage"];
$showsource= $_REQUEST["showsource"];
$REQUEST_URI= getenv("REQUEST_URI");
$DOCUMENT_ROOT= getenv("DOCUMENT_ROOT");
$SCRIPT_NAME= getenv("SCRIPT_NAME");
$SCRIPT_FILENAME= getenv("SCRIPT_FILENAME");
$SERVER_SIGNATURE= getenv("SERVER_SIGNATURE");
if ($skip=="") $skip= 0;
if ($perpage=="") $perpage= 100;
function myfilesize($file) {
// First check if the file exists.
if(!is_file($file)) exit("File does not exist!");
// Setup some common file size measurements.
$kb = 1024; // Kilobyte
$mb = 1024 * $kb; // Megabyte
$gb = 1024 * $mb; // Gigabyte
$tb = 1024 * $gb; // Terabyte
// Get the file size in bytes.
$size = filesize($file);
if($size < $kb) return $size." B";
else if($size < $mb) return round($size/$kb,2)." KB";
else if($size < $gb) return round($size/$mb,2)." MB";
else if($size < $tb) return round($size/$gb,2)." GB";
else return round($size/$tb,2)." TB";
}
if (substr($REQUEST_URI,-1)=="/") {
$length= strlen($REQUEST_URI)-1;
$uripath= substr($REQUEST_URI,0,$length);
} else {
$uripath= dirname($REQUEST_URI);
}
$filepath= $DOCUMENT_ROOT.urldecode($uripath);
// Some users have suggested:
//$filepath= realpath(".");
// instead of using $DOCUMENT_ROOT.
//print "filepath= $filepath and realpath=".realpath(".")." and uripath= $uripath ";
$lastslash= strrpos($uripath,"/");
$parenturi= substr($uripath,0,$lastslash+1);
if ($parenturi=="") $parenturi= "/";
$displayuripath= urldecode($uripath);
// show source code?
if ($showsource) $sourceinfo= "| Script: $SCRIPT_FILENAME ( <a href='#source'>source code</a> )";
else $sourceinfo= "| <a href='$SCRIPT_NAME?showsource=1#source'>show source code</a>";
print "<html>
<head>
<title>$displayuripath</title>
<style type='text/css'>
body { font-family: Verdana, Geneva, sans-serif; font-size: 12px; background-color: #ffffee;}
table { font-family: Verdana, Geneva, sans-serif; font-size: 12px; }
.heading { font-size: 12px; font-weight: bold; background-color: #666677; color: #dddddd; border: 1px; border-style: solid; }
.oddrow { background-color: #ffffff; }
.evenrow { background-color: #eeffee; }
</style>
</head>
<body>
<h1>Image index of $displayuripath</h1>
<p><a href='$parenturi'><img src='/icons/back.gif' border=0 hspace=5 align=absmiddle>Up to parent folder</a> | <a href='#files'>Jump to files</a> $sourceinfo</p>";
if ($skip) {
$prevskip= $skip - $perpage;
if ($prevskip<0) $prevskip= 0;
$prevtag= "<a href='?skip=$prevskip'>Previous Page</a>";
print "<p>$prevtag</p>";
}
if ($handle = opendir($filepath)) {
print "
<table cellpadding=5>
<tr class=heading>
<td align=center>Icon</td>
<td>Name</td>
<td align=center>Filesize</td>
<td>Timestamp</td>
</tr>";
// FIRST PASS for subdirectories only -- makes $mydirarray, which can be sorted alphabetically
$count= 0;
while ($file = readdir($handle)) {
if (substr($file,0,1)==".") continue;
if ($file=="index.php") continue;
if (@is_dir("$filepath/$file")) {
$mydirarray[$count]="$file";
$count= $count+1;
}
}
closedir($handle);
// now sort and print subfolders...
if (is_array($mydirarray)) {
sort($mydirarray);
reset($mydirarray);
foreach ($mydirarray AS $key=>$file) {
$timestamp= filemtime("$filepath/$file");
$modified= date("r", $timestamp);
if ($evenrow) {
$evenrow=0;
$rowclass= "evenrow";
}
else {
$evenrow=1;
$rowclass= "oddrow";
}
if ($key==($count-1)) $separator= "<a name='files'> </a>";
$safefile= urlencode($file);
print "
<tr class='$rowclass'>
<td align=right><img src='/icons/folder.gif' alt=folder title=folder></td>
<td><a href='$uripath/$safefile/'>$file/</a>$separator</td>
<td align=center>-</td>
<td>$modified</td>
</tr>";
}
}
// SECOND PASS for files only
$handle = opendir($filepath);
$skipped= 0;
$index= 0;
$count= 0;
while ($file = readdir($handle)) {
// don't show .dotfiles, self, directories, or links (links are bad??? hmm)
if (substr($file,0,1)==".") continue;
if ($file=="index.php") continue;
if (@is_dir("$filepath/$file")) continue;
if (@is_link("$filepath/$file")) continue;
$myfilearray[$count]= $file;
$count= $count+1;
}
closedir($handle);
// now sort on filename
if (is_array($myfilearray)) {
sort($myfilearray);
reset($myfilearray);
foreach ($myfilearray AS $key=>$file) {
if ($index >= $perpage) {
$shownext= 1;
break;
}
if ($skipped<$skip && $skip!= 0) {
$skipped= $skipped + 1;
continue;
}
$index= $index + 1;
$timestamp= filemtime("$filepath/$file");
$modified= date("r", $timestamp);
if ($evenrow) {
$evenrow=0;
$rowclass= "evenrow";
}
else {
$evenrow=1;
$rowclass= "oddrow";
}
unset($info);
unset($extrainfo);
unset($sizetag);
$filesize= myfilesize("$filepath/$file");
if ($imagesize=@getimagesize("$filepath/$file",$info)) {
$width= $imagesize[0];
$height= $imagesize[1];
if ($width>$thumbwidth) {
$ratio= $thumbwidth / $width;
$width=$thumbwidth;
$height= $height*$ratio;
}
if ($height>$thumbheight) {
$ratio= $thumbheight / $height;
$height=$thumbheight;
$width= $width*$ratio;
}
switch ($imagesize[2]) {
case 5: $icontag= "<img src='/icons/image3.gif' alt=file title='photoshop image'>"; break;
case 7: $icontag= "<img src='/icons/image2.gif' alt=file title='tiff image'>"; break;
case 8: $icontag= "<img src='/icons/image2.gif' alt=file title='tiff image'>"; break;
default: $icontag= "<img src='$uripath/$file' width=$width height=$height alt=image title=image>"; break;
}
$sizetag= "($imagesize[0]x$imagesize[1])";
if (isset ($info['APP13'])) {
$iptc = iptcparse ($info['APP13']);
if (is_array($iptc)) {
foreach ($iptc AS $key=>$val) {
if ($key=="2#000") continue;
$extrainfo.="$val[0]<br>";
}
}
}
// don't show thumbnails bigger than 500K!
if (filesize("$filepath/$file")>($thumblimit*1024)) $icontag= "<img src='/icons/image2.gif' alt=file title='image'>";
}
else {
// try to determine from extension...
$lastdot= strrpos($file, ".");
$extension= strtolower(substr($file,$lastdot+1));
//flerror("File extension is $extension.");
switch ($extension) {
case "pdf": $icontag= "<img src='/icons/layout.gif' alt=pdf title=pdf>"; break;
case "txt": $icontag= "<img src='/icons/text.gif' alt=text title=text>"; break;
case "htm": $icontag= "<img src='/icons/text.gif' alt=html title=html>"; break;
case "html": $icontag= "<img src='/icons/text.gif' alt=html title=html>"; break;
case "wav": $icontag= "<img src='/icons/sound1.gif' alt=sound title=sound>"; break;
case "au": $icontag= "<img src='/icons/sound1.gif' alt=sound title=sound>"; break;
case "aiff": $icontag= "<img src='/icons/sound1.gif' alt=sound title=sound>"; break;
case "mp3": $icontag= "<img src='/icons/sound2.gif' alt=sound title=sound>"; break;
case "ogg": $icontag= "<img src='/icons/sound2.gif' alt=sound title=sound>"; break;
case "mov": $icontag= "<img src='/icons/movie.gif' alt=video title=video>"; break;
case "avi": $icontag= "<img src='/icons/movie.gif' alt=video title=video>"; break;
case "mpg": $icontag= "<img src='/icons/movie.gif' alt=video title=video>"; break;
case "mpeg": $icontag= "<img src='/icons/movie.gif' alt=video title=video>"; break;
case "mp4": $icontag= "<img src='/icons/movie.gif' alt=video title=video>"; break;
case "divx": $icontag= "<img src='/icons/movie.gif' alt=video title=video>"; break;
case "zip": $icontag= "<img src='/icons/compressed.gif' alt='archive' title='zip archive'>"; break;
default: $icontag= "<img src='/icons/generic.gif' alt=file title=file>"; break;
}
}
// file row
$safefile= urlencode($file);
print "
<tr class='$rowclass'>
<td valign=top align=right>$icontag</td>
<td valign=top><a href='$uripath/$safefile'>$file</a> $sizetag</td>
<td valign=top align=center>$filesize</td>
<td valign=top>$modified</td>
</tr>";
}
}
else print "
<tr>
<td valign=middle colspan='4'> No files here.</td>
</tr>";
print "
<tr class=heading>
<td align=center>Image</td>
<td>Name</td>
<td align=center>Filesize</td>
<td>Timestamp</td>
</tr>
</table>";
if ($shownext) {
$nextskip= $skip + $index;
if ($prevtag) $prevtag .= " | ";
print "<p>$prevtag <a href='?skip=$nextskip'>Next Page</a></p>";
}
elseif ($skip) {
print "<p>$prevtag</p>";
}
print "
<p><a href='$parenturi'><img src='/icons/back.gif' border=0 hspace=5 align=absmiddle>Up to parent folder</a></p>";
}
if ($showsource) {
print "<hr><a name='source'> </a><h1>PHP Source:</h1>";
$void= show_source($SCRIPT_FILENAME);
}
print "
<hr>
</body>
</html>";
?>