[ Index ]
 

Code source de e107 0.7.8

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/e107_files/ -> thumb.php (source)

   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_files/thumb.php,v $
  14  |     $Revision: 1.2 $
  15  |     $Date: 2005/08/23 03:54:04 $
  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      if (e_QUERY){
  33          $tmp = explode("+",rawurldecode(e_QUERY));
  34          if(strpos($tmp[0], "/") === 0 || strpos($tmp[0], ":") >= 1){
  35              $source = $tmp[0];
  36          }else{
  37              $source = "../".str_replace("../","",$tmp[0]);
  38          }
  39  
  40          $newsize = $tmp[1];
  41          if(!resize_image($source, "stdout", $newsize)){
  42              echo "Couldn't find: ".$source;
  43          }
  44      }
  45  ?>


Généré le : Sun Apr 1 01:23:32 2007 par Balluche grâce à PHPXref 0.7