Файл: vsime.com/duels/inc/act_finished.php
Строк: 48
<?php
$links_hist['name'] = "Дуэли / Законченные дуэли";
$links_hist['link'] = "/duels/?act=finished";
$title .= ' - Законченные дуэли';
ex_head();
$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_end` 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']);
if ($post['winer']==$post_user['id'])
{
$post['result'] = "Выиграл $post_user[nick]";
} elseif ($post['winer']=='draw') {
$post['result'] = "Ничья";
} else {
$post['result'] = "Выиграл $post_ank[nick]";
}
echo "<div class='list'>n";
echo "<div class='overfl_hid'>n";
echo profile_icon($post_user['id']).profile_nick($post_user['id'], 1);
echo " против ";
echo profile_icon($post_ank['id']).profile_nick($post_ank['id'], 1);
echo "<br />n";
echo "Результат: $post[result]<br />n";
echo "<img src='/i/site/information.png' /> <a href='?act=info&id=$post[id]'>Подробности</a>n";
echo "</div>n";
echo "<div class='clear'></div>n";
echo "</div>n";
}
pages_show("?");
echo "<div class='foot'>n";
echo image_back()." <a href='/duels'>Назад</a>n";
echo "</div>n";
ex_foot();
?>