<?php

define('BB_SCRIPT', 'info');
define('BB_ROOT', './');
require(BB_ROOT .'common.php');

// Start session management
$user->session_start();

global $lang;

$info = array();
$html_dir = LANG_DIR . 'html/';
$req_mode = !empty($_REQUEST['show']) ? (string) $_REQUEST['show'] : 'not_found';

switch ($req_mode)
{
	case 'advert':
		$info['title'] = $lang['ADVERT'];
		$info['src'] = 'advert.html';
		break;

	case 'copyright_holders':
		$info['title'] = $lang['COPYRIGHT_HOLDERS'];
		$info['src'] = 'copyright_holders.html';
		break;

	case 'not_found':
		$info['title'] = $lang['NOT_FOUND'];
		$info['src'] = 'not_found.html';
		break;

	case 'user_agreement':
		$info['title'] = $lang['USER_AGREEMENT'];
		$info['src'] = 'user_agreement.html';
		break;

	default:
		bb_simple_die('Invalid request');
}

$require = file_exists($html_dir . $info['src']) ? $html_dir . $info['src'] : $html_dir . 'not_found.html';

?><!DOCTYPE html>
<html dir="ltr">
<div class="modal-header">
	<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
	<h4 class="modal-title"><?php echo mb_strtoupper($info['title'], 'UTF-8'); ?></h4>
</div>
<div class="modal-body">
	<?php require($require); ?>
</div>
</body>
</html>