Location: PHPKode > projects > Content*Builder > modules/forum/index.php
<?php
$forum_time_start = microtime();
/**
 * Zentrale Steuerungsdatei für Aktionen im Forum
 * 
 * @version $Id: index.php,v 1.2 2004/05/26 20:30:00 cb_fog Exp $
 * @copyright 2003 C*B Development Team
**/

$actualModuleDir = dirname(__FILE__)."/";
require_once( $actualModuleDir."prepend.inc.php" );

$tpl->assign("forum_link", $forum_link);
$tpl->assign("forumID", $_REQUEST[forumID]);

$forum_logged_in = 0;
if(!empty($_SESSION[community_uid])) {
	$forum_logged_in = 1;
	$tpl->assign("community_uid", $_SESSION[community_uid]);
	$tpl->assign("forum_logged_in", "1");
}

$forumObj = & new CB_Forum($_SESSION[community_uid]);

$config  = parse_ini_file($actualModuleDir.'BBCodeParser.ini', true);
$options = &PEAR::getStaticProperty('HTML_BBCodeParser', '_options');
$options = $config['HTML_BBCodeParser'];
$bbCodeParser = new HTML_BBCodeParser( $options );

/*
* Check Optionen nach denen der Text untersucht wird
*/
$forumObj->setOption("allowHTML",          $forum_option->getSingleOption("isAllowedHTML"));
$forumObj->setOption("allowBBCode",        $forum_option->getSingleOption("isAllowedBBCode"));
$forumObj->setOption("bbCodeParser",       &$bbCodeParser);
$forumObj->setOption("forumOption",        &$forum_option);
$forumObj->setOption("nestedSet_message",  &$nestedSet_message);
$forumObj->setOption("nestedSet_category", &$nestedSet_category);

$forum_content = array();

switch($_REQUEST['action']) {
	case "showThread":
		 require_once($actualModuleDir."showThread.inc.php");
		 break;
	case "addReply":
		 require_once($actualModuleDir."messageAddReply.inc.php");
		 break;
	case "addThread":
		 require_once($actualModuleDir."messageAddThread.inc.php");
		 break;
	case "editMessage":
		 require_once($actualModuleDir."messageEdit.inc.php");
		 break;
	default:
		 require_once($actualModuleDir."showForum.inc.php");
		 break;
}

$forum_time_end  = microtime();
$forum_start_arr = explode(" ", $forum_time_start);
$forum_end_arr   = explode(" ", $forum_time_end);
$forum_elapsed   = ($forum_end_arr[0] - $forum_start_arr[0]) + ($forum_end_arr[1] - $forum_start_arr[1]);
$forum_mtime     = number_format( $forum_elapsed, 3, ".", ",");

$tpl->assign("forum_elapse_time", $forum_mtime);
$tpl->assign("forum_content", $forum_content);
$tpl->display("forum.template");
?>
Return current item: Content*Builder