Файл: search.php
Строк: 873
<?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?error");
echo'<div class="p">Ошибка! Пользователь с таким логином и паролем не зарегистрирован, или пароль/логин неверен! <a href="index?">На главную</a><br>';exit;
}else{
$udatas=mysql_query("SELECT * FROM `users` WHERE `udata0`='$nick' LIMIT 1");
$udatas= mysql_fetch_array($udatas);
$udatam0=$udatas['udata0'];
$udatam1=$udatas['udata1'];
$udatam2=$udatas['udata2'];
$udatam3=$udatas['udata3'];
$udatam4=$udatas['udata4'];
$udatam5=$udatas['udata5'];
$udatam6=$udatas['udata6'];
$udatam7=$udatas['udata7'];
$udatam8=$udatas['udata8'];
$udatam9=$udatas['udata9'];
$udatam10=$udatas['udata10'];
$udatam11=$udatas['udata11'];
$udatam12=$udatas['udata12'];
$udatam13=$udatas['udata13'];
$udatam14=$udatas['udata14'];
$udatam15=$udatas['udata15'];
$udatam16=$udatas['udata16'];
$udatam17=$udatas['udata17'];
$udatam18=$udatas['udata18'];
$udatam19=$udatas['udata19'];
$udatam20=$udatas['udata20'];
$udatam21=$udatas['udata21'];
$udatam22=$udatas['udata22'];
$udatam23=$udatas['udata23'];
$udatam24=$udatas['udata24'];
$udatam25=$udatas['udata25'];
$udatam26=$udatas['udata26'];
$udatam27=$udatas['udata27'];
$udatam28=$udatas['udata28'];
$udatam29=$udatas['udata29'];
$udatam30=$udatas['udata30'];
$udatam31=$udatas['udata31'];
$udatam32=$udatas['udata32'];
$udatam33=$udatas['udata33'];
$udatam34=$udatas['udata34'];
$udatam35=$udatas['udata35'];
$udatam36=$udatas['udata36'];
$udatam37=$udatas['udata37'];
$udatam38=$udatas['udata38'];
$udatam39=$udatas['udata39'];
$udatam40=$udatas['udata40'];
$udatam41=$udatas['udata41'];
$udatam42=$udatas['udata42'];
$udatam43=$udatas['udata43'];
$udatam44=$udatas['udata44'];
$udatam45=$udatas['udata45'];
$udatam46=$udatas['udata46'];
$udatam47=$udatas['udata47'];
$udatam48=$udatas['udata48'];
$udatam49=$udatas['udata49'];
$udatam50=$udatas['udata50'];
$udatam51=$udatas['udata51'];
$udatam52=$udatas['udata52'];
$udatam53=$udatas['udata53'];
$udatam54=$udatas['udata54'];
$udatam55=$udatas['udata55'];
$udatam56=$udatas['udata56'];
$udatam57=$udatas['udata57'];
$udatam58=$udatas['udata58'];
$udatam59=$udatas['udata59'];
$udatam60=$udatas['udata60'];
$udatam61=$udatas['udata61'];
$udatam62=$udatas['udata62'];
$udatam63=$udatas['udata63'];
$udatam64=$udatas['udata64'];
$udatam65=$udatas['udata65'];
$udatam66=$udatas['udata66'];
$udatam67=$udatas['udata67'];
$udatam68=$udatas['udata68'];
$udatam69=$udatas['udata69'];
$udatam70=$udatas['udata70'];
$udatam71=$udatas['udata71'];
$udatam72=$udatas['udata72'];
$udatam73=$udatas['udata73'];
$udatam74=$udatas['udata74'];
$udatam75=$udatas['udata75'];
$udatam76=$udatas['udata76'];
$udatam77=$udatas['udata77'];
$udatam78=$udatas['udata78'];
$udatam79=$udatas['udata79'];
$udatam80=$udatas['udata80'];
$udatam81=$udatas['udata81'];
$udatam82=$udatas['udata82'];
$udatam83=$udatas['udata83'];
$udatam84=$udatas['udata84'];
$udatam85=$udatas['udata85'];
$udatam86=$udatas['udata86'];
$udatam87=$udatas['udata87'];
$udatam88=$udatas['udata88'];
$udatam89=$udatas['udata89'];
$udatam90=$udatas['udata90'];
$udatam91=$udatas['udata91'];
$udatam92=$udatas['udata92'];
$udatam93=$udatas['udata93'];
$udatam94=$udatas['udata94'];
$udatam95=$udatas['udata95'];
$udatam96=$udatas['udata96'];
$udatam97=$udatas['udata97'];
$udatam98=$udatas['udata98'];
$udatam99=$udatas['udata99'];
$udatam100=$udatas['udata100'];
switch(@$go) {
default:
echo "<form action="search?&go=go" method="post"><small>Введите ник:</small><br/>";
echo "<input name="nick" maxlength="10" title="nick" emptyok="true"/><br/>";
echo "<input type="submit" value="Передать" /></form>";
break;
case 'go':
$req = mysql_query("SELECT * FROM `users` WHERE `udata0`='$nick' LIMIT 1");
////////////////////////////
$avto=mysql_num_rows($req);
if($avto==0){
echo'Такого игрока не существует. <br/>';
include('files/down.php');exit;
}
$nick = htmlspecialchars(stripslashes($nick));
$aglava=mysql_query("SELECT * FROM `clan` WHERE `clan0`='$udatam23' ");
$arrs= mysql_fetch_array($aglava);
$ggg=$arrs['clan2'];
$req = mysql_query("SELECT * FROM `table_vip` LIMIT 1");
// //////////////////////////
$avto = mysql_fetch_array($req);
if(!empty($ggg)){
$aglav=mysql_query("SELECT * FROM `clan` WHERE `clan0`='$nick' ");
$ar= mysql_fetch_array($aglav);
$ggg1 = $ar['clan0'];
if($ggg1=="$nick")
{
$st2 = "Старейшина";
}else
if($udatam23 !== "")
{
$st2 = "Преемник";
}else
if($udatam23 == "")
{
$st2 = "Бродяга";
}
if($udatam67=="200"){$st3 = ", <b><font color=lime>Администратор</font></b>";}
if($udatam67=="100"){$st3 = ", <b><font color=blue>Ст. Модератор</font></b>";}
if($udatam67=="50"){$st3 = ", <b><font color=blue>Мл. Модератор</font></b>";}
if($udatam67<="49"){$st3 = "";}
$req = mysql_query("SELECT * FROM `table_vip` WHERE `nick` = '$nick' LIMIT 1");
$usdata = mysql_fetch_array($req);
$avto = mysql_num_rows($req);
if ($avto == 1) {$st4 = ", <b><font color=gold>VIP-игрок</font></b>";}
echo"<img src="pic/clan/$ggg" alt="clan"/> </b>$nick</b> (<font color=green>$udatam9</font>, $st2 $st3 $st4)<br/>";}else{
echo"</b>$nick</b> (<font color=green>$udatam9</font>, $st)<br/>";
}
$req = mysql_query("SELECT * FROM `table_status` WHERE `usr` = '$nick'");
////////////////////////////
$avto=mysql_num_rows($req);
if($avto>=1){
echo'<div id="active"><div class="dialog_window">';
While($mag = mysql_fetch_array($req))
{
echo $mag['status'].'<br />';
}
echo '</div></div>';
}
if($udatam9<20){
$st="NG";}
elseif($udatam9>=20 and $udatam9<40){
$st="D";}
elseif($udatam9>=40 and $udatam9<52){
$st="C";}
elseif($udatam9>=52 and $udatam9<62){
$st="B";}
elseif($udatam9>=62 and $udatam9<76){
$st="A";}
elseif($udatam9>=76){
$st="S";}
elseif($udatam9>=80){
$st="S80";}
if($udata34=="0"){
if (is_file('pic/avatar/'.$nick.''))
{
echo'<br><img src="pic/avatar/'.$nick.'" alt="pic"/><br/><br/>';
}else
if($udatam27=="wizard"){
if($udatam2=="M"){
echo'<br><img src="pic/avatar/warrior/'.$udatam26.'/m/M/'.$st.'.gif"/><br/><br/>';}else{echo'<br><img src="pic/avatar/warrior/'.$udatam26.'/m/'.$st.'.gif"/><br/><br/>';}}else
if($udatam27=="fighert"){
if($udatam2=="M"){
echo'<br><img src="pic/avatar/mages/'.$udatam26.'/m/M/'.$st.'.gif"/><br/><br/>';}else{echo'<br><img src="pic/avatar/mages/'.$udatam26.'/m/'.$st.'.gif"/><br/><br/>';}}
}else{echo"<br><br>";}
$t=time();
$req = mysql_query("SELECT * FROM `ban` WHERE `usr` = '$nick' LIMIT 1");
// //////////////////////////
$avto = mysql_num_rows($req);
if ($avto == 1) {
$ban = mysql_fetch_array($req);
if($ban[ban_time]<$t){
mysql_query("DELETE FROM `ban` WHERE `usr` = '$nick'");
}else{
echo"Игрок Заблокирован!<br> Причина бана: $ban[text]<br> Осталось: ";
$ban[ban_time]=$ban[ban_time]-time();
if($ban[ban_time]<60){
echo "$ban[ban_time] сек.<br>";
}elseif($ban[ban_time]>60 and $ban[ban_time]<3600){
$ban[ban_time]=round($ban[ban_time]/60);
echo "$ban[ban_time] мин.<br>";
}else{
$ban[ban_time]=round($ban[ban_time]/3600);
echo "$ban[ban_time] часов<br>";
}
echo"<br>"; }
}
$t=time();
$req = mysql_query("SELECT * FROM `banchat` WHERE `usr` = '$nick' LIMIT 1");
// //////////////////////////
$avto = mysql_num_rows($req);
if ($avto == 1) {
$ban = mysql_fetch_array($req);
if($ban[ban_time]<$t){
mysql_query("DELETE FROM `banchat` WHERE `usr` = '$nick'");
}else{
echo"Игрок находится в бане!<br> Причина бана: $ban[text]<br> Осталось: ";
$ban[ban_time]=$ban[ban_time]-time();
if($ban[ban_time]<60){
echo "$ban[ban_time] сек.";
}elseif($ban[ban_time]>60 and $ban[ban_time]<3600){
$ban[ban_time]=round($ban[ban_time]/60);
echo "$ban[ban_time] мин.";
}else{
$ban[ban_time]=round($ban[ban_time]/3600);
echo "$ban[ban_time] часов";
}
echo"<br>"; }
}
echo"<img src="img/progress.png" alt="pic"/> <a href="search?go=progress&nick=$nick">Достижения</a><br/>";
$q = mysql_query("SELECT COUNT(`id`) FROM `table_stena` WHERE `id`='$nick'");
$kol = mysql_result($q, 0);
echo"<img src="img/action.png" alt="pic"/> <a href="search.php?go=stena&nick=$nick&id=$nick">Отзывы о игроке</a> [<b>$kol</b>]<br/>";
echo"<img src="img/stat.png" alt="pic"/> <a href="search.php?go=stat&nick=$nick">Статистика персонажа</a><br/>";
echo"<img src="img/information.png" alt="pic"/> <a href="search.php?go=ankets&nick=$nick">Информация о персонаже</a><br/>";
if($nick!==$log){
echo"<img src="img/messages.png" alt="pic"/> <a href="msg?&user=$nick&go=answer">Написать письмо</a><br /><br />";
}
$aglav=mysql_query("SELECT * FROM `clan_people` WHERE `clan_people0`='$nick' ");
$ar= mysql_fetch_array($aglav);
$ggg1=$ar['clan_people0'];
if($ggg1=="$nick"){
echo"В клане: <b><a href="search?go=clan&nick=$udatam23">$ar[clan_people1]</b> <a href="search?&go=go&nick=$udatam23">[$udatam23]</a><br/>";}else{
echo"Не в клане<br/>";}
$aglav=mysql_query("SELECT * FROM `clan_alliance` WHERE `glava`='$udatam90' ");
$ar= mysql_fetch_array($aglav);
if($udatam90!==""){
echo"В альянсе: <b><a href="search?go=alliance&nick=$udatam90">$ar[ali_name]</b> <a href="search?&go=go&nick=$udatam90">[$udatam90]</a><br/>";}else{
echo"Не в альянсе<br/>";}
echo"В Городе: $udatam20<br/>";
if(!empty($udatam33)){echo"Профессия: <b>$udatam33</b><br/>";}else{echo"Профессии нет.<br/>";}
echo"Раса / Класс: ";
if($udatam26=="ork"){echo"Орк";}
if($udatam26=="elf"){echo"Эльф";}
if($udatam26=="darkelf"){echo"Темный эльф";}
if($udatam26=="human"){echo"Человек";}
if($udatam26=="gnom"){echo"Гном";}
if($udatam26=="kamael"){echo"Камаэль";}
echo" / ";
if($udatam27=="wizard"){echo"Маг";}
if($udatam27=="fighert"){echo"Войн";}
echo '<br /><br />';
include_once"files/opiti.dat";
echo"Жизни: <font color="#EC264C">$udatam16</font> / <font color="#7C3A48">$udatam17</font><br>
Мана: <font color="049FD9">$udatam29</font> / <font color="215C7A">$udatam30</font>";
echo"<br>Опыт: "; echo '<font color="#666475">'.number_format( $udatam19 ).'</font>';
include("files/opits.php");
$exp_next=$exp-$udatam19;
if($nick==$log){
echo' (Осталось: '.number_format($exp_next).') ';}
echo"<br> SP: "; echo number_format( $udatam31 );
$time=time()-600;
if($udatam56>=$time){
echo"<br>Статус: <font color="lime">Online<br/></font></b>";}else{
echo"<br>Статус: <font color="red">Offline<br/></font>";
}
echo '<br /><br />';
echo"Карма / PK / PvP: <font color=red>$udatam86</font> / <font color=red>$udatam61</font> / <font color=blue>$udatam85</font><br/>";
echo"Побед / Поражений: "; echo '<font color=green>'.number_format( $udatam6 ).'</font> / <font color=red>'.number_format( $udatam7 ).'</font><br /><br />';
echo"<img src="img/up.png" alt="pic"/> <a href="search.php?go=sn&nick=$nick">Снаряжение</a>";
$elita=mysql_query("SELECT * FROM `peklowin` WHERE `usr`='$nick' and `ok`='ataka' LIMIT 1");
if(mysql_num_rows($elita)==1){
$udatam4=$udatam4*1.15;}else{$udatam4=$udatam4;}
$elita=mysql_query("SELECT * FROM `peklowin` WHERE `usr`='$nick' and `ok`='lov' LIMIT 1");
if(mysql_num_rows($elita)==1){
$udatam3=$udatam3*1.15;}else{$udatam3=$udatam3;}
$elita=mysql_query("SELECT * FROM `peklowin` WHERE `usr`='$nick' and `ok`='pvp' LIMIT 1");
if(mysql_num_rows($elita)==1){
$udatam4=$udatam4*1.15;}else{$udatam4=$udatam4;}
$elita=mysql_query("SELECT * FROM `peklowin` WHERE `usr`='$nick' and `ok`='pvpc' LIMIT 1");
if(mysql_num_rows($elita)==1){
$udatam4=$udatam4*1.15;}else{$udatam4=$udatam4;}
$test = mysql_query("SELECT * FROM `weapon_item` WHERE `login`='$log' and `name`='$udata12' LIMIT 1");
$ts=mysql_fetch_array($test);
if($ts[weaponType]=="dual"){$ts[weaponType]=7;}
if($ts[weaponType]=="sword"){$ts[weaponType]=1;}
if($ts[weaponType]=="bow"){$ts[weaponType]=2;}
if($ts[weaponType]=="blunt"){$ts[weaponType]=3;}
if($ts[weaponType]=="dagger"){$ts[weaponType]=4;}
if($ts[weaponType]=="pole"){$ts[weaponType]=5;}
if($ts[weaponType]=="dualfist"){$ts[weaponType]=6;}
if($ts[weaponType]=="etc"){$ts[weaponType]=10;}
$elita=mysql_query("SELECT * FROM `bonusstats` WHERE `login`='$log' and `vid`='$ts[weaponType]' LIMIT 1 ");
$stats=mysql_fetch_array($elita);
$ts1=mysql_num_rows($elita);
if($ts1==1){
$udata4=$udata4+$stats[kol];}else{$udata4=$udata4;}
/////////////////////////////////////////////////
$test = mysql_query("SELECT * FROM `armor_item` WHERE `login`='$log' and `name`='$udata11' LIMIT 1");
$ts=mysql_fetch_array($test);
$elita=mysql_query("SELECT * FROM `bonusstats` WHERE `login`='$log' and `vid`='$ts[armor_type]' LIMIT 1 ");
$stats=mysql_fetch_array($elita);
$ts1=mysql_num_rows($elita);
if($ts1==1){
$udata3=$udata3+$stats[kol];}else{$udata3=$udata3;}
echo' <br>Физ. / Маг. атака: ';
echo number_format( $udatam4 ).' / ';
echo number_format( $udatam83 );
echo' <br>Физ. / Маг. защита: ';
echo number_format( $udatam3 ).' / ';
echo number_format( $udatam82 ).'<br /><br />';
echo"<img src="img/news.png" alt="pic"/> <a href="recommendations">Рекомендовать</a><br/>";
echo"<img src="img/forum_2.png" alt="pic"/> <a href="msg?&go=save_conts&nick=$nick">Добавить в друзья</a><br>";
$weapon = mysql_result(mysql_query("SELECT COUNT(*) FROM podarok_ok WHERE usr='$nick' "),0);
echo "<img src="img/library.png" alt="pic"/> <a href='podarok_not.php?nicks=$nick'>Подарки</a> ($weapon)<br>";
$qi = mysql_query("SELECT * FROM `podarok_ok` WHERE `usr` = '$nick' ORDER by `nick` DESC LIMIT 3");
while($msg=mysql_fetch_array($qi))
{
$froms2 = strip_tags($msg['podarok']);
$qp=mysql_query("SELECT * FROM `porarky` WHERE `id` = '$froms2' LIMIT 1");
$p = mysql_fetch_array($qp);
echo"<a href='podarok_not.php?nicks=$nick'><img src='$p[url]' /></a>";
}
if ($udata67 == "200")
{
echo"<br><br><a href="adms.php?&go=profil&nick=$nick">Редактировать игрока $nick</a><br/>";
$q = mysql_query("SELECT COUNT(*) FROM `msg_r` WHERE `user_to` = '$nick' AND `read` = '1';");
$new_mail = mysql_result($q, 0);
$w = mysql_query("SELECT COUNT(*) FROM `msg_r` WHERE `user_to` = '$nick' AND `read` = '0';");
$old_mail = mysql_result($w, 0);
echo"<a href="search?&nick=$nick&go=look">Сообщения игрока $nick</a>[$new_mail/$old_mail]</br>";
$s = mysql_query("SELECT COUNT(*) FROM `zametki` WHERE `zam3` = '$nick' ;");
$zametki = mysql_result($s, 0);
echo"<a href="adms.php?&go=seezam&nick=$nick">Заметки игрока $nick</a>[$zametki]<br/><br>";
}
if ($udata67 == "200")
{
echo"<a href="adms?go=10&usr=$nick">Забанить</a><br>";
echo"<a href="adms?go=13&usr=$nick">Забанить(общение)</a><br>";
if($udatam67 != 200){
echo"<a href="adms?go=addadmin&usr=$nick&asc=1">Сделать администратором</a><br>";
}
if($udatam67 != 100){
echo"<a href="adms?go=addmoder&usr=$nick&asc=1">Сделать модератором</a><br>";
}
if($udatam67 == 200){
echo"<a href="adms?go=deladmin&usr=$nick&asc=1">Удалить администратора</a><br>";
}
if($udatam67 == 100){
echo"<a href="adms?go=delmoder&usr=$nick&asc=1">Удалить модератора</a><br>";
}
$q = mysql_query("SELECT COUNT(*) FROM `msg_r` WHERE `user_to` = '$nick' AND `read` = '1';");
$new_mail = mysql_result($q, 0);
$w = mysql_query("SELECT COUNT(*) FROM `msg_r` WHERE `user_to` = '$nick' AND `read` = '0';");
$old_mail = mysql_result($w, 0);
}
if ($udata67 == "100")
{
echo"<br><a href="moder?go=10&usr=$nick">Забанить</a><br><br>";
echo"<br><a href="moder?go=11&usr=$nick">Забанить(общение)</a><br>";
}
break;
case 'stat':
echo"Пол: ";
if($udatam2=="M"){echo"Парень<br/>";}else{echo"Девушка<br/>";}
echo'В игре: '.sec2day($udatam60).' <br>';
echo"Дата регистрации: <b>$udatam28</b><br/>";
$req = mysql_query("SELECT * FROM `recommendations` WHERE `usr` = '$nick'");
$rs = mysql_fetch_array($req);
if($rs[kol]==""){$rs[kol]=0;}
echo"Рекомендован: $rs[kol] раз<br/><br/>";
$pr_q=mysql_query("SELECT * FROM `users` order by `udata19` desc;");
$i=1;
while($pr_ar=mysql_fetch_array($pr_q))
{
if($pr_ar[udata0]==$nick){
$udataf19=$pr_ar['udata19'];
echo "<br>Место в рейтинге <u>самых опытных</u>: <b>".$i."</b>";
}
$i=$i+1;
}
$pr_q=mysql_query("SELECT * FROM `users` order by `udata60` desc;");
$i=1;
while($pr_ar=mysql_fetch_array($pr_q))
{
if($pr_ar[udata0]==$nick){
$udataf19=$pr_ar['udata19'];
echo "<br>Место в рейтинге <u>самых активных</u> : <b>".$i."</b>";
}
$i=$i+1;
}
$pr_q=mysql_query("SELECT * FROM `users` order by `udata61` desc;");
$i=1;
while($pr_ar=mysql_fetch_array($pr_q))
{
if($pr_ar[udata0]==$nick){
$udataf19=$pr_ar['udata19'];
echo "<br>Место в рейтинге <u>PK</u> : <b>".$i."</b>";
}
$i=$i+1;
}
$pr_q=mysql_query("SELECT * FROM `users` order by `udata86` desc;");
$i=1;
while($pr_ar=mysql_fetch_array($pr_q))
{
if($pr_ar[udata0]==$nick){
$udataf19=$pr_ar['udata19'];
echo "<br>Место в рейтинге <u>PK по карме</u> : <b>".$i."</b>";
}
$i=$i+1;
}
$pr_q=mysql_query("SELECT * FROM `users` order by `udata85` desc;");
$i=1;
while($pr_ar=mysql_fetch_array($pr_q))
{
if($pr_ar[udata0]==$nick){
$udataf19=$pr_ar['udata19'];
echo "<br>Место в рейтинге <u>PvP</u> : <b>".$i."</b>";
}
$i=$i+1;
}
break;
case 'sn':
$qi = mysql_query("SELECT * from `item` WHERE `uda4`='".$udatam40."' LIMIT 1 ");
while($row=mysql_fetch_array($qi))
{
if($row['uda4']==$udatam40){
echo'<br><img src="pic/ukrashenie/'.$row['uda5'].'" alt="pic"/>';
}
}
if($udatam40!=="Пусто"){
echo "Украшения: <a href="search?&nick=$nick&go=ukrashenie">$udatam40</a>";
}else{echo"<br><img src="pic/ukrashenie.gif" alt="pic"/> Украшения: Не одето";}
$qi = mysql_query("SELECT * from `armor_item` WHERE `name`='".$udatam10."' LIMIT 1 ");
while($row=mysql_fetch_array($qi))
{
if($row['name']==$udatam10){
$name = explode("*", $row['name']);
echo'<br><img src="pic/armor/'.$name[0].'.jpeg" alt="pic"/>';
}
}
if($udatam10!=="Пусто"){
echo "Шлем: <a href="search?&nick=$nick&go=golova">$udatam10</a>";
}else{echo"<br><img src="pic/not_item/helmet.gif" alt="pic"/> Шлем: Не одето";}
$qi = mysql_query("SELECT * from `weapon_item` WHERE `name`='".$udatam12."' LIMIT 1 ");
while($row=mysql_fetch_array($qi))
{
if($row['name']==$udatam12){
$namee=explode("*",$row['name']);
if(empty($namee[1])){
if($udatam12=="Удочка"){echo"<br><img src="pic/uda.jpg" alt="pic"/>";}else{
echo'<br><img src="pic/weapon/'.$row['name'].'.jpeg" alt="pic"/>';}
}else{echo'<br><img src="pic/weapon/'.$namee[0].'.jpeg" alt="pic"/>'; }
}
}
if($udatam12!=="Пусто"){
echo"<b></b>Правая рука: <a href="search?&nick=$nick&go=weapon">$udatam12</a>";
}else{echo"<br><img src="pic/not_item/weapon.gif" alt="pic"/> Правая рука: Не одето";}
$qi = mysql_query("SELECT * from `armor_item` WHERE `name`='".$udatam45."' LIMIT 1 ");
while($row=mysql_fetch_array($qi))
{
if($row[bodypart]=="lrhand"){
if($row['name']==$udatam12){
echo'<br><img src="pic/weapon/'.$row['name'].'.jpeg" alt="pic"/>';
}}else{
if($row['name']==$udatam45){
echo'<br><img src="pic/armor/'.$row['kartinka'].'" alt="pic"/>';
}}
}
if($udatam45!=="Пусто"){
echo"<b></b>Левая рука: <a href="search?&nick=$nick&go=shield">$udatam45</a>";
}else{echo"<br><img src="pic/not_item/shield.gif" alt="pic"/> Левая рука: Не одето";}
if($udatam11=="Пусто"){echo"<br><img src="pic/not_item/armor.gif" alt="pic"/> Верх: Не одето";}
$qi = mysql_query("SELECT * from `armor_item` WHERE `name`='".$udatam11."' LIMIT 1 ");
while($row=mysql_fetch_array($qi))
{
if($row['bodypart']=="fullarmor"){
if($row['name']==$udatam11){
echo'<br><img src="pic/armor/'.$row['kartinka'].'" alt="pic"/>';}
}else
if($row['bodypart']=="chest"){
if($row['name']==$udatam11){
echo'<br><img src="pic/armor/'.$row['kartinka'].'" alt="pic"/>';
}
}
if($row['bodypart']=="chest"){
if($udatam11!=="Пусто"){
echo"<b></b>Верх: <a href="search?&nick=$nick&go=armor">$udatam11</a>";
}}else
if($row['bodypart']=="fullarmor"){
if($udatam11!=="Пусто"){
echo"<b></b>Роба: <a href="search?&nick=$nick&go=armor">$udatam11</a>";
}
}
}
if($udatam84=="Пусто"){echo"<br><img src="pic/not_item/down.gif" alt="pic"/> Низ: Не одето";}
$qi = mysql_query("SELECT * from `armor_item` WHERE `name`='".$udatam84."' LIMIT 1 ");
while($row=mysql_fetch_array($qi))
{
if($row['bodypart']=="fullarmor"){
if($row['name']==$udatam84){
echo'<br><img src="pic/armor/'.$row['kartinka'].'" alt="pic"/>'; }
}else
if($row['bodypart']=="legs"){
if($row['name']==$udatam84){
echo'<br><img src="pic/armor/'.$row['kartinka'].'" alt="pic"/>';
}
}
if($row['bodypart']=="legs"){
if($udatam84!=="Пусто"){
echo"<b></b>Низ: <a href="search?&nick=$nick&go=armor">$udatam84</a>";
}
}else
if($row['bodypart']=="fullarmor"){
if($udatam84!=="Пусто"){
echo"<b></b>Роба: <a href="search?&nick=$nick&go=armor">$udatam84</a>";
}
}
}
$qi = mysql_query("SELECT * from `armor_item` WHERE `name`='".$udatam46."' LIMIT 1 ");
while($row=mysql_fetch_array($qi))
{
if($row['name']==$udatam46){
echo'<br><img src="pic/armor/'.$row['kartinka'].'" alt="pic"/>';
}
}
if($udatam46!=="Пусто"){
echo"<b></b>Перчатки: <a href="search?&nick=$nick&go=gloves">$udatam46</a>";
}else{echo"<br><img src="pic/not_item/gloves.gif" alt="pic"/> Перчатки: Не одето";}
$qi = mysql_query("SELECT * from `armor_item` WHERE `name`='".$udatam13."' LIMIT 1 ");
while($row=mysql_fetch_array($qi))
{
if($row['name']==$udatam13){
echo'<br><img src="pic/armor/'.$row['kartinka'].'" alt="pic"/>';
}
}
if($udatam13!=="Пусто"){
echo"<b></b>Сапоги: <a href="search?&nick=$nick&go=nogi">$udatam13</a>";
}else{echo"<br><img src="pic/not_item/nogi.gif" alt="pic"/> Сапоги: Не одето";}
echo"<br>";
echo'<br><b>Бижутерия:</b>';
$qi = mysql_query("SELECT * from `armor_item` WHERE `name`='".$udatam81."' LIMIT 1 ");
while($row=mysql_fetch_array($qi))
{
if($row['name']==$udatam81){
echo'<br><img src="pic/armor/'.$row['kartinka'].'" alt="pic"/>';
}
}
if($udatam81!=="Пусто"){
echo"<b></b>Ожерелье: $udatam81";
}else{echo"<br><img src="pic/not_item/necklace.gif" alt="pic"/> Ожерелье: Не одето";}
$qi = mysql_query("SELECT * from `armor_item` WHERE `name`='".$udatam80."' LIMIT 1 ");
while($row=mysql_fetch_array($qi))
{
if($row['name']==$udatam80){
echo'<br><img src="pic/armor/'.$row['kartinka'].'" alt="pic"/>';
}
}
if($udatam80!=="Пусто"){
echo"<b></b>Левая серьга: $udatam80";
}else{echo"<br><img src="pic/not_item/l_earring.gif" alt="pic"/> Левая серьга: Не одето";}
$qi = mysql_query("SELECT * from `armor_item` WHERE `name`='".$udatam79."' LIMIT 1 ");
while($row=mysql_fetch_array($qi))
{
if($row['name']==$udatam79){
echo'<br><img src="pic/armor/'.$row['kartinka'].'" alt="pic"/>';
}
}
if($udatam79!=="Пусто"){
echo"<b></b>Правая серьга: $udatam79";
}else{echo"<br><img src="pic/not_item/r_earring.gif" alt="pic"/> Правая серьга: Не одето";}
$qi = mysql_query("SELECT * from `armor_item` WHERE `name`='".$udatam77."' LIMIT 1 ");
while($row=mysql_fetch_array($qi))
{
if($row['name']==$udatam77){
echo'<br><img src="pic/armor/'.$row['kartinka'].'" alt="pic"/>';
}
}
if($udatam77!=="Пусто"){
echo"<b></b>Левое кольцо: $udatam77";
}else{echo"<br><img src="pic/not_item/l_ring.gif" alt="pic"/> Левое кольцо: Не одето";}
$qi = mysql_query("SELECT * from `armor_item` WHERE `name`='".$udatam78."' LIMIT 1 ");
while($row=mysql_fetch_array($qi))
{
if($row['name']==$udatam78){
echo'<br><img src="pic/armor/'.$row['kartinka'].'" alt="pic"/>';
}
}
if($udatam78!=="Пусто"){
echo"<b></b>Правое кольцо: $udatam78";
}else{echo"<br><img src="pic/not_item/r_ring.gif" alt="pic"/> Правое кольцо: Не одето";}
echo '<br />';
$elita=mysql_query("SELECT * FROM `peklowin` WHERE `usr`='$nick' and `ok`='ataka' LIMIT 1");
if(mysql_num_rows($elita)==1){
$udatam4=$udatam4*1.15;}else{$udatam4=$udatam4;}
$elita=mysql_query("SELECT * FROM `peklowin` WHERE `usr`='$nick' and `ok`='lov' LIMIT 1");
if(mysql_num_rows($elita)==1){
$udatam3=$udatam3*1.15;}else{$udatam3=$udatam3;}
$elita=mysql_query("SELECT * FROM `peklowin` WHERE `usr`='$nick' and `ok`='pvp' LIMIT 1");
if(mysql_num_rows($elita)==1){
$udatam4=$udatam4*1.15;}else{$udatam4=$udatam4;}
$elita=mysql_query("SELECT * FROM `peklowin` WHERE `usr`='$nick' and `ok`='pvpc' LIMIT 1");
if(mysql_num_rows($elita)==1){
$udatam4=$udatam4*1.15;}else{$udatam4=$udatam4;}
$test = mysql_query("SELECT * FROM `weapon_item` WHERE `login`='$log' and `name`='$udata12' LIMIT 1");
$ts=mysql_fetch_array($test);
if($ts[weaponType]=="dual"){$ts[weaponType]=7;}
if($ts[weaponType]=="sword"){$ts[weaponType]=1;}
if($ts[weaponType]=="bow"){$ts[weaponType]=2;}
if($ts[weaponType]=="blunt"){$ts[weaponType]=3;}
if($ts[weaponType]=="dagger"){$ts[weaponType]=4;}
if($ts[weaponType]=="pole"){$ts[weaponType]=5;}
if($ts[weaponType]=="dualfist"){$ts[weaponType]=6;}
if($ts[weaponType]=="etc"){$ts[weaponType]=10;}
$elita=mysql_query("SELECT * FROM `bonusstats` WHERE `login`='$log' and `vid`='$ts[weaponType]' LIMIT 1 ");
$stats=mysql_fetch_array($elita);
$ts1=mysql_num_rows($elita);
if($ts1==1){
$udata4=$udata4+$stats[kol];}else{$udata4=$udata4;}
/////////////////////////////////////////////////
$test = mysql_query("SELECT * FROM `armor_item` WHERE `login`='$log' and `name`='$udata11' LIMIT 1");
$ts=mysql_fetch_array($test);
$elita=mysql_query("SELECT * FROM `bonusstats` WHERE `login`='$log' and `vid`='$ts[armor_type]' LIMIT 1 ");
$stats=mysql_fetch_array($elita);
$ts1=mysql_num_rows($elita);
if($ts1==1){
$udata3=$udata3+$stats[kol];}else{$udata3=$udata3;}
echo' <br>Физ. / Маг. атака: ';
echo number_format( $udatam4 ).' / ';
echo number_format( $udatam83 );
echo' <br>Физ. / Маг. защита: ';
echo number_format( $udatam3 ).' / ';
echo number_format( $udatam82 ).'<br/>';
break;
case 'del':
$qi = mysql_query("SELECT * FROM `table_stena` WHERE `id`='".$log."' and `aid`='".abs(intval($_GET[aid]))."' LIMIT 1");
$row=mysql_num_rows($qi);
if($row==1){
mysql_query("DELETE FROM `table_stena` WHERE `aid`='".abs(intval($_GET[aid]))."'") or die(mysql_error());
echo 'Сообщения успешно удалено<br>';}else{echo"Ошибка!";}
break;
case 'save':
$_GET[id] = htmlspecialchars(stripslashes($_GET[id]));
$req = mysql_query("SELECT * FROM `users` WHERE `udata0`='".mysql_real_escape_string($_GET[id])."' LIMIT 1");
////////////////////////////
$avto=mysql_num_rows($req);
if($avto==0){
echo'Такого игрока не сушествует. <br/>';
include('files/down.php');exit;
}
if($udata9<"10"){echo"Отзывы можно писать только с 10 уровня.";
include_once"inclydings/down.php";
exit;
}
if($msg==""){echo "Вы не ввели комментарий";
include 'inclydings/down.php';
exit;
}
mysql_query("INSERT INTO table_stena VALUES('$id','$log','','".mysql_real_escape_string($_POST[msg])."','$time')") or die(mysql_error());
echo "Отзыв добавлен</a>";
break;
case 'add':
$_GET[nick] = htmlspecialchars(stripslashes($_GET[nick]));
$req = mysql_query("SELECT * FROM `users` WHERE `udata0`='".mysql_real_escape_string($_GET[nick])."' LIMIT 1");
////////////////////////////
$avto=mysql_num_rows($req);
if($avto==0){
echo'Такого игрока не сушестивует. <br/>';
include('files/down.php');exit;
}
if($udata9<"10"){echo"Отзывы можно писать только с 10 уровня.";
include_once"inclydings/down.php";
exit;
}
echo'<form method="post" action="search.php?go=save&id='.$_GET[nick].'">';
echo "<br/>Коментарий:<br/>";
echo "<input class="button" name="msg" maxlength="300" title="Коментарий" emptyok="true"/><br/>";
echo '<input class="button" type="submit" value="Добавить"/></form>';
break;
case 'stena':
$_GET[nick] = htmlspecialchars(stripslashes($_GET[nick]));
$q = mysql_query("SELECT COUNT(`id`) FROM `table_stena` WHERE `id`='".mysql_real_escape_string($_GET[id])."'");
$kol = mysql_result($q, 0);
if($kol=="0"){
echo "Стена пустая.<br/>";
}else{
echo "$kol записей<br/>";
}
if(empty($startan)) $startan = 0;
$startan=intval($startan);
if($startan<0) $startan=0; $num_msgs_an=5;
$qi = mysql_query("SELECT * FROM `table_stena` WHERE `id`='".mysql_real_escape_string($_GET[id])."' ORDER by `aid` DESC LIMIT $startan,$num_msgs_an");
while($row=mysql_fetch_array($qi))
{
$d = time()-$row['time'];
$row['msg'] = replase_smile($row['msg']);
echo "<a href="search.php?nick=$row[nick]&go=go">$row[nick]</a>(".sec2day($d)." назад)<br>$row[msg]<br/>";
if($udata67==200 or $udata67==100 or $row[id]==$log or $row[nick]==$log){echo"<a href="search?go=del&aid=".$row['aid']."">[х]</a><br/>";};
}
$q = mysql_query("SELECT COUNT(`id`) FROM `table_stena` WHERE `id`='".mysql_real_escape_string($_GET[nick])."'");
$kol = mysql_result($q, 0);
if($startan!= 0) $page2left = ' <a href= search.php?go=stena&startan='. ($startan - 5) .'&page='.($page-1).'&id='.$nick.'&nick='.$nick.'>'. ($page - 1) .'</a> | ';
if(empty($page)){$page=1;}
if($kol > $startan + 5) $page2right = ' | <a href= search.php?go=stena&startan='. ($startan + 5) .'&page='. ($page+1) .'&id='.$nick.'&nick='.$nick.'>'. ($page + 1) .'</a>';
echo $page2left.'<b>('.$page.')</b>'.$page1right.$page2right.'<br/>';
if ($startan != 0) {echo '<a href="search.php?go=stena&startan='.($startan - 5).'&page='.($page-1).'&id='.$nick.'&nick='.$nick.'">Назад</a> ';}
if ($kol > $startan + 5) {echo ' <a href="search.php?go=stena&startan='.($startan + 5).'&page='.($page+1).'&id='.$nick.'&nick='.$nick.'">Далее</a><br/>';}
echo "<li><a href="search.php?go=add&nick=$nick">Добавить Отзыв</a>";
break;
case 'alliance':
echo"<b>Информация о Альянсе:</b><br/><br>";
$aglava=mysql_query("SELECT * FROM `alliance` WHERE `usr`='$udatam90' ");
$arrs= mysql_fetch_array($aglava);
$ggg=$arrs['name'];
$ggg1=$arrs['usr'];
echo"Название альянса: <b>$ggg</b> <br>";
echo"Глава альянса: <a href="search?&go=go&nick=$ggg1">$ggg1</a><br>";
// Переменная хранит число сообщений выводимых на станице
$num = 5;
// Извлекаем из URL текущую страницу
$page = $_GET['page'];
// Определяем общее число сообщений в базе данных
$result = mysql_query("SELECT COUNT(*) FROM clan_alliance where `ali_name`='$ggg'");
$posts = mysql_result($result, 0);
// Находим общее число страниц
$total = intval(($posts - 1) / $num) + 1;
// Определяем начало сообщений для текущей страницы
$page = intval($page);
// Если значение $page меньше единицы или отрицательно
// переходим на первую страницу
// А если слишком большое, то переходим на последнюю
if(empty($page) or $page < 0) $page = 1;
if($page > $total) $page = $total;
// Вычисляем начиная к какого номера
// следует выводить сообщения
$start = $page * $num - $num;
// Выбираем $num сообщений начиная с номера $start
$pr_q=mysql_query("SELECT * FROM clan_alliance where `ali_name`='$ggg' ");
$pt = mysql_query("SELECT * FROM clan_alliance where `ali_name`='$ggg' ");
$pts = mysql_num_rows($pt);
echo "В альянсе $pts клана(ов)<br>";
$pr_q=mysql_query("SELECT * FROM clan_alliance where `ali_name`='$ggg' Limit $start, $num");
while($pr_ar=mysql_fetch_array($pr_q))
{
echo "<br><b></b><a href="search?&nick=".$pr_ar['glava']."&go=go">".$pr_ar['glava']." </a> [<a href="search?go=clan&nick=".$pr_ar['glava']."">".$pr_ar['clan']."</a> ]";
}
// Проверяем нужны ли стрелки назад
if ($page != 1) $pervpage = '<br><a href=search?go=alliance&nick='.$nick.'&page=1>1</a> ... ';
// Проверяем нужны ли стрелки вперед
if ($page != $total) $nextpage = ' ... <a href=search?go=alliance&nick='.$nick.'&page=' .$total. '>' .$total. '</a>';
// Находим две ближайшие станицы с обоих краев, если они есть
if($page - 2 > 0) $page2left = ' <a href=search?go=alliance&nick='.$nick.'&page='. ($page - 2) .'>'. ($page - 2) .'</a> ';
if($page - 1 > 0) $page1left = '<a href=search?go=alliance&nick='.$nick.'&page='. ($page - 1) .'>'. ($page - 1) .'</a> ';
if($page + 2 <= $total) $page2right = ' <a href=search?go=alliance&nick='.$nick.'&page='. ($page + 2) .'>'. ($page + 2) .'</a>';
if($page + 1 <= $total) $page1right = ' <a href=search?go=alliance&nick='.$nick.'&page='. ($page + 1) .'>'. ($page + 1) .'</a>';
// Вывод меню
echo "<br><br>Страницы: ";
echo $pervpage.$page2left.$page1left.'<b>'.$page.'</b>'.$page1right.$page2right.$nextpage;
break;
case 'clan':
echo"<b>Информация о клане:</b><br/><br>";
$aglava=mysql_query("SELECT * FROM `clan` WHERE `clan0`='$nick' ");
$arrs= mysql_fetch_array($aglava);
$ggg=$arrs['clan1'];
echo"Названия клана: <b>$ggg</b> <br>";
echo"Глава клана: <a href="search?&go=go&nick=$nick">$nick</a><br>";
echo"<br>Уровень клана : $arrs[clan9]";
echo"<br>Репутация клана: $arrs[clan11]<br>";
echo"Капитал клана: "; echo number_format( $arrs[clan4]);
echo"<br>Клановый опыт: "; echo number_format( $arrs[clan8]);
if($arrs[clan10]==""){$arrs[clan10]="не имеет";}
echo"<br>Клан Холл: $arrs[clan10]";
echo"<br>Замки:";
$req = mysql_query("SELECT * FROM `zamok` WHERE clan='$udatam23'");
////////////////////////////
$avto=mysql_num_rows($req);
if($avto>=1){
While($c = mysql_fetch_array($req))
{
echo"</br><b>$c[name]</b><br/>";
}
}else{
echo" не имеет<br/>";
}
// Переменная хранит число сообщений выводимых на станице
$num = 5;
// Извлекаем из URL текущую страницу
$page = $_GET['page'];
// Определяем общее число сообщений в базе данных
$result = mysql_query("SELECT COUNT(*) FROM clan_people where `clan_people1`='$ggg' ORDER by `clan_people4` DESC");
$posts = mysql_result($result, 0);
// Находим общее число страниц
$total = intval(($posts - 1) / $num) + 1;
// Определяем начало сообщений для текущей страницы
$page = intval($page);
// Если значение $page меньше единицы или отрицательно
// переходим на первую страницу
// А если слишком большое, то переходим на последнюю
if(empty($page) or $page < 0) $page = 1;
if($page > $total) $page = $total;
// Вычисляем начиная к какого номера
// следует выводить сообщения
$start = $page * $num - $num;
// Выбираем $num сообщений начиная с номера $start
$pr_q=mysql_query("SELECT * FROM clan_people where `clan_people1`='$ggg' ;");
$pt = mysql_query("SELECT * FROM `clan_people` where `clan_people1`='$ggg' ;");
$pts = mysql_num_rows($pt);
echo"<br>В клане: $pts человек(а)";
echo '<br><br>';
$pr_q=mysql_query("SELECT * FROM clan_people where `clan_people1`='$ggg' ORDER by `clan_people4` DESC Limit $start, $num");
while($pr_ar=mysql_fetch_array($pr_q))
{
$pr_qs = mysql_query("SELECT * from `users` where `udata0`='$pr_ar[clan_people0]' ");
while($arr = mysql_fetch_array($pr_qs)){
$pr_ar['clan_people4']=number_format($pr_ar['clan_people4']);
echo "<br><b></b><a href="search?&nick=".$pr_ar['clan_people0']."&go=go">".$pr_ar['clan_people0']." </a> - ".$pr_ar['clan_people2']." (Опыт: ".$pr_ar['clan_people4'].") ";
$fff=time()-5000;
if($arr[udata56]>$fff){
echo'<font color=green>[Онлайн]</font>';
}else{
echo'<font color=#EE0000>[Оффлайн]</font>';}
}
}
// Проверяем нужны ли стрелки назад
if ($page != 1) $pervpage = '<br><a href=search?go=clan&nick='.$nick.'&page=1>1</a> ... ';
// Проверяем нужны ли стрелки вперед
if ($page != $total) $nextpage = ' ... <a href=search?go=clan&nick='.$nick.'&page=' .$total. '>' .$total. '</a>';
// Находим две ближайшие станицы с обоих краев, если они есть
if($page - 2 > 0) $page2left = ' <a href=search?go=clan&nick='.$nick.'&page='. ($page - 2) .'>'. ($page - 2) .'</a> ';
if($page - 1 > 0) $page1left = '<a href=search?go=clan&nick='.$nick.'&page='. ($page - 1) .'>'. ($page - 1) .'</a> ';
if($page + 2 <= $total) $page2right = ' <a href=search?go=clan&nick='.$nick.'&page='. ($page + 2) .'>'. ($page + 2) .'</a>';
if($page + 1 <= $total) $page1right = ' <a href=search?go=clan&nick='.$nick.'&page='. ($page + 1) .'>'. ($page + 1) .'</a>';
// Вывод меню
echo "<br><br>Страницы: ";
echo $pervpage.$page2left.$page1left.'<b>'.$page.'</b>'.$page1right.$page2right.$nextpage;
break;
break;
case 'progress':
$pk=mysql_query("SELECT * FROM `achieve` WHERE `log`='$nick' and `achievement` = 'trevel' ");
$p=mysql_fetch_array($pk);
$plvl=$p['lvl'];
if($plvl==""){$plvl=0;}
if($plvl=="0"){$b=1;}
if($plvl=="1"){$b=7;}
if($plvl=="2"){$b=21;}
if($plvl=="3"){$b=21;}
if($plvl=="4"){$b=42;}
if($plvl=="5"){$b=42;}
echo'<i><u>Путишественник</u></i> (Время в игре <u>'.sec3day($udatam60).'</u> дней из <u>'.$b.'</u> дней, <u>'.$plvl.'</u> уровень)<br>';
$battles=mysql_query("SELECT * FROM `achieve` WHERE `log`='$nick' and `achievement` = 'battles' ");
$b= mysql_fetch_array($battles);
$blvl=$b['lvl'];
if($blvl==""){$blvl=0;}
if($blvl=="0"){$b=500;}
if($blvl=="1"){$b=5000;}
if($blvl=="2"){$b=15000;}
if($blvl=="3"){$b=30000;}
if($blvl=="4"){$b=60000;}
if($blvl=="5"){$b=60000;}
echo"<i><u>Варвар</u></i> (Убито монстров <u>$udatam6</u> из <u>$b</u>, <u>$blvl</u> уровень)<br>";
$pvp=mysql_query("SELECT * FROM `achieve` WHERE `log`='$nick' and `achievement` = 'pvp' ");
$v= mysql_fetch_array($pvp);
$vlvl=$v['lvl'];
if($vlvl==""){$vlvl=0;}
if($vlvl=="0"){$b=100;}
if($vlvl=="1"){$b=1000;}
if($vlvl=="2"){$b=2500;}
if($vlvl=="3"){$b=5000;}
if($vlvl=="4"){$b=10000;}
if($vlvl=="5"){$b=10000;}
echo"<i><u>Воин</u></i> (PvP боев <u>$udatam85</u> из <u>$b</u>, <u>$vlvl</u> уровень)<br>";
$pk=mysql_query("SELECT * FROM `achieve` WHERE `log`='$nick' and `achievement` = 'pk' ");
$p= mysql_fetch_array($pk);
$plvl=$p['lvl'];
if($plvl==""){$plvl=0;}
if($plvl=="0"){$b=100;}
if($plvl=="1"){$b=1000;}
if($plvl=="2"){$b=2500;}
if($plvl=="3"){$b=5000;}
if($plvl=="4"){$b=10000;}
if($plvl=="5"){$b=10000;}
echo"<i><u>Секирщик</u></i> (PK боев <u>$udatam61</u> из <u>$b</u>, <u>$plvl</u> уровень)<br>";
$money=mysql_fetch_row(mysql_query('SELECT SUM(`lvl`) FROM `achieve` WHERE `log`="'.$nick.'" '));
$aaa=(int)$money[0];
echo"<br>Всего $aaa достижений";
break;
case 'weapon':
$aglava=mysql_query("SELECT * FROM `users` WHERE `udata0`='$nick' ");
while($row=mysql_fetch_array($aglava))
{
$aglavas=mysql_query("SELECT * FROM `weapon_item` WHERE `login`='$nick' and `name`='$row[udata12]' LIMIT 1");
while($row=mysql_fetch_array($aglavas))
{
$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/>";
$namee=explode("*",$udata12);
if(empty($namee[1])){
echo'<img src="pic/weapon/'.$row['name'].'.jpeg" alt="pic"/></br>';}else{echo'<img src="pic/weapon/'.$namee[0].'.jpeg" alt="pic"/></br>'; }
echo"Маг. Атака: $m_dam Физ. Атака: $p_dam<br/>
$bodypart</br>
Grade: $crystal_type<br/>
Цена: $price аден<br/>
";
}
}
break;
case 'golova':
$aglava=mysql_query("SELECT * FROM `users` WHERE `udata0`='$nick' ");
while($row=mysql_fetch_array($aglava))
{
$aglavas=mysql_query("SELECT * FROM `armor_item` WHERE `login`='$nick' and `name`='$row[udata10]' LIMIT 1");
while($row=mysql_fetch_array($aglavas))
{
$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>
";
}
}
break;
case 'armor':
$aglava=mysql_query("SELECT * FROM `users` WHERE `udata0`='$nick' ");
while($row=mysql_fetch_array($aglava))
{
$aglavas=mysql_query("SELECT * FROM `armor_item` WHERE `login`='$nick' and `name`='$row[udata11]' LIMIT 1");
while($row=mysql_fetch_array($aglavas))
{
$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>
";
}
}
break;
case 'shield':
$aglava=mysql_query("SELECT * FROM `users` WHERE `udata0`='$nick' ");
while($row=mysql_fetch_array($aglava))
{
$aglavas=mysql_query("SELECT * FROM `armor_item` WHERE `login`='$nick' and `name`='$row[udata45]' LIMIT 1");
while($row=mysql_fetch_array($aglavas))
{
$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>
";
}
}
break;
case 'gloves':
$aglava=mysql_query("SELECT * FROM `users` WHERE `udata0`='$nick' ");
while($row=mysql_fetch_array($aglava))
{
$aglavas=mysql_query("SELECT * FROM `armor_item` WHERE `login`='$nick' and `name`='$row[udata46]' LIMIT 1");
while($row=mysql_fetch_array($aglavas))
{
$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>
";
}
}
break;
case 'nogi':
$aglava=mysql_query("SELECT * FROM `users` WHERE `udata0`='$nick' ");
while($row=mysql_fetch_array($aglava))
{
$aglavas=mysql_query("SELECT * FROM `armor_item` WHERE `login`='$nick' and `name`='$row[udata13]' LIMIT 1");
while($row=mysql_fetch_array($aglavas))
{
$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>
";
}
}
break;
case 'look':
if($nick == 'ByUNNAMED'){
echo 'Запрещено читать сообщения главного администратора!';
include_once 'files/down.php';
exit;
}
$result = mysql_result(mysql_query("SELECT COUNT(*) FROM `msg_r` WHERE user_to = '$nick'"),0);
if ($result == 0)
{
echo "Сообщений нет!<br/>";
echo "<a href="msg?&go=write_message">Написать сообщение</a><br/>";
echo "<a href="msg?">Назад</a>";
}
else {
$times = date("H:i");
if ($_GET[page] == "" || $_GET[page] < 0 || $_GET[page] == "0")
{
$_GET[page] = 0;
}
$next = $_GET[page] + 1;
$back = $_GET[page] - 1;
$num = $_GET[page] * 5000;
if($_GET[page] == "0")
{$i = 0;}
else{$i = ($_GET[page]*5000)+1;}
$puslap = floor($viso/5000);
$message = mysql_query("SELECT * FROM msg_r WHERE user_to = '$nick' ORDER BY id DESC LIMIT $num,5000");
while($msg = mysql_fetch_array($message))
{
if ($msg[read] == 1)
{
$read = "не прочитано";
} else
{
$read = "прочитано";
}
$text = $msg[mail_msg];
$text = strip_tags($text);
$text=bb_code($text);
$from = strip_tags($msg['user_from']);
echo "<b>От кого:</b> <a href="search?&nick=$from&go=go">$from </a> [$read]<br/><b>Дата Добавления</b>: <small>$msg[time]</small><br/><b>Сообщение</b>: $text
<br/><hr>
";
}
}
break;
case 'ankets':
$usdata = mysql_fetch_array($req);
$req = mysql_query("SELECT * FROM `anketa` WHERE `usr` = '$nick'");
////////////////////////////
$avto=mysql_num_rows($req);
if($avto>=1){
While($mag = mysql_fetch_array($req))
{
echo"<hr/><b>Имя:</b> $mag[Imya]<hr/>";
echo"<b>Фимилия:</b> $mag[familia]<hr/>";
echo"<b>Год рождения:</b> $mag[god]<hr/>";
echo"<b>Страна:</b> $mag[strana]<hr/>";
echo"<b>Город:</b> $mag[gorod]<hr/>";
echo"<b>Любимая музыка:</b> $mag[muz]<hr/>";
echo"<b>Интересы:</b> $mag[interes]<hr/>";
echo"<b>О себе:</b> $mag[info]";
echo "<br><br> <a href="search.php?$sd&go=go&nick=$nick"> Вернуться к $nick </a><br>";
}}
else{
$req = mysql_query("SELECT `rasa`,`acces_level` FROM `users` WHERE `nick` = '$nick'");
echo' У персонажа:'; echo" <a href="search.php?nick=$nick&go=go">$nick</a> (Нет анкеты)";
}
}
}
include_once"files/down.php";
?>