From 7d904297367824957461109d8f52e9f5f73e60fb Mon Sep 17 00:00:00 2001 From: paulr Date: Mon, 28 Nov 2011 13:09:43 +1100 Subject: [PATCH] initial --- show.php | 108 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 108 insertions(+), 0 deletions(-) create mode 100644 show.php diff --git a/show.php b/show.php new file mode 100644 index 0000000..701a301 --- /dev/null +++ b/show.php @@ -0,0 +1,108 @@ + $height) { + $nw = 200; + $nh = (int)($height/($width/200)); + } else { + $nh = 200; + $nw = (int)($width/($height/200)); + + } + + /* + * 2000 + * 1800 + * $nw = 200 + * $mul = $height/$width/200 + */ + + error_log("neww = $nw, $nh"); + $thumb = imagecreatetruecolor($nw, $nh); + + imagecopyresized($thumb, $src, 0, 0, 0, 0, $nw, $nh, $width, $height); + imagejpeg($thumb); + } else { + header("Status: 404 Not Found"); + } + return; +} else { + + // show a grid of images + ?> + + +

Temp Show

+ +"; + // print_r($_SERVER); + //echo ""; + $i = 0; + + $dh = opendir($show_dir); + while (($file = readdir($dh)) !== false) { + if(preg_match("/.*\.[jJ][pP][gG]$/", $file)) { + if($i == 0) { + echo ""; + } + + echo ""; + + if($i == ($n_per_line-1)) { + echo ""; + $i = 0; + } else { + $i++; + } + } + } + + +?> +
+ + + \ No newline at end of file -- 1.7.0.4