Файл: dev/cups.php
Строк: 138
<?
ini_set('display_errors', 'off');
include_once '../sys/core/start.php';
include_once '../sys/core/compress.php';
include_once '../sys/core/sess.php';
include_once '../sys/core/home.php';
include_once '../sys/core/settings.php';
include_once '../sys/core/db_connect.php';
include_once '../sys/core/ipua.php';
include_once '../sys/core/fnc.php';
include_once '../sys/core/user.php';
include_once '../sys/inc/fnc_game.php';
include_once '../sys/inc/thead.php';
include_once '../sys/inc/uhead.php';
only_reg();
if(isset($_GET['id'])){
$id = intval($_GET['id']);
} else {
$id = $user['id'];
}
if(isset($_GET['type'])){
$type = htmlspecialchars(mysql_real_escape_string($_GET['type']));
} else {
$type = 'gold';
}
if($type=='gold'){
$type_ru = "<table class='wdt brown-header'><tr><td align='left'>Золотые:</td></tr></table>";
} elseif ($type=='silver') {
$type_ru = "<table class='wdt brown-header'><tr><td align='left'>Серебряные:</td></tr></table>";
} elseif ($type=='bronze') {
$type_ru = "<table class='wdt brown-header'><tr><td align='left'>Бронзовые:</td></tr></table>";
}
echo "<table class='wdt msg-table'>";
echo "<tr><td align='left' style='vertical-align: top; width: 10%'><img src='/style/img/images/face-ajl.png'></td>";
echo "<td align='left' style='vertical-align: top'>";
echo "Рада снова видеть тебя дома. Что-то ты последнее время занят сильно.</td></tr></table></td></tr></table>";
echo "<table class='wdt brown-header'><tr><td align='left'>Моя статистика:</td></tr></table>";
echo "<table class='wdt gray-table white'>";
echo "<tr><td align='left' style='vertical-align: top;'>";
echo "<table class='wdt'>";
echo "<tr><td style='padding: 0px; padding-bottom: 3px;'>Игрок: $user[nick]</td></tr>";
echo "<tr><td style='padding: 0px; padding-bottom: 3px;'>Игровой ID: <b>$user[id]</b></td></tr>";
echo "<tr><td style='padding: 0px; padding-bottom: 3px;'>Уровень: <b>$user[level]</b></td></tr>";
echo "<tr><td style='padding: 0px; padding-bottom: 3px;'>Опыт: <b class = 'yellow'>".m_format($user['exp'])." / ".m_format($exp_next_level)."</b></td></tr>";
echo "<tr><td style='padding: 0px; padding-bottom: 3px;'>Рейтинг: <img src='/style/img/icons/rating.png' alt='mail'><b class = 'yellow'>".m_format($user['rating'])."</b></td></tr>";
echo "<tr><td style='padding: 0px; padding-bottom: 3px;'>Фишки: <img src='/style/img/icons/fishka.png' alt='mail'><b class = 'white'>".m_format($user['fishka'])."</b></td></tr>";
echo "</td></tr></table></td>";
echo "<td align='right' style='vertical-align: top; width: 10%'><img alt='logo' src='/style/img/avatars/$user[avatar].png' alt='avatar'></td></tr></table>";
echo "<table class='wdt brown-header'><tr><td align='left'>Настройки:</td></tr></table>";
echo "<table class='wdt gray-table'><tr>";
echo "<td width='50%'><form action='/dev/home.php' method='post'><input class='yes-btn' type='submit' value='Статистика'></form></td><td>";
echo "<form action='/dev/home.php?change_avatar' method='post'><input class='yes-btn' type='submit' value='Аватар'></form></td><tr><td>";
echo "<form action='/dev/home.php?change_pass' method='post'><input class='yes-btn' type='submit' value='Смена пароля'></form></td><td>";
echo "<form action='/dev/home.php?change_nick' method='post'><input class='yes-btn' type='submit' value='Смена ника'></form></td></tr>";
echo "<tr><td width='50%'><form action='/dev/achievements.php' method='post'><input class='yes-btn' type='submit' value='Достижения'></form></td><td>";
echo "<input class='inactive-btn' type='submit' value='Кубки'></td><tr><td>";
echo "<form action='/dev/messages.php' method='post'><input class='yes-btn' type='submit' value='Почта'></form></td></td></tr></table>";
echo "<table class='wdt brown-header'><tr><td align='left'>Кубки:</td></tr></table>";
echo "<table class='wdt gray-table'><tr>";
echo '<td width="50%"><form action="?id='.$id.'&type=gold" method="post"><input class="yes-btn" type="submit" value="Золотые"></form></td><td>';
echo '<td width="50%"><form action="?id='.$id.'&type=silver" method="post"><input class="yes-btn" type="submit" value="Серебряные"></form></td><td>';
echo '<td width="50%"><form action="?id='.$id.'&type=bronze" method="post"><input class="yes-btn" type="submit" value="Бронзовые"></form></td></td></tr></table>';
echo $type_ru.' ';
$gold = mysql_query("SELECT * FROM `user_cups` WHERE `type`='".$type."' and `id_user` = '".$id."'");
if(mysql_num_rows($gold)==0){
echo '<div class="white">У данного игрока нет кубков</div>';
} else {
while($cup = mysql_fetch_array($gold)){
$t = mysql_query("SELECT * FROM `turnir` WHERE `id`='".$cup['turnir']."'");
$t = mysql_fetch_array($t);
echo '<table class="wdt gray-table" style="font-size: 10pt"><tbody><tr><td class="white td-cell" align="center" style="width:60px; padding-right:2px;">
<img src="/style/img/cups/'.$cup['image'].'"></td>
<td class="td-cell white" align="left" style="vertical-align:top;">
<b class="orange">'.$t['name'].'</b><br><br>
<b class="white"></b><br></td>
<td class="td-cell" align="right" style="padding-right: 10px">
<form action="tournament.php?id='.$t['id'].'" method="post"><input class="yes-btn" type="submit" value="Просмотреть"></form>
</td></tr></tbody></table>';
}
}
include_once '../sys/inc/tfoot.php';