Файл: mylaf.ru/mods/battleavatars/who.votes.php
Строк: 57
<?
include_once '../../sys/inc/start.php';
include_once '../../sys/inc/compress.php';
include_once '../../sys/inc/sess.php';
include_once '../../sys/inc/home.php';
include_once '../../sys/inc/settings.php';
include_once '../../sys/inc/db_connect.php';
include_once '../../sys/inc/ipua.php';
include_once '../../sys/inc/fnc.php';
include_once '../../sys/inc/user.php';
$duel=intval($_GET['duel']);
$duel = mysql_fetch_assoc(mysql_query("SELECT * FROM `duel` WHERE `id` = '".intval($_GET['duel'])."' LIMIT 1"));
$vot = mysql_fetch_assoc(mysql_query("SELECT * FROM `duel_vote` WHERE `id_duel` = '".intval($_GET['duel'])."' LIMIT 1"));
$ank=intval($_GET['us']);
$ank=get_user($_GET['us']);
if ($duel['id']==0)header("location:/index.php");
$set['title']='Кто голосовал за '.$ank['nick'].'';
include_once '../../sys/inc/thead.php';
title();
aut();
$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `duel_vote` WHERE `id_opponent` = '$ank[id]' AND `id_duel` = '$duel[id]'"), 0);
if ($k_post==0)msg("За $ank[nick] пока никто не голосовал");
$k_page=k_page($k_post,$set['p_str']);
$page=page($k_page);
$start=$set['p_str']*$page-$set['p_str'];
$q = mysql_query("SELECT * FROM `duel_vote` WHERE `id_opponent` = '$ank[id]' AND `id_duel` = '$duel[id]' LIMIT $start, $set[p_str]");
while($us=mysql_fetch_assoc($q)){
echo "<div class='forum'>";
echo "".us($us['id_user'])."";
echo "</div>";
}
if ($k_page>1)str("?duel=$duel[id]&us=$ank[id]&",$k_page,$page);
include_once '../../sys/inc/tfoot.php';
?>