<?php
include '../Core/db.php';
header('content-type:image/png');
$prof = $db -> query("SELECT * FROM `users` WHERE `id` = '".($_GET['id'])."'") -> fetch_array();
$wap_master = imagecreatefrompng("img/".$prof['sex'].".png");
$item_helmet = $db -> query("SELECT * FROM `bag` WHERE `user` = '".$prof['id']."' AND `type_vesh` = 'helmet' AND `status` = 'on'") -> fetch_array();
if($item_helmet){
$helmet_img = imagecreatefrompng('img/maneken/'.$prof['sex'].'/'.$item_helmet['lvl'].'/'.$item_helmet['type_vesh'].'.png');
imagecopy($wap_master, $helmet_img, 0, 0, 0, 0, 431, 532);}
$item_armor = $db -> query("SELECT * FROM `bag` WHERE `user` = '".$prof['id']."' AND `type_vesh` = 'armor' AND `status` = 'on'") -> fetch_array();
if($item_armor){
$armor_img = imagecreatefrompng('img/maneken/'.$prof['sex'].'/'.$item_armor['lvl'].'/'.$item_armor['type_vesh'].'.png');
imagecopy($wap_master, $armor_img, 0, 0, 0, 0, 431, 532);}
$item_plech = $db -> query("SELECT * FROM `bag` WHERE `user` = '".$prof['id']."' AND `type_vesh` = 'plech' AND `status` = 'on' ORDER BY `id` LIMIT 1") -> fetch_array();
if($item_plech){
$plech_img = imagecreatefrompng('img/maneken/'.$prof['sex'].'/'.$item_plech['lvl'].'/'.$item_plech['type_vesh'].'.png');
imagecopy($wap_master, $plech_img, 0, 0, 0, 0, 431, 532);}
$item_boots = $db -> query("SELECT * FROM `bag` WHERE `user` = '".$prof['id']."' AND `type_vesh` = 'boots' AND `status` = 'on'") -> fetch_array();
if($item_boots){
$boots_img = imagecreatefrompng('img/maneken/'.$prof['sex'].'/'.$item_boots['lvl'].'/'.$item_boots['type_vesh'].'.png');
imagecopy($wap_master, $boots_img, 0, 0, 0, 0, 431, 532);}
$item_shield = $db -> query("SELECT * FROM `bag` WHERE `user` = '".$prof['id']."' AND `type_vesh` = 'shield' AND `status` = 'on'") -> fetch_array();
if($item_shield){
$shield_img = imagecreatefrompng('img/maneken/'.$prof['sex'].'/'.$item_shield['lvl'].'/'.$item_shield['type_vesh'].'.png');
imagecopy($wap_master, $shield_img, 0, 0, 0, 0, 431, 532);}
$item_weapon = $db -> query("SELECT * FROM `bag` WHERE `user` = '".$prof['id']."' AND `type_vesh` = 'weapon' AND `status` = 'on'") -> fetch_array();
if($item_weapon){
$weapon_img = imagecreatefrompng('img/maneken/'.$prof['sex'].'/'.$item_weapon['lvl'].'/'.$item_weapon['type_vesh'].'.png');
imagecopy($wap_master, $weapon_img, 0, 0, 0, 0, 431, 532);}
imagepng($wap_master);
?>
$item_boots = $db -> query("SELECT * FROM `bag` WHERE `user` = '".$prof['id']."' AND `pit` = 'drakon' AND `status` = 'on'") -> fetch_array();
if($item_boots){
$boots_img = imagecreatefrompng('img/maneken/'.$prof['sex'].'/'.$item_boots['lvl'].'/'.$item_boots['pit'].'.png');
imagecopy($wap_master, $boots_img, 0, 0, 0, 0, 300, 700);}
<img width="122" height="200" src="/maneken_'.$user['id'].'.png">
AddDefaultCharset utf-8
DirectoryIndex index.php
Options -Indexes
RewriteEngine On
RewriteBase /
# Директории скрипта #
php_value default_mimetype text/html
php_flag magic_quotes_gpc Off
php_flag magic_quotes_runtime Off
php_flag magic_quotes_sybase Off
php_flag register_argc_argv Off
php_value session.auto_start 0
# Защита от школьников #
RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|[|%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|[|%[0-9A-Z]{0,2})
RewriteRule ^(.*)$ index.php [F,L]
# Кеширование в браузере на стороне пользователя #
<ifModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/css text/javascript application/javascript application/x-javascript
</ifModule>
# Если нет какой либо странички в игре #
ErrorDocument 404 /Modules/error.php
ErrorDocument 401 /Modules/error.php
ErrorDocument 403 /Modules/error.php
ErrorDocument 500 /Modules/error.php
RewriteRule ^profil?$ Profile/user.php [L,QSA]
RewriteRule ^maneken_([0-9]*).png?$ /maneken/maneken.php?id=$1 [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d