Файл: vsime.com/duels/inc/act_index.php
Строк: 119
<?
$links_hist['name'] = "$config[site_name] / Дуэли";
$links_hist['link'] = "/duels/";
ex_head();
if (isset($_POST['submited']) && isset($user))
{
if (hsc(@$_POST['mdp'])==$mdp)
{
$ank = profile(my_esc($_POST['nick_duel']));
if (!@$ank['id'])show_errors("Пользователь <b>".my_esc($_POST['nick_duel'])."</b> не найден");
else
{
header("Location: ?act=call&id=$ank[id]");
exit();
}
} else hacked_by_Killer();
}
$count_results = mysqli_result("SELECT COUNT(*) FROM `duels` WHERE `winer` = '0' AND `ok` = '1'");
$count_pages = count_pages($count_results);
$page = page();
$start = start_pages();
if (!$count_results)
{
echo "<div class='list_empty'>n";
echo "Нет дуэлейn";
echo "</div>n";
}
$query = mysqli_query($dbi, "SELECT * FROM `duels` WHERE `winer` = '0' AND `ok` = '1' ORDER BY `time_start` DESC LIMIT $start, $config[rop]");
while ($post = mysqli_fetch_array($query))
{
$post_user = profile($post['id_user']);
$post_ank = profile($post['id_ank']);
$post['info'] = duel_info($post['id']);
echo "<div class='list'>n";
echo "<table>n";
echo "<td style='width: 45%;'>n";
echo "<span class='left'><a href='?act=info&id=$post[id]'><img src='/i/site/information.png' /></a></span>n";
show_avatar($post_user['id'], 'big');
echo "<br />n";
echo profile_icon($post_user['id']).profile_nick($post_user['id'], 1),profile_medal($post_user['id']);
echo "<br />n";
echo "<img src='/i/site/star.png' /> Голосов: М - ".($post['info']['pollen_user_m']).", Ж - ".($post['info']['pollen_user_w'])."n";
if (!$post['info']['pollen'])
{
echo "<br />n";
echo "<img src='/i/site/okey.png' /> <a href='?act=poll&id=$post[id]&man=1'>Голосовать</a>";
}
echo "</td>n";
echo "<td style='width: 10%;'>n";
echo "<h1 style='font-size: 50px; color: #329ede;'>VS<h1>n";
echo "</td>n";
echo "<td style='width: 45%;'>n";
show_avatar($post_ank['id'], 'big');
echo "<br />n";
echo profile_icon($post_ank['id']).profile_nick($post_ank['id'], 1),profile_medal($post_ank['id']);
echo "<br />n";
echo "<img src='/i/site/star.png' /> Голосов: М - ".($post['info']['pollen_ank_m']).", Ж - ".($post['info']['pollen_ank_w'])."n";
if (!$post['info']['pollen'])
{
echo "<br />n";
echo "<img src='/i/site/okey.png' /> <a href='?act=poll&id=$post[id]&man=2'>Голосовать</a>";
}
echo "</td>n";
echo "</table>n";
echo "</div>n";
}
pages_show("?");
if (isset($user))
{
echo "<div class='list'>n";
echo "<form method='POST' action='' class='multi'>n";
echo "Введите ник пользователя, которого хотите вызвать на дуэль<br />n";
echo "<input type='text' name='nick_duel' value=''>n";
echo "<input type='hidden' name='mdp' value='$mdp'>n";
echo "<input type='submit' name='submited' value='Вызвать на дуэль'>n";
echo "</form>n";
echo "</div>n";
}
echo "<div class='list_or'>n";
if (isset($user))
{
if (mysqli_result("SELECT COUNT(*) FROM `duels` WHERE `id_ank` = '$user[id]' AND `ok` = '0'"))echo "<img src='/i/site/action_red.png' /> <a href='?act=my_call'><span class='spared'>Вас вызывают на дуэль!</span></a><br />n";
echo $config['code_action']." <a href='?act=my_duel'>Моя активная дуэль</a><br />n";
echo $config['code_action']." <a href='?act=user_duels'>Мои законченные дуэли</a><br />n";
}
echo $config['code_action']." <a href='?act=finished'>Законченные дуэли (".mysqli_result("SELECT COUNT(*) FROM `duels` WHERE `winer` != '0' AND `ok` = '1'").")</a><br />n";
echo "</div>n";
ex_foot();
?>