mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 22:03:49 -07:00
Reworked info.php (#664)
This commit is contained in:
parent
642e49e77d
commit
b20e7489d7
2 changed files with 44 additions and 48 deletions
60
info.php
60
info.php
|
@ -16,9 +16,9 @@ $user->session_start();
|
|||
|
||||
global $lang;
|
||||
|
||||
$info = array();
|
||||
$info = [];
|
||||
$html_dir = LANG_DIR . 'html/';
|
||||
$req_mode = !empty($_REQUEST['show']) ? (string)$_REQUEST['show'] : 'not_found';
|
||||
$req_mode = (string)$_REQUEST['show'];
|
||||
|
||||
switch ($req_mode) {
|
||||
case 'advert':
|
||||
|
@ -31,59 +31,23 @@ switch ($req_mode) {
|
|||
$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');
|
||||
case 'not_found':
|
||||
$info['title'] = $lang['NOT_FOUND'];
|
||||
$info['src'] = 'not_found.html';
|
||||
break;
|
||||
}
|
||||
|
||||
$require = file_exists($html_dir . $info['src']) ? $html_dir . $info['src'] : $html_dir . 'not_found.html';
|
||||
$require = file_exists($html_dir . $info['src']) ? $html_dir . $info['src'] : false;
|
||||
|
||||
?><!DOCTYPE html>
|
||||
<html dir="ltr">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<meta http-equiv="Content-Style-Type" content="text/css"/>
|
||||
<link rel="stylesheet" href="styles/templates/default/css/main.css" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
<style type="text/css">
|
||||
#infobox-wrap {
|
||||
width: 760px;
|
||||
}
|
||||
$template->assign_vars([
|
||||
'PAGE_TITLE' => mb_strtoupper($info['title'], 'UTF-8'),
|
||||
'REQUIRE' => $require ? file_get_contents($require) : $lang['NOT_FOUND'],
|
||||
]);
|
||||
|
||||
#infobox-body {
|
||||
background: #FFFFFF;
|
||||
color: #000000;
|
||||
padding: 1em;
|
||||
height: 400px;
|
||||
overflow: auto;
|
||||
border: 1px inset #000000;
|
||||
}
|
||||
|
||||
#infobox-body p {
|
||||
margin-top: 1em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
</style>
|
||||
<br/>
|
||||
<div id="infobox-wrap" class="bCenter row1">
|
||||
<fieldset class="pad_6">
|
||||
<legend class="med bold mrg_2 warnColor1"><?php echo mb_strtoupper($info['title'], 'UTF-8'); ?></legend>
|
||||
<div class="bCenter">
|
||||
<?php require($require); ?>
|
||||
</div>
|
||||
</fieldset>
|
||||
<p class="gen tRight pad_6"><a href="javascript:window.close();" class="gen">[ <?php echo $lang['LOCK']; ?> ]</a>
|
||||
</p>
|
||||
</div><!--/infobox-wrap-->
|
||||
</body>
|
||||
</html>
|
||||
print_page('info.tpl', 'simple');
|
||||
|
|
32
styles/templates/default/info.tpl
Normal file
32
styles/templates/default/info.tpl
Normal file
|
@ -0,0 +1,32 @@
|
|||
<style type="text/css">
|
||||
#infobox-wrap {
|
||||
width: 760px;
|
||||
}
|
||||
|
||||
#infobox-body {
|
||||
background: #FFFFFF;
|
||||
color: #000000;
|
||||
padding: 1em;
|
||||
height: 400px;
|
||||
overflow: auto;
|
||||
border: 1px inset #000000;
|
||||
}
|
||||
|
||||
#infobox-body p {
|
||||
margin-top: 1em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
</style>
|
||||
|
||||
<br/>
|
||||
<div id="infobox-wrap" class="bCenter row1">
|
||||
<fieldset class="pad_6">
|
||||
<legend class="med bold mrg_2 warnColor1"><!-- IF PAGE_TITLE -->{PAGE_TITLE}<!-- ENDIF --></legend>
|
||||
<!-- IF REQUIRE -->
|
||||
<div class="bCenter">{REQUIRE}</div>
|
||||
<!-- ENDIF -->
|
||||
</fieldset>
|
||||
<p class="gen tRight pad_6"><a href="javascript:window.close();" class="gen">[ {L_LOCK} ]</a>
|
||||
</p>
|
||||
</div><!--/infobox-wrap-->
|
||||
<br/>
|
Loading…
Add table
Add a link
Reference in a new issue