Файл: gifts.php
Строк: 90
<?
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';
$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'] = 'Подарки ';
include_once 'sys/inc/thead.php';
title();
aut();
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `gifts` WHERE `id_user` = '$ank[id]' LIMIT 1"), 0);
if ($k_post==0)
{
echo '<div class="foot">У обитателя нет подарков</div>';
}
$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 `gifts` 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"));
echo "<div class='foot'>";
echo"<img src='/gifts/".$f['id_gifts'].".png' alt='' class='icon'/><br>";
echo "".$f['text']." n";
echo "<br>От: ";
echo "".online($a['id'])." ";
echo "<a href='/user.profile.php?id=$a[id]'>n";
echo GradientText("$a[nick]", "$a[ncolor]", "$a[ncolor2]");
echo "</a> n";
echo "<a href='/user.ank.php?id=$a[id]'><img src='/style/img/in.png' alt='' class='icon'/></a> ";
if ($a['ank_strana']=='Украина')echo "<img src='/style/usr/ua.png' alt=''>";
if ($a['ank_strana']=='Россия')echo "<img src='/style/usr/ru.png' alt=''>";
if ($a['ank_strana']=='Узбекистан')echo "<img src='/style/usr/uz.png' alt=''>";
if ($a['ank_strana']=='Казахстан')echo "<img src='/style/usr/kz.png' alt=''>";
if ($a['ank_strana']=='СНГ')echo "<img src='/style/usr/dr.png' alt=''>";
if ($a['ank_strana']=='Белоруссия')echo "<img src='/style/usr/by.png' alt=''>";
if ($a['ank_strana']=='Азербайджан')echo "<img src='/style/usr/az.png' alt=''>";
if ($a['ank_strana']=='Армения')echo "<img src='/style/usr/am.png' alt=''>";
echo "".online2($a['id'])."";
echo "(".vremja($f['time']).") n";
echo "</div>";
}
if ($k_page>1)str("?id=$ank[id]&",$k_page,$page); // Вывод страниц
include_once 'sys/inc/tfoot.php';
?>