Файл: mlord.ru/maneken/maneken.php
Строк: 96
<?
// Автор проекта GEARBAKC
// Офф.сайт GEARNET.RU
// http://gearnet.ru/users/1
// Только эксклюзивные скрипты!
require_once('../core/index.php');
$avatars = $db->query("SELECT * FROM `users` WHERE `id`='".$_GET['id']."'")->fetch();
header('content-type: image/png');
$image = imageCreateFromPng('../design/ico/maneken/maneken.png');
$left_k=$db->query("SELECT id FROM `backpack` WHERE `id_user`='".$avatars['id']."' AND `status`='1' AND `kit`='8'")->rowCount();
if($left_k==1){
$left_v = $db->query("SELECT * FROM `backpack` WHERE `id_user`='".$avatars['id']."' AND `status`='1' AND `kit`='8'")->fetch();
$thing_l = $db->query("SELECT * FROM `thing` WHERE `id`='".$left_v['id_thing']."'")->fetch();
if(file_exists('../design/ico/maneken/'.$thing_l['id'].'.png')){
$left = imageCreateFromPng('../design/ico/maneken/'.$thing_l['id'].'.png');
imagecopy($image, $left, 25, 85, 1, 1, 45, 45);}}
$right_k=$db->query("SELECT id FROM `backpack` WHERE `id_user`='".$avatars['id']."' AND `status`='1' AND `kit`='9'")->rowCount();
if($right_k==1){
$right_v = $db->query("SELECT * FROM `backpack` WHERE `id_user`='".$avatars['id']."' AND `status`='1' AND `kit`='9'")->fetch();
$thing_r = $db->query("SELECT * FROM `thing` WHERE `id`='".$right_v['id_thing']."'")->fetch();
if(file_exists('../design/ico/maneken/'.$thing_r['id'].'.png')){
$right = imageCreateFromPng('../design/ico/maneken/'.$thing_r['id'].'.png');
imagecopy($image, $right, 170, 85, 1, 1, 45, 45);}}
$center_k=$db->query("SELECT id FROM `backpack` WHERE `id_user`='".$avatars['id']."' AND `status`='1' AND `kit`='4'")->rowCount();
if($center_k==1){
$center_v = $db->query("SELECT * FROM `backpack` WHERE `id_user`='".$avatars['id']."' AND `status`='1' AND `kit`='4'")->fetch();
$thing_c = $db->query("SELECT * FROM `thing` WHERE `id`='".$center_v['id_thing']."'")->fetch();
if(file_exists('../design/ico/maneken/'.$thing_c['id'].'.png')){
$center = imageCreateFromPng('../design/ico/maneken/'.$thing_c['id'].'.png');
imagecopy($image, $center, 98, 85, 1, 1, 45, 45);}}
$bottom_k=$db->query("SELECT id FROM `backpack` WHERE `id_user`='".$avatars['id']."' AND `status`='1' AND `kit`='3'")->rowCount();
if($bottom_k==1){
$bottom_v = $db->query("SELECT * FROM `backpack` WHERE `id_user`='".$avatars['id']."' AND `status`='1' AND `kit`='3'")->fetch();
$thing_b = $db->query("SELECT * FROM `thing` WHERE `id`='".$bottom_v['id_thing']."'")->fetch();
if(file_exists('../design/ico/maneken/'.$thing_b['id'].'.png')){
$bottom = imageCreateFromPng('../design/ico/maneken/'.$thing_b['id'].'.png');
imagecopy($image, $bottom, 98, 162, 1, 1, 45, 45);}}
$top_k=$db->query("SELECT id FROM `backpack` WHERE `id_user`='".$avatars['id']."' AND `status`='1' AND `kit`='1'")->rowCount();
if($top_k==1){
$top_v = $db->query("SELECT * FROM `backpack` WHERE `id_user`='".$avatars['id']."' AND `status`='1' AND `kit`='1'")->fetch();
$thing_t = $db->query("SELECT * FROM `thing` WHERE `id`='".$top_v['id_thing']."'")->fetch();
if(file_exists('../design/ico/maneken/'.$thing_t['id'].'.png')){
$top = imageCreateFromPng('../design/ico/maneken/'.$thing_t['id'].'.png');
imagecopy($image, $top, 98, 8, 1, 1, 45, 45);}}
imagePng($image);
?>