[ Index ]
 

Code source de e107 0.7.8

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

title

Body

[fermer]

/e107_handlers/ -> avatar_handler.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_handlers/avatar_handler.php,v $
  14  |     $Revision: 1.5 $
  15  |     $Date: 2005/12/27 20:17:17 $
  16  |     $Author: sweetas $
  17  +----------------------------------------------------------------------------+
  18  */
  19  if (!defined('e107_INIT')) { exit; }
  20  
  21  function avatar($avatar) {
  22      global $tp;
  23      if (stristr($avatar, "-upload-") !== FALSE) {
  24          return e_FILE."public/avatars/".str_replace("-upload-", "", $avatar);
  25      } else if (stristr($avatar, "Binary") !== FALSE) {
  26          $sqla = new db;
  27          preg_match("/Binary\s(.*?)\//", $avatar, $result);
  28          $sqla->db_Select("rbinary", "*", "binary_id='".$tp -> toDB($result[1])."' ");
  29          $row = $sqla->db_Fetch();
  30           extract($row);
  31          return $binary_data;
  32      } else if (strpos($avatar, "http://") === FALSE) {
  33          return e_IMAGE."avatars/".$avatar;
  34      } else {
  35          return $avatar;
  36      }
  37  }
  38      
  39  ?>


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