Вход Регистрация
Файл: usscripts/logo.php
Строк: 32
<?
  
##########################################
## Автор: -=ШАХТЕР=-                        #                                                                                                                                                                                      ## Сайт: http://masteram.us                 #                                                                                                   ## ICQ  :  46-92-90                         #                                                                                             ## Версия 3.0 от 4.06.10                    #
## ДАННЫЙ СКРИПТ РАСПРОСТРАНЯЕТСЯ БЕСПЛАТНО #
## КАЧАЕМ ТОЛЬКО НА   http://masteram.us    #
  #########################################
require'../config.php';
who_add(0,'us');
aut();
error_reporting(E_PARSE);
$m=@$_SERVER['QUERY_STRING'];

$a = @mysql_fetch_array(mysql_query ("Select * from groups where id = '".$m."'"));
$img $a['logo'];

$name $a['logo'];

$array=explode("."$img);
$type=$array[1];

$w $set['w_img_sten'];
$h $set['h_img_sten'];

function 
resizeimage($name$type$w$h)
{
$ratio=$w/$h;
$size_image=getimagesize($name);

$src_ratio=$size_image[0]/$size_image[1];
if(
$ratio<$src_ratio)
$h=$w/$src_ratio;
else 
$w=$h*$src_ratio;
$destroy=imagecreatetruecolor($w$h);
if(
strtolower($type)=="jpg"$src_image=imagecreatefromjpeg($name);
elseif(
strtolower($type)=="gif"$src_image=imagecreatefromgif($name);
elseif(
strtolower($type)=="jpeg"$src_image=imagecreatefromjpeg($name);
else 
$src_image=imagecreatefrompng($name);

if(!@
imagecopyresampled($destroy$src_image0000$w$h$size_image[0], $size_image[1])) return false;

if(
strtolower($type)=="jpg")
{
header("Content-type: image/jpeg");
imagejpeg($destroy);
}
if(
strtolower($type)=="gif")
{
header("Content-type: image/gif");
imagegif($destroy);
}
 if(
strtolower($type)=="png")
{
header("Content-type: image/png");
imagepng($destroy);
}
 if(
strtolower($type)=="jpeg")
{
header("Content-type: image/jpeg");
imagepng($destroy);
}
 if(
strtolower($type)=="bmp")
{
header("Content-type: image/bmp");
imagepng($destroy);
}
imagedestroy($destroy);
imagedestroy($src_image);
return 
TRUE;
}

resizeimage($img$type$w$h);

?>
Онлайн: 2
Реклама