<?
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();
err();

$k_new = mysql_result(mysql_query("SELECT COUNT(*) FROM `obmennik_files` WHERE `time` > '".(time()-86400)."'"), 0);

$k_page = k_page($k_new,$set['p_str']);
$page = page($k_page);
$start = $set['p_str']*$page-$set['p_str'];
if ($k_new==0)
{
echo "Нет новых файлов\n";
}

$q = mysql_query("SELECT * FROM `obmennik_files` WHERE `time` > '".(time()-86400)."' ORDER BY time DESC LIMIT $start, $set[p_str]");
while ($post = mysql_fetch_array($q))
{


$ras=$post['ras'];
$file=H."sys/obmen/files/$post[id].dat";
$name=$post['name'];
$size=$post['size'];


echo "<div class='str'>";
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><br />\n";


include 'inc/opis.php';

echo ' Папка: <a href="/obmen'.$dir['dir'].'?">'.$dir['name'].'</a>';
echo'</div>';
}


if ($k_page>1)str('?',$k_page,$page); // Вывод страниц



include_once '../sys/inc/tfoot.php';
?>