File "avatar.php"

Full path: /home/argothem/www/memo/site/site/CoolForum_0.8.4_beta/CoolForum_0.8.4_beta/avatar.php
File size: 3.03 KB
MIME-type: text/x-php
Charset: 8 bit

<?
//*********************************************************************************
//*                                                                               *
//*                  CoolForum v.0.8 Beta : Forum de discussion                   *
//*              Copyright 2001-2002 SORIANO Denis alias Cool Coyote             *
//*                                                                               *
//*                                                                               *
//*       This program is free software; you can redistribute it and/or           *
//*       modify it under the terms of the GNU General Public License             *
//*       as published by the Free Software Foundation; either version 2          *
//*       of the License, or (at your option) any later version.                  *
//*                                                                               *
//*       This program is distributed in the hope that it will be useful,         *
//*       but WITHOUT ANY WARRANTY; without even the implied warranty of          *
//*       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           *
//*       GNU General Public License for more details.                            *
//*                                                                               *
//*       You should have received a copy of the GNU General Public License       *
//*       along with this program; if not, write to the Free Software             *
//*	      Foundation, Inc., 59 Temple Place - Suite 330,                          *
//*	      Boston, MA  02111-1307, USA.                                            *
//*                                                                               *
//*                                                                               *
//*       Forum Cr par SORIANO Denis (Cool Coyote)                              *
//*       contact : coyote@coolcoyote.net                                         *
//*       site web et tlchargement : http://www.coolforum.net                   *
//*                                                                               *
//*********************************************************************************

if(!isset($_SERVER))
{
    $_SERVER = $HTTP_SERVER_VARS;
    $_ENV = $HTTP_ENV_VARS;
    $_COOKIE = $HTTP_COOKIE_VARS;
    $_GET = $HTTP_GET_VARS;
    $_POST = $HTTP_POST_VARS;
    $_FILES = $HTTP_POST_FILES;
    $_SESSION = $HTTP_SESSION_VARS;
    
    $_REQUEST = $_POST;
    for($i=0;$i<count($_GET);$i++)
    {
    	$trans=each($_GET);
    	$_REQUEST[$trans['key']]=$_REQUEST[$trans['value']];
    }
    unset($i,$trans);
}

header('Pragma: no-cache');
if (ereg(".jpg",$_GET['img']))
	header("Content-Type: image/jpeg");
else if (ereg(".gif",$_GET['img']))
	header("Content-Type: image/gif");
header('Expires: 0');

$fichier="logos/".$_GET['img'];
$imginfos=@getimagesize($fichier);

if($imginfos[2]==1 || $imginfos[2]==2)
{
	$fp=fopen($fichier,"rb");
	$image=fread($fp,filesize($fichier));
	fclose($fp);
	
	echo($image);
}
?>