Файл: info.php
Строк: 63
<?php
include_once("files/zag.php");
include_once("files/ini.php");
$polz=mysql_query("SELECT * FROM `users` WHERE `udata0`='$log' AND `udata1`='$pas' LIMIT 1");
if(mysql_num_rows($polz)==0){
header ("Location: index.php?error");
echo'<div class="p">Ошибка! Пользователь с таким логином и паролем не зарегистрирован, или пароль/логин неверен! <a href="index.php">На главную</a><br>';exit;
}else{
if($_GET[vid]=="armor"){
$qi = mysql_query("SELECT * from `armor_item` WHERE `login`='".$log."' and `item_id`='$id' ");
if (mysql_affected_rows()==0)
{
echo "Вещь не существует!<br/>";
}
else
{
while($row=mysql_fetch_array($qi))
{
$id=$row['item_id'];
$name=$row['name'];
$bodypart=$row['bodypart'];
$crystallizable=$row['crystallizable'];
$armor_type=$row['armor_type'];
$weight=$row['weight'];
$material=$row['material'];
$crystal_type=$row['crystal_type'];
$avoid_modify=$row['avoid_modify'];
$duration=$row['duration'];
$p_def=$row['p_def'];
$m_def=$row['m_def'];
$mp_bonus=$row['mp_bonus'];
$price=$row['price'];
$crystal_count=$row['crystal_count'];
$sellable=$row['sellable'];
$dropable=$row['dropable'];
$destroyable =$row['destroyable'];
$tradeable=$row['tradeable'];
$item_skill_id=$row['item_skill_id'];
$item_skill_lvl=$row['item_skill_lvl'];
$kartinka=$row['kartinka'];
if($crystal_type=="none"){$crystal_type="NG";}
if($crystal_type=="d"){$crystal_type="D";}
if($crystal_type=="c"){$crystal_type="C";}
if($crystal_type=="b"){$crystal_type="B";}
if($crystal_type=="a"){$crystal_type="A";}
if($crystal_type=="s"){$crystal_type="S";}
echo"$name<br/>";
echo'<img src="pic/armor/'.$kartinka.'" alt="pic"/><br>';
echo"Маг. Зашита: $m_def Физ. Защита: $p_def<br/>
Вид брони: $armor_type</br>
Grade: $crystal_type<br/>
Цена: $price аден<br/>
Бонус к мане: $mp_bonus</br>
";
echo"<a href="inventar.php?">[Назад]</a></small>";
}}}elseif($_GET[vid]=="weapon"){
$qi = mysql_query("SELECT * from `weapon_item` WHERE `login`='".$log."' and `item_id`='$id' ");
if (mysql_affected_rows()==0)
{
echo "Вещь не существует!<br/>";
}
else
{
while($row=mysql_fetch_array($qi))
{
$name=$row['name'];
$bodypart=$row['bodypart'];
$crystallizable=$row['crystallizable'];
$armor_type=$row['armor_type'];
$soulshots=$row['soulshots'];
$spiritshots=$row['spiritshots'];
$crystal_type=$row['crystal_type'];
$p_dam=$row['p_dam'];
$rnd_dam=$row['rnd_dam'];
$weaponType=$row['weaponType'];
$critical=$row['critical'];
$hit_modify=$row['hit_modify'];
$avoid_modify=$row['avoid_modify'];
$shield_def=$row['shield_def'];
$shield_def_rate=$row['shield_def_rate'];
$atk_speed=$row['atk_speed'];
$mp_consume=$row['mp_consume'];
$m_dam=$row['m_dam'];
$duration=$row['duration'];
$price=$row['price'];
$crystal_count=$row['crystal_count'];
$sellable=$row['sellable'];
$dropable=$row['dropable'];
$destroyable=$row['destroyable'];
$tradeable=$row['tradeable'];
if($crystal_type=="none"){$crystal_type="NG";}
if($crystal_type=="d"){$crystal_type="D";}
if($crystal_type=="c"){$crystal_type="C";}
if($crystal_type=="b"){$crystal_type="B";}
if($crystal_type=="a"){$crystal_type="A";}
if($crystal_type=="s"){$crystal_type="S";}
if($bodypart=="lrhand"){$bodypart="Двуручное оружие.";}
if($bodypart=="rhand"){$bodypart="Одноручное оружие.";}
if($bodypart=="lhand"){$bodypart="Одноручное оружие.";}
echo"$name<br/>";
echo'<img src="pic/weapon/'.$name.'.jpeg" alt="pic"/><br>';
echo"Маг. Атака: $m_dam Физ. Атака: $p_dam<br/>
$bodypart</br>
Grade: $crystal_type<br/>
Soulshots: $soulshots | Spiritshots: $spiritshots</br>
Цена: $price аден<br/>
";}
}}else{
$qi = mysql_query("SELECT * from `item` WHERE `uda7`='".$log."' and `id`='".$id."' ");
if (mysql_affected_rows()==0)
{
echo "Вещь не существует!";
}
else
{
while($row=mysql_fetch_array($qi))
{
if($row['uda3']=="0"){$row['uda3']="NG";}
if($row['uda2']!==$tip){echo"<small>Ошибка.</small>"; include_once"files/down.php"; exit;}
echo"".$row['uda4']."<br/>";
echo'<img src="pic/'.$row['uda2'].'/'.$row['uda5'].'" alt="pic"/></br>';
if($tip=="weapon"){ echo"Атака: ".$row['uda0']."<br/>";}else{echo"Защита: ".$row['uda0']."<br/>";}
echo"Grade: ".$row['uda3']."<br/>
Цена: ".$row['uda1']." аден<br/>
";
echo"<a href="inventar.php?">[Назад]</a></small>";
}}}}
include_once"files/down.php";
?>