<?php

/***************************************************************************
 *
 *      Update to 2.0.18 by Alf (31.10.2005) 00:06
 *
 *	Title: xphpBBi - phpBB Complete Integration project 
 *	Description: Project to turn the phpBB forums into a fully functioning
 *		Xoops2 Module. Based on the phpBB 2.0.11 port from BBpixel.com - 
 *		(PBBoard v1.22).
 *	Credits: Xoops2 Module Development Team - Koudanshi - phpBB Group
 *	Thanks: To Koudanshi for a great start in his port, and phpBB Group for
 *		such a great forum software.
 *	License: GNU/GPL version 2 or later.
 ****************************************************************************/

/***************************************************************************
 *                              page_tail.php
 *                            -------------------
 *   begin                : Saturday, Feb 13, 2001
 *   copyright            : (C) 2001 The phpBB Group
 *   email                : support@phpbb.com
 *
 *   $Id: page_tail.php,v 1.27.2.4 2005/09/14 18:14:30 acydburn Exp $
 *
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

if ( !defined('IN_PHPBB') )
{
	die('Hacking attempt');
}

global $do_gzip_compress;

//
// Show the overall footer.
//
global $xoopsUserIsAdmin, $xoopsLogger;
$admin_link = ( is_object($xoopsUser) && ($xoopsUserIsAdmin || $userdata['user_level'] == ADMIN) ) ? '<a href="'.XOOPS_URL.$board_config['script_path'].'admin/index.php?sid=' . $userdata['sess_id'] . '">' . $lang['Admin_panel'] . '</a><br /><br />' : '';

$template->set_filenames(array(
	'overall_footer' => ( empty($gen_simple_header) ) ? 'overall_footer.tpl' : 'simple_footer.tpl')
);

$template->assign_vars(array(
	'PHPBB_VERSION' => '2' . $board_config['version'],
	'XPHPBBI_VERSION' => $board_config['version_bb'],
 	'TRANSLATION_INFO' => (isset($lang['TRANSLATION_INFO'])) ? $lang['TRANSLATION_INFO'] : ((isset($lang['TRANSLATION'])) ? $lang['TRANSLATION'] : ''),
	'ADMIN_LINK' => $admin_link)
);

$template->pparse('overall_footer');
// Close our DB connection.
//
$db->sql_close();

// [begin] SE Friendly Board mod
if ( !$userdata['session_logged_in'] )
{
	$contents = ob_get_contents();
	ob_end_clean();
	echo replace_mod_rewrite($contents);
}
// [end] SE Friendly Board mod

//XOOPS
if (!$gen_simple_header) include (XOOPS_ROOT_PATH.'/footer.php');
//
exit;
?>