Просмотр файла forum/new.themes.php

Размер файла: 1.5Kb
<?
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,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
        {
            $razd = mysql_fetch_array(mysql_query("SELECT * FROM `forum_razd` WHERE `id` = '$new_themes[id_razd]' "));
            $cat = mysql_fetch_array(mysql_query("SELECT * FROM `forum_cat` WHERE `id` = '$new_themes[id_cat]'"));
            
	
            echo '<div class="maintitle">Тема: <a href="message.php?id='.$new_themes['id'].'">'.$new_themes['name'].'</a></div>';
            echo "<div class='maintext'><a href='them.php?id=$razd[id]'>$razd[name]</a> <span class='mainrazd'>-></span> ";
            echo "<a href='razd.php?id=$cat[id]'>$cat[name]</a>";
            echo '</div>';
        }
        while($new_themes = mysql_fetch_array($new_them));
            echo '<div class="pages">';
            echo $newlist->pagination();
            echo '</div>';
    }



include_once'../template/foot.php';
?>