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

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