Код вывода последних пяти тем при использовании Web App темы
KOD (+/-)
/** Последние темы форума от seg0ro */
require_once $rootpath.'forum/includes/functoins.php';
$limit=5;// Сколько тем выводить
$topicQuery= mysql_query("SELECT * FROM `forum_topics` ORDER BY `time` DESC LIMIT $limit ");
echo'<div class="menu"><strong>Последние '.$limit.' тем форума:</strong>';
while($topicRes= mysql_fetch_assoc($topicQuery)){
$sub='Автор: '.$topicRes['user'];
if($topicRes['count']>1){
$lastPost= explode(':|:',$topicRes['lastpost']);
$sub.=' <a href="/forum/index.php?topic='.$topicRes['topic'].'&post='.$lastPost[1].'" title="перейти к сообщению">Последн.</a>: '.$lastPost[0];
}
echo'<div>'.show_topic($topicRes,$sub.' '.functions::display_date($topicRes['time']).'<br />Подфорум: <a href="/forum/index.php?forum='.$topicRes['forum'].'">'.functions::checkout($topicRes['forumname']).'</a>').'</div>';
}
echo'</div>';
/** Последние темы форума от seg0ro */
require_once $rootpath.'forum/includes/functoins.php';
$limit=5;// Сколько тем выводить
$topicQuery= mysql_query("SELECT * FROM `forum_topics` ORDER BY `time` DESC LIMIT $limit ");
echo'<div class="menu"><strong>Последние '.$limit.' тем форума:</strong>';
while($topicRes= mysql_fetch_assoc($topicQuery)){
$sub='Автор: '.$topicRes['user'];
if($topicRes['count']>1){
$lastPost= explode(':|:',$topicRes['lastpost']);
$sub.=' <a href="/forum/index.php?topic='.$topicRes['topic'].'&post='.$lastPost[1].'" title="перейти к сообщению">Последн.</a>: '.$lastPost[0];
}
echo'<div>'.show_topic($topicRes,$sub.' '.functions::display_date($topicRes['time']).'<br />Подфорум: <a href="/forum/index.php?forum='.$topicRes['forum'].'">'.functions::checkout($topicRes['forumname']).'</a>').'</div>';
}
echo'</div>';
/** Последние темы форума от seg0ro */