{% else-1 %}
3KZO * 4.92
(12 дек 2012, 17:18) (0/0) [0]
вот вам вывод тем с моей кмс. впишите в таблицу темы поле last_time,last_user

и всё *

<?php

echo \'<a href=\"/forum\"><b>Форум</b></a> (<a href=\"/forum-theme-new\">\'.mysql_result(mysql_query(\"SELECT COUNT(`id`) FROM `forum_theme`\"*, 0).\'</a>/<a href=\"/forum-msg-new\">\'.mysql_result(mysql_query(\"SELECT COUNT(`id`) FROM `forum_msg`\"*, 0).\'</a>*<div class=\"menu\">\';
$last_theme = mysql_query(\"SELECT * FROM `forum_theme` ORDER BY `last_time` DESC LIMIT 5\"*;

while($last_theme_info = mysql_fetch_assoc($last_theme)){

$last_theme_info_msg = mysql_result(mysql_query(\"SELECT COUNT(`id`) FROM `forum_msg` WHERE `theme`=\'\".$last_theme_info[\'id\'].\"\'\"*, 0);
$last_theme_info_page_end = ceil($last_theme_info_msg/10);

if($last_theme_info[\'status\']==\"0\"* echo \'<b>#</b>\'; elseif($last_theme_info[\'status\']==\"1\"* echo \'<b>!</b>\';
echo \'<a href=\"/forum-theme/\'.$last_theme_info[\'id\'].\'\">\'.$last_theme_info[\'name\'].\'</a> (\'.$last_theme_info_msg.\') <a href=\"/forum-theme/\'.$last_theme_info[\'id\'].\'/page/\'.$last_theme_info_page_end.\'\">>></a><br>\';

}


?>

кто в танке, могу выложить таблицы.
  • 1 из 1