File size: 1.17Kb
<?
define('SHCMS', true);
include_once'../system/inc/basic_settings.php';
$shcmsengine['title'] = 'Новые темы';
include_once'../template/head.php';
$allfield = mysql_result(mysql_query("SELECT COUNT(*) FROM `forum_them` WHERE `time` > ".(time()-86400).""),0);
$newlist = new Navigation($allfield, // кол-во полей для вывода
10, // выводить 5 записей на страницу
true); // выводить "Стр." возле ссылок навигации
$new_them = mysql_query("SELECT * FROM `forum_them` WHERE `time` >".(time()-86400)." ORDER BY time DESC ". $newlist->limit()."");
$new_themes = mysql_fetch_array($new_them);
if($new_themes == null)
{
echo '<div class="posts">Новых тем нет</div>';
}
else
{
do
{
echo '<div class="posts">';
echo '<a href="mess.php?id='.$new_themes['id'].'">'.$new_themes['name'].'</a><br/>';
echo $new_themes['text'];
echo '</div>';
}
while($new_themes = mysql_fetch_array($new_them));
echo '<div class="link_reg">';
echo $newlist->pagination();
echo '</div>';
}
include_once'../template/foot.php';
?>