Blame Identity/Webenv/phpBB/3.0.4/faq.php

ef5584
ef5584
/**
ef5584
*
ef5584
* @package phpBB3
ef5584
* @version $Id: faq.php 8479 2008-03-29 00:22:48Z naderman $
ef5584
* @copyright (c) 2005 phpBB Group
ef5584
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
ef5584
*
ef5584
*/
ef5584
ef5584
/**
ef5584
* @ignore
ef5584
*/
ef5584
define('IN_PHPBB', true);
ef5584
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
ef5584
$phpEx = substr(strrchr(__FILE__, '.'), 1);
ef5584
include($phpbb_root_path . 'common.' . $phpEx);
ef5584
ef5584
// Start session management
ef5584
$user->session_begin();
ef5584
$auth->acl($user->data);
ef5584
$user->setup();
ef5584
ef5584
$mode = request_var('mode', '');
ef5584
ef5584
// Load the appropriate faq file
ef5584
switch ($mode)
ef5584
{
ef5584
	case 'bbcode':
ef5584
		$l_title = $user->lang['BBCODE_GUIDE'];
ef5584
		$user->add_lang('bbcode', false, true);
ef5584
	break;
ef5584
ef5584
	default:
ef5584
		$l_title = $user->lang['FAQ_EXPLAIN'];
ef5584
		$user->add_lang('faq', false, true);
ef5584
	break;
ef5584
}
ef5584
ef5584
// Pull the array data from the lang pack
ef5584
$help_blocks = array();
ef5584
foreach ($user->help as $help_ary)
ef5584
{
ef5584
	if ($help_ary[0] == '--')
ef5584
	{
ef5584
		$template->assign_block_vars('faq_block', array(
ef5584
			'BLOCK_TITLE'		=> $help_ary[1])
ef5584
		);
ef5584
ef5584
		continue;
ef5584
	}
ef5584
ef5584
	$template->assign_block_vars('faq_block.faq_row', array(
ef5584
		'FAQ_QUESTION'		=> $help_ary[0],
ef5584
		'FAQ_ANSWER'		=> $help_ary[1])
ef5584
	);
ef5584
}
ef5584
ef5584
// Lets build a page ...
ef5584
$template->assign_vars(array(
ef5584
	'L_FAQ_TITLE'	=> $l_title,
ef5584
	'L_BACK_TO_TOP'	=> $user->lang['BACK_TO_TOP'])
ef5584
);
ef5584
ef5584
page_header($l_title);
ef5584
ef5584
$template->set_filenames(array(
ef5584
	'body' => 'faq_body.html')
ef5584
);
ef5584
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
ef5584
ef5584
page_footer();
ef5584
ef5584
?>