Файл: _downfile_CodWM_21480/foto/rating.php
Строк: 81
<?
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();
aut();
err();
?>
<link rel="stylesheet" href="/foto/foto.css" type="text/css" />
<?
echo "<div class='foot'>";
echo "<img src='/style/icons/str2.gif' alt='' class='icon'/>n";
echo "<a href='/foto/'>Альбомы</a> n";
echo "</div> <center> ";
$set['p_str'] = 1;
$k_rxn = mysql_num_rows(mysql_query("SELECT `id` FROM `gallery_foto` WHERE `rating` > '0'"));
$k_page = k_page($k_rxn,$set['p_str']);
$page = page($k_page);
$start = $set['p_str']*$page-$set['p_str'];
echo '<div class="nav1">';
if ($k_rxn=='0')
{
echo "<div class='err'>";
echo 'Нет результатов';
echo "</div>";
}
$r_xn = mysql_query("SELECT * FROM `gallery_foto` WHERE `rating` > '0' ORDER BY `rating` DESC LIMIT $start, $set[p_str]");
while ($ank = mysql_fetch_array($r_xn))
{
// Лесенка
echo '<table class="' . ($num % 2 ? "nav1" : "nav2") . '">';
$num++;
echo " <tr>n";
echo " <td class='icon141'><div class = 'foto3'><div class = 'foto_bl3'>
<center><img class = 'img' src = '/foto/img/votes.png' />
<small>$ank[rating]</small>
</center></div>n";
$f=$ank['id'];
$foto = mysql_fetch_assoc(mysql_query("SELECT * FROM `gallery_foto` WHERE `id` = '" . $f . "' LIMIT 1"));
$gallery = mysql_fetch_assoc(mysql_query("SELECT * FROM `gallery` WHERE `id`='" . $foto['id_gallery'] . "' LIMIT 1"));
$ank_p=get_user($gallery['id_user']);
echo '<a href="/foto/' . $ank_p['id'] . '/' . $gallery['id'] . '/' . $ank['id'] . '/" title="Перейти к фото">';
echo " <img src='/foto/foto640/$ank[id].$ank[ras]' alt='*' style='width:128px; height:128px; '/></a> n";
echo "</div>";
echo "</td> </tr> </table> n";
}
echo ' </div></center>';
if ($k_page>1)str("rating.php?",$k_page,$page);
echo "<div class='foot'>";
echo "<img src='/style/icons/str2.gif' alt='' class='icon'/>n";
echo "<a href='/foto/'>Альбомы</a> n";
echo "</div>";
include_once '../sys/inc/tfoot.php';
?>