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

Размер файла: 1.5Kb
  1. <?
  2. define('SHCMS', true);
  3. include_once'../system/inc/basic_settings.php';
  4. $shcmsengine['title'] = 'Новые темы';
  5. include_once'../template/head.php';
  6.  
  7. $allfield = mysql_result(mysql_query("SELECT COUNT(*) FROM `forum_them` WHERE `time` > ".(time()-86400).""),0);
  8. $newlist = new Navigation($allfield, 10,true);
  9. $new_them = mysql_query("SELECT * FROM `forum_them` WHERE `time` >".(time()-86400)." ORDER BY `time` DESC ". $newlist->limit()."");
  10. $new_themes = mysql_fetch_array($new_them);
  11.  
  12. if($new_themes == NULL)
  13. {
  14. echo '<div class="posts">Новых тем нет</div>';
  15. }
  16. else
  17. {
  18. do
  19. {
  20. $razd = mysql_fetch_array(mysql_query("SELECT * FROM `forum_razd` WHERE `id` = '$new_themes[id_razd]' "));
  21. $cat = mysql_fetch_array(mysql_query("SELECT * FROM `forum_cat` WHERE `id` = '$new_themes[id_cat]'"));
  22. echo '<div class="maintitle">Тема: <a href="message.php?id='.$new_themes['id'].'">'.$new_themes['name'].'</a></div>';
  23. echo "<div class='maintext'><a href='them.php?id=$razd[id]'>$razd[name]</a> <span class='mainrazd'>-></span> ";
  24. echo "<a href='razd.php?id=$cat[id]'>$cat[name]</a>";
  25. echo '</div>';
  26. }
  27. while($new_themes = mysql_fetch_array($new_them));
  28. echo '<div class="pages">';
  29. echo $newlist->pagination();
  30. echo '</div>';
  31. }
  32.  
  33.  
  34.  
  35. include_once'../template/foot.php';
  36. ?>