<?php
/*
* @package LabCMS
* @copyright (c) 2006 Alexander Levin aka Loki (loki_angel@mail.ru)
* @support http://labcms.ru
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*/
	$mod_template="forums.tpl";
	$forums=Db::i()->select("SELECT forum_id, forum_last_user_id, forum_name, descr, forum_total_posts, f.total_themes, UNIX_TIMESTAMP(forum_last_post) as forum_last_post, IF(user_id, login, forum_last_user) as forum_last_user, closed  FROM ?_forum_forums f LEFT JOIN ?_users u ON f.forum_last_user_id=u.user_id");
	foreach($forums as $key=>$forum)
	{
		$forums[$key]['forum_name_html']=getbb($forum['forum_name'], 'nolinks');
	}
	
	Tpl::i()->assign('forums', $forums);
