Файл: selemege.tk/rank.php
Строк: 73
<?
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';
error_reporting(0);
$ank['id'] = $user['id'];
if (isset($_GET['id']))$ank['id'] = intval($_GET['id']);
$q = mysql_query("SELECT * FROM `user` WHERE `id` = $ank[id] LIMIT 1");
if (mysql_num_rows($q)==0){header("Location: index.php?".SID);exit;}
$set['title'] = 'Награды '.$ank['nick'].'';
include_once 'sys/inc/thead.php';
title();
aut();
echo '<link rel="stylesheet" type="text/css" href="/style/themes/akc/touch.css"/>';
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `rank` WHERE `id_user` = '$ank[id]' LIMIT 1"), 0);
if ($k_post==0)
{
echo "<div class='gradient_block1 list_item'>";
echo 'У обитателя '.$ank['nick'].' нет наград<br>';
}
$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 `rank` WHERE `id_user` = '$ank[id]' ORDER BY time DESC LIMIT $start, $set[p_str]");
while ($f = mysql_fetch_array($q))
{
$a = mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id` = '$f[ot_id]' LIMIT 1"));
if($num==1){
$num=0;
}else{
$num=1;}
echo "<div class='gradient_block1 list_item'>";
echo"<img src='/rank/".$f['id_rank'].".gif' alt='' class='icon'/><br>";
echo "".$f['text']." n";
echo "<br>От: <a href='info.php?id=$a[id]'>$a[nick]</a>n";
echo "(".vremja($f['time']).") n";
echo '</div>' ;
}
/////////
if($user['id']!=$ank['id']) {
if ($user['group_access']>=7){
echo "<div class='gradient_block1 list_item'>";
echo "<img src='sys/img/pod.gif' alt='' class='icon'/><a href="medals/rank.php?id=$ank[id]&pod=1">Наградить юзера</a></div>";}}
////////
if ($k_page>1)str("?",$k_page,$page); // Вывод страниц
include_once 'sys/inc/tfoot.php';
?>