Файл: dost.php
Строк: 207
<?
define('PROTECTOR', 1);
include('files/db.php');
include($path.'files/auth.php');
if ($user_id==0){
header('location: index.php');exit;
}
$textl='Достижения';
include($path.'files/core.php');
include($path.'files/head.php');
include($path.'files/zag.php');
echo '<table width=100%>
<tr>
<td width=35%>
<a href=game.php><div style="background: #882222; border-radius: 7px 0 0 7px" class="m p bts bbs brs bls" align=center>Главная</div></a>
</td><td>';
echo '<a href=?><div class="line bts brs bls bbs p m" style="border-radius: 0 7px 7px 0">
<font color=#ffffff>Достижения
</font>
</div></a></td></tr></table>';
echo '<div class="bat bts brs bls bbs p">';
echo '<center><img src=img/dost/dost.png width=60%><br>
<font color=#ffff00><i>Тут вы можете ознакомиться с вашими успехами в игре</i></font>
</center>';
$dost=mysql_fetch_array(mysql_query("SELECT * FROM `users_dost` WHERE `usr`='".$udata['id']."'"));
echo '<img src=img/main/e28.png> Бонус достижений: <img src=img/main/p1.png>'.$dost['sila'].' <img src=img/main/p2.png>'.$dost['arm'].' <img src=img/main/p3.png>'.$dost['hp'].'';
echo '<center><a href=?>Боевые</a> | <a href=?rs>Расходные</a></center>';
if(isset($_GET['rs']))
{
/////АЛХИМИК
$d_alh=$dost['alh']+1;
$dal_ex=mysql_fetch_array(mysql_query("SELECT * FROM `users_dost_exp` WHERE `lvl`='".$d_alh."'"));
$dal_ex2=mysql_fetch_array(mysql_query("SELECT * FROM `users_dost_exp` WHERE `lvl`='".$dost['alh']."'"));
$dal_exp=$dal_ex['exp']-$dal_ex2['exp'];
$dal_exp=$dal_exp/100;
$dal_exp=round(($dost['alh_exp']-$dal_ex2['exp'])/$dal_exp);
if($dal_exp>100){$dal_exp=100;}
echo '<div class="head m p">
<table width=100%>
<tr>
<td width=70px><img src=img/dost/alh/'.$dost['alh'].'.png></td>
<td>
<img src=img/main/e28.png> Алхимик<br>
<img src=img/main/e28.png> Уровень: <font color=#00ff99>'.$dost['alh'].'</font><br>
<img src=img/main/e28.png> <font color=#ff9900>Эликсиров приготовлено:</font>
<div style="width:100%; height: 14px" class="v8 bts bbs brs bls">
<div style="background: #ff9900; width: '.$dal_exp.'%; height: 14px">
</div>
</div>
<table width=100%><tr><td align=left>'.$dost['alh_exp'].'</td><td align=right>'.$dal_ex['exp'].'</td></tr></table>
</td>
</tr>
</table>
</div>';
/////////
/////ЖИВЧИК
$d_elic=$dost['elic']+1;
$de_ex=mysql_fetch_array(mysql_query("SELECT * FROM `users_dost_exp` WHERE `lvl`='".$d_elic."'"));
$de_ex2=mysql_fetch_array(mysql_query("SELECT * FROM `users_dost_exp` WHERE `lvl`='".$dost['elic']."'"));
$de_exp=$de_ex['exp']-$de_ex2['exp'];
$de_exp=$de_exp/100;
$de_exp=round(($dost['elic_exp']-$de_ex2['exp'])/$de_exp);
if($de_exp>100){$de_exp=100;}
echo '<div class="head m p">
<table width=100%>
<tr>
<td width=70px><img src=img/dost/elic/'.$dost['elic'].'.png></td>
<td>
<img src=img/main/e28.png> Живчик<br>
<img src=img/main/e28.png> Уровень: <font color=#00ff99>'.$dost['elic'].'</font><br>
<img src=img/main/e28.png> <font color=#ff9900>Эликсиров выпито:</font>
<div style="width:100%; height: 14px" class="v8 bts bbs brs bls">
<div style="background: #ff9900; width: '.$de_exp.'%; height: 14px">
</div>
</div>
<table width=100%><tr><td align=left>'.$dost['elic_exp'].'</td><td align=right>'.$de_ex['exp'].'</td></tr></table>
</td>
</tr>
</table>
</div>';
/////////
/////КУЗНЕЦ
$d_kyzn=$dost['kyzn']+1;
$dk_ex=mysql_fetch_array(mysql_query("SELECT * FROM `users_dost_exp` WHERE `lvl`='".$d_kyzn."'"));
$dk_ex2=mysql_fetch_array(mysql_query("SELECT * FROM `users_dost_exp` WHERE `lvl`='".$dost['kyzn']."'"));
$dk_ex['exp']=floor($dk_ex['exp']/3);
$dk_ex2['exp']=floor($dk_ex2['exp']/3);
$dk_exp=$dk_ex['exp']-$dk_ex2['exp'];
$dk_exp=$dk_exp/100;
$dk_exp=round(($dost['kyzn_exp']-$dk_ex2['exp'])/$dk_exp);
if($dk_exp>100){$dk_exp=100;}
echo '<div class="head m p">
<table width=100%>
<tr>
<td width=70px><img src=img/dost/kyzn/'.$dost['kyzn'].'.png></td>
<td>
<img src=img/main/e28.png> Кузнец<br>
<img src=img/main/e28.png> Уровень: <font color=#00ff99>'.$dost['kyzn'].'</font><br>
<img src=img/main/e28.png> <font color=#ff9900>Наложено чар:</font>
<div style="width:100%; height: 14px" class="v8 bts bbs brs bls">
<div style="background: #ff9900; width: '.$dk_exp.'%; height: 14px">
</div>
</div>
<table width=100%><tr><td align=left>'.$dost['kyzn_exp'].'</td><td align=right>'.$dk_ex['exp'].'</td></tr></table>
</td>
</tr>
</table>
</div>';
/////////
}
else
{
/////ОХОТНИК
$d_hunt=$dost['hunter']+1;
$dh_ex=mysql_fetch_array(mysql_query("SELECT * FROM `users_dost_exp` WHERE `lvl`='".$d_hunt."'"));
$dh_ex2=mysql_fetch_array(mysql_query("SELECT * FROM `users_dost_exp` WHERE `lvl`='".$dost['hunter']."'"));
$dh_exp=$dh_ex['exp']-$dh_ex2['exp'];
$dh_exp=$dh_exp/100;
$dh_exp=round(($dost['hunter_exp']-$dh_ex2['exp'])/$dh_exp);
if($dh_exp>100){$dh_exp=100;}
echo '<div class="head m p">
<table width=100%>
<tr>
<td width=70px><img src=img/dost/hunter/'.$dost['hunter'].'.png></td>
<td>
<img src=img/main/e28.png> Охотник<br>
<img src=img/main/e28.png> Уровень: <font color=#00ff99>'.$dost['hunter'].'</font><br>
<img src=img/main/e28.png> <font color=#ff9900>Монстров убито(окресности в зачет не идут):</font>
<div style="width:100%; height: 14px" class="v8 bts bbs brs bls">
<div style="background: #ff9900; width: '.$dh_exp.'%; height: 14px">
</div>
</div>
<table width=100%><tr><td align=left>'.$dost['hunter_exp'].'</td><td align=right>'.$dh_ex['exp'].'</td></tr></table>
</td>
</tr>
</table>
</div>';
/////////
/////УБИЙЦА
$d_kill=$dost['killer']+1;
$dk_ex=mysql_fetch_array(mysql_query("SELECT * FROM `users_dost_exp` WHERE `lvl`='".$d_kill."'"));
$dk_ex2=mysql_fetch_array(mysql_query("SELECT * FROM `users_dost_exp` WHERE `lvl`='".$dost['killer']."'"));
$dk_exp=$dk_ex['exp']-$dk_ex2['exp'];
$dk_exp=$dk_exp/100;
$dk_exp=round(($dost['killer_exp']-$dk_ex2['exp'])/$dk_exp);
if($dk_exp>100){$dk_exp=100;}
echo '<div class="head m p">
<table width=100%>
<tr>
<td width=70px><img src=img/dost/killer/'.$dost['killer'].'.png></td>
<td>
<img src=img/main/e28.png> Убийца<br>
<img src=img/main/e28.png> Уровень: <font color=#00ff99>'.$dost['killer'].'</font><br>
<img src=img/main/e28.png> <font color=#ff9900>Игроков убито:</font>
<div style="width:100%; height: 14px" class="v8 bts bbs brs bls">
<div style="background: #ff9900; width: '.$dk_exp.'%; height: 14px">
</div>
</div>
<table width=100%><tr><td align=left>'.$dost['killer_exp'].'</td><td align=right>'.$dk_ex['exp'].'</td></tr></table>
</td>
</tr>
</table>
</div>';
/////////
/////СТРАЖ
$d_str=$dost['str']+1;
$ds_ex=mysql_fetch_array(mysql_query("SELECT * FROM `users_dost_exp` WHERE `lvl`='".$d_str."'"));
$ds_ex2=mysql_fetch_array(mysql_query("SELECT * FROM `users_dost_exp` WHERE `lvl`='".$dost['str']."'"));
$ds_ex['exp']=$ds_ex['exp']*3;
$ds_ex2['exp']=$ds_ex2['exp']*3;
$ds_exp=$ds_ex['exp']-$ds_ex2['exp'];
$ds_exp=$ds_exp/100;
$ds_exp=round(($dost['str_exp']-$ds_ex2['exp'])/$ds_exp);
if($ds_exp>100){$ds_exp=100;}
echo '<div class="head m p">
<table width=100%>
<tr>
<td width=70px><img src=img/dost/str/'.$dost['str'].'.png></td>
<td>
<img src=img/main/e28.png> Страж<br>
<img src=img/main/e28.png> Уровень: <font color=#00ff99>'.$dost['str'].'</font><br>
<img src=img/main/e28.png> <font color=#ff9900>Штурмов выйграно:</font>
<div style="width:100%; height: 14px" class="v8 bts bbs brs bls">
<div style="background: #ff9900; width: '.$ds_exp.'%; height: 14px">
</div>
</div>
<table width=100%><tr><td align=left>'.$dost['str_exp'].'</td><td align=right>'.$ds_ex['exp'].'</td></tr></table>
</td>
</tr>
</table>
</div>';
/////////
/////ПЕРВОПРОХОДЧИК
$d_oh=$dost['ohot']+1;
$do_ex=mysql_fetch_array(mysql_query("SELECT * FROM `users_dost_exp` WHERE `lvl`='".$d_oh."'"));
$do_ex2=mysql_fetch_array(mysql_query("SELECT * FROM `users_dost_exp` WHERE `lvl`='".$dost['ohot']."'"));
$do_exp=$do_ex['exp']-$do_ex2['exp'];
$do_exp=$do_exp/100;
$do_exp=round(($dost['ohot_exp']-$do_ex2['exp'])/$do_exp);
if($do_exp>100){$do_exp=100;}
echo '<div class="head m p">
<table width=100%>
<tr>
<td width=70px><img src=img/dost/ohot/'.$dost['ohot'].'.png></td>
<td>
<img src=img/main/e28.png> Первопроходчик<br>
<img src=img/main/e28.png> Уровень: <font color=#00ff99>'.$dost['ohot'].'</font><br>
<img src=img/main/e28.png> <font color=#ff9900>Охот пройдено:</font>
<div style="width:100%; height: 14px" class="v8 bts bbs brs bls">
<div style="background: #ff9900; width: '.$do_exp.'%; height: 14px">
</div>
</div>
<table width=100%><tr><td align=left>'.$dost['ohot_exp'].'</td><td align=right>'.$do_ex['exp'].'</td></tr></table>
</td>
</tr>
</table>
</div>';
/////////
/////КЛАДОИСКАТЕЛЬ
$d_pdz=$dost['pdz']+1;
$dp_ex=mysql_fetch_array(mysql_query("SELECT * FROM `users_dost_exp` WHERE `lvl`='".$d_pdz."'"));
$dp_ex2=mysql_fetch_array(mysql_query("SELECT * FROM `users_dost_exp` WHERE `lvl`='".$dost['pdz']."'"));
$dp_exp=$dp_ex['exp']-$dp_ex2['exp'];
$dp_exp=$dp_exp/100;
$dp_exp=round(($dost['pdz_exp']-$dp_ex2['exp'])/$dp_exp);
if($dp_exp>100){$dp_exp=100;}
echo '<div class="head m p">
<table width=100%>
<tr>
<td width=70px><img src=img/dost/pdz/'.$dost['pdz'].'.png></td>
<td>
<img src=img/main/e28.png> Кладоискатель<br>
<img src=img/main/e28.png> Уровень: <font color=#00ff99>'.$dost['pdz'].'</font><br>
<img src=img/main/e28.png> <font color=#ff9900>Подземелий пройдено:</font>
<div style="width:100%; height: 14px" class="v8 bts bbs brs bls">
<div style="background: #ff9900; width: '.$dp_exp.'%; height: 14px">
</div>
</div>
<table width=100%><tr><td align=left>'.$dost['pdz_exp'].'</td><td align=right>'.$dp_ex['exp'].'</td></tr></table>
</td>
</tr>
</table>
</div>';
/////////
/////ГЛАДИАТОР
$d_bz=$dost['bz']+1;
$db_ex=mysql_fetch_array(mysql_query("SELECT * FROM `users_dost_exp` WHERE `lvl`='".$d_bz."'"));
$db_ex2=mysql_fetch_array(mysql_query("SELECT * FROM `users_dost_exp` WHERE `lvl`='".$dost['bz']."'"));
$db_exp=$db_ex['exp']-$db_ex2['exp'];
$db_exp=$db_exp/100;
$db_exp=round(($dost['bz_exp']-$db_ex2['exp'])/$db_exp);
if($db_exp>100){$db_exp=100;}
echo '<div class="head m p">
<table width=100%>
<tr>
<td width=70px><img src=img/dost/bz/'.$dost['bz'].'.png></td>
<td>
<img src=img/main/e28.png> Гладиатор<br>
<img src=img/main/e28.png> Уровень: <font color=#00ff99>'.$dost['bz'].'</font><br>
<img src=img/main/e28.png> <font color=#ff9900>Боевых Зон выйграно:</font>
<div style="width:100%; height: 14px" class="v8 bts bbs brs bls">
<div style="background: #ff9900; width: '.$db_exp.'%; height: 14px">
</div>
</div>
<table width=100%><tr><td align=left>'.$dost['bz_exp'].'</td><td align=right>'.$db_ex['exp'].'</td></tr></table>
</td>
</tr>
</table>
</div>';
/////////
/////ЗАЩИТНИК
$d_av=$dost['avan']+1;
$da_ex=mysql_fetch_array(mysql_query("SELECT * FROM `users_dost_exp` WHERE `lvl`='".$d_av."'"));
$da_ex2=mysql_fetch_array(mysql_query("SELECT * FROM `users_dost_exp` WHERE `lvl`='".$dost['avan']."'"));
$da_exp=$da_ex['exp']-$da_ex2['exp'];
$da_exp=$da_exp/100;
$da_exp=round(($dost['avan_exp']-$da_ex2['exp'])/$da_exp);
if($da_exp>100){$da_exp=100;}
echo '<div class="head m p">
<table width=100%>
<tr>
<td width=70px><img src=img/dost/avan/'.$dost['avan'].'.png></td>
<td>
<img src=img/main/e28.png> Защитник<br>
<img src=img/main/e28.png> Уровень: <font color=#00ff99>'.$dost['avan'].'</font><br>
<img src=img/main/e28.png> <font color=#ff9900>Аванпостов выйграно:</font>
<div style="width:100%; height: 14px" class="v8 bts bbs brs bls">
<div style="background: #ff9900; width: '.$da_exp.'%; height: 14px">
</div>
</div>
<table width=100%><tr><td align=left>'.$dost['avan_exp'].'</td><td align=right>'.$da_ex['exp'].'</td></tr></table>
</td>
</tr>
</table>
</div>';
/////////
}
echo '</div></div>';
include('files/down.php');
?>