Файл: test.masteram.us/obmen/new.php
Строк: 43
<?
include '../Core.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'];
echo "<div class='tmn'>";
echo "<a href='/obmen/'>Обменник</a> | Новинки<br />n";
echo "</div>n";
if ($k_new==0)
{
echo "<div class='linechat'>";
echo "Нет новых файловn";
echo "</div>";
}
$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))
{
$dir = mysql_fetch_array(mysql_query("SELECT * FROM `obmennik_dir` WHERE `id` = '$post[id_dir]' LIMIT 1"));
$ank=get_user($post['id_user']);
echo "<div class='linechat'>";
$ras="$post[ras]";
include 'inc/icon14.php';
echo "<a href='/obmen/$dir[id]/$post[id]/'>$post[name].$ras</a> (".size_file($post['size']).")<br />n";
echo "Папка: <a href='/obmen/$dir[id]/'>$dir[name]</a><br/>n";
echo "Добавил: <a href='/info.php?id=$ank[id]'>$ank[nick]</a><br/>n";
echo "</div>";
}
if ($k_page>1)str('?',$k_page,$page); // Вывод страниц
echo "<div class='tmn'>";
echo "<a href='/obmen/'>Обменник</a> | Новинки<br />n";
echo "</div>n";
include_once '../sys/inc/tfoot.php';
?>