torrentpier/admin/admin_terms.php
Roman Kelesidis 79bb13e17d
feat(ACP): Added robots.txt editor (#1913)
* feat(admin): Added robots.txt editor

* Update admin_robots.tpl

* Update admin_robots.php

* Update admin_robots.php

* Update admin_robots.php

* Update admin_robots.tpl

* Updated

* Updated

* Update main.php

* Updated
2025-05-30 17:53:22 +03:00

33 lines
1.2 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
/**
* TorrentPier Bull-powered BitTorrent tracker engine
*
* @copyright Copyright (c) 2005-2025 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
*/
if (!empty($setmodules)) {
$module['GENERAL']['TERMS'] = basename(__FILE__);
return;
}
require __DIR__ . '/pagestart.php';
require INC_DIR . '/bbcode.php';
$preview = isset($_POST['preview']);
if (isset($_POST['post']) && ($bb_cfg['terms'] !== $_POST['message'])) {
bb_update_config(['terms' => $_POST['message']]);
bb_die($lang['TERMS_UPDATED_SUCCESSFULLY'] . '<br /><br />' . sprintf($lang['CLICK_RETURN_TERMS_CONFIG'], '<a href="admin_terms.php">', '</a>') . '<br /><br />' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>'));
}
$template->assign_vars([
'S_ACTION' => 'admin_terms.php',
'EXT_LINK_NW' => $bb_cfg['ext_link_new_win'],
'MESSAGE' => $preview ? $_POST['message'] : $bb_cfg['terms'],
'PREVIEW_HTML' => $preview ? bbcode2html($_POST['message']) : '',
]);
print_page('admin_terms.tpl', 'admin');