Файл: love/photo_img.php
Строк: 31
<?php // автор -=ШАХТЕР=- http://waphp.ru
require'../includes.php';
error_reporting(E_PARSE);
$nk=intval($_SERVER['QUERY_STRING']);
if(isset($_GET['nk']))$nk =intval($_GET['nk']);
$img = H.user_inf2($nk,'love_photo');
$W = intval($_GET['W']);
$H = intval($_GET['H']);
$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);
if(!$_GET['W'] and !$_GET['H'])
{
$W = $set['w_photo']; // ширина картинки
$H = $set['h_photo']; // высота картинки
}
$new = imageCreateTrueColor($W, $H);
imageCopyResampled($new, $old, 0, 0, 0, 0, $W, $H, $wn, $hn);
// цвет
$color = imagecolorallocate($new, 255, 255, 255);
imagestring($new, 7, $W-(strlen(user_inf2($nk,'love_vote_photo'))*15), 3, user_inf2($nk,'love_vote_photo'), $color);
imageJpeg($new,null,100);
}
}
?>