From: paulr Date: Mon, 28 Nov 2011 02:09:43 +0000 (+1100) Subject: initial X-Git-Url: http://git.pjr.cc/?a=commitdiff_plain;h=7d904297367824957461109d8f52e9f5f73e60fb;p=quickshow.git initial --- 7d904297367824957461109d8f52e9f5f73e60fb 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