[ Index ] |
|
Code source de e107 0.7.8 |
1 <?php 2 /* 3 + ----------------------------------------------------------------------------+ 4 | e107 website system 5 | 6 | ©Steve Dunstan 2001-2002 7 | http://e107.org 8 | jalist@e107.org 9 | 10 | Released under the terms and conditions of the 11 | GNU General Public License (http://gnu.org). 12 | 13 | $Source: /cvsroot/e107/e107_0.7/e107_images/thumb.php,v $ 14 | $Revision: 1.3 $ 15 | $Date: 2005/08/23 09:36:30 $ 16 | $Author: sweetas $ 17 +----------------------------------------------------------------------------+ 18 */ 19 /* 20 Usage: simply replace your <img src='filename.jpg' 21 with 22 <img src='".e_IMAGE."thumb.php?filename.jpg+size"' /> 23 or 24 <img src='".e_IMAGE."thumb.php?<full path to file>/filename.jpg+size"' /> 25 eg <img src='".e_IMAGE."thumb.php?home/images/myfilename.jpg+100)"' /> 26 27 */ 28 29 require_once ("../class2.php"); 30 require_once(e_HANDLER."resize_handler.php"); 31 32 // var 3. 33 // 1= newspost images/preview 34 // 2= 35 36 if (e_QUERY){ 37 $tmp = explode("+",rawurldecode(e_QUERY)); 38 if(strpos($tmp[0], "/") === 0 || strpos($tmp[0], ":") >= 1){ 39 $source = $tmp[0]; 40 }else{ 41 $source = "../".str_replace("../","",$tmp[0]); 42 } 43 44 45 46 47 $newsize = $tmp[1]; 48 if(!file_exists(e_IMAGE."newspost_images/preview/preview_".basename($source))){ 49 50 if(!resize_image($source, e_IMAGE."newspost_images/preview/preview_".basename($source), $newsize)){ 51 echo "Couldn't find: ".$source; 52 } 53 } 54 55 56 header("Content-type: image/jpg"); 57 $imagedata = file_get_contents(e_IMAGE."newspost_images/preview/preview_".basename($source)); 58 echo $imagedata; 59 exit; 60 61 62 } 63 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Apr 1 01:23:32 2007 | par Balluche grâce à PHPXref 0.7 |