View file www/gallery.php

File size: 1.64Kb
<?php
#-----------------------------------------------------#
#          ********* Бизнес Сайты *********           #
#             Made by   :  BIZON                      #
#               E-mail  :  [email protected]            #
#                 Site  :  http://f913218p.bget.ru    #
#  Вы не имеете право вносить изменения в код скрипта #
#      это может повлечь неработоспособность сайта    #
#-----------------------------------------------------#
if (isset($_GET['url']))
{
$st = htmlspecialchars($_GET['url']);
$cat = htmlspecialchars($_GET['cat']);
$st = stripslashes(trim($st));
$im = imagecreatefromjpeg($cat."/".$st);
if (isset($_GET['small']))
$small=(int)($_GET['small']);
else
$small=0;
if($small!=0){
$scr_img=$im;
$size = GetImageSize($cat."/".$st);
$scr_width = $size[1];
$scr_height = $size[0];
$dest_width = $small;
$dest_height = ($dest_width/$scr_width) * $scr_height;
if($dest_height<100)$dest_height=100;
$dest_img=ImageCreateTrueColor($dest_height,$dest_width);
ImageCopyResampled($dest_img, $scr_img, 0, 0, 0, 0,$dest_height,$dest_width,$scr_height,$scr_width);
ImageJpeg($dest_img);
ImageDestroy($dest_img);
}else{
$stamp = imagecreatetruecolor(200, 70);
imagefilledrectangle($stamp, 0, 0, 199, 169, 0x00FFFF);
imagefilledrectangle($stamp, 9, 9, 190, 60, 0xFFFFFF);
imagestring($stamp, 5, 20, 20, 'Web Sait', 0x00FFFF);
imagestring($stamp, 3, 20, 40,$_SERVER['SERVER_NAME'], 0x00FFFF);
$marge_right = 10;
$marge_bottom = 10;
$sx = imagesx($stamp);
$sy = imagesy($stamp);
imagecopymerge($im, $stamp, imagesx($im) - $sx - $marge_right, imagesy($im) - $sy - $marge_bottom, 0, 0, imagesx($stamp), imagesy($stamp), 30);
imagepng($im);
imagedestroy($im);
}}
?>