<?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
*/

Hook::call('forum_before');

$main=Factory::create('forum.main');

if (isset($_GET['action']) && is_callable(array($main, $_GET['action']))) {
	call_user_func(array($main, $_GET['action']));
} else {
	if (!empty($_GET['var1'])) $action='themes';
	else $action='forums';
	call_user_func(array($main, $action));
}

Hook::call('forum_after');