<?php

include_once '../sys/inc/start.php';
include_once '../sys/inc/compress.php';
include_once '../sys/inc/sess.php';
include_once '../sys/inc/home.php';
include_once '../sys/inc/settings.php';
include_once '../sys/inc/db_connect.php';
include_once '../sys/inc/ipua.php';
include_once '../sys/inc/fnc.php';
include_once '../sys/inc/user.php';

if (isset($user))$ank['id']=$user['id'];
if (isset($_GET['id']))$ank['id']=intval($_GET['id']);
$ank=mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id` = $ank[id] LIMIT 1"));

$set['title']=$ank['nick'].' - Одежда ';
error_reporting (0);
include_once '../sys/inc/thead.php';
title();
aut();
//header("Content-type: application/vnd.wap.xhtml+xml");
header("Content-type: text/html");
echo "<link rel='stylesheet' href='style.css' type='text/css' /><center>";
echo "<div class='grad32'><img src='fermer.gif'></div><div class='ferm3'><img src='shop25.gif'><div class='grad16'>Одежда</div></center>";
echo'<div class="ferm3">';

$r_head=mysql_query("SELECT * FROM `k_user` WHERE `type`='head' AND `uid`='".$ank['id']."'");
$r_torso=mysql_query("SELECT * FROM `k_user` WHERE `type`='torso' AND `uid`='".$ank['id']."'");
$r_hands=mysql_query("SELECT * FROM `k_user` WHERE `type`='hands' AND `uid`='".$ank['id']."'");
$r_feet=mysql_query("SELECT * FROM `k_user` WHERE `type`='feet' AND `uid`='".$ank['id']."'");
$r_shoe=mysql_query("SELECT * FROM `k_user` WHERE `type`='shoe' AND `uid`='".$ank['id']."'");
$akses=mysql_query("SELECT * FROM `k_user` WHERE `type`='akses' AND `uid`='".$ank['id']."'");
$akses_two=mysql_query("SELECT * FROM `k_user` WHERE `type`='akses_two' AND `uid`='".$ank['id']."'");
$akses_three=mysql_query("SELECT * FROM `k_user` WHERE `type`='akses_three' AND `uid`='".$ank['id']."'");

if(!mysql_num_rows($r_head)){
echo 'Голова: Пусто<br/>';
}else{
while($row=mysql_fetch_assoc($r_head)){
echo 'Голова: <a href="shop_of_clothes.php?p=info&amp;id='.$row['vid'].'">'.$row['name'].'</a>';
if($ank['id']==$user['id']){echo ' <a href="closet.php?p=snyat&amp;id='.$row['id'].'">[снять]</a>';};
echo '<br/>';
};
};


if(!mysql_num_rows($r_torso)){
echo 'Торс: Пусто<br/>';
}else{
while($row=mysql_fetch_assoc($r_torso)){
echo 'Торс: <a href="shop_of_clothes.php?p=info&amp;id='.$row['vid'].'">'.$row['name'].'</a>';
if($ank['id']==$user['id']){echo ' <a href="closet.php?p=snyat&amp;id='.$row['id'].'">[снять]</a>';};
echo '<br/>';
};
};


if(!mysql_num_rows($r_hands)){
echo 'Руки: Пусто<br/>';
}else{
while($row=mysql_fetch_assoc($r_hands)){
echo 'Руки: <a href="shop_of_clothes.php?p=info&amp;id='.$row['vid'].'">'.$row['name'].'</a>';
if($ank['id']==$user['id']){echo ' <a href="closet.php?p=snyat&amp;id='.$row['id'].'">[снять]</a>';
};
echo '<br/>';
};
};


if(!mysql_num_rows($r_feet)){
echo 'Ноги: Пусто<br/>';
}else{
while($row=mysql_fetch_assoc($r_feet)){
echo 'Ноги: <a href="shop_of_clothes.php?p=info&amp;id='.$row['vid'].'">'.$row['name'].'</a>';
if($ank['id']==$user['id']){echo ' <a href="closet.php?p=snyat&amp;id='.$row['id'].'">[снять]</a>';
};
echo '<br/>';
};
};


if(!mysql_num_rows($r_shoe)){
echo 'Обувь: Пусто<br/>';
}else{
while($row=mysql_fetch_assoc($r_shoe)){
echo 'Обувь: <a href="shop_of_clothes.php?p=info&amp;id='.$row['vid'].'">'.$row['name'].'</a>';
if($ank['id']==$user['id']){echo ' <a href="closet.php?p=snyat&amp;id='.$row['id'].'">[снять]</a>';
};
echo '<br/>';
};
};


if(!mysql_num_rows($akses)){
echo 'Аксесуар: Пусто<br/>';
}else{
while($row=mysql_fetch_assoc($akses)){
echo 'Аксесуар: <a href="shop_of_clothes.php?p=info&amp;id='.$row['vid'].'">'.$row['name'].'</a>';
if($ank['id']==$user['id']){echo ' <a href="closet.php?p=snyat&amp;id='.$row['id'].'">[снять]</a>';
};
echo '<br/>';
};
};


if(!mysql_num_rows($akses_two)){
echo 'Доп.аксесуары: Пусто<br/>';
}else{
while($row=mysql_fetch_assoc($akses_two)){
echo 'Доп.аксесуары: <a href="shop_of_clothes.php?p=info&amp;id='.$row['vid'].'">'.$row['name'].'</a>';
if($ank['id']==$user['id']){echo ' <a href="closet.php?p=snyat&amp;id='.$row['id'].'">[снять]</a>';
};
echo '<br/>';
};
};


if(!mysql_num_rows($akses_three)){
echo 'Доп.аксесуары: Пусто<br/>';
}else{
while($row=mysql_fetch_assoc($akses_three)){
echo 'Доп.аксесуары: <a href="shop_of_clothes.php?p=info&amp;id='.$row['vid'].'">'.$row['name'].'</a>';
if($ank['id']==$user['id']){echo ' <a href="closet.php?p=snyat&amp;id='.$row['id'].'">[снять]</a>';
};
echo '<br/>';
};
};


echo '<div class="grad16">Одет в :</div></div>';

$r_head=mysql_query("SELECT * FROM `k_user` WHERE `type`='head' AND `uid`='".$ank['id']."'");
$r_torso=mysql_query("SELECT * FROM `k_user` WHERE `type`='torso' AND `uid`='".$ank['id']."'");
$r_hands=mysql_query("SELECT * FROM `k_user` WHERE `type`='hands' AND `uid`='".$ank['id']."'");
$r_feet=mysql_query("SELECT * FROM `k_user` WHERE `type`='feet' AND `uid`='".$ank['id']."'");
$r_shoe=mysql_query("SELECT * FROM `k_user` WHERE `type`='shoe' AND `uid`='".$ank['id']."'");
$akses=mysql_query("SELECT * FROM `k_user` WHERE `type`='akses' AND `uid`='".$ank['id']."'");


if(!mysql_num_rows($r_head)){
echo '<img src="images/head.gif" alt=""/><br />';
}else{
while($row=mysql_fetch_assoc($r_head)){
echo '<img src="images/'.$row['path'].'" alt=""/><br />';
};
};

if(!mysql_num_rows($akses)){
echo '<img src="images/akses.gif" alt=""/><br />';
}else{
while($row=mysql_fetch_assoc($akses)){
echo '<img src="images/'.$row['path'].'" alt=""/><br />';
};
};


if(!mysql_num_rows($r_torso)){
echo '<img src="images/torso.gif" alt=""/>';
}else{
while($row=mysql_fetch_assoc($r_torso)){
echo '<img src="images/'.$row['path'].'" alt=""/>';
};
};

if(!mysql_num_rows($r_hands)){
echo '<img src="images/hands.gif" alt=""/><br />';
}else{
while($row=mysql_fetch_assoc($r_hands)){
echo '<img src="images/'.$row['path'].'" alt=""/><br />';
};
};

if(!mysql_num_rows($r_feet)){
echo '<img src="images/feet.gif" alt=""/>';
}else{
while($row=mysql_fetch_assoc($r_feet)){
echo '<img src="images/'.$row['path'].'" alt=""/>';
};
};


if(!mysql_num_rows($r_shoe)){
echo '<img src="images/shoe.gif" alt=""/><br />';
}else{
while($row=mysql_fetch_assoc($r_shoe)){
echo '<img src="images/'.$row['path'].'" alt=""/><br />';
};
};

echo '<div class="grad16">Гламур-Рейтинг '.$ank[nick].'</div><div class="ferm3">';
include_once 'inc/popularity.php';
echo "Сексуальность: <span class=\"ank_d\">$ank_sex</span><br />\n";
echo "Шикарность: <span class=\"ank_d\">$ank_shik</span><br />\n";
echo "Деловитость: <span class=\"ank_d\">$ank_del</span><br />\n";
echo "Спортивность: <span class=\"ank_d\">$ank_sport</span><br />\n";
echo "Эпатажность: <span class=\"ank_d\">$ank_epat</span><br />\n";
echo "Гламурность: <span class=\"ank_d\">$ank_glam</span><br />\n";

if($karma==0){echo 'Карма : 0<br />';}else{echo 'Карма : '.$karma.' %<br />';}


echo'<div class=\'foot\'>';
echo'<a href="closet.php"><img src="egg.png"> Мой Гардероб</a><br>';
echo '<a href="shop_of_clothes.php"><img src="egg.png"> Магазин Одежды</a><br />';
echo "<a href='my.php'><img src='egg.png'> На ферму</a><br/>";
echo "<a href='index.php'><img src='egg.png'> В игру</a>";
echo'</div></div>';

include_once '../sys/inc/tfoot.php';
?>