mirror of
https://github.com/torrentpier/torrentpier.git
synced 2024-12-15 00:21:17 -08:00
3626143879
* Replaced some file_exists to is_file * Update functions_thumbs.php * Updated * Update CronHelper.php * Updated * Update IPHelper.php * Updated * Update update_forums_atom.php * Update functions.php * Update Validate.php
51 lines
1.3 KiB
PHP
51 lines
1.3 KiB
PHP
<?php
|
||
/**
|
||
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||
*
|
||
* @copyright Copyright (c) 2005-2024 TorrentPier (https://torrentpier.com)
|
||
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||
*/
|
||
|
||
define('BB_SCRIPT', 'info');
|
||
|
||
require __DIR__ . '/common.php';
|
||
|
||
// Start session management
|
||
$user->session_start();
|
||
|
||
$info = [];
|
||
$htmlDir = LANG_DIR . 'html/';
|
||
|
||
switch ((string)$_REQUEST['show'] ?? 'not_found') {
|
||
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 'user_agreement':
|
||
$info['title'] = $lang['USER_AGREEMENT'];
|
||
$info['src'] = 'user_agreement.html';
|
||
break;
|
||
|
||
default:
|
||
case 'not_found':
|
||
$info['title'] = $lang['NOT_FOUND'];
|
||
$info['src'] = 'not_found.html';
|
||
break;
|
||
}
|
||
|
||
$require = is_file($htmlDir . $info['src']) ? ($htmlDir . $info['src']) : false;
|
||
|
||
$template->assign_vars([
|
||
'PAGE_TITLE' => mb_strtoupper($info['title'], 'UTF-8'),
|
||
'REQUIRE' => $require ? file_get_contents($require) : $lang['NOT_FOUND'],
|
||
]);
|
||
|
||
print_page('info.tpl', 'simple');
|