<?php
// $Id: header.php,v 1.5 2004/10/31 15:17:47 Farsus Exp $
// -------------------------------------------------------------------------//
//			       RUNCMS
//
//	 Relaible - Unique - Nocost &  Simplicity & ease off use
//                       < http://www.runcms.org >
// -------------------------------------------------------------------------//

include_once('../../mainfile.php');
include_once('config.php');
include_once('class/class.permissions.php');
include_once('functions.php');
include_once('include/ui_functions.php');

function newbbplus_page_header()
{
	global $xoopsOption, $xoopsConfig,  $xoopsModule, $HTTP_USER_AGENT, $_SERVER;

	site_cache('read');
	xoops_header(false);

	// Add the CSS + Javascript required for NewBB Plus into the head element
	include_once('class/hover.css');
	include_once('include/newbbplus.js');
?>
<script type="text/javascript" src="<?php echo XOOPS_URL; ?>/modules/newbb_plus/class/tabpane.js" ></script>
<?php
	include_once('class/tab.css');

	// Link in the RSS Feed - this allows aggregators to auto-discover the feed
	if ($newbbConfig['rss_enable'])
	{
		echo '<link rel="alternate" type="application/rss+xml" title="Forum RSS" href="cache/forum.xml"/>';
	}

	$currenttheme = getTheme();
	include_once(XOOPS_ROOT_PATH.'/themes/'.$currenttheme.'/theme.php');

	if ( @file_exists(XOOPS_ROOT_PATH.'/themes/'.$currenttheme.'/language/lang-'.$xoopsConfig['language'].'.php') )
	{
		include_once(XOOPS_ROOT_PATH.'/themes/'.$currenttheme.'/language/lang-'.$xoopsConfig['language'].'.php');
	}
	elseif ( @file_exists(XOOPS_ROOT_PATH.'/themes/'.$currenttheme.'/language/lang-english.php') )
	{
		include_once(XOOPS_ROOT_PATH.'/themes/'.$currenttheme.'/language/lang-english.php');
	}

	$xoopsOption['show_rblock'] = 1;  // Always show right blocks - managed by Blocks Admin!
	themeheader($xoopsOption['show_rblock']);
	make_cblock(XOOPS_CENTERBLOCK_TOPALL);
?>
	<!-- START MODULE SPAN CSS -->
	<span id="<?php if ($xoopsModule) { echo $xoopsModule->dirname();}?>_dom" name="<?php if ($xoopsModule) { echo $xoopsModule->dirname();}?>_dom" class="<?php if ($xoopsModule) { echo $xoopsModule->dirname();}?>_css">
	<!-- START MODULE SPAN CSS -->
<?php
}

?>