<?
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']='ТОП 30 файлов';
include_once '../sys/inc/thead.php';
title();
err();
?>
<div class='fyt'>
<img src='/style/images/left.gif' alt='' class='icon'/> <a href='/'>Старт</a> &raquo <a href='/obmen/'>Обменник</a> &raquo ТОП 30
</div>
<?
$k_new = mysql_result(mysql_query("SELECT COUNT(*) FROM `obmennik_files` WHERE `time` > '".(time()-86400)."'"), 0);
if ($k_new==0)
{
?>
<div class='noy'>Нет новых файлов</div>
<?
}

$q=mysql_query("SELECT * FROM `obmennik_files` ORDER BY `k_loads` DESC LIMIT 30;");
while ($post = mysql_fetch_array($q))
{
$ras=$post['ras'];
$file=H."sys/obmen/files/$post[id].dat";
$name=$post['name'];
$size=$post['size'];
if($num==1){
echo "<div class='enk_div'>\n";
$num=0;
}else{
echo "<div class='enk2_div'>\n";
$num=1;}
include 'inc/icon14.php';
$dir=mysql_fetch_array(mysql_query("SELECT * FROM `obmennik_dir` WHERE `id` = '$post[id_dir]' LIMIT 1"));
if ($set['echo_rassh']==1)$ras=".$post[ras]";else $ras=NULL;
echo "<a href='/obmen$dir[dir]$post[name].$post[ras]?showinfo'>$post[name]$ras</a>  ($post[k_loads])<br />\n";
include 'inc/opis.php';
echo ' Папка: <a href="/obmen'.$dir['dir'].'?">'.$dir['name'].'</a>';
echo "</div>\n";
}
?>
<div class='fyt'>
<img src='/style/images/left.gif' alt='' class='icon'/> <a href='/'>Старт</a> &raquo <a href='/obmen/'>Обменник</a> &raquo ТОП 30
</div>
<?
include_once '../sys/inc/tfoot.php';
?>