Файл: mylaf.ru/foto/ocenky.php
Строк: 54
<?
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';
title();
mysql_query("UPDATE `gallery_rating` SET `ready` = '0' WHERE `avtor` = '$user[id]'");
$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `gallery_rating` WHERE `avtor` = '$user[id]'"),0);
$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 `gallery_rating` WHERE `avtor` = '$user[id]' ORDER BY `time` DESC LIMIT $start, $set[p_str]");
if ($k_post==0)
{
echo "<div class='msg'>n";
echo "Нет оценокn";
echo "</div>n";
}
while ($post = mysql_fetch_assoc($q))
{
$ank2=get_user($post['id_user']);
$foto=mysql_fetch_assoc(mysql_query("SELECT * FROM `gallery_foto` WHERE `id` = $post[id_foto]"));
echo "<div class='forum'>n";
echo "".us($ank2['id'])."";
echo "<img src='/style/icons/$post[like].png' alt=''/> ".vremja($post['time'])."";
echo "<img src='/foto/foto128/$foto[id].$foto[ras]' alt='$foto[name]' style='max-height:50px;max-width:50px;'/>n";
echo "</div>n";
}
if ($k_page>1)str("ocenky.php?id=".$ank['id'].'&',$k_page,$page); // Вывод страниц
include_once '../sys/inc/tfoot.php';
?>