mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 06:13:58 -07:00
New infopage script
Переделка файла выводящего страницы с информацией. Долой динамическое подключение и костыли на проверку XSS.
This commit is contained in:
parent
16c1e401d7
commit
b61a7ee9b6
24 changed files with 128 additions and 431 deletions
|
@ -749,10 +749,7 @@ class attach_parent
|
|||
$s_hidden = '<input type="hidden" name="add_attachment_body" value="' . $value_add . '" />';
|
||||
$s_hidden .= '<input type="hidden" name="posted_attachments_body" value="' . $value_posted . '" />';
|
||||
|
||||
$u_rules_id = $forum_id;
|
||||
|
||||
$template->assign_vars(array(
|
||||
'RULES' => '<a href="'."misc.php?do=attach_rules&f=$u_rules_id".'" target="_blank">'. $lang['ALLOWED_EXTENSIONS_AND_SIZES'] .'</a>',
|
||||
'ADD_ATTACH_HIDDEN_FIELDS' => $s_hidden,
|
||||
));
|
||||
|
||||
|
@ -783,12 +780,11 @@ class attach_parent
|
|||
if ($this->add_attachment_body)
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'TPL_ADD_ATTACHMENT' => true,
|
||||
'FILE_COMMENT' => htmlspecialchars($this->file_comment),
|
||||
'FILESIZE' => $attach_config['max_filesize'],
|
||||
'FILENAME' => htmlspecialchars($this->filename),
|
||||
|
||||
'S_FORM_ENCTYPE' => 'enctype="multipart/form-data"',
|
||||
'TPL_ADD_ATTACHMENT' => true,
|
||||
'FILE_COMMENT' => htmlspecialchars($this->file_comment),
|
||||
'FILESIZE' => $attach_config['max_filesize'],
|
||||
'FILENAME' => htmlspecialchars($this->filename),
|
||||
'S_FORM_ENCTYPE' => 'enctype="multipart/form-data"',
|
||||
));
|
||||
}
|
||||
|
||||
|
@ -810,13 +806,12 @@ class attach_parent
|
|||
}
|
||||
|
||||
$template->assign_block_vars('attach_row', array(
|
||||
'FILE_NAME' => @htmlspecialchars($this->attachment_filename_list[$i]),
|
||||
'ATTACH_FILENAME' => @$this->attachment_list[$i],
|
||||
'FILE_COMMENT' => @htmlspecialchars($this->attachment_comment_list[$i]),
|
||||
'ATTACH_ID' => @$this->attachment_id_list[$i],
|
||||
|
||||
'U_VIEW_ATTACHMENT' => $download_link)
|
||||
);
|
||||
'FILE_NAME' => @htmlspecialchars($this->attachment_filename_list[$i]),
|
||||
'ATTACH_FILENAME' => @$this->attachment_list[$i],
|
||||
'FILE_COMMENT' => @htmlspecialchars($this->attachment_comment_list[$i]),
|
||||
'ATTACH_ID' => @$this->attachment_id_list[$i],
|
||||
'U_VIEW_ATTACHMENT' => $download_link,
|
||||
));
|
||||
|
||||
// Thumbnail there ? And is the User Admin or Mod ? Then present the 'Delete Thumbnail' Button
|
||||
if (@intval($this->attachment_thumbnail_list[$i]) == 1 && ((isset($is_auth['auth_mod']) && $is_auth['auth_mod']) || IS_ADMIN))
|
||||
|
|
|
@ -606,9 +606,9 @@ $bb_cfg['trash_forum_id'] = 0; // (int) 7
|
|||
$bb_cfg['first_logon_redirect_url'] = 'index.php';
|
||||
$bb_cfg['terms_and_conditions_url'] = 'terms.php';
|
||||
|
||||
$bb_cfg['user_agreement_url'] = 'misc.php?do=info&show=user_agreement';
|
||||
$bb_cfg['copyright_holders_url'] = 'misc.php?do=info&show=copyright_holders';
|
||||
$bb_cfg['advert_url'] = 'misc.php?do=info&show=advert';
|
||||
$bb_cfg['user_agreement_url'] = 'info.php?show=user_agreement';
|
||||
$bb_cfg['copyright_holders_url'] = 'info.php?show=copyright_holders';
|
||||
$bb_cfg['advert_url'] = 'info.php?show=advert';
|
||||
|
||||
// Captcha
|
||||
$bb_cfg['captcha'] = array(
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
if (!defined('BB_ROOT')) die(basename(__FILE__));
|
||||
if (PHP_VERSION < '5.3') die('TorrentPier II requires PHP version 5.3+. Your PHP version '. PHP_VERSION);
|
||||
if (!defined('BB_SCRIPT')) define('BB_SCRIPT', 'undefined');
|
||||
if (!defined('BB_CFG_LOADED')) trigger_error('bb_cfg not loaded', E_USER_ERROR);
|
||||
if (!defined('BB_CFG_LOADED')) trigger_error('File config.php not loaded', E_USER_ERROR);
|
||||
|
||||
// Define some basic configuration arrays
|
||||
unset($stopwords, $synonyms_match, $synonyms_replace);
|
||||
|
|
71
upload/info.php
Normal file
71
upload/info.php
Normal file
|
@ -0,0 +1,71 @@
|
|||
<?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">
|
||||
<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="./templates/default/css/main.css" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
<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"><?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>
|
|
@ -1,17 +1,4 @@
|
|||
<title>ADVERTISING ON THE SITE</title>
|
||||
|
||||
<div id="infobox-wrap" class="bCenter row1">
|
||||
<fieldset class="pad_6">
|
||||
<legend class="med bold mrg_2 warnColor1">ADVERTISING ON THE SITE</legend>
|
||||
<div class="bCenter">
|
||||
<style type="text/css">
|
||||
#infobox-body p { margin-top: 1em; margin-bottom: 1em; }
|
||||
</style>
|
||||
<div id="infobox-body">
|
||||
<h2 class="bold">Advertising on <a href="http://<?php echo ($bb_cfg['server_port'] != 80) ? "{$bb_cfg['server_name']}:{$bb_cfg['server_port']}" : $bb_cfg['server_name']; ?>"><?php echo $bb_cfg['sitename']?></a></h2>
|
||||
<p>For advertising please contact: <strong><a href="mailto:<?php echo $bb_cfg['adv_email']; ?>" class="gen"><?php echo $bb_cfg['adv_email']; ?></a></strong></p>
|
||||
</div><!--/infobox-body-->
|
||||
</div>
|
||||
</fieldset>
|
||||
<p class="gen tRight pad_6"><a href="javascript:window.close();" class="gen">[ Close ]</a></p>
|
||||
</div><!--/infobox-wrap-->
|
||||
<div id="infobox-body">
|
||||
<h2 class="bold">Advertising on <a href="http://<?php echo ($bb_cfg['server_port'] != 80) ? "{$bb_cfg['server_name']}:{$bb_cfg['server_port']}" : $bb_cfg['server_name']; ?>"><?php echo $bb_cfg['sitename']?></a></h2>
|
||||
<p>For advertising please contact: <strong><a href="mailto:<?php echo $bb_cfg['adv_email']; ?>" class="gen"><?php echo $bb_cfg['adv_email']; ?></a></strong></p>
|
||||
</div><!--/infobox-body-->
|
|
@ -1,18 +1,6 @@
|
|||
<title>INFORMATION FOR COPYRIGHT HOLDERS</title>
|
||||
|
||||
<div id="infobox-wrap" class="bCenter row1">
|
||||
<fieldset class="pad_6">
|
||||
<legend class="med bold mrg_2 warnColor1">INFORMATION FOR COPYRIGHT HOLDERS</legend>
|
||||
<div class="bCenter">
|
||||
<style type="text/css">
|
||||
|
||||
#infobox-body p { margin-top: 1em; margin-bottom: 1em; }
|
||||
|
||||
</style>
|
||||
|
||||
<div id="infobox-body">
|
||||
|
||||
<p>Information for copyright holders.</p>
|
||||
<p><h1>INFORMATION FOR COPYRIGHT HOLDERS</h1></p>
|
||||
|
||||
<p>If you are the copyright of any material link (or links) which is available on this site, and would not want to spread this information by users without your consent, we will be happy to assist you by removing the appropriate links.</p>
|
||||
|
||||
|
@ -45,7 +33,3 @@ which indicated to us the following information:</p>
|
|||
<p>c) According to the Law on Copyright and Related Rights, a reference to any data (information message), by itself, is not subject to copyright law (although it may violate the "Agreement on the use of the website"). Thus, it is not necessary to send letters containing threats or demands, as not having a real reason.</p>
|
||||
|
||||
</div><!--/infobox-body-->
|
||||
</div>
|
||||
</fieldset>
|
||||
<p class="gen tRight pad_6"><a href="javascript:window.close();" class="gen">[ Close ]</a></p>
|
||||
</div><!--/infobox-wrap-->
|
|
@ -1,14 +1,3 @@
|
|||
<div id="infobox-wrap" class="bCenter row1">
|
||||
<fieldset class="pad_6">
|
||||
<legend class="med bold mrg_2 warnColor1">File not found</legend>
|
||||
<div class="bCenter">
|
||||
<style type="text/css">
|
||||
#infobox-body p { margin-top: 1em; margin-bottom: 1em; }
|
||||
</style>
|
||||
<div id="infobox-body">
|
||||
<p>File not found</p>
|
||||
</div><!--/infobox-body-->
|
||||
</div>
|
||||
</fieldset>
|
||||
<p class="gen tRight pad_6"><a href="javascript:window.close();" class="gen">[ Close ]</a></p>
|
||||
</div><!--/infobox-wrap-->
|
||||
<div id="infobox-body">
|
||||
<p>File not found</p>
|
||||
</div><!--/infobox-body-->
|
|
@ -12,7 +12,7 @@
|
|||
<div>
|
||||
<h3>FAQ</h3>
|
||||
<ul class="med">
|
||||
<li><a href="misc.php?do=info&show=user_agreement" class="med" onclick="window.open(this.href, '', IWP); return false;"><b>Terms of use resource</b></a></li>
|
||||
<li><a href="info.php?show=user_agreement" class="med" onclick="window.open(this.href, '', IWP); return false;"><b>Terms of use resource</b></a></li>
|
||||
<li><a href="http://torrentpier.me/threads/faq-для-новичков.260" class="med">FAQ for beginners</a></li>
|
||||
<li><a href="http://torrentpier.me/forums/Основные-вопросы-по-torrentpier-ii.10" class="med">Where is ask a question?</a></li>
|
||||
</ul>
|
||||
|
|
|
@ -1,25 +1,10 @@
|
|||
<?php if (isset($in_info)) {?>
|
||||
<title>USER AGREEMENT</title>
|
||||
|
||||
<div id="infobox-wrap" class="bCenter row1">
|
||||
<fieldset class="pad_6">
|
||||
<legend class="med bold mrg_2 warnColor1">USER AGREEMENT</legend>
|
||||
<div class="bCenter">
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
#infobox-body p { margin-top: 1em; margin-bottom: 1em; }
|
||||
|
||||
</style>
|
||||
<?php }?>
|
||||
|
||||
<div id="infobox-body">
|
||||
|
||||
<p>
|
||||
|
||||
<h1>USER AGREEMENT</h1>
|
||||
<p><h1>USER AGREEMENT</h1></p>
|
||||
|
||||
<h3>ABOUT SITE</h3>
|
||||
<p><h3>ABOUT SITE</h3></p>
|
||||
|
||||
<p>Internet - resource (website) <a href="http://<?php echo ($bb_cfg['server_port'] != 80) ? "{$bb_cfg['server_name']}:{$bb_cfg['server_port']}" : $bb_cfg['server_name']; ?>"><?php echo $bb_cfg['sitename']?></a> (hereinafter - Resource) is an internet site that allows users to share information with each other via bit-torrent, as well as in free form, and provides a means to monitor the integrity of information transmitted (via hash-files).</p>
|
||||
|
||||
|
@ -97,9 +82,3 @@
|
|||
</p>
|
||||
|
||||
</div><!--/infobox-body-->
|
||||
<?php if (isset($in_info)) {?>
|
||||
</div>
|
||||
</fieldset>
|
||||
<p class="gen tRight pad_6"><a href="javascript:window.close();" class="gen">[ Close ]</a></p>
|
||||
</div><!--/infobox-wrap-->
|
||||
<?php }?>
|
|
@ -657,6 +657,7 @@ $lang['USER_AGREEMENT_AGREE'] = 'I have read and agree to the User agreement abo
|
|||
|
||||
$lang['COPYRIGHT_HOLDERS'] = 'For copyright holders';
|
||||
$lang['ADVERT'] = 'Advertise on this site';
|
||||
$lang['NOT_FOUND'] = 'File not found';
|
||||
|
||||
// Visual confirmation system strings
|
||||
$lang['CONFIRM_CODE_WRONG'] = 'The confirmation code you entered was incorrect';
|
||||
|
@ -1032,13 +1033,6 @@ $lang['DIRECTORY_DOES_NOT_EXIST'] = 'The Directory \'%s\' does not exist or Coul
|
|||
$lang['DIRECTORY_IS_NOT_A_DIR'] = 'Please check if \'%s\' is a directory.'; // replace %s with directory
|
||||
$lang['DIRECTORY_NOT_WRITEABLE'] = 'Directory \'%s\' is not writeable. You\'ll have to create the upload path and chmod it to 777 (or change the owner to you httpd-servers owner) to upload files.<br />If you have only plain FTP-access change the \'Attribute\' of the directory to rwxrwxrwx.'; // replace %s with directory
|
||||
|
||||
// Attach Rules Window
|
||||
$lang['RULES_PAGE'] = 'Attachment Rules';
|
||||
$lang['ATTACH_RULES_TITLE'] = 'Allowed Extension Groups and their Sizes';
|
||||
$lang['GROUP_RULE_HEADER'] = '%s -> Maximum Upload Size: %s'; // Replace first %s with Extension Group, second one with the Size STRING
|
||||
$lang['ALLOWED_EXTENSIONS_AND_SIZES'] = 'Allowed Extensions and Sizes';
|
||||
$lang['NOTE_USER_EMPTY_GROUP_PERMISSIONS'] = 'NOTE:<br />You are normally allowed to attach files within this Forum, <br />but since no Extension Group is allowed to be attached here, <br />you are unable to attach anything. If you try, <br />you will receive an Error Message.<br />';
|
||||
|
||||
// Quota Variables
|
||||
$lang['UPLOAD_QUOTA'] = 'Upload Quota';
|
||||
$lang['PM_QUOTA'] = 'PM Quota';
|
||||
|
|
|
@ -1,17 +1,4 @@
|
|||
<title>РЕКЛАМА НА САЙТЕ</title>
|
||||
|
||||
<div id="infobox-wrap" class="bCenter row1">
|
||||
<fieldset class="pad_6">
|
||||
<legend class="med bold mrg_2 warnColor1">РЕКЛАМА НА САЙТЕ</legend>
|
||||
<div class="bCenter">
|
||||
<style type="text/css">
|
||||
#infobox-body p { margin-top: 1em; margin-bottom: 1em; }
|
||||
</style>
|
||||
<div id="infobox-body">
|
||||
<h2 class="bold">Размещение рекламы на <a href="http://<?php echo ($bb_cfg['server_port'] != 80) ? "{$bb_cfg['server_name']}:{$bb_cfg['server_port']}" : $bb_cfg['server_name']; ?>"><?php echo $bb_cfg['sitename']?></a></h2>
|
||||
<p>По вопросам размещения рекламы обращайтесь по адресу: <strong><a href="mailto:<?php echo $bb_cfg['adv_email']; ?>" class="gen"><?php echo $bb_cfg['adv_email']; ?></a></strong></p>
|
||||
</div><!--/infobox-body-->
|
||||
</div>
|
||||
</fieldset>
|
||||
<p class="gen tRight pad_6"><a href="javascript:window.close();" class="gen">[ Закрыть ]</a></p>
|
||||
</div><!--/infobox-wrap-->
|
||||
<div id="infobox-body">
|
||||
<h2 class="bold">Размещение рекламы на <a href="http://<?php echo ($bb_cfg['server_port'] != 80) ? "{$bb_cfg['server_name']}:{$bb_cfg['server_port']}" : $bb_cfg['server_name']; ?>"><?php echo $bb_cfg['sitename']?></a></h2>
|
||||
<p>По вопросам размещения рекламы обращайтесь по адресу: <strong><a href="mailto:<?php echo $bb_cfg['adv_email']; ?>" class="gen"><?php echo $bb_cfg['adv_email']; ?></a></strong></p>
|
||||
</div><!--/infobox-body-->
|
|
@ -1,18 +1,6 @@
|
|||
<title>ИНФОРМАЦИЯ ДЛЯ ПРАВООБЛАДАТЕЛЕЙ</title>
|
||||
|
||||
<div id="infobox-wrap" class="bCenter row1">
|
||||
<fieldset class="pad_6">
|
||||
<legend class="med bold mrg_2 warnColor1">ИНФОРМАЦИЯ ДЛЯ ПРАВООБЛАДАТЕЛЕЙ</legend>
|
||||
<div class="bCenter">
|
||||
<style type="text/css">
|
||||
|
||||
#infobox-body p { margin-top: 1em; margin-bottom: 1em; }
|
||||
|
||||
</style>
|
||||
|
||||
<div id="infobox-body">
|
||||
|
||||
<p>Информация для правообладателей.</p>
|
||||
<p><h1>ИНФОРМАЦИЯ ДЛЯ ПРАВООБЛАДАТЕЛЕЙ</h1></p>
|
||||
|
||||
<p>Если Вы являетесь правообладателем какого-либо материала, ссылка (либо ссылки) на который размещена на этом сайте, и не хотели бы чтобы данная информация распространялась пользователями без Вашего на то согласия, то мы будем рады оказать Вам содействие, удалив соответствующие ссылки.</p>
|
||||
|
||||
|
@ -45,7 +33,3 @@
|
|||
<p>в) Согласно закону об Авторском и Смежном правах, ссылка на любые данные (информационное сообщение), сама по себе, не является объектом авторского права (хотя может нарушать "соглашение об использовании сайта"). Таким образом, не стоит присылать письма содержащие угрозы либо требования, как не имеющие под собой реальных оснований.</p>
|
||||
|
||||
</div><!--/infobox-body-->
|
||||
</div>
|
||||
</fieldset>
|
||||
<p class="gen tRight pad_6"><a href="javascript:window.close();" class="gen">[ Закрыть ]</a></p>
|
||||
</div><!--/infobox-wrap-->
|
|
@ -1,14 +1,3 @@
|
|||
<div id="infobox-wrap" class="bCenter row1">
|
||||
<fieldset class="pad_6">
|
||||
<legend class="med bold mrg_2 warnColor1">Файл не найден</legend>
|
||||
<div class="bCenter">
|
||||
<style type="text/css">
|
||||
#infobox-body p { margin-top: 1em; margin-bottom: 1em; }
|
||||
</style>
|
||||
<div id="infobox-body">
|
||||
<p>Файл не найден</p>
|
||||
</div><!--/infobox-body-->
|
||||
</div>
|
||||
</fieldset>
|
||||
<p class="gen tRight pad_6"><a href="javascript:window.close();" class="gen">[ Закрыть ]</a></p>
|
||||
</div><!--/infobox-wrap-->
|
||||
<div id="infobox-body">
|
||||
<p>Файл не найден</p>
|
||||
</div><!--/infobox-body-->
|
|
@ -12,7 +12,7 @@
|
|||
<div>
|
||||
<h3>FAQ</h3>
|
||||
<ul class="med">
|
||||
<li><a href="misc.php?do=info&show=user_agreement" class="med" onclick="window.open(this.href, '', IWP); return false;"><b>Правила пользования данным ресурсом</b></a></li>
|
||||
<li><a href="info.php?show=user_agreement" class="med" onclick="window.open(this.href, '', IWP); return false;"><b>Правила пользования данным ресурсом</b></a></li>
|
||||
<li><a href="http://torrentpier.me/threads/faq-для-новичков.260" class="med">FAQ для новичков</a></li>
|
||||
<li><a href="http://torrentpier.me/forums/Основные-вопросы-по-torrentpier-ii.10" class="med">Где задать вопрос?</a></li>
|
||||
</ul>
|
||||
|
|
|
@ -1,25 +1,10 @@
|
|||
<?php if (isset($in_info)) {?>
|
||||
<title>ПОЛЬЗОВАТЕЛЬСКОЕ СОГЛАШЕНИЕ</title>
|
||||
|
||||
<div id="infobox-wrap" class="bCenter row1">
|
||||
<fieldset class="pad_6">
|
||||
<legend class="med bold mrg_2 warnColor1">ПОЛЬЗОВАТЕЛЬСКОЕ СОГЛАШЕНИЕ</legend>
|
||||
<div class="bCenter">
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
#infobox-body p { margin-top: 1em; margin-bottom: 1em; }
|
||||
|
||||
</style>
|
||||
<?php }?>
|
||||
|
||||
<div id="infobox-body">
|
||||
|
||||
<p>
|
||||
|
||||
<h1>ПОЛЬЗОВАТЕЛЬСКОЕ СОГЛАШЕНИЕ</h1>
|
||||
<p><h1>ПОЛЬЗОВАТЕЛЬСКОЕ СОГЛАШЕНИЕ</h1></p>
|
||||
|
||||
<h3>О САЙТЕ</h3>
|
||||
<p><h3>О САЙТЕ</h3></p>
|
||||
|
||||
<p>Интернет - ресурс (сайт) <a href="http://<?php echo ($bb_cfg['server_port'] != 80) ? "{$bb_cfg['server_name']}:{$bb_cfg['server_port']}" : $bb_cfg['server_name']; ?>"><?php echo $bb_cfg['sitename']?></a> (в дальнейшем - Ресурс) является интернет-сайтом, позволяющим пользователям обмениваться друг с другом информацией по протоколу бит-торрент, а также в свободной форме, и предоставляющим средства для контроля целостности передаваемой информации (посредством hash-файлов).</p>
|
||||
|
||||
|
@ -97,9 +82,3 @@
|
|||
</p>
|
||||
|
||||
</div><!--/infobox-body-->
|
||||
<?php if (isset($in_info)) {?>
|
||||
</div>
|
||||
</fieldset>
|
||||
<p class="gen tRight pad_6"><a href="javascript:window.close();" class="gen">[ Закрыть ]</a></p>
|
||||
</div><!--/infobox-wrap-->
|
||||
<?php }?>
|
|
@ -657,6 +657,7 @@ $lang['USER_AGREEMENT_AGREE'] = 'Я прочел ПОЛЬЗОВАТЕЛЬСКО
|
|||
|
||||
$lang['COPYRIGHT_HOLDERS'] = 'Для правообладателей';
|
||||
$lang['ADVERT'] = 'Реклама на сайте';
|
||||
$lang['NOT_FOUND'] = 'Файл не найден';
|
||||
|
||||
// Visual confirmation system strings
|
||||
$lang['CONFIRM_CODE_WRONG'] = 'Вы ввели неверный код подтверждения';
|
||||
|
@ -1032,13 +1033,6 @@ $lang['DIRECTORY_DOES_NOT_EXIST'] = 'Директория \'%s\' не сущес
|
|||
$lang['DIRECTORY_IS_NOT_A_DIR'] = 'Пожалуйста, проверьте является ли \'%s\' директорией.'; // replace %s with directory
|
||||
$lang['DIRECTORY_NOT_WRITEABLE'] = 'Директория \'%s\' недоступна для записи. Вам нужно создать директорию для закачек и выполнить chmod 777 (или изменить владельца httpd-servers) для закачки фалов на сервер.<br />Если у вас только FTP доступ к серверу измените \'Атрибуты\' директории на rwxrwxrwx.'; // replace %s with directory
|
||||
|
||||
// Attach Rules Window
|
||||
$lang['RULES_PAGE'] = 'Правила вложений';
|
||||
$lang['ATTACH_RULES_TITLE'] = 'Разрешенные группы расширений и их размер';
|
||||
$lang['GROUP_RULE_HEADER'] = '%s -> Максимальный общий размер: %s'; // Replace first %s with Extension Group, second one with the Size STRING
|
||||
$lang['ALLOWED_EXTENSIONS_AND_SIZES'] = 'Разрешенные расширения и их размер';
|
||||
$lang['NOTE_USER_EMPTY_GROUP_PERMISSIONS'] = 'ВНИМАНИЕ:<br />Вы можете отправлять вложения в этот форум, <br />но, так как ни одной группе расширений не разрешено быть вложенной здесь, <br />вы не можете ничего отправить. Если вы попытаетесь, <br />то получите сообщение об ошибке.<br />';
|
||||
|
||||
// Quota Variables
|
||||
$lang['UPLOAD_QUOTA'] = 'Квота';
|
||||
$lang['PM_QUOTA'] = 'Квота ЛС';
|
||||
|
|
|
@ -1,17 +1,4 @@
|
|||
<title>РЕКЛАМА НА САЙТІ</title>
|
||||
|
||||
<div id="infobox-wrap" class="bCenter row1">
|
||||
<fieldset class="pad_6">
|
||||
<legend class="med bold mrg_2 warnColor1">РЕКЛАМА НА САЙТІ</legend>
|
||||
<div class="bCenter">
|
||||
<style type="text/css">
|
||||
#infobox-body p { margin-top: 1em; margin-bottom: 1em; }
|
||||
</style>
|
||||
<div id="infobox-body">
|
||||
<h2 class="bold">Розміщення реклами на <a href="http://<?php echo ($bb_cfg['server_port'] != 80) ? "{$bb_cfg['server_name']}:{$bb_cfg['server_port']}" : $bb_cfg['server_name']; ?>"><?php echo $bb_cfg['sitename']?></a></h2>
|
||||
<p>З питань розміщення реклами звертайтесь за адресою: <strong><a href="mailto:<?php echo $bb_cfg['adv_email']; ?>" class="gen"><?php echo $bb_cfg['adv_email']; ?></a></strong></p>
|
||||
</div><!--/infobox-body-->
|
||||
</div>
|
||||
</fieldset>
|
||||
<p class="gen tRight pad_6"><a href="javascript:window.close();" class="gen">[ Закрити ]</a></p>
|
||||
</div><!--/infobox-wrap-->
|
||||
<div id="infobox-body">
|
||||
<h2 class="bold">Розміщення реклами на <a href="http://<?php echo ($bb_cfg['server_port'] != 80) ? "{$bb_cfg['server_name']}:{$bb_cfg['server_port']}" : $bb_cfg['server_name']; ?>"><?php echo $bb_cfg['sitename']?></a></h2>
|
||||
<p>З питань розміщення реклами звертайтесь за адресою: <strong><a href="mailto:<?php echo $bb_cfg['adv_email']; ?>" class="gen"><?php echo $bb_cfg['adv_email']; ?></a></strong></p>
|
||||
</div><!--/infobox-body-->
|
|
@ -1,18 +1,6 @@
|
|||
<title>ІНФОРМАЦІЯ ДЛЯ ПРАВОВЛАСНИКІВ</title>
|
||||
|
||||
<div id="infobox-wrap" class="bCenter row1">
|
||||
<fieldset class="pad_6">
|
||||
<legend class="med bold mrg_2 warnColor1">ІНФОРМАЦІЯ ДЛЯ ПРАВОВЛАСНИКІВ</legend>
|
||||
<div class="bCenter">
|
||||
<style type="text/css">
|
||||
|
||||
#infobox-body p { margin-top: 1em; margin-bottom: 1em; }
|
||||
|
||||
</style>
|
||||
|
||||
<div id="infobox-body">
|
||||
|
||||
<p>Інформація для правовласників.</p>
|
||||
<p><h1>ІНФОРМАЦІЯ ДЛЯ ПРАВОВЛАСНИКІВ</h1></p>
|
||||
|
||||
<p>Якщо Ви є правовласником якого-небудь матеріалу, посилання (або посилання) на якe розміщено на цьому сайті, і не хотіли б щоб дана інформація розповсюджувалася користувачами без Вашої на те згоди, то ми будемо сприяти Вам, видаливши відповідні посилання.</p>
|
||||
|
||||
|
@ -45,7 +33,3 @@
|
|||
<p>в) Згідно закону про Авторське і Суміжне права, посилання на будь-які дані (інформаційне повідомлення), саме по собі, не є об'єктом авторського права (хоча може порушувати "угоду про використання сайту"). Таким чином, не варто присилати листи, що містять погрози або вимоги, як що не мають під собою реальних підстав.</p>
|
||||
|
||||
</div><!--/infobox-body-->
|
||||
</div>
|
||||
</fieldset>
|
||||
<p class="gen tRight pad_6"><a href="javascript:window.close();" class="gen">[ Закрити ]</a></p>
|
||||
</div><!--/infobox-wrap-->
|
|
@ -1,14 +1,3 @@
|
|||
<div id="infobox-wrap" class="bCenter row1">
|
||||
<fieldset class="pad_6">
|
||||
<legend class="med bold mrg_2 warnColor1">Файл не знайдено</legend>
|
||||
<div class="bCenter">
|
||||
<style type="text/css">
|
||||
#infobox-body p { margin-top: 1em; margin-bottom: 1em; }
|
||||
</style>
|
||||
<div id="infobox-body">
|
||||
<p>Файл не знайдено</p>
|
||||
</div><!--/infobox-body-->
|
||||
</div>
|
||||
</fieldset>
|
||||
<p class="gen tRight pad_6"><a href="javascript:window.close();" class="gen">[ Закрити ]</a></p>
|
||||
</div><!--/infobox-wrap-->
|
||||
<div id="infobox-body">
|
||||
<p>Файл не знайдено</p>
|
||||
</div><!--/infobox-body-->
|
|
@ -12,7 +12,7 @@
|
|||
<div>
|
||||
<h3>FAQ</h3>
|
||||
<ul class="med">
|
||||
<li><a href="misc.php?do=info&show=user_agreement" class="med" onclick="window.open(this.href, '', IWP); return false;"><b>Правила користування цим ресурсом</b></a></li>
|
||||
<li><a href="info.php?show=user_agreement" class="med" onclick="window.open(this.href, '', IWP); return false;"><b>Правила користування цим ресурсом</b></a></li>
|
||||
<li><a href="http://torrentpier.me/threads/faq-для-новичков.260" class="med">FAQ для новачків</a></li>
|
||||
<li><a href="http://torrentpier.me/forums/Основные-вопросы-по-torrentpier-ii.10" class="med">Де поставити питання?</a></li>
|
||||
</ul>
|
||||
|
|
|
@ -1,25 +1,10 @@
|
|||
<?php if (isset($in_info)) {?>
|
||||
<title>УГОДА</title>
|
||||
|
||||
<div id="infobox-wrap" class="bCenter row1">
|
||||
<fieldset class="pad_6">
|
||||
<legend class="med bold mrg_2 warnColor1">УГОДА</legend>
|
||||
<div class="bCenter">
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
#infobox-body p { margin-top: 1em; margin-bottom: 1em; }
|
||||
|
||||
</style>
|
||||
<?php }?>
|
||||
|
||||
<div id="infobox-body">
|
||||
|
||||
<p>
|
||||
|
||||
<h1>УГОДА</h1>
|
||||
<p><h1>УГОДА</h1></p>
|
||||
|
||||
<h3>ПРО САЙТ</h3>
|
||||
<p><h3>ПРО САЙТ</h3></p>
|
||||
|
||||
<p>Інтернет - ресурс (сайт) <a href="http://<?php echo ($bb_cfg['server_port'] != 80) ? "{$bb_cfg['server_name']}:{$bb_cfg['server_port']}" : $bb_cfg['server_name']; ?>"><?php echo $bb_cfg['sitename']?></a> (надалі - Ресурс) є інтернет-сайтом, що дозволяє користувачам обмінюватися один з одним інформацією по протоколу біт-торрент, а також у вільній формі, що надає засоби для контролю цілісності інформації, що передається (за допомогою hash-файлів).</p>
|
||||
|
||||
|
@ -97,9 +82,3 @@
|
|||
</p>
|
||||
|
||||
</div><!--/infobox-body-->
|
||||
<?php if (isset($in_info)) {?>
|
||||
</div>
|
||||
</fieldset>
|
||||
<p class="gen tRight pad_6"><a href="javascript:window.close();" class="gen">[ Закрити ]</a></p>
|
||||
</div><!--/infobox-wrap-->
|
||||
<?php }?>
|
|
@ -657,6 +657,7 @@ $lang['USER_AGREEMENT_AGREE'] = "Я прочитав УГОДУ і зобов'я
|
|||
|
||||
$lang['COPYRIGHT_HOLDERS'] = 'Для правовласників';
|
||||
$lang['ADVERT'] = 'Реклама на сайті';
|
||||
$lang['NOT_FOUND'] = 'Файл не знайдено';
|
||||
|
||||
// Visual confirmation system strings
|
||||
$lang['CONFIRM_CODE_WRONG'] = 'Ви ввели неправильний код підтвердження';
|
||||
|
@ -1032,13 +1033,6 @@ $lang['DIRECTORY_DOES_NOT_EXIST'] = 'Директорія \'%s\' не існує
|
|||
$lang['DIRECTORY_IS_NOT_A_DIR'] = 'будь Ласка, перевірте чи є \'%s\' директорією.'; // replace %s with directory
|
||||
$lang['DIRECTORY_NOT_WRITEABLE'] = 'Директорія \'%s\' недоступна для запису. Вам потрібно створити директорію для закачувань і виконати chmod 777 (або змінити власника httpd-servers) для закачування файлів на сервер.<br />Якщо у вас тільки FTP доступ до сервера змініть \'Атрибути\' директорії на rwxrwxrwx.'; // replace %s with directory
|
||||
|
||||
// Attach Rules Window
|
||||
$lang['RULES_PAGE'] = 'Правила вкладень';
|
||||
$lang['ATTACH_RULES_TITLE'] = 'Дозволені групи розширень та їх розмір';
|
||||
$lang['GROUP_RULE_HEADER'] = '%s -> Максимальний загальний розмір: %s'; // Replace first %s with Extension Group, second one with the Size STRING
|
||||
$lang['ALLOWED_EXTENSIONS_AND_SIZES'] = 'Дозволені розширення та їх розмір';
|
||||
$lang['NOTE_USER_EMPTY_GROUP_PERMISSIONS'] = 'УВАГА:<br />Ви можете відправляти вкладення в цей форум, <br />але, так як ні одній групі розширень не дозволено бути вкладеною тут, <br />ви не можете нічого відправити. Якщо ви спробуєте, <br />то отримаєте повідомлення про помилку.<br />';
|
||||
|
||||
// Quota Variables
|
||||
$lang['UPLOAD_QUOTA'] = 'Розмір';
|
||||
$lang['PM_QUOTA'] = 'Квота ОП';
|
||||
|
|
144
upload/misc.php
144
upload/misc.php
|
@ -1,144 +0,0 @@
|
|||
<?php
|
||||
|
||||
define('IN_FORUM', true);
|
||||
define('BB_SCRIPT', 'misc');
|
||||
define('BB_ROOT', './');
|
||||
require(BB_ROOT .'common.php');
|
||||
|
||||
// Start Session Management
|
||||
$user->session_start();
|
||||
|
||||
$do = request_var('do', '');
|
||||
|
||||
if ($do == 'attach_rules')
|
||||
{
|
||||
if (!$forum_id = @intval(request_var('f', '')) OR !forum_exists($forum_id))
|
||||
{
|
||||
bb_die('invalid forum_id');
|
||||
}
|
||||
require(ATTACH_DIR .'attachment_mod.php');
|
||||
// Display the allowed Extension Groups and Upload Size
|
||||
$auth = auth(AUTH_ALL, $forum_id, $userdata);
|
||||
$_max_filesize = $attach_config['max_filesize'];
|
||||
|
||||
if (!$auth['auth_attachments'] || !$auth['auth_view'])
|
||||
{
|
||||
bb_die('You are not allowed to call this file');
|
||||
}
|
||||
|
||||
$sql = 'SELECT group_id, group_name, max_filesize, forum_permissions
|
||||
FROM ' . BB_EXTENSION_GROUPS . '
|
||||
WHERE allow_group = 1
|
||||
ORDER BY group_name ASC';
|
||||
|
||||
if (!($result = DB()->sql_query($sql)))
|
||||
{
|
||||
bb_die('Could not query extension groups');
|
||||
}
|
||||
|
||||
$allowed_filesize = array();
|
||||
$rows = DB()->sql_fetchrowset($result);
|
||||
$num_rows = DB()->num_rows($result);
|
||||
DB()->sql_freeresult($result);
|
||||
|
||||
// Ok, only process those Groups allowed within this forum
|
||||
$nothing = true;
|
||||
for ($i = 0; $i < $num_rows; $i++)
|
||||
{
|
||||
$auth_cache = trim($rows[$i]['forum_permissions']);
|
||||
|
||||
$permit = ((is_forum_authed($auth_cache, $forum_id)) || trim($rows[$i]['forum_permissions']) == '');
|
||||
|
||||
if ($permit)
|
||||
{
|
||||
$nothing = false;
|
||||
$group_name = $rows[$i]['group_name'];
|
||||
$f_size = intval(trim($rows[$i]['max_filesize']));
|
||||
$det_filesize = (!$f_size) ? $_max_filesize : $f_size;
|
||||
|
||||
$max_filesize = (!$det_filesize) ? $lang['UNLIMITED'] : humn_size($det_filesize);
|
||||
|
||||
$template->assign_block_vars('group_row', array(
|
||||
'GROUP_RULE_HEADER' => sprintf($lang['GROUP_RULE_HEADER'], $group_name, $max_filesize),
|
||||
));
|
||||
|
||||
$sql = 'SELECT extension
|
||||
FROM ' . BB_EXTENSIONS . "
|
||||
WHERE group_id = " . (int) $rows[$i]['group_id'] . "
|
||||
ORDER BY extension ASC";
|
||||
|
||||
if (!($result = DB()->sql_query($sql)))
|
||||
{
|
||||
bb_die('Could not query extensions');
|
||||
}
|
||||
|
||||
$e_rows = DB()->sql_fetchrowset($result);
|
||||
$e_num_rows = DB()->num_rows($result);
|
||||
DB()->sql_freeresult($result);
|
||||
|
||||
for ($j = 0; $j < $e_num_rows; $j++)
|
||||
{
|
||||
$template->assign_block_vars('group_row.extension_row', array(
|
||||
'EXTENSION' => $e_rows[$j]['extension'],
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'PAGE_TITLE' => $lang['ATTACH_RULES_TITLE'],
|
||||
));
|
||||
|
||||
if ($nothing)
|
||||
{
|
||||
$template->assign_block_vars('switch_nothing', array());
|
||||
}
|
||||
|
||||
print_page('attach_rules.tpl', 'simple');
|
||||
}
|
||||
elseif ($do == 'info')
|
||||
{
|
||||
$req_mode = (string) request_var('show', 'not_found');
|
||||
if(preg_match('/\//i', $req_mode))
|
||||
{
|
||||
die('Include detected!');
|
||||
}
|
||||
if(preg_match('/</i', $req_mode))
|
||||
{
|
||||
die('XSS detected!');
|
||||
}
|
||||
$req_mode = clean_filename(basename($req_mode));
|
||||
|
||||
$html_dir = LANG_DIR . 'html/';
|
||||
$require = file_exists($html_dir . $req_mode .'.html') ? $html_dir . $req_mode .'.html' : $html_dir . 'not_found.html';
|
||||
|
||||
$in_info = true;
|
||||
|
||||
?><!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="./templates/default/css/main.css" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<style type="text/css">
|
||||
#infobox-wrap { width: 760px; }
|
||||
#infobox-body {
|
||||
background: #FFFFFF; color: #000000; padding: 1em;
|
||||
height: 400px; overflow: auto; border: 1px inset #000000;
|
||||
}
|
||||
</style>
|
||||
|
||||
<br />
|
||||
<?php require($require) ?>
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
bb_die('Invalid mode');
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
<div class="spacer_8"></div>
|
||||
|
||||
<table class="forumline wAuto">
|
||||
<tr>
|
||||
<th>{L_ATTACH_RULES_TITLE}</th>
|
||||
</tr>
|
||||
<!-- BEGIN switch_nothing -->
|
||||
<tr>
|
||||
<td class="row1 tCenter">{L_NOTE_USER_EMPTY_GROUP_PERMISSIONS}</td>
|
||||
</tr>
|
||||
<!-- END switch_nothing -->
|
||||
<!-- BEGIN group_row -->
|
||||
<tr>
|
||||
<td class="row1 tCenter">
|
||||
<h4 class="mrg_6">{group_row.GROUP_RULE_HEADER}</h4>
|
||||
<p class="mrg_6">
|
||||
<!-- BEGIN extension_row -->
|
||||
{group_row.extension_row.EXTENSION}
|
||||
<!-- END extension_row -->
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- END group_row -->
|
||||
</table>
|
Loading…
Add table
Add a link
Reference in a new issue