Файл: vsime.com/duels/inc/act_pollen.php
Строк: 51
<?
if_user('is_reg');
$duel = mysqli_fetch_array(mysqli_query($dbi, "SELECT * FROM `duels` WHERE `id` = '".intval(@$_GET['id'])."' AND `ok` = '1'"));
if (!@$duel['id'])
{
$title .= ' - Ошибка!';
ex_head();
$error = 'Дуэль не найдена';
show_errors();
ex_foot();
}
$links_hist['name'] = "$config[site_name] / Дуэли";
$links_hist['link'] = "/duels/";
$title .= ' - Кто проголосовал';
ex_head();
$duel['info'] = duel_info($duel['id']);
$count_results = mysqli_result("SELECT COUNT(*) FROM `duels_pollen` WHERE `id_duel` = '$duel[id]'");
$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_pollen` WHERE `id_duel` = '$duel[id]' ORDER BY `time` DESC LIMIT $start, $config[rop]");
while ($post = mysqli_fetch_array($query))
{
$ank = profile($post['id_user']);
if ($post['man']==1)$ank2 = profile($duel['id_user']); else $ank2 = profile($duel['id_ank']);
echo "<div class='list'>n";
echo "<div class='left'>n";
show_avatar($ank['id'], 'small');
echo "</div>n";
echo "<div class='overfl_hid'>n";
echo profile_icon($ank['id']).profile_nick($ank['id'], 1).profile_medal($ank['id']);
echo " (".vremja($post['time']).")n";
echo "<br />n";
echo pol_word($ank['id'], array('Проголосовал', 'Проголосовалa'))." за ";
echo profile_icon($ank2['id']).profile_nick($ank2['id'], 1);
echo "</div>n";
echo "<div class='clear'></div>n";
echo "</div>n";
}
pages_show("?act=pollen&id=$duel[id]");
echo "<div class='foot'>n";
echo image_back()." <a href='?act=info&id=$duel[id]'>Назад</a>n";
echo "</div>n";
ex_foot();
?>