// // available at http://phpthumb.sourceforge.net // // and/or https://github.com/JamesHeinrich/phpThumb // ////////////////////////////////////////////////////////////// // // // phpThumb.demo.showpic.php // // James Heinrich // // 23 Feb 2004 // // // // This code is useful for popup pictures (e.g. thumbnails // // you want to show larger, such as a larger version of a // // product photo for example) but you don't know the image // // dimensions before popping up. This script displays the // // image with no window border, and resizes the window to // // the size it needs to be (usually better to spawn it // // large (600x400 for example) and let it auto-resize it // // smaller), and if the image is larger than 90% of the // // current screen area the window respawns itself with // // scrollbars. // // // // Usage: // // window.open('showpic.php?src=big.jpg&title=Big+picture', // // 'popupwindowname', // // 'width=600,height=400,menubar=no,toolbar=no') // // // // See demo linked from http://phpthumb.sourceforge.net /// ////////////////////////////////////////////////////////////// die('For security reasons, this demo is disabled by default. Please comment out line '.__LINE__.' in '.basename(__FILE__)); $phpThumbLocation = '../phpThumb.php'; require_once '../phpThumb.config.php'; echo ''; echo ''; if (isset($_GET['title'])) { echo ''.htmlentities($_GET['title']).''; unset($_GET['title']); } else { echo ''.htmlentities('phpThumb :: popup window resizing demo').''; } ?> $value) { if (!in_array($key, $allowedGETparameters)) { continue; } if (is_array($value)) { if ($key != 'fltr') { continue; } foreach ($value as $key2 => $value2) { @$additionalparameters[$key][] = preg_replace('#[^A-Za-z0-9\\. _:/]#', '', $value2); } } else { if ($key == 'src') { // allow as passed $additionalparameters[$key] = $value; } else { $additionalparameters[$key] = preg_replace('#[^A-Za-z0-9\\. _:/]#', '', $value); } } } $imagesrc = phpThumbURL($additionalparameters, $phpThumbLocation); echo ''; echo '
'; if (!empty($_GET['src'])) { echo ''; } else { echo '
';
	echo 'Usage:

'.basename(__FILE__).'?src=filename&title=Picture+Title'; echo '
'; } ?>