// // available at http://phpthumb.sourceforge.net /// ////////////////////////////////////////////////////////////// /// // // See: phpthumb.readme.txt for usage instructions // // /// ////////////////////////////////////////////////////////////// // // // 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 /// ////////////////////////////////////////////////////////////// ?> <?php echo @$_GET['title']; ?> '; flush(); if ($imgdata = @getimagesize($_GET['src'])) { // this would be an excellent place to put some caching stuff to avoid re-scanning every picture every time // check for maximum dimensions to allow no-scrollbar window echo ''; } elseif (!isset($_REQUEST['norespawn'])) { // cannot determine correct window size, or correct size too large: respawn with scrollbars echo ''; } ?>