Вход Регистрация
Файл: photo_img.php
Строк: 31
<?php

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,'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_inf($nk,'vote_photo'))*15), 3, user_inf($nk,'vote_photo'), $color);


imageJpeg($new,null,100);
}
}



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