Файл: infringements_img.php
Строк: 18
<?php
require'shaxty.php'; // waphp.ru - закрытый клуб вап мастеров!
error_reporting(E_PARSE);
$m=intval($_SERVER['QUERY_STRING']);
$a = mysql_fetch_assoc(mysql_query ("Select * from infringements where id = '".$m."'"));
$img = H.'files/infringements/'.$a['img'];
$W = 100; // ширина картинки
$H = 100; // высота картинки
$getim = getimagesize($img);
if ($getim[2] == 1 || $getim[2] == 2 || $getim[2] == 3) {
if ($getim[2] == 1)$old = imagecreatefromgif($img);
elseif ($getim[2] == 2) $old = imagecreatefromjpeg($img);
elseif ($getim[2] == 3)$old = imagecreatefrompng($img);
{
$wn = imageSX($old);
$hn = imageSY($old);
$new = imageCreateTrueColor($W, $H);
imageCopyResampled($new, $old, 0, 0, 0, 0, $W, $H, $wn, $hn);
imageJpeg($new,null,100);
}
}
/* by -=ШАХТЕР=- (waphp.ru - качай только тут) */ ?>