Merge pull request #13 from torrentpier/develop

R593

Основные изменения в данной ревизии:

- добавлена карта сайта (sitemap);

- исправлена ошибка с выводом списка файлов в некорректно созданных или чрезмерно больших торрент-файлах;
- исправлена прямая необходимость наличия модуля tidy для работы движка, теперь он опциональный, но крайне рекомендуемый;
- исправлена ошибка с функцией вывода картинки пола пользователя;
- исправлена работа крон-задачи по удалению неактивных пользователей;
- исправлена ошибка в начислении сид-бонусов;
- исправления в локализации и файлах шаблона;
- исправлено подключение файлов системы вложений;

- удален файл viewonline.php;
- удалены пустые символы в конце строк;
- удалены части неиспользуемого кода.
This commit is contained in:
Exile 2014-08-04 23:41:34 +04:00
commit b6ee3360b8
115 changed files with 1159 additions and 962 deletions

59
README.md Normal file
View file

@ -0,0 +1,59 @@
TorrentPier II
======================
TorrentPier II - движок торрент-трекера, написанный на php. Высокая скорость работы, простота модификации, устойчивость к высоким нагрузкам, в том числе и поддержка альтернативных анонсеров (например, Ocelot). Помимо этого, крайне развитый официальный форум поддержки, где помимо прочего можно испытать движок в работе на демо-версии, не устанавливая его а также получить любую другую интересующую вас информацию и скачать моды.
## Установка
Для установки вам необходимо выполнить несколько простых шагов:
1. Распаковываем на сервер содержимое папки **upload**
2. Создаем базу данных, в которую при помощи phpmyadmin (или любого другого удобного инструмента) импортируем дамп, расположенный в папке **install/sql/mysql.sql**
3. Правим файл конфигурации **config.php**, загруженный на сервер:
> $bb_cfg['db']['db1'] = array('localhost', 'dbase', 'user', 'pass', $charset, $pconnect);
> В данной строке изменяем данные входа в базу данных, остальные правки в файле вносятся по усмотрению, исходя из необходимости из внесения (ориентируйтесь на описания, указанные у полей).
4. Редактируем указанные файлы:
+ **favicon.ico** (меняем на свою иконку, если есть)
+ **robots.txt** (меняем адреса в строках **Host** и **Sitemap** на свои)
## Права доступа на папки и файлы
Исходя из настроек вашего сервера, устанавливаем рекомендуемые права доступа (chmod) на указанные папки **777**, а на файлы внутри этих папок (кроме файлов **.htaccess** и **.keep**) **666**:
- ajax/html
- cache
- cache/filecache
- files
- files/thumbs
- images
- images/avatars
- images/captcha
- images/ranks
- images/smiles
- log
- sitemap
- triggers
## Необходимые настройки php
mbstring.internal_encoding = UTF-8
magic_quotes_gpc = Off
Внести данные настройки необходимо в файл **php.ini**. Их вам может установить ваш хостер по запросу, если у вас возникают какие-либо проблемы с их самостоятельной установкой. Впрочем, эти настройки могут быть установлены на сервере по-умолчанию, поэтому их внесение требуется исключительно по необходимости.
## Необходимые модули php
php5-tidy
Начиная с версии 2.0.9 (ревизия 592 в старой нумерации) данный модуль не является обязательным, но его установка крайне рекомендуется для повышения качества обработки html-кода тем и сообщений пользователей.
## Рекомендуемый способ запуска cron.php
Для значительного ускорения работы трекера может потребоваться отвязка встроенного форумного крона. С более подробной информацией об отвязке крона, вы можете ознакомиться в данной теме http://torrentpier.me/threads/52/ на нашем форуме поддержки.
## Полезные ссылки
+ Наш форум http://torrentpier.me/
+ Центр загрузки http://get.torrentpier.me/
+ Часто задаваемые вопросы http://faq.torrentpier.me/
+ Где задать вопрос http://torrentpier.me/forums/10/

View file

@ -557,8 +557,10 @@ INSERT INTO `bb_config` VALUES ('seed_bonus_points', '');
INSERT INTO `bb_config` VALUES ('seed_bonus_tor_size', '0'); INSERT INTO `bb_config` VALUES ('seed_bonus_tor_size', '0');
INSERT INTO `bb_config` VALUES ('seed_bonus_user_regdate', '0'); INSERT INTO `bb_config` VALUES ('seed_bonus_user_regdate', '0');
INSERT INTO `bb_config` VALUES ('site_desc', 'A little text to describe your forum'); INSERT INTO `bb_config` VALUES ('site_desc', 'A little text to describe your forum');
INSERT INTO `bb_config` VALUES ('sitemap_time', '');
INSERT INTO `bb_config` VALUES ('sitename', 'TorrentPier II - Torrent Tracker'); INSERT INTO `bb_config` VALUES ('sitename', 'TorrentPier II - Torrent Tracker');
INSERT INTO `bb_config` VALUES ('smilies_path', 'images/smiles'); INSERT INTO `bb_config` VALUES ('smilies_path', 'images/smiles');
INSERT INTO `bb_config` VALUES ('static_sitemap', '');
INSERT INTO `bb_config` VALUES ('topics_per_page', '50'); INSERT INTO `bb_config` VALUES ('topics_per_page', '50');
INSERT INTO `bb_config` VALUES ('xs_use_cache', '1'); INSERT INTO `bb_config` VALUES ('xs_use_cache', '1');
INSERT INTO `bb_config` VALUES ('active_ads', ''); INSERT INTO `bb_config` VALUES ('active_ads', '');
@ -642,6 +644,7 @@ INSERT INTO `bb_cron` VALUES (18, 1, 'Seeder last seen', 'tr_update_seeder_last_
INSERT INTO `bb_cron` VALUES (19, 1, 'Captcha', 'captcha_gen_gc.php', 'daily', NULL, '05:00:00', 120, '', '', NULL, 0, '', 0, 0, 0); INSERT INTO `bb_cron` VALUES (19, 1, 'Captcha', 'captcha_gen_gc.php', 'daily', NULL, '05:00:00', 120, '', '', NULL, 0, '', 0, 0, 0);
INSERT INTO `bb_cron` VALUES (20, 1, 'Tracker dl-complete count', 'tr_complete_count.php', 'interval', NULL, NULL, 255, '', '', '06:00:00', 0, '', 0, 0, 0); INSERT INTO `bb_cron` VALUES (20, 1, 'Tracker dl-complete count', 'tr_complete_count.php', 'interval', NULL, NULL, 255, '', '', '06:00:00', 0, '', 0, 0, 0);
INSERT INTO `bb_cron` VALUES (21, 1, 'Cache garbage collector', 'cache_gc.php', 'interval', NULL, NULL, 255, '', '', '00:05:00', 0, '', 0, 0, 0); INSERT INTO `bb_cron` VALUES (21, 1, 'Cache garbage collector', 'cache_gc.php', 'interval', NULL, NULL, 255, '', '', '00:05:00', 0, '', 0, 0, 0);
INSERT INTO `bb_cron` VALUES (22, 1, 'Sitemap update', 'sitemap.php', 'daily', NULL, '06:00:00', 30, '', '', NULL, 0, '', 0, 0, 0);
-- -------------------------------------------------------- -- --------------------------------------------------------

View file

@ -14,8 +14,8 @@ Quick guide:
copy two files: automatically generated 'converter/passwords.php' and 'for_tbdev/pass.php' to your TBDevYSE root and run pass.php copy two files: automatically generated 'converter/passwords.php' and 'for_tbdev/pass.php' to your TBDevYSE root and run pass.php
(Don't forget to remove these files after completion). (Don't forget to remove these files after completion).
You allow to change message text, see $msg in pass.php for this. You allow to change message text, see $msg in pass.php for this.
10. If you want to redirect peers from older announce to new announce everytime, replace original TBDev's announce.php with 10. If you want to redirect peers from older announce to new announce everytime, replace original TBDev's announce.php with
'for_tbdev/announce.php' 'for_tbdev/announce.php'
Cheers, RoadTrain. Cheers, RoadTrain.
http://torrentpier.me/ http://torrentpier.me/

View file

@ -42,10 +42,10 @@ mysql_close();
mysql_query("SET NAMES $dbcharset"); mysql_query("SET NAMES $dbcharset");
// Get passkey for TorrentPier // Get passkey for TorrentPier
$user_id += USER_ID_DIFF; $user_id += USER_ID_DIFF;
$res = mysql_query("SELECT auth_key FROM bb_bt_users WHERE user_id = $user_id") or err(mysql_error()); $res = mysql_query("SELECT auth_key FROM bb_bt_users WHERE user_id = $user_id") or err(mysql_error());
if (mysql_affected_rows() == 0) if (mysql_affected_rows() == 0)
{ {
err('Passkey doesn\'t created on new tracker or user doesn\'t exist'); err('Passkey doesn\'t created on new tracker or user doesn\'t exist');
} }

View file

@ -8,14 +8,12 @@ loggedinorreturn();
$new_tr_url = "http://torrentpier.me/"; // with ending slash $new_tr_url = "http://torrentpier.me/"; // with ending slash
$subject = "Переезд на новый движок"; $subject = "Переезд на новый движок";
$msg = '[b]Внимание![/b] Наш трекер переехал на новый движок! Адрес трекера - [url='.$new_tr_url.']'.$new_tr_url.'[/url] $msg = '[b]Внимание![/b] Наш трекер переехал на новый движок! Адрес трекера - [url='.$new_tr_url.']'.$new_tr_url.'[/url]
Вся база перенесена на новый движок, регистрироваться заново не надо. Вся база перенесена на новый движок, регистрироваться заново не надо.
Войти на трекер можно [url='.$new_tr_url.'login.php]здесь[/url]. Ваши данные на новом трекере: Войти на трекер можно [url='.$new_tr_url.'login.php]здесь[/url]. Ваши данные на новом трекере:
[b]Логин:[/b] %s [b]Логин:[/b] %s
[b]Пароль:[/b] %s [b]Пароль:[/b] %s
Сменить пароль можно после входа на трекер в [url='.$new_tr_url.'profile.php?mode=editprofile]настройках[/url].'; Сменить пароль можно после входа на трекер в [url='.$new_tr_url.'profile.php?mode=editprofile]настройках[/url].';
if (empty($_POST['confirm'])) if (empty($_POST['confirm']))
{ {
@ -32,14 +30,14 @@ if (empty($_POST['confirm']))
else else
{ {
if(!file_exists('passwords.php')) stderr($tracker_lang['error'], 'passwords.php not exists'); if(!file_exists('passwords.php')) stderr($tracker_lang['error'], 'passwords.php not exists');
include('passwords.php'); include('passwords.php');
stdhead(); stdhead();
foreach ($passwords as $user) foreach ($passwords as $user)
{ {
$msg_sql = sprintf($msg, $user['username'], $user['new_passwd']); $msg_sql = sprintf($msg, $user['username'], $user['new_passwd']);
sql_query("INSERT INTO messages (receiver, added, subject, msg) VALUES({$user['tb_user_id']}, NOW(), ".sqlesc($subject).", ".sqlesc($msg_sql).")"); sql_query("INSERT INTO messages (receiver, added, subject, msg) VALUES({$user['tb_user_id']}, NOW(), ".sqlesc($subject).", ".sqlesc($msg_sql).")");
} }
stdmsg('OK', 'Mass PM succesful'); stdmsg('OK', 'Mass PM succesful');
} }

View file

@ -81,18 +81,18 @@ if (CONVERT_USERS)
{ {
$start = $i * C_USERS_PER_ONCE; $start = $i * C_USERS_PER_ONCE;
$offset = C_USERS_PER_ONCE; $offset = C_USERS_PER_ONCE;
$sql = " $sql = "
SELECT SELECT
id, username, email, status, UNIX_TIMESTAMP(added) AS added, UNIX_TIMESTAMP(last_access) AS last_access, id, username, email, status, UNIX_TIMESTAMP(added) AS added, UNIX_TIMESTAMP(last_access) AS last_access,
class, icq, msn, aim, yahoo, website, $_sql class, icq, msn, aim, yahoo, website, $_sql
uploaded, downloaded, enabled, language uploaded, downloaded, enabled, language
FROM ". TB_USERS_TABLE ." FROM ". TB_USERS_TABLE ."
ORDER BY id ORDER BY id
LIMIT $start, $offset"; LIMIT $start, $offset";
$users = DB()->fetch_rowset($sql); $users = DB()->fetch_rowset($sql);
DB()->sql_freeresult(); DB()->sql_freeresult();
foreach ($users as $user) foreach ($users as $user)
{ {
@ -159,17 +159,17 @@ if (CONVERT_TORRENTS)
print_ok ("Categories from TBDev converted"); print_ok ("Categories from TBDev converted");
unset($cats); unset($cats);
// Start of torrents converting // Start of torrents converting
switch(TR_TYPE) switch(TR_TYPE)
{ {
case 'yse': case 'yse':
$_sql = 'image1, image2, '; $_sql = 'image1, image2, ';
break; break;
case 'sky': case 'sky':
$_sql = 'poster, screenshot1, screenshot2, screenshot3, screenshot4, '; $_sql = 'poster, screenshot1, screenshot2, screenshot3, screenshot4, ';
break; break;
default: default:
$_sql = ''; $_sql = '';
break; break;
@ -187,9 +187,9 @@ if (CONVERT_TORRENTS)
$start = $i * C_TORRENTS_PER_ONCE; $start = $i * C_TORRENTS_PER_ONCE;
$offset = C_TORRENTS_PER_ONCE; $offset = C_TORRENTS_PER_ONCE;
$sql = " $sql = "
SELECT SELECT
id, info_hash, name, filename, search_text, descr, $_sql id, info_hash, name, filename, search_text, descr, $_sql
category, UNIX_TIMESTAMP(added) AS added, size, views, category, UNIX_TIMESTAMP(added) AS added, size, views,
UNIX_TIMESTAMP(last_action) AS lastseed, times_completed, owner, sticky UNIX_TIMESTAMP(last_action) AS lastseed, times_completed, owner, sticky
FROM ". TB_TORRENTS_TABLE ." FROM ". TB_TORRENTS_TABLE ."
ORDER BY id ORDER BY id
@ -197,7 +197,7 @@ if (CONVERT_TORRENTS)
$torrents = DB()->fetch_rowset($sql); $torrents = DB()->fetch_rowset($sql);
DB()->sql_freeresult(); DB()->sql_freeresult();
foreach ($torrents as $torrent) foreach ($torrents as $torrent)
{ {
$torrent['topic_id'] = $torrent['id'] + $max_topic_id; $torrent['topic_id'] = $torrent['id'] + $max_topic_id;
@ -219,16 +219,16 @@ if (CONVERT_TORRENTS)
$max_post_id = (int) get_max_val(BB_POSTS, 'post_id'); $max_post_id = (int) get_max_val(BB_POSTS, 'post_id');
$max_topic_id = (int) get_max_val(BB_TOPICS, 'topic_id'); $max_topic_id = (int) get_max_val(BB_TOPICS, 'topic_id');
$max_attach_id = (int) get_max_val(BB_ATTACHMENTS, 'attach_id'); $max_attach_id = (int) get_max_val(BB_ATTACHMENTS, 'attach_id');
$comments_count = (int) get_count(TB_COMMENTS_TABLE, 'id'); $comments_count = (int) get_count(TB_COMMENTS_TABLE, 'id');
$loops = (int) ceil($comments_count / C_COMMENTS_PER_ONCE); $loops = (int) ceil($comments_count / C_COMMENTS_PER_ONCE);
for ($i = 0; $i < $loops; $i++) for ($i = 0; $i < $loops; $i++)
{ {
$start = $i * C_COMMENTS_PER_ONCE; $start = $i * C_COMMENTS_PER_ONCE;
$offset = C_COMMENTS_PER_ONCE; $offset = C_COMMENTS_PER_ONCE;
$sql = " $sql = "
SELECT SELECT
c.id, c.user, c.torrent, c.text, tor.category, c.id, c.user, c.torrent, c.text, tor.category,
UNIX_TIMESTAMP(c.added) AS added, UNIX_TIMESTAMP(c.editedat) AS editedat, c.ip UNIX_TIMESTAMP(c.added) AS added, UNIX_TIMESTAMP(c.editedat) AS editedat, c.ip
FROM ". TB_COMMENTS_TABLE ." c FROM ". TB_COMMENTS_TABLE ." c
@ -236,10 +236,10 @@ if (CONVERT_TORRENTS)
WHERE c.torrent <> 0 WHERE c.torrent <> 0
ORDER BY c.id ORDER BY c.id
LIMIT $start, $offset"; LIMIT $start, $offset";
$comments = DB()->fetch_rowset($sql); $comments = DB()->fetch_rowset($sql);
DB()->sql_freeresult(); DB()->sql_freeresult();
foreach ($comments as $comment) foreach ($comments as $comment)
{ {
$comment['user'] += $max_uid; $comment['user'] += $max_uid;

View file

@ -21,7 +21,7 @@ function hex2bin($h)
} }
function get_max_val($table_name, $column) function get_max_val($table_name, $column)
{ {
$row = DB()->fetch_row("SELECT MAX($column) AS $column FROM $table_name LIMIT 1"); $row = DB()->fetch_row("SELECT MAX($column) AS $column FROM $table_name LIMIT 1");
return $row[$column]; return $row[$column];
} }
@ -43,19 +43,9 @@ function set_auto_increment($table_name, $column, $val = null)
DB()->query("ALTER TABLE $table_name auto_increment = $val"); DB()->query("ALTER TABLE $table_name auto_increment = $val");
} }
//Users functions // Users functions
function tp_users_cleanup() function tp_users_cleanup()
{ {
/*
if (!function_exists('user_delete')) require_once(INC_DIR .'functions_admin.php');
if ($row = DB()->fetch_row("SELECT user_id FROM ". BB_USERS ." WHERE user_id NOT IN(". EXCLUDED_USERS_CSV .');'))
{
foreach ($row as $user)
{
user_delete($user['user_id']);
}
}*/
DB()->query('DELETE FROM '. BB_USERS .' WHERE user_id NOT IN('. EXCLUDED_USERS_CSV .')'); DB()->query('DELETE FROM '. BB_USERS .' WHERE user_id NOT IN('. EXCLUDED_USERS_CSV .')');
DB()->query('TRUNCATE '. BB_BT_USERS); DB()->query('TRUNCATE '. BB_BT_USERS);
} }
@ -91,7 +81,7 @@ function convert_user($user)
"user_id" => $user['id'], "user_id" => $user['id'],
"user_active" => ($user['enabled'] == 'yes') ? true : false, "user_active" => ($user['enabled'] == 'yes') ? true : false,
"username" => $user['username'], "username" => $user['username'],
"user_password" => md5($user['password']), "user_password" => md5($user['password']),
"user_lastvisit" => $user['last_access'], "user_lastvisit" => $user['last_access'],
"user_regdate" => $user['added'], "user_regdate" => $user['added'],
"user_level" => tp_user_level($user['class']), "user_level" => tp_user_level($user['class']),
@ -101,11 +91,11 @@ function convert_user($user)
"user_avatar" => !empty($user['avatar']) ? $user['avatar'] : null, "user_avatar" => !empty($user['avatar']) ? $user['avatar'] : null,
"user_avatar_type" => !empty($user['avatar']) ? 2 : null, "user_avatar_type" => !empty($user['avatar']) ? 2 : null,
"user_email" => $user['email'], "user_email" => $user['email'],
"user_website" => $user['website'], "user_website" => $user['website'],
); );
$columns = $values = array(); $columns = $values = array();
foreach ($user_data as $column => $value) foreach ($user_data as $column => $value)
{ {
$columns[] = $column; $columns[] = $column;
@ -113,9 +103,9 @@ function convert_user($user)
} }
$sql_columns = implode(',', $columns); $sql_columns = implode(',', $columns);
$sql_values = implode(',', $values); $sql_values = implode(',', $values);
DB()->query("INSERT IGNORE INTO ". BB_USERS . " ($sql_columns) VALUES($sql_values);"); DB()->query("INSERT IGNORE INTO ". BB_USERS . " ($sql_columns) VALUES($sql_values);");
$bt_user_data = array( $bt_user_data = array(
"user_id" => $user['id'], "user_id" => $user['id'],
"auth_key" => make_rand_str(BT_AUTH_KEY_LENGTH), "auth_key" => make_rand_str(BT_AUTH_KEY_LENGTH),
@ -123,7 +113,7 @@ function convert_user($user)
"u_down_total" => $user['downloaded'], "u_down_total" => $user['downloaded'],
); );
$columns = $values = array(); $columns = $values = array();
foreach ($bt_user_data as $column => $value) foreach ($bt_user_data as $column => $value)
{ {
$columns[] = $column; $columns[] = $column;
@ -131,7 +121,7 @@ function convert_user($user)
} }
$sql_bt_columns = implode(',', $columns); $sql_bt_columns = implode(',', $columns);
$sql_bt_values = implode(',', $values); $sql_bt_values = implode(',', $values);
DB()->query("INSERT IGNORE INTO ". BB_BT_USERS . " ($sql_bt_columns) VALUES($sql_bt_values);"); DB()->query("INSERT IGNORE INTO ". BB_BT_USERS . " ($sql_bt_columns) VALUES($sql_bt_values);");
} }
@ -143,7 +133,7 @@ function tp_categories_cleanup()
function tp_add_category_old($id, $cat_title) function tp_add_category_old($id, $cat_title)
{ {
DB()->query("INSERT IGNORE INTO ". BB_CATEGORIES ." (cat_id, cat_title) DB()->query("INSERT IGNORE INTO ". BB_CATEGORIES ." (cat_id, cat_title)
VALUES ($id, '". DB()->escape($cat_title) ."')"); VALUES ($id, '". DB()->escape($cat_title) ."')");
return; return;
} }
@ -151,7 +141,7 @@ function tp_add_category_old($id, $cat_title)
function tp_add_category($cat_data) function tp_add_category($cat_data)
{ {
$columns = $values = array(); $columns = $values = array();
foreach ($cat_data as $column => $value) foreach ($cat_data as $column => $value)
{ {
$columns[] = $column; $columns[] = $column;
@ -159,7 +149,7 @@ function tp_add_category($cat_data)
} }
$sql_bt_columns = implode(',', $columns); $sql_bt_columns = implode(',', $columns);
$sql_bt_values = implode(',', $values); $sql_bt_values = implode(',', $values);
DB()->query("INSERT IGNORE INTO ". BB_CATEGORIES . " ($sql_bt_columns) VALUES($sql_bt_values);"); DB()->query("INSERT IGNORE INTO ". BB_CATEGORIES . " ($sql_bt_columns) VALUES($sql_bt_values);");
} }
@ -173,16 +163,7 @@ function tp_topics_cleanup()
DB()->query("TRUNCATE ". BB_POSTS_SEARCH); DB()->query("TRUNCATE ". BB_POSTS_SEARCH);
DB()->query("TRUNCATE ". BB_POSTS_TEXT); DB()->query("TRUNCATE ". BB_POSTS_TEXT);
DB()->query("TRUNCATE ". BB_TOPICS); DB()->query("TRUNCATE ". BB_TOPICS);
/*if (!function_exists('topic_delete')) require_once(INC_DIR .'functions_admin.php');
if ($row = DB()->fetch_row("SELECT topic_id FROM ". BB_TOPICS))
{
foreach ($row as $topic)
{
topic_delete($topic['topic_id']);
}
}*/
return; return;
} }
@ -196,7 +177,7 @@ function tp_add_topic($topic_data)
} }
$sql_columns = implode(',', $columns); $sql_columns = implode(',', $columns);
$sql_values = implode(',', $values); $sql_values = implode(',', $values);
DB()->query("INSERT IGNORE INTO ". BB_TOPICS . " ($sql_columns) VALUES($sql_values);"); DB()->query("INSERT IGNORE INTO ". BB_TOPICS . " ($sql_columns) VALUES($sql_values);");
return; return;
} }
@ -213,7 +194,7 @@ function tp_add_post($post_data)
} }
$sql_columns = implode(',', $columns); $sql_columns = implode(',', $columns);
$sql_values = implode(',', $values); $sql_values = implode(',', $values);
DB()->query("INSERT IGNORE INTO bb_{$key} ($sql_columns) VALUES($sql_values);"); DB()->query("INSERT IGNORE INTO bb_{$key} ($sql_columns) VALUES($sql_values);");
} }
return; return;
@ -231,7 +212,7 @@ function tp_add_attach($attach_data)
} }
$sql_columns = implode(',', $columns); $sql_columns = implode(',', $columns);
$sql_values = implode(',', $values); $sql_values = implode(',', $values);
DB()->query("INSERT IGNORE INTO bb_{$key} ($sql_columns) VALUES($sql_values);"); DB()->query("INSERT IGNORE INTO bb_{$key} ($sql_columns) VALUES($sql_values);");
} }
return; return;
@ -248,19 +229,19 @@ function append_images($tor)
{ {
$poster = $screens = ''; $poster = $screens = '';
switch(TR_TYPE) switch(TR_TYPE)
{ {
case 'yse': case 'yse':
if(!empty($tor['image1'])) if(!empty($tor['image1']))
{ {
$poster = "[img=right]".make_img_path($tor['image1'])."[/img]"; $poster = "[img=right]".make_img_path($tor['image1'])."[/img]";
} }
if(!empty($tor['image2'])) if(!empty($tor['image2']))
{ {
$screens = '[spoiler="Скриншоты"][img]'.make_img_path($tor['image2'])."[/img][/spoiler]"; $screens = '[spoiler="Скриншоты"][img]'.make_img_path($tor['image2'])."[/img][/spoiler]";
} }
break; break;
case 'sky': case 'sky':
if(!empty($tor['poster'])) if(!empty($tor['poster']))
{ {
$poster = "[img=right]".make_img_path($tor['poster'])."[/img]"; $poster = "[img=right]".make_img_path($tor['poster'])."[/img]";
} }
@ -270,7 +251,7 @@ function append_images($tor)
$screens .= '[spoiler="Скриншоты"]'; $screens .= '[spoiler="Скриншоты"]';
for ($i = 1; $i<=4; $i++) for ($i = 1; $i<=4; $i++)
{ {
if(!empty($tor['screenshot'.$i])) if(!empty($tor['screenshot'.$i]))
{ {
$screens .= "[img]".make_img_path($tor['screenshot'.$i])."[/img] \n"; $screens .= "[img]".make_img_path($tor['screenshot'.$i])."[/img] \n";
} }
@ -299,9 +280,8 @@ function convert_torrent($torrent)
"topic_last_post_time" => $torrent['added'], "topic_last_post_time" => $torrent['added'],
); );
tp_add_topic($topic_data); tp_add_topic($topic_data);
//$post_text = prepare_message($torrent['descr'], true, true);
$post_text = stripslashes(prepare_message(addslashes(unprepare_message($torrent['descr'])), true, true)); $post_text = stripslashes(prepare_message(addslashes(unprepare_message($torrent['descr'])), true, true));
$post_data = array( $post_data = array(
"posts" => array( "posts" => array(
"post_id" => $torrent['post_id'], "post_id" => $torrent['post_id'],
@ -321,7 +301,7 @@ function convert_torrent($torrent)
), ),
); );
tp_add_post($post_data); tp_add_post($post_data);
$attach_data = array( $attach_data = array(
"attachments" => array( "attachments" => array(
"attach_id" => $torrent['attach_id'], "attach_id" => $torrent['attach_id'],
@ -340,11 +320,11 @@ function convert_torrent($torrent)
), ),
); );
tp_add_attach($attach_data); tp_add_attach($attach_data);
//Torrents //Torrents
if (BDECODE) if (BDECODE)
{ {
$filename = get_attachments_dir() .'/'. $torrent['id'] .".torrent"; $filename = get_attachments_dir() .'/'. $torrent['id'] .".torrent";
if (!file_exists($filename)) if (!file_exists($filename))
{ {
return; return;
@ -359,7 +339,7 @@ function convert_torrent($torrent)
{ {
$info_hash_sql = hex2bin($torrent['info_hash']); $info_hash_sql = hex2bin($torrent['info_hash']);
} }
$torrent_data = array( $torrent_data = array(
"info_hash" => $info_hash_sql, "info_hash" => $info_hash_sql,
"post_id" => $torrent['post_id'], "post_id" => $torrent['post_id'],
@ -374,7 +354,7 @@ function convert_torrent($torrent)
); );
$columns = $values = array(); $columns = $values = array();
foreach ($torrent_data as $column => $value) foreach ($torrent_data as $column => $value)
{ {
$columns[] = $column; $columns[] = $column;
@ -382,16 +362,16 @@ function convert_torrent($torrent)
} }
$sql_columns = implode(', ', $columns); $sql_columns = implode(', ', $columns);
$sql_values = implode(', ', $values); $sql_values = implode(', ', $values);
DB()->query("INSERT IGNORE INTO ". BB_BT_TORRENTS . " ($sql_columns) VALUES($sql_values);"); DB()->query("INSERT IGNORE INTO ". BB_BT_TORRENTS . " ($sql_columns) VALUES($sql_values);");
return; return;
} }
//Comments functions // Comments functions
function convert_comment($comment) function convert_comment($comment)
{ {
$post_text = prepare_message($comment['text'], true, true); $post_text = prepare_message($comment['text'], true, true);
$post_data = array( $post_data = array(
"posts" => array( "posts" => array(
"post_id" => $comment['id'], "post_id" => $comment['id'],
@ -409,7 +389,6 @@ function convert_comment($comment)
), ),
); );
tp_add_post($post_data); tp_add_post($post_data);
//add_search_words($comment['id'], stripslashes($post_text));
return; return;
} }
@ -431,7 +410,7 @@ function convert_cat($forum, $allow_torrents = true)
); );
$columns = $values = array(); $columns = $values = array();
foreach ($forum_data as $column => $value) foreach ($forum_data as $column => $value)
{ {
$columns[] = $column; $columns[] = $column;
@ -439,7 +418,7 @@ function convert_cat($forum, $allow_torrents = true)
} }
$sql_columns = implode(',', $columns); $sql_columns = implode(',', $columns);
$sql_values = implode(',', $values); $sql_values = implode(',', $values);
DB()->query("INSERT IGNORE INTO ". BB_FORUMS . " ($sql_columns) VALUES($sql_values);"); DB()->query("INSERT IGNORE INTO ". BB_FORUMS . " ($sql_columns) VALUES($sql_values);");
return; return;
} }

View file

@ -1,2 +1,3 @@
<?php <?php
$passwords = array(); $passwords = array();

View file

@ -1,5 +1,5 @@
<?php <?php
define('IN_FORUM', true); define('IN_FORUM', true);
define('IN_SERVICE', true); define('IN_SERVICE', true);
define('BB_ROOT', './'); define('BB_ROOT', './');
@ -52,36 +52,36 @@ $loops = (int) ceil($torrents_count / C_TORRENTS_PER_ONCE);
$not_exist = array(); $not_exist = array();
$attach_dir = get_attachments_dir() .'/'; $attach_dir = get_attachments_dir() .'/';
for ($i = 0; $i < $loops; $i++) for ($i = 0; $i < $loops; $i++)
{ {
$start = $i * C_TORRENTS_PER_ONCE; $start = $i * C_TORRENTS_PER_ONCE;
$offset = C_TORRENTS_PER_ONCE; $offset = C_TORRENTS_PER_ONCE;
$sql = "SELECT $sql = "SELECT
tor.attach_id, tor.topic_id, ad.physical_filename tor.attach_id, tor.topic_id, ad.physical_filename
FROM ". BB_BT_TORRENTS ." tor FROM ". BB_BT_TORRENTS ." tor
LEFT JOIN ". BB_ATTACHMENTS_DESC ." ad ON(ad.attach_id = tor.attach_id) LEFT JOIN ". BB_ATTACHMENTS_DESC ." ad ON(ad.attach_id = tor.attach_id)
ORDER BY tor.attach_id ORDER BY tor.attach_id
LIMIT $start, $offset"; LIMIT $start, $offset";
$torrents = DB()->fetch_rowset($sql); $torrents = DB()->fetch_rowset($sql);
DB()->sql_freeresult(); DB()->sql_freeresult();
foreach ($torrents as $torrent) foreach ($torrents as $torrent)
{ {
$filename = $attach_dir . $torrent['physical_filename']; $filename = $attach_dir . $torrent['physical_filename'];
if (!file_exists($filename)) if (!file_exists($filename))
{ {
$not_exist[] = '<a href="viewtopic.php?t='. $torrent['topic_id'] .'">'. $filename .'</a>'; $not_exist[] = '<a href="viewtopic.php?t='. $torrent['topic_id'] .'">'. $filename .'</a>';
} }
else else
{ {
$tor = bdecode_file($filename); $tor = bdecode_file($filename);
$info = (!empty($tor['info'])) ? $tor['info'] : array(); $info = (!empty($tor['info'])) ? $tor['info'] : array();
$info_hash = pack('H*', sha1(bencode($info))); $info_hash = pack('H*', sha1(bencode($info)));
$info_hash_sql = rtrim(DB()->escape($info_hash), ' '); $info_hash_sql = rtrim(DB()->escape($info_hash), ' ');
DB()->query("UPDATE ". BB_BT_TORRENTS ." DB()->query("UPDATE ". BB_BT_TORRENTS ."
SET info_hash = '$info_hash_sql' SET info_hash = '$info_hash_sql'
WHERE attach_id = {$torrent['attach_id']}"); WHERE attach_id = {$torrent['attach_id']}");
@ -91,9 +91,9 @@ for ($i = 0; $i < $loops; $i++)
print_ok ("Completed"); print_ok ("Completed");
if(!empty($not_exist)) if (!empty($not_exist))
{ {
print_ok ("These torrents doesn't exist in filesystem: ". implode(', ', array_unique($not_exist))); print_ok ("These torrents doesn't exist in filesystem: ". implode(', ', array_unique($not_exist)));
} }
} }

View file

@ -100,7 +100,7 @@ function convert_user($user)
); );
$columns = $values = array(); $columns = $values = array();
foreach ($user_data as $column => $value) foreach ($user_data as $column => $value)
{ {
$columns[] = $column; $columns[] = $column;
@ -108,9 +108,9 @@ function convert_user($user)
} }
$sql_columns = implode(',', $columns); $sql_columns = implode(',', $columns);
$sql_values = implode(',', $values); $sql_values = implode(',', $values);
DB()->query("INSERT IGNORE INTO ". BB_USERS . " ($sql_columns) VALUES ($sql_values);"); DB()->query("INSERT IGNORE INTO ". BB_USERS . " ($sql_columns) VALUES ($sql_values);");
$bt_user_data = array( $bt_user_data = array(
"user_id" => $user['id'], "user_id" => $user['id'],
"auth_key" => make_rand_str(BT_AUTH_KEY_LENGTH), "auth_key" => make_rand_str(BT_AUTH_KEY_LENGTH),
@ -118,7 +118,7 @@ function convert_user($user)
"u_down_total" => $user['downloaded'], "u_down_total" => $user['downloaded'],
); );
$columns = $values = array(); $columns = $values = array();
foreach ($bt_user_data as $column => $value) foreach ($bt_user_data as $column => $value)
{ {
$columns[] = $column; $columns[] = $column;
@ -126,7 +126,7 @@ function convert_user($user)
} }
$sql_bt_columns = implode(',', $columns); $sql_bt_columns = implode(',', $columns);
$sql_bt_values = implode(',', $values); $sql_bt_values = implode(',', $values);
DB()->query("INSERT IGNORE INTO ". BB_BT_USERS . " ($sql_bt_columns) VALUES ($sql_bt_values);"); DB()->query("INSERT IGNORE INTO ". BB_BT_USERS . " ($sql_bt_columns) VALUES ($sql_bt_values);");
} }
@ -138,7 +138,7 @@ function tp_categories_cleanup()
function tp_add_category_old($id, $cat_title) function tp_add_category_old($id, $cat_title)
{ {
DB()->query("INSERT IGNORE INTO ". BB_CATEGORIES ." (cat_id, cat_title) DB()->query("INSERT IGNORE INTO ". BB_CATEGORIES ." (cat_id, cat_title)
VALUES ($id, '". DB()->escape($cat_title) ."')"); VALUES ($id, '". DB()->escape($cat_title) ."')");
return; return;
} }
@ -146,7 +146,7 @@ function tp_add_category_old($id, $cat_title)
function tp_add_category($cat_data) function tp_add_category($cat_data)
{ {
$columns = $values = array(); $columns = $values = array();
foreach ($cat_data as $column => $value) foreach ($cat_data as $column => $value)
{ {
$columns[] = $column; $columns[] = $column;
@ -154,12 +154,12 @@ function tp_add_category($cat_data)
} }
$sql_bt_columns = implode(',', $columns); $sql_bt_columns = implode(',', $columns);
$sql_bt_values = implode(',', $values); $sql_bt_values = implode(',', $values);
DB()->query("INSERT IGNORE INTO ". BB_CATEGORIES . " ($sql_bt_columns) VALUES ($sql_bt_values);"); DB()->query("INSERT IGNORE INTO ". BB_CATEGORIES . " ($sql_bt_columns) VALUES ($sql_bt_values);");
} }
function tp_topics_cleanup() function tp_topics_cleanup()
{ {
DB()->query("TRUNCATE ". BB_ATTACHMENTS); DB()->query("TRUNCATE ". BB_ATTACHMENTS);
DB()->query("TRUNCATE ". BB_ATTACHMENTS_DESC); DB()->query("TRUNCATE ". BB_ATTACHMENTS_DESC);
DB()->query("TRUNCATE ". BB_BT_TORRENTS); DB()->query("TRUNCATE ". BB_BT_TORRENTS);
@ -168,21 +168,12 @@ function tp_topics_cleanup()
DB()->query("TRUNCATE ". BB_POSTS_SEARCH); DB()->query("TRUNCATE ". BB_POSTS_SEARCH);
DB()->query("TRUNCATE ". BB_POSTS_TEXT); DB()->query("TRUNCATE ". BB_POSTS_TEXT);
DB()->query("TRUNCATE ". BB_TOPICS); DB()->query("TRUNCATE ". BB_TOPICS);
/*if (!function_exists('topic_delete')) require_once('./includes/functions_admin.php');
if ($row = DB()->fetch_row("SELECT topic_id FROM ". TOPICS))
{
foreach ($row as $topic)
{
topic_delete($topic['topic_id']);
}
}*/
return; return;
} }
function tp_add_topic($topic_data) function tp_add_topic($topic_data)
{ {
$columns = $values = array(); $columns = $values = array();
foreach ($topic_data as $column => $value) foreach ($topic_data as $column => $value)
{ {
@ -191,13 +182,13 @@ function tp_add_topic($topic_data)
} }
$sql_columns = implode(',', $columns); $sql_columns = implode(',', $columns);
$sql_values = implode(',', $values); $sql_values = implode(',', $values);
DB()->query("INSERT IGNORE INTO ". BB_TOPICS . " ($sql_columns) VALUES ($sql_values);"); DB()->query("INSERT IGNORE INTO ". BB_TOPICS . " ($sql_columns) VALUES ($sql_values);");
return; return;
} }
function tp_add_post($post_data) function tp_add_post($post_data)
{ {
foreach ($post_data as $key => $data) foreach ($post_data as $key => $data)
{ {
$columns = $values = array(); $columns = $values = array();
@ -208,14 +199,14 @@ function tp_add_post($post_data)
} }
$sql_columns = implode(',', $columns); $sql_columns = implode(',', $columns);
$sql_values = implode(',', $values); $sql_values = implode(',', $values);
DB()->query("INSERT IGNORE INTO bb_{$key} ($sql_columns) VALUES ($sql_values);"); DB()->query("INSERT IGNORE INTO bb_{$key} ($sql_columns) VALUES ($sql_values);");
} }
return; return;
} }
function tp_add_attach($attach_data) function tp_add_attach($attach_data)
{ {
foreach ($attach_data as $key => $data) foreach ($attach_data as $key => $data)
{ {
$columns = $values = array(); $columns = $values = array();
@ -226,7 +217,7 @@ function tp_add_attach($attach_data)
} }
$sql_columns = implode(',', $columns); $sql_columns = implode(',', $columns);
$sql_values = implode(',', $values); $sql_values = implode(',', $values);
DB()->query("INSERT IGNORE INTO bb_{$key} ($sql_columns) VALUES ($sql_values);"); DB()->query("INSERT IGNORE INTO bb_{$key} ($sql_columns) VALUES ($sql_values);");
} }
return; return;
@ -243,19 +234,19 @@ function append_images($tor)
{ {
$poster = $screens = ''; $poster = $screens = '';
switch(TR_TYPE) switch(TR_TYPE)
{ {
case 'yse': case 'yse':
if(!empty($tor['image1'])) if(!empty($tor['image1']))
{ {
$poster = "[img=right]".make_img_path($tor['image1'])."[/img]"; $poster = "[img=right]".make_img_path($tor['image1'])."[/img]";
} }
if(!empty($tor['image2'])) if(!empty($tor['image2']))
{ {
$screens = '[spoiler="Скриншоты"][img]'.make_img_path($tor['image2'])."[/img][/spoiler]"; $screens = '[spoiler="Скриншоты"][img]'.make_img_path($tor['image2'])."[/img][/spoiler]";
} }
break; break;
case 'sky': case 'sky':
if(!empty($tor['poster'])) if(!empty($tor['poster']))
{ {
$poster = "[img=right]".make_img_path($tor['poster'])."[/img]"; $poster = "[img=right]".make_img_path($tor['poster'])."[/img]";
} }
@ -265,7 +256,7 @@ function append_images($tor)
$screens .= '[spoiler="Скриншоты"]'; $screens .= '[spoiler="Скриншоты"]';
for ($i = 1; $i<=4; $i++) for ($i = 1; $i<=4; $i++)
{ {
if(!empty($tor['screenshot'.$i])) if(!empty($tor['screenshot'.$i]))
{ {
$screens .= "[img]".make_img_path($tor['screenshot'.$i])."[/img] \n"; $screens .= "[img]".make_img_path($tor['screenshot'.$i])."[/img] \n";
} }
@ -294,9 +285,9 @@ function convert_torrent($torrent)
"topic_last_post_time" => $torrent['added'], "topic_last_post_time" => $torrent['added'],
); );
tp_add_topic($topic_data); tp_add_topic($topic_data);
$post_text = stripslashes(prepare_message(addslashes(unprepare_message($torrent['descr'])), true, true)); $post_text = stripslashes(prepare_message(addslashes(unprepare_message($torrent['descr'])), true, true));
$post_data = array( $post_data = array(
"posts" => array( "posts" => array(
"post_id" => $torrent['post_id'], "post_id" => $torrent['post_id'],
@ -316,7 +307,7 @@ function convert_torrent($torrent)
), ),
); );
tp_add_post($post_data); tp_add_post($post_data);
$attach_data = array( $attach_data = array(
"attachments" => array( "attachments" => array(
"attach_id" => $torrent['attach_id'], "attach_id" => $torrent['attach_id'],
@ -335,11 +326,11 @@ function convert_torrent($torrent)
), ),
); );
tp_add_attach($attach_data); tp_add_attach($attach_data);
//Torrents //Torrents
if (BDECODE) if (BDECODE)
{ {
$filename = get_attachments_dir() .'/'. $torrent['id'] .".torrent"; $filename = get_attachments_dir() .'/'. $torrent['id'] .".torrent";
if (!file_exists($filename)) if (!file_exists($filename))
{ {
return; return;
@ -354,7 +345,7 @@ function convert_torrent($torrent)
{ {
$info_hash_sql = hex2bin($torrent['info_hash']); $info_hash_sql = hex2bin($torrent['info_hash']);
} }
$torrent_data = array( $torrent_data = array(
"info_hash" => $info_hash_sql, "info_hash" => $info_hash_sql,
"post_id" => $torrent['post_id'], "post_id" => $torrent['post_id'],
@ -362,14 +353,14 @@ function convert_torrent($torrent)
"topic_id" => $torrent['topic_id'], "topic_id" => $torrent['topic_id'],
"forum_id" => $torrent['category'], "forum_id" => $torrent['category'],
"attach_id" => $torrent['attach_id'], "attach_id" => $torrent['attach_id'],
"size" => $torrent['size'], "size" => $torrent['size'],
"reg_time" => $torrent['added'], "reg_time" => $torrent['added'],
"complete_count" => $torrent['times_completed'], "complete_count" => $torrent['times_completed'],
"seeder_last_seen" => $torrent['lastseed'], "seeder_last_seen" => $torrent['lastseed'],
); );
$columns = $values = array(); $columns = $values = array();
foreach ($torrent_data as $column => $value) foreach ($torrent_data as $column => $value)
{ {
$columns[] = $column; $columns[] = $column;
@ -377,7 +368,7 @@ function convert_torrent($torrent)
} }
$sql_columns = implode(', ', $columns); $sql_columns = implode(', ', $columns);
$sql_values = implode(', ', $values); $sql_values = implode(', ', $values);
DB()->query("INSERT IGNORE INTO ". BB_BT_TORRENTS . " ($sql_columns) VALUES($sql_values);"); DB()->query("INSERT IGNORE INTO ". BB_BT_TORRENTS . " ($sql_columns) VALUES($sql_values);");
return; return;
} }
@ -386,7 +377,7 @@ function convert_torrent($torrent)
function convert_comment($comment) function convert_comment($comment)
{ {
$post_text = prepare_message($comment['text'], true, true); $post_text = prepare_message($comment['text'], true, true);
$post_data = array( $post_data = array(
"posts" => array( "posts" => array(
"post_id" => $comment['id'], "post_id" => $comment['id'],
@ -404,13 +395,12 @@ function convert_comment($comment)
), ),
); );
tp_add_post($post_data); tp_add_post($post_data);
//add_search_words($comment['id'], stripslashes($post_text));
return; return;
} }
//Forums functions //Forums functions
function tp_forums_cleanup() function tp_forums_cleanup()
{ {
DB()->query('TRUNCATE '. BB_FORUMS); DB()->query('TRUNCATE '. BB_FORUMS);
} }
@ -426,7 +416,7 @@ function convert_cat($forum, $allow_torrents = true)
); );
$columns = $values = array(); $columns = $values = array();
foreach ($forum_data as $column => $value) foreach ($forum_data as $column => $value)
{ {
$columns[] = $column; $columns[] = $column;
@ -434,7 +424,7 @@ function convert_cat($forum, $allow_torrents = true)
} }
$sql_columns = implode(',', $columns); $sql_columns = implode(',', $columns);
$sql_values = implode(',', $values); $sql_values = implode(',', $values);
DB()->query("INSERT IGNORE INTO ". BB_FORUMS . " ($sql_columns) VALUES ($sql_values);"); DB()->query("INSERT IGNORE INTO ". BB_FORUMS . " ($sql_columns) VALUES ($sql_values);");
return; return;
} }

View file

@ -1,2 +1,3 @@
<?php <?php
$passwords = array(); $passwords = array();

View file

@ -1,5 +1,5 @@
<?php <?php
define('IN_FORUM', true); define('IN_FORUM', true);
define('IN_SERVICE', true); define('IN_SERVICE', true);
define('BB_ROOT', './'); define('BB_ROOT', './');
@ -8,7 +8,6 @@ require(INC_DIR .'functions_torrent.php');
require(BB_ROOT .'converter/settings.php'); require(BB_ROOT .'converter/settings.php');
require(BB_ROOT .'converter/functions.php'); require(BB_ROOT .'converter/functions.php');
// Init userdata // Init userdata
$user->session_start(); $user->session_start();
@ -52,36 +51,36 @@ $loops = (int) ceil($torrents_count / C_TORRENTS_PER_ONCE);
$not_exist = array(); $not_exist = array();
$attach_dir = get_attachments_dir() .'/'; $attach_dir = get_attachments_dir() .'/';
for ($i = 0; $i < $loops; $i++) for ($i = 0; $i < $loops; $i++)
{ {
$start = $i * C_TORRENTS_PER_ONCE; $start = $i * C_TORRENTS_PER_ONCE;
$offset = C_TORRENTS_PER_ONCE; $offset = C_TORRENTS_PER_ONCE;
$sql = "SELECT $sql = "SELECT
tor.attach_id, tor.topic_id, ad.physical_filename tor.attach_id, tor.topic_id, ad.physical_filename
FROM ". BB_BT_TORRENTS ." tor FROM ". BB_BT_TORRENTS ." tor
LEFT JOIN ". BB_ATTACHMENTS_DESC ." ad ON(ad.attach_id = tor.attach_id) LEFT JOIN ". BB_ATTACHMENTS_DESC ." ad ON(ad.attach_id = tor.attach_id)
ORDER BY tor.attach_id ORDER BY tor.attach_id
LIMIT $start, $offset"; LIMIT $start, $offset";
$torrents = DB()->fetch_rowset($sql); $torrents = DB()->fetch_rowset($sql);
DB()->sql_freeresult(); DB()->sql_freeresult();
foreach ($torrents as $torrent) foreach ($torrents as $torrent)
{ {
$filename = $attach_dir . $torrent['physical_filename']; $filename = $attach_dir . $torrent['physical_filename'];
if (!file_exists($filename)) if (!file_exists($filename))
{ {
$not_exist[] = '<a href="viewtopic.php?t='. $torrent['topic_id'] .'">'. $filename .'</a>'; $not_exist[] = '<a href="viewtopic.php?t='. $torrent['topic_id'] .'">'. $filename .'</a>';
} }
else else
{ {
$tor = bdecode_file($filename); $tor = bdecode_file($filename);
$info = (!empty($tor['info'])) ? $tor['info'] : array(); $info = (!empty($tor['info'])) ? $tor['info'] : array();
$info_hash = pack('H*', sha1(bencode($info))); $info_hash = pack('H*', sha1(bencode($info)));
$info_hash_sql = rtrim(DB()->escape($info_hash), ' '); $info_hash_sql = rtrim(DB()->escape($info_hash), ' ');
DB()->query("UPDATE ". BB_BT_TORRENTS ." DB()->query("UPDATE ". BB_BT_TORRENTS ."
SET info_hash = '$info_hash_sql' SET info_hash = '$info_hash_sql'
WHERE attach_id = {$torrent['attach_id']}"); WHERE attach_id = {$torrent['attach_id']}");
@ -91,9 +90,9 @@ for ($i = 0; $i < $loops; $i++)
print_ok ("Completed"); print_ok ("Completed");
if(!empty($not_exist)) if (!empty($not_exist))
{ {
print_ok ("These torrents doesn't exist in filesystem: ". implode(', ', array_unique($not_exist))); print_ok ("These torrents doesn't exist in filesystem: ". implode(', ', array_unique($not_exist)));
} }
} }

View file

@ -1,58 +1,3 @@
******************** Для получения информации об установке движка, откройте в своем браузере указаную ссылку:
** Установка **
********************
Распаковываем на сервер содержимое папки upload. https://github.com/torrentpier/tracker/tree/master#torrentpier-ii
Заходим в phpmyadmin, открываем или создаем новую базу, потом импортируем дамп (install/sql/mysql.sql)
Правим файл конфигурации config.php (изменяем данные входа в БД, остальное по усмотрению)
* Файлы favicon.ico (меняем на свою иконку, если есть), robots.txt(допуск или запрет ботам поисковиков к серверу, блокирует не все, меняем адреса в строках Host: и Sitemap: на свои адреса)
************************************
** Права доступа на папки и файлы **
************************************
Устанавливаем права доступа на данные папки 777, на файлы внутри этих папок (кроме .htaccess) 666:
- ajax/html
- cache
- cache/filecache
- files
- files/thumbs
- images
- images/avatars
- images/captcha
- images/ranks
- images/smiles
- log
- triggers
************************************
** Необходимые значения в php.ini **
************************************
mbstring.internal_encoding = UTF-8
magic_quotes_gpc = Off
************************************
** Необходимые модули для php **
************************************
php5-tidy
************************************
** Необходимый запуск cron.php **
************************************
Подробнее в теме http://torrentpier.me/threads/Отвязка-запуск-крона.52/
************************************
** Часто задаваемые вопросы **
************************************
http://torrentpier.me/threads/faq-для-новичков.260/
************************************
** Где задать вопрос **
************************************
http://torrentpier.me/forums/Основные-вопросы-по-torrentpier-ii.10/

View file

@ -20,7 +20,7 @@ else
$upload_dir = '../' . $attach_config['upload_dir']; $upload_dir = '../' . $attach_config['upload_dir'];
} }
include(BB_ROOT .'attach_mod/includes/functions_selects.php'); include(ATTACH_DIR .'includes/functions_selects.php');
// Check if the language got included // Check if the language got included
if (!isset($lang['TEST_SETTINGS_SUCCESSFUL'])) if (!isset($lang['TEST_SETTINGS_SUCCESSFUL']))
@ -76,7 +76,6 @@ else
$sort_order = 'ASC'; $sort_order = 'ASC';
} }
// Pagination ? // Pagination ?
$do_pagination = ($view != 'stats' && $view != 'search') ? true : false; $do_pagination = ($view != 'stats' && $view != 'search') ? true : false;

View file

@ -23,7 +23,7 @@ else
$upload_dir = '../' . $attach_config['upload_dir']; $upload_dir = '../' . $attach_config['upload_dir'];
} }
include(BB_ROOT .'attach_mod/includes/functions_selects.php'); include(ATTACH_DIR .'includes/functions_selects.php');
// Check if the language got included // Check if the language got included
if (!isset($lang['TEST_SETTINGS_SUCCESSFUL'])) if (!isset($lang['TEST_SETTINGS_SUCCESSFUL']))

View file

@ -40,9 +40,7 @@ else
if (isset($_POST['submit']) && $row['config_value'] != $new[$config_name]) if (isset($_POST['submit']) && $row['config_value'] != $new[$config_name])
{ {
if ($config_name == 'seed_bonus_points' || $config_name == 'seed_bonus_release') $new[$config_name] = serialize($new[$config_name]); if ($config_name == ('seed_bonus_points' || 'seed_bonus_release' || 'bonus_upload' || 'bonus_upload_price')) $new[$config_name] = serialize(str_replace(',', '.', $new[$config_name]));
if ($config_name == 'bonus_upload' || $config_name == 'bonus_upload_price') $new[$config_name] = serialize($new[$config_name]);
bb_update_config(array($config_name => $new[$config_name])); bb_update_config(array($config_name => $new[$config_name]));
} }
} }
@ -89,7 +87,7 @@ switch($mode)
if ($new['seed_bonus_points'] && $new['seed_bonus_release']) if ($new['seed_bonus_points'] && $new['seed_bonus_release'])
{ {
$seed_bonus = unserialize($new['seed_bonus_points']); $seed_bonus = unserialize($new['seed_bonus_points']);
$seed_release = unserialize($new['seed_bonus_release']); $seed_release = unserialize($new['seed_bonus_release']);
foreach ($seed_bonus as $i => $row) foreach ($seed_bonus as $i => $row)
@ -106,7 +104,7 @@ switch($mode)
if ($new['bonus_upload'] && $new['bonus_upload_price']) if ($new['bonus_upload'] && $new['bonus_upload_price'])
{ {
$upload_row = unserialize($new['bonus_upload']); $upload_row = unserialize($new['bonus_upload']);
$price_row = unserialize($new['bonus_upload_price']); $price_row = unserialize($new['bonus_upload_price']);
foreach ($upload_row as $i => $row) foreach ($upload_row as $i => $row)
{ {

View file

@ -26,7 +26,7 @@ else
$upload_dir = BB_ROOT . $attach_config['upload_dir']; $upload_dir = BB_ROOT . $attach_config['upload_dir'];
} }
include(BB_ROOT .'attach_mod/includes/functions_selects.php'); include(ATTACH_DIR .'includes/functions_selects.php');
// Check if the language got included // Check if the language got included
if (!isset($lang['TEST_SETTINGS_SUCCESSFUL'])) if (!isset($lang['TEST_SETTINGS_SUCCESSFUL']))

View file

@ -9,7 +9,6 @@ if (!empty($setmodules))
require('./pagestart.php'); require('./pagestart.php');
// ACP Header - END // ACP Header - END
// View Read Post Reply Edit Delete Sticky Announce Vote Poll PostAttach Download // View Read Post Reply Edit Delete Sticky Announce Vote Poll PostAttach Download
$simple_auth_ary = array( $simple_auth_ary = array(
/* Public */ 0 => array(AUTH_ALL, AUTH_ALL, AUTH_ALL, AUTH_ALL, AUTH_REG, AUTH_REG, AUTH_MOD, AUTH_MOD, AUTH_REG, AUTH_REG, AUTH_REG, AUTH_ALL), // Public /* Public */ 0 => array(AUTH_ALL, AUTH_ALL, AUTH_ALL, AUTH_ALL, AUTH_REG, AUTH_REG, AUTH_MOD, AUTH_MOD, AUTH_REG, AUTH_REG, AUTH_REG, AUTH_ALL), // Public

View file

@ -951,7 +951,6 @@ function renumber_order ($mode, $cat = 0)
} }
$sql .= " ORDER BY $orderfield ASC"; $sql .= " ORDER BY $orderfield ASC";
if (!$result = DB()->sql_query($sql)) if (!$result = DB()->sql_query($sql))
{ {
bb_die('Could not get list of categories / forums #2'); bb_die('Could not get list of categories / forums #2');

View file

@ -245,7 +245,6 @@ else
generate_pagination($url, $items_count, $per_page, $start); generate_pagination($url, $items_count, $per_page, $start);
$filter = array(); $filter = array();
if ($log_rowset) if ($log_rowset)

View file

@ -36,10 +36,10 @@ if (isset($_POST['submit']))
if ($group_id != -1) if ($group_id != -1)
{ {
$user_list = DB()->fetch_rowset(" $user_list = DB()->fetch_rowset("
SELECT u.username, u.user_email, u.user_lang SELECT u.username, u.user_email, u.user_lang
FROM ". BB_USERS ." u, ". BB_USER_GROUP ." ug FROM ". BB_USERS ." u, ". BB_USER_GROUP ." ug
WHERE ug.group_id = $group_id WHERE ug.group_id = $group_id
AND ug.user_pending = 0 AND ug.user_pending = 0
AND u.user_id = ug.user_id AND u.user_id = ug.user_id
AND u.user_active = 1 AND u.user_active = 1
AND u.user_id NOT IN(". EXCLUDED_USERS_CSV . $user_id_sql .") AND u.user_id NOT IN(". EXCLUDED_USERS_CSV . $user_id_sql .")
@ -48,8 +48,8 @@ if (isset($_POST['submit']))
else else
{ {
$user_list = DB()->fetch_rowset(" $user_list = DB()->fetch_rowset("
SELECT username, user_email, user_lang SELECT username, user_email, user_lang
FROM ". BB_USERS ." FROM ". BB_USERS ."
WHERE user_active = 1 WHERE user_active = 1
AND user_id NOT IN(". EXCLUDED_USERS_CSV . $user_id_sql .") AND user_id NOT IN(". EXCLUDED_USERS_CSV . $user_id_sql .")
"); ");

View file

@ -36,7 +36,6 @@ else
} }
} }
if ($mode != '') if ($mode != '')
{ {
if ($mode == 'edit' || $mode == 'add') if ($mode == 'edit' || $mode == 'add')

View file

@ -0,0 +1,52 @@
<?php
if (!empty($setmodules))
{
$module['Mods']['SITEMAP'] = basename(__FILE__);
return;
}
require('./pagestart.php');
require(INC_DIR .'functions_selects.php');
$sql = "SELECT * FROM " . BB_CONFIG;
if (!$result = DB()->sql_query($sql))
{
bb_die('Could not query config information in admin_sitemap');
}
else
{
$new_params = array();
while ($row = DB()->sql_fetchrow($result))
{
$config_name = $row['config_name'];
$config_value = $row['config_value'];
$default_config[$config_name] = $config_value;
$new[$config_name] = isset($_POST[$config_name]) ? $_POST[$config_name] : $default_config[$config_name];
if (isset($_POST['submit']) && $row['config_value'] != $new[$config_name])
{
$new_params[$config_name] = $new[$config_name];
}
}
if (isset($_POST['submit']))
{
if (!empty($new_params))
{
bb_update_config($new_params);
}
}
}
$s_mess = $lang['SITEMAP_CREATED'].': <b>'.bb_date($new['sitemap_time'], $bb_cfg['post_date_format']).'</b> '.$lang['SITEMAP_AVAILABLE'].': <a href="'.make_url('/sitemap/sitemap.xml').'" target="_blank">'.make_url('/sitemap/sitemap.xml').'</a>';
$message = (@file_exists(BB_ROOT. "/sitemap/sitemap.xml")) ? $s_mess : $lang['SITEMAP_NOT_CREATED'];
$template->assign_vars(array(
'STATIC_SITEMAP' => $new['static_sitemap'],
'MESSAGE' => $message,
));
print_page('admin_sitemap.tpl', 'admin');

View file

@ -795,10 +795,7 @@ else
$base_url .= '&search_moderators=true&moderators_forum='. rawurlencode(stripslashes($moderators_forum)); $base_url .= '&search_moderators=true&moderators_forum='. rawurlencode(stripslashes($moderators_forum));
$moderators_forum = intval($moderators_forum); $moderators_forum = intval($moderators_forum);
$sql = "SELECT forum_name $sql = "SELECT forum_name FROM ".BB_FORUMS." WHERE forum_id = ".$moderators_forum;
FROM ".BB_FORUMS."
WHERE forum_id = ".$moderators_forum;
if (!$result = DB()->sql_query($sql)) if (!$result = DB()->sql_query($sql))
{ {

View file

@ -5,8 +5,8 @@ define('IN_FORUM', true);
define('IN_ADMIN', true); define('IN_ADMIN', true);
require(BB_ROOT .'common.php'); require(BB_ROOT .'common.php');
require(BB_ROOT .'attach_mod/attachment_mod.php'); require(ATTACH_DIR .'attachment_mod.php');
require(BB_ROOT .'attach_mod/includes/functions_admin.php'); require(ATTACH_DIR .'includes/functions_admin.php');
require_once(INC_DIR .'functions_admin.php'); require_once(INC_DIR .'functions_admin.php');
$user->session_start(); $user->session_start();

View file

@ -34,12 +34,12 @@ switch ($ajax->action)
case 'mod_action': case 'mod_action':
case 'change_tor_status': case 'change_tor_status':
case 'gen_passkey': case 'gen_passkey':
require(BB_ROOT . 'attach_mod/attachment_mod.php'); require(ATTACH_DIR . 'attachment_mod.php');
require(INC_DIR . 'functions_torrent.php'); require(INC_DIR . 'functions_torrent.php');
break; break;
case 'change_torrent': case 'change_torrent':
require(BB_ROOT . 'attach_mod/attachment_mod.php'); require(ATTACH_DIR . 'attachment_mod.php');
require(INC_DIR . 'functions_torrent.php'); require(INC_DIR . 'functions_torrent.php');
break; break;
@ -55,6 +55,10 @@ switch ($ajax->action)
case 'group_membership': case 'group_membership':
require(INC_DIR . 'functions_group.php'); require(INC_DIR . 'functions_group.php');
break; break;
case 'sitemap';
require(INC_DIR .'class.sitemap.php');
break;
} }
// position in $ajax->valid_actions['xxx'] // position in $ajax->valid_actions['xxx']
@ -78,6 +82,7 @@ class ajax_common
'change_user_opt' => array('admin'), 'change_user_opt' => array('admin'),
'manage_user' => array('admin'), 'manage_user' => array('admin'),
'manage_admin' => array('admin'), 'manage_admin' => array('admin'),
'sitemap' => array('admin'),
'mod_action' => array('mod'), 'mod_action' => array('mod'),
'topic_tpl' => array('mod'), 'topic_tpl' => array('mod'),
@ -116,7 +121,7 @@ class ajax_common
global $lang; global $lang;
// Exit if we already have errors // Exit if we already have errors
if (!empty($this->response['error_code'])) if (!empty($this->response['error_code']))
{ {
$this->send(); $this->send();
} }
@ -127,7 +132,7 @@ class ajax_common
if (!$action || !is_string($action)) if (!$action || !is_string($action))
{ {
$this->ajax_die('no action specified'); $this->ajax_die('no action specified');
} }
elseif (!$action_params =& $this->valid_actions[$action]) elseif (!$action_params =& $this->valid_actions[$action])
{ {
$this->ajax_die('invalid action: ' . $action); $this->ajax_die('invalid action: ' . $action);
@ -406,4 +411,9 @@ class ajax_common
{ {
require(AJAX_DIR . 'chat.php'); require(AJAX_DIR . 'chat.php');
} }
function sitemap()
{
require(AJAX_DIR .'sitemap.php');
}
} }

View file

@ -148,7 +148,7 @@ switch ($field)
$btu[$field] = $value; $btu[$field] = $value;
$this->response['update_ids']['u_ratio'] = (string) get_bt_ratio($btu); $this->response['update_ids']['u_ratio'] = (string) get_bt_ratio($btu);
break; break;
case 'user_points': case 'user_points':
$value = htmlCHR($value); $value = htmlCHR($value);
$value = (float) str_replace(',', '.', $this->request['value']); $value = (float) str_replace(',', '.', $this->request['value']);

View file

@ -72,13 +72,13 @@ switch ($mode)
if (!$user_id) $this->ajax_die($lang['NO_USER_ID_SPECIFIED']); if (!$user_id) $this->ajax_die($lang['NO_USER_ID_SPECIFIED']);
$reg_ip = DB()->fetch_rowset("SELECT username, user_id, user_rank FROM ". BB_USERS ." $reg_ip = DB()->fetch_rowset("SELECT username, user_id, user_rank FROM ". BB_USERS ."
WHERE user_reg_ip = '{$profiledata['user_reg_ip']}' WHERE user_reg_ip = '{$profiledata['user_reg_ip']}'
AND user_reg_ip != '' AND user_reg_ip != ''
AND user_id != {$profiledata['user_id']} AND user_id != {$profiledata['user_id']}
ORDER BY username ASC"); ORDER BY username ASC");
$last_ip = DB()->fetch_rowset("SELECT username, user_id, user_rank FROM " .BB_USERS ." $last_ip = DB()->fetch_rowset("SELECT username, user_id, user_rank FROM " .BB_USERS ."
WHERE user_last_ip = '{$profiledata['user_last_ip']}' WHERE user_last_ip = '{$profiledata['user_last_ip']}'
AND user_last_ip != '' AND user_last_ip != ''
AND user_id != {$profiledata['user_id']}"); AND user_id != {$profiledata['user_id']}");
@ -101,7 +101,7 @@ switch ($mode)
$link_last_ip .= profile_url($row) .' '; $link_last_ip .= profile_url($row) .' ';
} }
} }
if ($profiledata['user_level'] == ADMIN && !IS_ADMIN) $reg_ip = $last_ip = $lang['HIDDEN']; if ($profiledata['user_level'] == ADMIN && !IS_ADMIN) $reg_ip = $last_ip = $lang['HIDDEN'];
elseif ($profiledata['user_level'] == MOD && IS_MOD) $reg_ip = $last_ip = $lang['HIDDEN']; elseif ($profiledata['user_level'] == MOD && IS_MOD) $reg_ip = $last_ip = $lang['HIDDEN'];
else else

View file

@ -10,7 +10,7 @@ $mc_text = (string) $this->request['mc_text'];
if (!$mc_text = prepare_message($mc_text)) $this->ajax_die($lang['EMPTY_MESSAGE']); if (!$mc_text = prepare_message($mc_text)) $this->ajax_die($lang['EMPTY_MESSAGE']);
$post = DB()->fetch_row(" $post = DB()->fetch_row("
SELECT SELECT
p.post_id, p.poster_id p.post_id, p.poster_id
FROM ". BB_POSTS ." p FROM ". BB_POSTS ." p
WHERE p.post_id = $post_id WHERE p.post_id = $post_id

64
upload/ajax/sitemap.php Normal file
View file

@ -0,0 +1,64 @@
<?php
if (!defined('IN_AJAX')) die(basename(__FILE__));
global $bb_cfg, $lang;
$mode = (string) $this->request['mode'];
$map = new sitemap();
$html = '';
switch ($mode)
{
case 'create':
$map->create();
if (@file_exists(BB_ROOT. "/sitemap/sitemap.xml"))
{
$html .= $lang['SITEMAP_CREATED'].': <b>'.bb_date(TIMENOW, $bb_cfg['post_date_format']).'</b> '.$lang['SITEMAP_AVAILABLE'].': <a href="'.make_url('/sitemap/sitemap.xml').'" target="_blank">'.make_url('/sitemap/sitemap.xml').'</a>';
} else {
$html .= $lang['SITEMAP_NOT_CREATED'];
}
break;
case 'search_update':
if (!@file_exists(BB_ROOT. "/sitemap/sitemap.xml"))
{
$map->create();
}
$map_link = make_url('/sitemap/sitemap.xml');
if (strpos($map->send_url("http://google.com/webmasters/sitemaps/ping?sitemap=", $map_link), "successfully added") !== false) {
$html .= '<br />'.$lang['SITEMAP_NOTIFY_SEARCH'].' Google: <font style="color: green;">'.$lang['SITEMAP_SENT'].'</font>';
} else {
$html .= '<br />'.$lang['SITEMAP_NOTIFY_SEARCH'].' Google: <font style="color: red;">'.$lang['SITEMAP_ERROR'].'</font> URL: <a href="http://google.com/webmasters/sitemaps/ping?sitemap='.urlencode($map_link).'" target="_blank">http://google.com/webmasters/sitemaps/ping?sitemap='.$map_link.'</a>';
}
if (strpos($map->send_url("http://ping.blogs.yandex.ru/ping?sitemap=", $map_link), "OK") !== false) {
$html .= '<br />'.$lang['SITEMAP_NOTIFY_SEARCH'].' Yandex: <font style="color: green;">'.$lang['SITEMAP_SENT'].'</font>';
} else {
$html .= '<br />'.$lang['SITEMAP_NOTIFY_SEARCH'].' Yandex: <font style="color: red;">'.$lang['SITEMAP_ERROR'].'</font> URL: <a href="http://ping.blogs.yandex.ru/ping?sitemap='.urlencode($map_link).'" target="_blank">http://ping.blogs.yandex.ru/ping?sitemap='.$map_link.'</a>';
}
if ($map->send_url("http://www.bing.com/webmaster/ping.aspx?siteMap=", $map_link)) {
$html .= '<br />'.$lang['SITEMAP_NOTIFY_SEARCH'].' Bing: <font style="color: green;">'.$lang['SITEMAP_SENT'].'</font>';
} else {
$html .= '<br />'.$lang['SITEMAP_NOTIFY_SEARCH'].' Bing: <font style="color: red;">'.$lang['SITEMAP_ERROR'].'</font> URL: <a href="http://www.bing.com/webmaster/ping.aspx?siteMap='.urlencode($map_link).'" target="_blank">http://www.bing.com/webmaster/ping.aspx?siteMap='.$map_link.'</a>';
}
if (strpos($map->send_url("http://rpc.weblogs.com/pingSiteForm?name=InfraBlog&url=", $map_link), "Thanks for the ping") !== false) {
$html .= '<br />'.$lang['SITEMAP_NOTIFY_SEARCH'].' Weblogs: <font style="color: green;">'.$lang['SITEMAP_SENT'].'</font>';
} else {
$html .= '<br />'.$lang['SITEMAP_NOTIFY_SEARCH'].' Weblogs: <font style="color: red;">'.$lang['SITEMAP_ERROR'].'</font> URL: <a href="http://rpc.weblogs.com/pingSiteForm?name=InfraBlog&url='.urlencode($map_link).'" target="_blank">http://rpc.weblogs.com/pingSiteForm?name=InfraBlog&url='.$map_link.'</a>';
}
if ($map->send_url("http://search.yahooapis.com/SiteExplorerService/V1/ping?sitemap=", $map_link)) {
$html .= '<br />'.$lang['SITEMAP_NOTIFY_SEARCH'].' Yahoo: <font style="color: green;">'.$lang['SITEMAP_SENT'].'</font>';
} else {
$html .= '<br />'.$lang['SITEMAP_NOTIFY_SEARCH'].' Yahoo: <font style="color: red;">'.$lang['SITEMAP_ERROR'].'</font> URL: <a href="http://search.yahooapis.com/SiteExplorerService/V1/ping?sitemap='.urlencode($map_link).'" target="_blank">http://search.yahooapis.com/SiteExplorerService/V1/ping?sitemap='.$map_link.'</a>';
}
break;
}
$this->response['html'] = $html;
$this->response['mode'] = $mode;

View file

@ -10,6 +10,9 @@ if (!isset($this->request['attach_id']))
} }
$attach_id = (int) $this->request['attach_id']; $attach_id = (int) $this->request['attach_id'];
global $bnc_error;
$bnc_error = 0;
$torrent = DB()->fetch_row("SELECT at.attach_id, at.physical_filename FROM ". BB_ATTACHMENTS_DESC ." at WHERE at.attach_id = $attach_id LIMIT 1"); $torrent = DB()->fetch_row("SELECT at.attach_id, at.physical_filename FROM ". BB_ATTACHMENTS_DESC ." at WHERE at.attach_id = $attach_id LIMIT 1");
if (!$torrent) $this->ajax_die($lang['EMPTY_ATTACH_ID']); if (!$torrent) $this->ajax_die($lang['EMPTY_ATTACH_ID']);
$filename = get_attachments_dir() .'/'. $torrent['physical_filename']; $filename = get_attachments_dir() .'/'. $torrent['physical_filename'];
@ -79,7 +82,7 @@ class torrent
function build_filelist_array () function build_filelist_array ()
{ {
global $lang; global $lang;
$info = $this->tor_decoded['info']; $info = $this->tor_decoded['info'];
if (isset($info['name.utf-8'])) if (isset($info['name.utf-8']))
@ -126,7 +129,8 @@ class torrent
{ {
if (is_string($cur_files_ary)) if (is_string($cur_files_ary))
{ {
bb_die($lang['ERROR_BUILD']); $GLOBALS['bnc_error'] = 1;
break(1);
} }
$cur_files_ary[] = $this->build_file_item($name, $length); $cur_files_ary[] = $this->build_file_item($name, $length);
} }
@ -169,4 +173,6 @@ function clean_tor_dirname ($dirname)
return str_replace(array('[', ']', '<', '>', "'"), array('&#91;', '&#93;', '&lt;', '&gt;', '&#039;'), $dirname); return str_replace(array('[', ']', '<', '>', "'"), array('&#91;', '&#93;', '&lt;', '&gt;', '&#039;'), $dirname);
} }
if ($bnc_error) $tor_filelist = '<b style="color: #993300;">'.$lang['ERROR_BUILD'].'</b><br /><br />'.$tor_filelist;
$this->response['html'] = $tor_filelist; $this->response['html'] = $tor_filelist;

View file

@ -2,11 +2,11 @@
if (!defined('IN_FORUM')) die("Hacking attempt"); if (!defined('IN_FORUM')) die("Hacking attempt");
require(BB_ROOT .'attach_mod/includes/functions_includes.php'); require(ATTACH_DIR .'includes/functions_includes.php');
require(BB_ROOT .'attach_mod/includes/functions_attach.php'); require(ATTACH_DIR .'includes/functions_attach.php');
require(BB_ROOT .'attach_mod/includes/functions_delete.php'); require(ATTACH_DIR .'includes/functions_delete.php');
require(BB_ROOT .'attach_mod/includes/functions_thumbs.php'); require(ATTACH_DIR .'includes/functions_thumbs.php');
require(BB_ROOT .'attach_mod/includes/functions_filetypes.php'); require(ATTACH_DIR .'includes/functions_filetypes.php');
if (defined('ATTACH_INSTALL')) if (defined('ATTACH_INSTALL'))
{ {
@ -76,7 +76,7 @@ if (!($attach_config = CACHE('bb_cache')->get('attach_config')))
CACHE('bb_cache')->set('attach_config', $attach_config, 86400); CACHE('bb_cache')->set('attach_config', $attach_config, 86400);
} }
include(BB_ROOT .'attach_mod/displaying.php'); include(ATTACH_DIR .'displaying.php');
include(BB_ROOT .'attach_mod/posting_attachments.php'); include(ATTACH_DIR .'posting_attachments.php');
$upload_dir = $attach_config['upload_dir']; $upload_dir = $attach_config['upload_dir'];

View file

@ -344,7 +344,7 @@ function display_attachments($post_id)
// bt // bt
if ($link && ($attachments['_'. $post_id][$i]['extension'] === TORRENT_EXT)) if ($link && ($attachments['_'. $post_id][$i]['extension'] === TORRENT_EXT))
{ {
include(BB_ROOT .'attach_mod/displaying_torrent.php'); include(ATTACH_DIR .'displaying_torrent.php');
} }
else if ($link) else if ($link)
{ {

View file

@ -1,21 +1,5 @@
<?php <?php
/**
* Setup Basic Authentication
*/
// moved to auth
/**
* Setup Forum Authentication (admin/admin_forumauth.php)
*/
//admin/admin_forumauth.php
/**
* Setup Usergroup Authentication
*/
//admin/admin_ug_auth.php
/** /**
* Setup s_auth_can in viewforum and viewtopic (viewtopic.php/viewforum.php) * Setup s_auth_can in viewforum and viewtopic (viewtopic.php/viewforum.php)
*/ */
@ -49,9 +33,9 @@ function attachment_quota_settings($admin_mode, $submit = false, $mode)
$upload_dir = BB_ROOT . $attach_config['upload_dir']; $upload_dir = BB_ROOT . $attach_config['upload_dir'];
} }
include(BB_ROOT .'attach_mod/includes/functions_selects.php'); include(ATTACH_DIR .'includes/functions_selects.php');
if (!function_exists("process_quota_settings")) if (!function_exists("process_quota_settings"))
include(BB_ROOT . 'attach_mod/includes/functions_admin.php'); include(ATTACH_DIR . 'includes/functions_admin.php');
$user_id = 0; $user_id = 0;

View file

@ -9,7 +9,6 @@ define('FILENAME_CRYPTIC', false);
define('FILENAME_CRYPTIC_LENGTH', 64); define('FILENAME_CRYPTIC_LENGTH', 64);
define('FILENAME_TRANSLITERATE', true); define('FILENAME_TRANSLITERATE', true);
class attach_parent class attach_parent
{ {
var $post_attach = false; var $post_attach = false;

View file

@ -68,8 +68,8 @@ $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $do
// Version info // Version info
$bb_cfg['tp_version'] = '2.0.9 (RC)'; $bb_cfg['tp_version'] = '2.0.9 (RC)';
$bb_cfg['tp_release_date'] = '30-07-2014'; $bb_cfg['tp_release_date'] = '04-08-2014';
$bb_cfg['tp_release_state'] = 'R592'; $bb_cfg['tp_release_state'] = 'R593';
// Database // Database
$charset = 'utf8'; $charset = 'utf8';
@ -239,16 +239,16 @@ $page_cfg['show_torhelp'] = array(
// Path (trailing slash '/' at the end: XX_PATH - without, XX_DIR - with) // Path (trailing slash '/' at the end: XX_PATH - without, XX_DIR - with)
define('DIR_SEPR', DIRECTORY_SEPARATOR); define('DIR_SEPR', DIRECTORY_SEPARATOR);
define('BB_PATH', realpath(BB_ROOT) ); // absolute pathname to the forum root define('BB_PATH', realpath(BB_ROOT) ); // absolute pathname to the forum root
define('ADMIN_DIR', BB_PATH .'/admin/' ); define('ADMIN_DIR', BB_PATH .'/admin/' );
define('CACHE_DIR', BB_PATH .'/cache/' ); define('ATTACH_DIR', BB_PATH .'/attach_mod/');
define('CFG_DIR', BB_PATH .'/config/' ); define('CACHE_DIR', BB_PATH .'/cache/' );
define('INC_DIR', BB_PATH .'/includes/' ); define('CFG_DIR', BB_PATH .'/config/' );
define('LANG_ROOT_DIR', BB_PATH .'/language/' ); define('INC_DIR', BB_PATH .'/includes/' );
define('LOG_DIR', BB_PATH .'/log/' ); define('LANG_ROOT_DIR', BB_PATH .'/language/' );
define('TEMPLATES_DIR', BB_PATH .'/templates/'); define('LOG_DIR', BB_PATH .'/log/' );
define('TRIGGERS_DIR', BB_PATH .'/triggers/' ); define('TEMPLATES_DIR', BB_PATH .'/templates/' );
define('LOCKS_DIR', BB_PATH .'/locks/' ); define('TRIGGERS_DIR', BB_PATH .'/triggers/' );
// URL's // URL's
$bb_cfg['ajax_url'] = 'ajax.php'; # "http://{$_SERVER['SERVER_NAME']}/ajax.php" $bb_cfg['ajax_url'] = 'ajax.php'; # "http://{$_SERVER['SERVER_NAME']}/ajax.php"
@ -451,11 +451,11 @@ $bb_cfg['parse_ed2k_links'] = true; // make ed2k links clickable
$bb_cfg['post_date_format'] = 'd-M-Y H:i'; $bb_cfg['post_date_format'] = 'd-M-Y H:i';
$bb_cfg['ext_link_new_win'] = true; // open external links in new window $bb_cfg['ext_link_new_win'] = true; // open external links in new window
$bb_cfg['topic_moved_days_keep'] = 7; // remove topic moved links after xx days (or FALSE to disable) $bb_cfg['topic_moved_days_keep'] = 7; // remove topic moved links after xx days (or FALSE to disable)
$bb_cfg['allowed_posts_per_page'] = array(15, 30, 50, 100); $bb_cfg['allowed_posts_per_page'] = array(15, 30, 50, 100);
$bb_cfg['user_signature_start'] = '<div class="signature"><br />_________________<br />'; $bb_cfg['user_signature_start'] = '<div class="signature"><br />_________________<br />';
$bb_cfg['user_signature_end'] = '</div>'; // Это позволит использовать html теги, которые требуют закрытия. Например <table> или <font color> $bb_cfg['user_signature_end'] = '</div>'; // Это позволит использовать html теги, которые требуют закрытия. Например <table> или <font color>
// Posts // Posts
$bb_cfg['use_posts_cache'] = true; // if you switch from ON to OFF, you need to TRUNCATE `bb_posts_html` table $bb_cfg['use_posts_cache'] = true; // if you switch from ON to OFF, you need to TRUNCATE `bb_posts_html` table
@ -475,7 +475,6 @@ $bb_cfg['max_search_words_per_post'] = 200;
$bb_cfg['search_min_word_len'] = 3; $bb_cfg['search_min_word_len'] = 3;
$bb_cfg['search_max_word_len'] = 35; $bb_cfg['search_max_word_len'] = 35;
$bb_cfg['limit_max_search_results'] = false; $bb_cfg['limit_max_search_results'] = false;
$bb_cfg['tidy_post'] = true;
$bb_cfg['spam_filter_file_path'] = ''; //BB_PATH .'/misc/spam_filter_words.txt'; $bb_cfg['spam_filter_file_path'] = ''; //BB_PATH .'/misc/spam_filter_words.txt';
// Posting // Posting
@ -502,7 +501,7 @@ $bb_cfg['user_not_active_days_keep'] = 180; // inactive users but only wi
$bb_cfg['groupcp_members_per_page'] = 300; $bb_cfg['groupcp_members_per_page'] = 300;
// Tidy // Tidy
if ($bb_cfg['tidy_post'] && !function_exists('tidy_repair_string') or !extension_loaded('tidy')) die('Set $bb_cfg[\'tidy_post\'] = false in config.php'); $bb_cfg['tidy_post'] = (!extension_loaded('tidy')) ? false : true;
// Ads // Ads
$bb_cfg['show_ads'] = false; $bb_cfg['show_ads'] = false;
@ -581,15 +580,14 @@ $banned_user_agents = array(
# 'wget', # 'wget',
); );
$bb_cfg['porno_forums_screenshots_topic_id'] = 0; // (int) 7 $bb_cfg['trash_forum_id'] = 0; // (int) 7
$bb_cfg['trash_forum_id'] = 0; // (int) 7
$bb_cfg['first_logon_redirect_url'] = 'index.php'; $bb_cfg['first_logon_redirect_url'] = 'index.php';
$bb_cfg['terms_and_conditions_url'] = 'index.php'; $bb_cfg['terms_and_conditions_url'] = 'index.php';
$bb_cfg['user_agreement_url'] = 'misc.php?do=info&show=user_agreement'; $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['copyright_holders_url'] = 'misc.php?do=info&show=copyright_holders';
$bb_cfg['advert_url'] = 'misc.php?do=info&show=advert'; $bb_cfg['advert_url'] = 'misc.php?do=info&show=advert';
// Captcha // Captcha
$bb_cfg['captcha'] = array( $bb_cfg['captcha'] = array(

View file

@ -5,8 +5,8 @@ define('BB_SCRIPT', 'download');
define('IN_SERVICE', true); define('IN_SERVICE', true);
define('NO_GZIP', true); define('NO_GZIP', true);
define('BB_ROOT', './'); define('BB_ROOT', './');
require(BB_ROOT ."common.php"); require(BB_ROOT .'common.php');
require(BB_ROOT ."attach_mod/attachment_mod.php"); require(ATTACH_DIR .'attachment_mod.php');
$datastore->enqueue(array( $datastore->enqueue(array(
'attach_extensions', 'attach_extensions',
@ -164,7 +164,6 @@ for ($i = 0; $i < $num_auth_pages && $authorised == false; $i++)
} }
} }
if (!$authorised) if (!$authorised)
{ {
bb_die($lang['SORRY_AUTH_VIEW_ATTACH']); bb_die($lang['SORRY_AUTH_VIEW_ATTACH']);

View file

View file

@ -69,7 +69,7 @@ class Text_LangCorrect
#английский (all) #английский (all)
private $en = '[a-zA-Z]'; private $en = '[a-zA-Z]';
#английский (uppercase) #английский (uppercase)
private $en_uc = '[A-Z]'; private $en_uc = '[A-Z]';
@ -2822,7 +2822,7 @@ class Text_LangCorrect
/** /**
* Исправляет клавиатурные опечатки в тексте. * Исправляет клавиатурные опечатки в тексте.
* *
* @param scalar|null $s Текст в кодировке UTF-8. * @param scalar|null $s Текст в кодировке UTF-8.
* @param int $mode Константы self::SIMILAR_CHARS и/или self::KEYBOARD_LAYOUT, * @param int $mode Константы self::SIMILAR_CHARS и/или self::KEYBOARD_LAYOUT,
* (их можно комбинировать). Описание констант см. выше. * (их можно комбинировать). Описание констант см. выше.
@ -3055,7 +3055,7 @@ class Text_LangCorrect
#если в $word были спецсимволы, а в $s их уже нет, возвращаем $s #если в $word были спецсимволы, а в $s их уже нет, возвращаем $s
if ($is_sc && ! preg_match('/' . $this->sc . '/sSX', $s)) return $s; if ($is_sc && ! preg_match('/' . $this->sc . '/sSX', $s)) return $s;
#если в $s спецсимволов больше чем букв, возвращаем $word #если в $s спецсимволов больше чем букв, возвращаем $word
$sc_count = 0; $sc_count = 0;
$s = preg_replace('/' . $this->sc . '/sSX', '', $s, -1, $sc_count); $s = preg_replace('/' . $this->sc . '/sSX', '', $s, -1, $sc_count);

View file

@ -17,7 +17,7 @@
* Useful links * Useful links
* http://www.ilia.ws/archives/205-Type-hinting-for-PHP-5.3.html * http://www.ilia.ws/archives/205-Type-hinting-for-PHP-5.3.html
* http://php.net/manual/en/language.oop5.typehinting.php * http://php.net/manual/en/language.oop5.typehinting.php
* *
* @example ReflectionTypeHint_example.php * @example ReflectionTypeHint_example.php
* @link http://code.google.com/p/php5-reflection-type-hint/ * @link http://code.google.com/p/php5-reflection-type-hint/
* @license http://creativecommons.org/licenses/by-sa/3.0/ * @license http://creativecommons.org/licenses/by-sa/3.0/

View file

@ -0,0 +1,229 @@
<?php
class sitemap
{
var $home = "";
var $limit = 0;
var $topic_priority = "0.5";
var $stat_priority = "0.5";
var $priority = "0.6";
var $cat_priority = "0.7";
function sitemap () {
global $bb_cfg;
$this->home = 'http://'.$bb_cfg['server_name'].'/';
}
function build_map () {
$map = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n";
$map .= $this->get_static();
$map .= $this->get_forum();
$map .= $this->get_topic();
$map .= "</urlset>";
return $map;
}
function build_index ($count) {
$map = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<sitemapindex xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n";
$lastmod = date("Y-m-d");
$map .= "<sitemap>\n<loc>{$this->home}sitemap/sitemap1.xml</loc>\n<lastmod>{$lastmod}</lastmod>\n</sitemap>\n";
for ($i = 0; $i < $count; $i++) {
$t = $i + 2;
$map .= "<sitemap>\n<loc>{$this->home}sitemap/sitemap{$t}.xml</loc>\n<lastmod>{$lastmod}</lastmod>\n</sitemap>\n";
}
$map .= "</sitemapindex>";
return $map;
}
function build_stat () {
$map = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n";
$map .= $this->get_static();
$map .= $this->get_forum();
$map .= "</urlset>";
return $map;
}
function build_map_topic ($n) {
$map = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n";
$map .= $this->get_topic($n);
$map .= "</urlset>";
return $map;
}
function get_forum () {
global $datastore;
$this->priority = $this->cat_priority;
$xml = "";
$lastmod = date( "Y-m-d" );
if (!$forums = $datastore->get('cat_forums'))
{
$datastore->update('cat_forums');
$forums = $datastore->get('cat_forums');
}
$not_forums_id = $forums['not_auth_forums']['guest_view'];
$ignore_forum_sql = ($not_forums_id) ? "WHERE forum_id NOT IN($not_forums_id)" : '';
$sql = DB()->sql_query("SELECT forum_id, forum_topics, forum_parent, forum_name FROM ".BB_FORUMS." ".$ignore_forum_sql." ORDER BY forum_id ASC");
while ($row = DB()->sql_fetchrow($sql)) {
if (function_exists('seo_url')) $loc = $this->home . seo_url(FORUM_URL . $row['forum_id'], $row['forum_name']);
else $loc = $this->home . FORUM_URL. $row['forum_id'];
$xml .= $this->get_xml( $loc, $lastmod );
}
return $xml;
}
function get_topic ($page = false) {
global $datastore;
$xml = "";
$this->priority = $this->topic_priority;
if ($page) {
$page = $page - 1;
$page = $page * 40000;
$this->limit = " LIMIT {$page},40000";
} else {
if ($this->limit < 1) $this->limit = false;
if( $this->limit ) {
$this->limit = " LIMIT 0," . $this->limit;
} else {
$this->limit = "";
}
}
if (!$forums = $datastore->get('cat_forums')) {
$datastore->update('cat_forums');
$forums = $datastore->get('cat_forums');
}
$not_forums_id = $forums['not_auth_forums']['guest_view'];
$ignore_forum_sql = ($not_forums_id) ? "WHERE forum_id NOT IN($not_forums_id)" : '';
$sql = DB()->sql_query("SELECT topic_id, topic_title, topic_time FROM " . BB_TOPICS . " ".$ignore_forum_sql." ORDER BY topic_time DESC" . $this->limit);
while ($row = DB()->sql_fetchrow($sql)) {
if (function_exists('seo_url')) $loc = $this->home . seo_url(TOPIC_URL . $row['topic_id'], $row['topic_title']);
else $loc = $this->home . TOPIC_URL. $row['topic_id'];
$xml .= $this->get_xml($loc, date("Y-m-d", $row['topic_time']));
}
return $xml;
}
function get_static () {
global $bb_cfg;
$xml = "";
$lastmod = date("Y-m-d");
$this->priority = $this->stat_priority;
if (isset($bb_cfg['static_sitemap'])) {
$static_url = preg_replace("/\s/", '', $bb_cfg['static_sitemap']); //вырезаем переносы строк
preg_match_all ('#(https?://[\w-]+[\.\w-]+/((?!https?://)[\w- ./?%&=])+)#', $static_url, $out);
$static_url = count($out['0']);
if ($static_url > 0)
{
foreach($out['0'] as $url)
{
$loc = $url;
$xml .= $this->get_xml($loc, $lastmod);
}
}
}
return $xml;
}
function get_xml ($loc, $lastmod) {
$xml = "\t<url>\n";
$xml .= "\t\t<loc>$loc</loc>\n";
$xml .= "\t\t<lastmod>$lastmod</lastmod>\n";
$xml .= "\t\t<priority>" . $this->priority . "</priority>\n";
$xml .= "\t</url>\n";
return $xml;
}
function send_url ($url, $map) {
$data = false;
$file = $url.urlencode($map);
if (function_exists('curl_init')) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $file);
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 6);
$data = curl_exec($ch);
curl_close($ch);
return $data;
} else {
return @file_get_contents($file);
}
}
function create () {
$row = DB()->fetch_row("SELECT COUNT(*) AS count FROM ". BB_TOPICS);
if (!$this->limit) $this->limit = $row['count'];
if ($this->limit > 40000) {
$pages_count = @ceil($row['count'] / 40000);
$sitemap = $this->build_index($pages_count);
$handler = fopen(BB_ROOT. "/sitemap/sitemap.xml", "wb+");
fwrite($handler, $sitemap);
fclose($handler);
@chmod(BB_ROOT. "/sitemap/sitemap.xml", 0666);
$sitemap = $this->build_stat();
$handler = fopen(BB_ROOT. "/sitemap/sitemap1.xml", "wb+");
fwrite($handler, $sitemap);
fclose($handler);
@chmod(BB_ROOT. "/sitemap/sitemap.xml", 0666);
for ($i = 0; $i < $pages_count; $i++) {
$t = $i + 2;
$n = $i + 1;
$sitemap = $this->build_map_topic($n);
$handler = fopen(BB_ROOT. "/sitemap/sitemap{$t}.xml", "wb+");
fwrite($handler, $sitemap);
fclose($handler);
@chmod(BB_ROOT. "/sitemap/sitemap{$t}.xml", 0666);
}
} else {
$sitemap = $this->build_map();
$handler = fopen(BB_ROOT. "/sitemap/sitemap.xml", "wb+");
fwrite($handler, $sitemap);
fclose($handler);
@chmod(BB_ROOT. "/sitemap/sitemap.xml", 0666);
}
$params['sitemap_time'] = TIMENOW;
bb_update_config($params);
}
}

View file

@ -2390,7 +2390,7 @@ class UTF8
/** /**
* Convert UTF-16 / UCS-2 encoding string to UTF-8. * Convert UTF-16 / UCS-2 encoding string to UTF-8.
* Surrogates UTF-16 are supported! * Surrogates UTF-16 are supported!
* *
* In Russian: * In Russian:
* Преобразует строку из кодировки UTF-16 / UCS-2 в UTF-8. * Преобразует строку из кодировки UTF-16 / UCS-2 в UTF-8.
* Суррогаты UTF-16 поддерживаются! * Суррогаты UTF-16 поддерживаются!
@ -3078,7 +3078,6 @@ class UTF8
return self::convert_case($data, CASE_UPPER); return self::convert_case($data, CASE_UPPER);
} }
/** /**
* Convert all HTML entities to native UTF-8 characters * Convert all HTML entities to native UTF-8 characters
* Функция декодирует гораздо больше именованных сущностей, чем стандартная html_entity_decode() * Функция декодирует гораздо больше именованных сущностей, чем стандартная html_entity_decode()

View file

@ -2,14 +2,9 @@
if (!defined('BB_ROOT')) die(basename(__FILE__)); if (!defined('BB_ROOT')) die(basename(__FILE__));
$users_per_cycle = 1000;
require_once(INC_DIR .'functions_admin.php'); require_once(INC_DIR .'functions_admin.php');
$excluded_users = join(',', array( $users_per_cycle = 1000;
GUEST_UID,
BOT_UID,
));
while (true) while (true)
{ {
@ -19,32 +14,30 @@ while (true)
if ($not_activated_days = intval($bb_cfg['user_not_activated_days_keep'])) if ($not_activated_days = intval($bb_cfg['user_not_activated_days_keep']))
{ {
$sql = " $sql = DB()->fetch_rowset("SELECT user_id FROM ". BB_USERS ."
SELECT user_id WHERE user_level = 0
FROM ". BB_USERS ." AND user_lastvisit = 0
WHERE user_active = 0 AND user_session_time = 0
AND user_lastvisit = 0 AND user_regdate <= ". (TIMENOW - 86400 * $not_activated_days) ."
AND user_regdate < ". (TIMENOW - 86400*$not_activated_days) ." AND user_id NOT IN(". EXCLUDED_USERS_CSV .")
AND user_id NOT IN($excluded_users) LIMIT $users_per_cycle");
LIMIT $users_per_cycle
"; foreach ($sql as $row)
foreach (DB()->fetch_rowset($sql) as $row)
{ {
$not_activated_users[] = $row['user_id']; $not_activated_users[] = $row['user_id'];
} }
} }
if ($not_active_days = intval($bb_cfg['user_not_active_days_keep'])) if ($not_active_days = intval($bb_cfg['user_not_active_days_keep']))
{ {
$sql = " $sql = DB()->fetch_rowset("SELECT user_id FROM ". BB_USERS ."
SELECT user_id WHERE user_level = 0
FROM ". BB_USERS ." AND user_posts = 0
WHERE user_active = 1 AND user_lastvisit <= ". (TIMENOW - 86400 * $not_active_days) ."
AND user_posts = 0 AND user_id NOT IN(". EXCLUDED_USERS_CSV .")
AND user_lastvisit < ". (TIMENOW - 86400*$not_active_days) ." LIMIT $users_per_cycle");
AND user_id NOT IN($excluded_users)
LIMIT $users_per_cycle foreach ($sql as $row)
";
foreach (DB()->fetch_rowset($sql) as $row)
{ {
$not_active_users[] = $row['user_id']; $not_active_users[] = $row['user_id'];
} }
@ -61,6 +54,4 @@ while (true)
} }
sleep(3); sleep(3);
} }
unset($prune_users, $not_activated_users, $not_active_users);

View file

@ -0,0 +1,19 @@
<?php
if (!defined('BB_ROOT')) die(basename(__FILE__));
require(INC_DIR .'class.sitemap.php');
$map = new sitemap();
$map->create();
if (@file_exists(BB_ROOT. "/sitemap/sitemap.xml"))
{
$map_link = make_url('/sitemap/sitemap.xml');
$map->send_url("http://google.com/webmasters/sitemaps/ping?sitemap=", $map_link);
$map->send_url("http://ping.blogs.yandex.ru/ping?sitemap=", $map_link);
$map->send_url("http://www.bing.com/webmaster/ping.aspx?siteMap=", $map_link);
$map->send_url("http://rpc.weblogs.com/pingSiteForm?name=InfraBlog&url=", $map_link);
$map->send_url("http://search.yahooapis.com/SiteExplorerService/V1/ping?sitemap=", $map_link);
}

View file

@ -41,7 +41,7 @@ if ($bb_cfg['gender'])
$male = DB()->fetch_row("SELECT COUNT(user_id) AS male FROM ". BB_USERS ." WHERE user_gender = ". MALE ." AND user_id NOT IN(". EXCLUDED_USERS_CSV .")"); $male = DB()->fetch_row("SELECT COUNT(user_id) AS male FROM ". BB_USERS ." WHERE user_gender = ". MALE ." AND user_id NOT IN(". EXCLUDED_USERS_CSV .")");
$female = DB()->fetch_row("SELECT COUNT(user_id) AS female FROM ". BB_USERS ." WHERE user_gender = ". FEMALE ." AND user_id NOT IN(". EXCLUDED_USERS_CSV .")"); $female = DB()->fetch_row("SELECT COUNT(user_id) AS female FROM ". BB_USERS ." WHERE user_gender = ". FEMALE ." AND user_id NOT IN(". EXCLUDED_USERS_CSV .")");
$unselect = DB()->fetch_row("SELECT COUNT(user_id) AS unselect FROM ". BB_USERS ." WHERE user_gender = 0 AND user_id NOT IN(". EXCLUDED_USERS_CSV .")"); $unselect = DB()->fetch_row("SELECT COUNT(user_id) AS unselect FROM ". BB_USERS ." WHERE user_gender = 0 AND user_id NOT IN(". EXCLUDED_USERS_CSV .")");
$data['male'] = $male['male']; $data['male'] = $male['male'];
$data['female'] = $female['female']; $data['female'] = $female['female'];
$data['unselect'] = $unselect['unselect']; $data['unselect'] = $unselect['unselect'];
@ -51,10 +51,10 @@ if ($bb_cfg['gender'])
if ($bb_cfg['birthday_check_day'] && $bb_cfg['birthday_enabled']) if ($bb_cfg['birthday_check_day'] && $bb_cfg['birthday_enabled'])
{ {
$sql = DB()->fetch_rowset("SELECT user_id, username, user_rank , user_birthday $sql = DB()->fetch_rowset("SELECT user_id, username, user_rank , user_birthday
FROM ". BB_USERS ." FROM ". BB_USERS ."
WHERE user_id NOT IN(". EXCLUDED_USERS_CSV .") WHERE user_id NOT IN(". EXCLUDED_USERS_CSV .")
AND user_birthday != '0000-00-00' AND user_birthday != '0000-00-00'
AND user_active = 1 AND user_active = 1
ORDER BY user_level DESC, username ORDER BY user_level DESC, username
"); ");

View file

@ -1048,7 +1048,7 @@ function select_get_val ($key, &$val, $options_ary, $default, $num = true)
* *
* @access private * @access private
*/ */
function set_var(&$result, $var, $type, $multibyte = false, $strip = true) function set_var (&$result, $var, $type, $multibyte = false, $strip = true)
{ {
settype($var, $type); settype($var, $type);
$result = $var; $result = $var;
@ -1077,7 +1077,7 @@ function set_var(&$result, $var, $type, $multibyte = false, $strip = true)
* *
* Used to get passed variable * Used to get passed variable
*/ */
function request_var($var_name, $default, $multibyte = false, $cookie = false) function request_var ($var_name, $default, $multibyte = false, $cookie = false)
{ {
if (!$cookie && isset($_COOKIE[$var_name])) if (!$cookie && isset($_COOKIE[$var_name]))
{ {
@ -1311,27 +1311,21 @@ function bb_update_config ($params, $table = BB_CONFIG)
bb_get_config($table, true, true); bb_get_config($table, true, true);
} }
function get_db_stat($mode) function get_db_stat ($mode)
{ {
switch( $mode ) switch ($mode)
{ {
case 'usercount': case 'usercount':
$sql = "SELECT COUNT(user_id) AS total $sql = "SELECT COUNT(user_id) AS total FROM " . BB_USERS;
FROM " . BB_USERS;
break; break;
case 'newestuser': case 'newestuser':
$sql = "SELECT user_id, username $sql = "SELECT user_id, username FROM " . BB_USERS . " WHERE user_id <> " . GUEST_UID . " ORDER BY user_id DESC LIMIT 1";
FROM " . BB_USERS . "
WHERE user_id <> " . GUEST_UID . "
ORDER BY user_id DESC
LIMIT 1";
break; break;
case 'postcount': case 'postcount':
case 'topiccount': case 'topiccount':
$sql = "SELECT SUM(forum_topics) AS topic_total, SUM(forum_posts) AS post_total $sql = "SELECT SUM(forum_topics) AS topic_total, SUM(forum_posts) AS post_total FROM " . BB_FORUMS;
FROM " . BB_FORUMS;
break; break;
} }
@ -1342,7 +1336,7 @@ function get_db_stat($mode)
$row = DB()->sql_fetchrow($result); $row = DB()->sql_fetchrow($result);
switch ( $mode ) switch ($mode)
{ {
case 'usercount': case 'usercount':
return $row['total']; return $row['total'];
@ -1361,7 +1355,7 @@ function get_db_stat($mode)
return false; return false;
} }
function clean_username($username) function clean_username ($username)
{ {
$username = mb_substr(htmlspecialchars(str_replace("\'", "'", trim($username))), 0, 25, 'UTF-8'); $username = mb_substr(htmlspecialchars(str_replace("\'", "'", trim($username))), 0, 25, 'UTF-8');
$username = bb_rtrim($username, "\\"); $username = bb_rtrim($username, "\\");
@ -1650,7 +1644,7 @@ function generate_pagination ($base_url, $num_items, $per_page, $start_item, $ad
$total_pages = ceil($num_items/$per_page); $total_pages = ceil($num_items/$per_page);
if ( $total_pages == 1 || $num_items == 0 ) if ($total_pages == 1 || $num_items == 0)
{ {
return ''; return '';
} }
@ -1658,20 +1652,20 @@ function generate_pagination ($base_url, $num_items, $per_page, $start_item, $ad
$on_page = floor($start_item / $per_page) + 1; $on_page = floor($start_item / $per_page) + 1;
$page_string = ''; $page_string = '';
if ( $total_pages > ((2*($begin_end + $from_middle)) + 2) ) if ($total_pages > ((2*($begin_end + $from_middle)) + 2))
{ {
$init_page_max = ( $total_pages > $begin_end ) ? $begin_end : $total_pages; $init_page_max = ( $total_pages > $begin_end ) ? $begin_end : $total_pages;
for($i = 1; $i < $init_page_max + 1; $i++) for ($i = 1; $i < $init_page_max + 1; $i++)
{ {
$page_string .= ( $i == $on_page ) ? '<b>' . $i . '</b>' : '<a href="' . $base_url . "&amp;start=" . ( ( $i - 1 ) * $per_page ) . '">' . $i . '</a>'; $page_string .= ( $i == $on_page ) ? '<b>' . $i . '</b>' : '<a href="' . $base_url . "&amp;start=" . ( ( $i - 1 ) * $per_page ) . '">' . $i . '</a>';
if ( $i < $init_page_max ) if ($i < $init_page_max)
{ {
$page_string .= ", "; $page_string .= ", ";
} }
} }
if ( $total_pages > $begin_end ) if ($total_pages > $begin_end)
{ {
if ( $on_page > 1 && $on_page < $total_pages ) if ($on_page > 1 && $on_page < $total_pages)
{ {
$page_string .= ( $on_page > ($begin_end + $from_middle + 1) ) ? ' ... ' : ', '; $page_string .= ( $on_page > ($begin_end + $from_middle + 1) ) ? ' ... ' : ', ';
@ -1679,10 +1673,10 @@ function generate_pagination ($base_url, $num_items, $per_page, $start_item, $ad
$init_page_max = ( $on_page < $total_pages - ($begin_end + $from_middle) ) ? $on_page : $total_pages - ($begin_end + $from_middle); $init_page_max = ( $on_page < $total_pages - ($begin_end + $from_middle) ) ? $on_page : $total_pages - ($begin_end + $from_middle);
for($i = $init_page_min - $from_middle; $i < $init_page_max + ($from_middle + 1); $i++) for ($i = $init_page_min - $from_middle; $i < $init_page_max + ($from_middle + 1); $i++)
{ {
$page_string .= ($i == $on_page) ? '<b>' . $i . '</b>' : '<a href="' . $base_url . "&amp;start=" . ( ( $i - 1 ) * $per_page ) . '">' . $i . '</a>'; $page_string .= ($i == $on_page) ? '<b>' . $i . '</b>' : '<a href="' . $base_url . "&amp;start=" . ( ( $i - 1 ) * $per_page ) . '">' . $i . '</a>';
if ( $i < $init_page_max + $from_middle ) if ($i < $init_page_max + $from_middle)
{ {
$page_string .= ', '; $page_string .= ', ';
} }
@ -1693,10 +1687,10 @@ function generate_pagination ($base_url, $num_items, $per_page, $start_item, $ad
{ {
$page_string .= '&nbsp;...&nbsp;'; $page_string .= '&nbsp;...&nbsp;';
} }
for($i = $total_pages - ($begin_end - 1); $i < $total_pages + 1; $i++) for ($i = $total_pages - ($begin_end - 1); $i < $total_pages + 1; $i++)
{ {
$page_string .= ( $i == $on_page ) ? '<b>' . $i . '</b>' : '<a href="' . $base_url . "&amp;start=" . ( ( $i - 1 ) * $per_page ) . '">' . $i . '</a>'; $page_string .= ( $i == $on_page ) ? '<b>' . $i . '</b>' : '<a href="' . $base_url . "&amp;start=" . ( ( $i - 1 ) * $per_page ) . '">' . $i . '</a>';
if( $i < $total_pages ) if ($i < $total_pages)
{ {
$page_string .= ", "; $page_string .= ", ";
} }
@ -1705,24 +1699,24 @@ function generate_pagination ($base_url, $num_items, $per_page, $start_item, $ad
} }
else else
{ {
for($i = 1; $i < $total_pages + 1; $i++) for ($i = 1; $i < $total_pages + 1; $i++)
{ {
$page_string .= ( $i == $on_page ) ? '<b>' . $i . '</b>' : '<a href="' . $base_url . "&amp;start=" . ( ( $i - 1 ) * $per_page ) . '">' . $i . '</a>'; $page_string .= ( $i == $on_page ) ? '<b>' . $i . '</b>' : '<a href="' . $base_url . "&amp;start=" . ( ( $i - 1 ) * $per_page ) . '">' . $i . '</a>';
if ( $i < $total_pages ) if ($i < $total_pages)
{ {
$page_string .= ', '; $page_string .= ', ';
} }
} }
} }
if ( $add_prevnext_text ) if ($add_prevnext_text)
{ {
if ( $on_page > 1 ) if ($on_page > 1)
{ {
$page_string = ' <a href="' . $base_url . "&amp;start=" . ( ( $on_page - 2 ) * $per_page ) . '">' . $lang['PREVIOUS_PAGE'] . '</a>&nbsp;&nbsp;' . $page_string; $page_string = ' <a href="' . $base_url . "&amp;start=" . ( ( $on_page - 2 ) * $per_page ) . '">' . $lang['PREVIOUS_PAGE'] . '</a>&nbsp;&nbsp;' . $page_string;
} }
if ( $on_page < $total_pages ) if ($on_page < $total_pages)
{ {
$page_string .= '&nbsp;&nbsp;<a href="' . $base_url . "&amp;start=" . ( $on_page * $per_page ) . '">' . $lang['NEXT_PAGE'] . '</a>'; $page_string .= '&nbsp;&nbsp;<a href="' . $base_url . "&amp;start=" . ( $on_page * $per_page ) . '">' . $lang['NEXT_PAGE'] . '</a>';
} }
@ -1746,7 +1740,7 @@ function generate_pagination ($base_url, $num_items, $per_page, $start_item, $ad
// This does exactly what preg_quote() does in PHP 4-ish // This does exactly what preg_quote() does in PHP 4-ish
// If you just need the 1-parameter preg_quote call, then don't bother using this. // If you just need the 1-parameter preg_quote call, then don't bother using this.
// //
function bb_preg_quote($str, $delimiter) function bb_preg_quote ($str, $delimiter)
{ {
$text = preg_quote($str); $text = preg_quote($str);
$text = str_replace($delimiter, '\\' . $delimiter, $text); $text = str_replace($delimiter, '\\' . $delimiter, $text);
@ -1759,7 +1753,7 @@ function bb_preg_quote($str, $delimiter)
// calling script, note that the vars are passed as references this just makes it easier // calling script, note that the vars are passed as references this just makes it easier
// to return both sets of arrays // to return both sets of arrays
// //
function obtain_word_list(&$orig_word, &$replacement_word) function obtain_word_list (&$orig_word, &$replacement_word)
{ {
global $bb_cfg; global $bb_cfg;
@ -1861,7 +1855,7 @@ function bb_simple_die ($txt)
die($txt); die($txt);
} }
function bb_realpath($path) function bb_realpath ($path)
{ {
return (!@function_exists('realpath') || !@realpath(INC_DIR . 'functions.php')) ? $path : @realpath($path); return (!@function_exists('realpath') || !@realpath(INC_DIR . 'functions.php')) ? $path : @realpath($path);
} }
@ -1871,13 +1865,11 @@ function login_redirect ($url = '')
redirect(LOGIN_URL . '?redirect='. (($url) ? $url : $_SERVER['REQUEST_URI'])); redirect(LOGIN_URL . '?redirect='. (($url) ? $url : $_SERVER['REQUEST_URI']));
} }
function meta_refresh($url, $time = 5) function meta_refresh ($url, $time = 5)
{ {
global $template; global $template;
$template->assign_var( $template->assign_var('META', '<meta http-equiv="refresh" content="' . $time . ';url=' . $url . '" />');
'META' , '<meta http-equiv="refresh" content="' . $time . ';url=' . $url . '" />'
);
} }
function redirect ($url) function redirect ($url)
@ -1914,10 +1906,8 @@ function redirect ($url)
exit; exit;
} }
//-- mod : topic display order ---------------------------------------------------------------------
//-- add
// build a list of the sortable fields or return field name // build a list of the sortable fields or return field name
function get_forum_display_sort_option($selected_row=0, $action='list', $list='sort') function get_forum_display_sort_option ($selected_row = 0, $action = 'list', $list = 'sort')
{ {
global $lang; global $lang;
@ -1958,7 +1948,6 @@ function get_forum_display_sort_option($selected_row=0, $action='list', $list='s
} }
return $res; return $res;
} }
//-- fin mod : topic display order -----------------------------------------------------------------
function topic_attachment_image($switch_attachment) function topic_attachment_image($switch_attachment)
{ {
@ -2010,12 +1999,12 @@ if (!function_exists('array_combine'))
$key_count = count($keys); $key_count = count($keys);
$value_count = count($values); $value_count = count($values);
if ($key_count !== $value_count) { if ($key_count !== $value_count) {
user_error('array_combine() Both parameters should have equal number of elements', E_USER_WARNING); user_error('array_combine() both parameters should have equal number of elements', E_USER_WARNING);
return false; return false;
} }
if ($key_count === 0 || $value_count === 0) { if ($key_count === 0 || $value_count === 0) {
user_error('array_combine() Both parameters should have number of elements at least 0', E_USER_WARNING); user_error('array_combine() both parameters should have number of elements at least 0', E_USER_WARNING);
return false; return false;
} }
@ -2313,7 +2302,6 @@ function poll_is_active ($t_data)
return ($t_data['topic_vote'] == 1 && $t_data['topic_time'] > TIMENOW - $bb_cfg['poll_max_days']*86400); return ($t_data['topic_vote'] == 1 && $t_data['topic_time'] > TIMENOW - $bb_cfg['poll_max_days']*86400);
} }
function print_confirmation ($tpl_vars) function print_confirmation ($tpl_vars)
{ {
global $template, $lang; global $template, $lang;
@ -2483,12 +2471,6 @@ function clean_text_match ($text, $ltrim_star = true, $remove_stopwords = false,
$ltrim_chars = ($ltrim_star) ? ' *-!' : ' '; $ltrim_chars = ($ltrim_star) ? ' *-!' : ' ';
$wrap_with_quotes = preg_match('#^"[^"]+"$#', $text); $wrap_with_quotes = preg_match('#^"[^"]+"$#', $text);
# $min_word_len = max(2, $bb_cfg['search_min_word_len'] - 1);
# $max_word_len = $bb_cfg['search_max_word_len'];
# $text = preg_replace('#\b\w{1,'. $min_word_len .'}\b#', '', $text);
# $text = preg_replace('#\b\w{'. $max_word_len .',}\b#', '', $text);
$text = ' '. str_compact(ltrim($text, $ltrim_chars)) .' '; $text = ' '. str_compact(ltrim($text, $ltrim_chars)) .' ';
if ($remove_stopwords) if ($remove_stopwords)
@ -2498,23 +2480,19 @@ function clean_text_match ($text, $ltrim_star = true, $remove_stopwords = false,
if ($bb_cfg['search_engine_type'] == 'sphinx') if ($bb_cfg['search_engine_type'] == 'sphinx')
{ {
$text = preg_replace('#(?<=\S)\-#u', ' ', $text); // "1-2-3" -> "1 2 3" $text = preg_replace('#(?<=\S)\-#u', ' ', $text); // "1-2-3" -> "1 2 3"
$text = preg_replace('#[^0-9a-zA-Zа-яА-ЯёЁ\-_*|]#u', ' ', $text); // допустимые символы (кроме " которые отдельно) $text = preg_replace('#[^0-9a-zA-Zа-яА-ЯёЁ\-_*|]#u', ' ', $text); // допустимые символы (кроме " которые отдельно)
$text = str_replace('-', ' -', $text); // - только в начале слова $text = str_replace('-', ' -', $text); // - только в начале слова
$text = str_replace('*', '* ', $text); // * только в конце слова $text = str_replace('*', '* ', $text); // * только в конце слова
$text = preg_replace('#\s*\|\s*#u', '|', $text); // "| " -> "|" $text = preg_replace('#\s*\|\s*#u', '|', $text); // "| " -> "|"
$text = preg_replace('#\|+#u', ' | ', $text); // "||" -> "|" $text = preg_replace('#\|+#u', ' | ', $text); // "||" -> "|"
$text = preg_replace('#(?<=\s)[\-*]+\s#u', ' ', $text); // одиночные " - ", " * " $text = preg_replace('#(?<=\s)[\-*]+\s#u', ' ', $text); // одиночные " - ", " * "
$text = trim($text, ' -|'); $text = trim($text, ' -|');
$text = str_compact($text); $text = str_compact($text);
$text_match_sql = ($wrap_with_quotes && $text != '') ? '"'. $text .'"' : $text; $text_match_sql = ($wrap_with_quotes && $text != '') ? '"'. $text .'"' : $text;
} }
else else
{ {
# if ($all_words)
# {
# $text = preg_replace('#\s(\b\w)#', ' +$1', $text);
# }
$text_match_sql = DB()->escape(trim($text)); $text_match_sql = DB()->escape(trim($text));
} }
@ -2522,7 +2500,8 @@ function clean_text_match ($text, $ltrim_star = true, $remove_stopwords = false,
{ {
bb_die($lang['NO_SEARCH_MATCH']); bb_die($lang['NO_SEARCH_MATCH']);
} }
return $text_match_sql;
return $text_match_sql;
} }
function init_sphinx () function init_sphinx ()
@ -2531,14 +2510,12 @@ function init_sphinx ()
if (!isset($sphinx)) if (!isset($sphinx))
{ {
require(INC_DIR .'sphinxapi.php'); require(INC_DIR .'api.sphinx.php');
$sphinx = new SphinxClient(); $sphinx = new SphinxClient();
$sphinx->SetConnectTimeout(5); $sphinx->SetConnectTimeout(5);
# $sphinx->SetMaxQueryTime(2);
$sphinx->SetRankingMode(SPH_RANK_NONE); $sphinx->SetRankingMode(SPH_RANK_NONE);
$sphinx->SetMatchMode(SPH_MATCH_BOOLEAN); $sphinx->SetMatchMode(SPH_MATCH_BOOLEAN);
# $sphinx->SetSortMode($mode, $sortby="");
} }
} }
@ -2661,7 +2638,7 @@ function pad_with_space ($str)
return ($str) ? " $str " : $str; return ($str) ? " $str " : $str;
} }
function create_magnet($infohash, $auth_key, $logged_in) function create_magnet ($infohash, $auth_key, $logged_in)
{ {
global $bb_cfg, $_GET, $userdata, $images; global $bb_cfg, $_GET, $userdata, $images;
@ -2680,7 +2657,7 @@ function set_die_append_msg ($forum_id = null, $topic_id = null)
$template->assign_var('BB_DIE_APPEND_MSG', $msg); $template->assign_var('BB_DIE_APPEND_MSG', $msg);
} }
function set_pr_die_append_msg($pr_uid) function set_pr_die_append_msg ($pr_uid)
{ {
global $lang, $template; global $lang, $template;
@ -2778,7 +2755,7 @@ function get_avatar ($user_id, $ext_id, $allow_avatar = true, $size = true, $hei
{ {
// TODO // TODO
} }
$height = ($height != '') ? 'height="'. $height .'"' : ''; $height = ($height != '') ? 'height="'. $height .'"' : '';
$width = ($width != '') ? 'width="'. $width .'"' : ''; $width = ($width != '') ? 'width="'. $width .'"' : '';
@ -2813,13 +2790,13 @@ function gender_image ($gender)
switch ($gender) switch ($gender)
{ {
case MALE: case MALE:
$user_gender = '<img src="'. $images['icon_male'] .'" alt="'. $lang['GENDER_SELECT'][1] .'" title="'. $lang['GENDER_SELECT'][1] .'" border="0" />'; $user_gender = '<img src="'. $images['icon_male'] .'" alt="'. $lang['GENDER_SELECT'][MALE] .'" title="'. $lang['GENDER_SELECT'][MALE] .'" border="0" />';
break; break;
case FEMALE: case FEMALE:
$user_gender = '<img src="'. $images['icon_female'] .'" alt="'. $lang['GENDER_SELECT'][1] .'" title="'. $lang['GENDER_SELECT'][2] .'" border="0" />'; $user_gender = '<img src="'. $images['icon_female'] .'" alt="'. $lang['GENDER_SELECT'][FEMALE] .'" title="'. $lang['GENDER_SELECT'][FEMALE] .'" border="0" />';
break; break;
default: default:
$user_gender = '<img src="'. $images['icon_nogender'] .'" alt="'. $lang['GENDER_SELECT'][0] .'" title="'. $lang['GENDER_SELECT'][0] .'" border="0" />'; $user_gender = '<img src="'. $images['icon_nogender'] .'" alt="'. $lang['GENDER_SELECT'][NOGENDER] .'" title="'. $lang['GENDER_SELECT'][NOGENDER] .'" border="0" />';
break; break;
} }
} }

View file

@ -406,7 +406,7 @@ function user_notification($mode, &$post_data, &$topic_title, &$forum_id, &$topi
if ($update_watched_sql) if ($update_watched_sql)
{ {
DB()->query("UPDATE ". BB_TOPICS_WATCH ." DB()->query("UPDATE ". BB_TOPICS_WATCH ."
SET notify_status = ". TOPIC_WATCH_UN_NOTIFIED ." SET notify_status = ". TOPIC_WATCH_UNNOTIFIED ."
WHERE topic_id = $topic_id WHERE topic_id = $topic_id
AND user_id IN ($update_watched_sql) AND user_id IN ($update_watched_sql)
"); ");
@ -423,7 +423,7 @@ function user_notification($mode, &$post_data, &$topic_title, &$forum_id, &$topi
{ {
DB()->query(" DB()->query("
INSERT INTO " . BB_TOPICS_WATCH . " (user_id, topic_id, notify_status) INSERT INTO " . BB_TOPICS_WATCH . " (user_id, topic_id, notify_status)
VALUES (". $userdata['user_id'] .", $topic_id, ". TOPIC_WATCH_NOTIFIED .") VALUES (". $userdata['user_id'] .", $topic_id, ". TOPIC_WATCH_NOTIFIED .")
"); ");
} }
} }

View file

@ -581,7 +581,6 @@ function report_count_obtain()
return $report_count; return $report_count;
} }
// //
// Obtains reports (for a specific report module if $module_id is defined) // Obtains reports (for a specific report module if $module_id is defined)
// Includes authorisation check if $auth_check is set to true. // Includes authorisation check if $auth_check is set to true.

View file

@ -16,7 +16,7 @@ function validate_username ($username, $check_ban_and_taken = true)
if (mb_strlen($username, 'UTF-8') > USERNAME_MAX_LENGTH) if (mb_strlen($username, 'UTF-8') > USERNAME_MAX_LENGTH)
{ {
return $lang['USERNAME_TOO_LONG']; return $lang['USERNAME_TOO_LONG'];
} }
else if (mb_strlen($username, 'UTF-8') < USERNAME_MIN_LENGTH) else if (mb_strlen($username, 'UTF-8') < USERNAME_MIN_LENGTH)
{ {
return $lang['USERNAME_TOO_SMALL']; return $lang['USERNAME_TOO_SMALL'];
@ -102,7 +102,7 @@ function validate_email ($email, $check_ban_and_taken = true)
$email_sql = DB()->escape($email); $email_sql = DB()->escape($email);
if ($row = DB()->fetch_row("SELECT `user_email` FROM ". BB_USERS ." WHERE user_email = '$email_sql' LIMIT 1")) if ($row = DB()->fetch_row("SELECT `user_email` FROM ". BB_USERS ." WHERE user_email = '$email_sql' LIMIT 1"))
{ {
if($row['user_email'] == $userdata['user_email']) if($row['user_email'] == $userdata['user_email'])
return false; return false;
else else

View file

@ -161,7 +161,7 @@ define('TOPIC_LOCKED', 1);
define('TOPIC_MOVED', 2); define('TOPIC_MOVED', 2);
define('TOPIC_WATCH_NOTIFIED', 1); define('TOPIC_WATCH_NOTIFIED', 1);
define('TOPIC_WATCH_UN_NOTIFIED', 0); define('TOPIC_WATCH_UNNOTIFIED', 0);
// Topic types // Topic types
define('POST_NORMAL', 0); define('POST_NORMAL', 0);
@ -240,6 +240,7 @@ define('POST_REPORT_REASON_URL', 'r');
// Gender // Gender
define('MALE', 1); define('MALE', 1);
define('FEMALE', 2); define('FEMALE', 2);
define('NOGENDER', 0);
// Poll // Poll
# 1 - обычный опрос # 1 - обычный опрос
@ -428,7 +429,7 @@ if (!empty($banned_user_agents))
{ {
if (strstr(USER_AGENT, $agent)) if (strstr(USER_AGENT, $agent))
{ {
$filename = 'Skachivajte fajly brauzerom (скачивайте файлы браузером)'; $filename = 'Download files by using browser';
$output = '@'; $output = '@';
header('Content-Type: text/plain'); header('Content-Type: text/plain');
header('Content-Disposition: attachment; filename="'. $filename .'"'); header('Content-Disposition: attachment; filename="'. $filename .'"');

View file

@ -46,7 +46,6 @@ if (defined('SHOW_ONLINE') && SHOW_ONLINE)
'LOGGED_IN_USER_LIST' => ${$online_list}['userlist'], 'LOGGED_IN_USER_LIST' => ${$online_list}['userlist'],
'USERS_ONLINE_COUNTS' => ${$online_list}['cnt'], 'USERS_ONLINE_COUNTS' => ${$online_list}['cnt'],
'RECORD_USERS' => sprintf($lang['RECORD_ONLINE_USERS'], $bb_cfg['record_online_users'], bb_date($bb_cfg['record_online_date'])), 'RECORD_USERS' => sprintf($lang['RECORD_ONLINE_USERS'], $bb_cfg['record_online_users'], bb_date($bb_cfg['record_online_date'])),
'U_VIEWONLINE' => "viewonline.php",
)); ));
} }

View file

@ -657,9 +657,6 @@ class user_common
bb_setcookie(COOKIE_TOPIC, ''); bb_setcookie(COOKIE_TOPIC, '');
bb_setcookie(COOKIE_FORUM, ''); bb_setcookie(COOKIE_FORUM, '');
bb_setcookie(COOKIE_MARK, ''); bb_setcookie(COOKIE_MARK, '');
// Info message
# $template->assign_var('INFO_MESSAGE', $lang['FORUMS_MARKED_READ']);
} }
} }
@ -797,7 +794,6 @@ class user_common
} }
} }
// //
// userdata cache // userdata cache
// //

View file

@ -33,8 +33,7 @@ define('XS_TAG_ELSEIF', 7);
define('XS_TAG_ENDIF', 8); define('XS_TAG_ENDIF', 8);
define('XS_TAG_BEGINELSE', 11); define('XS_TAG_BEGINELSE', 11);
class Template
class Template
{ {
var $classname = "Template"; var $classname = "Template";
@ -528,7 +527,6 @@ class Template
return $varref; return $varref;
} }
/** /**
* Generates a reference to the array of data values for the given * Generates a reference to the array of data values for the given
* (possibly nested) block namespace. This is a string of the form: * (possibly nested) block namespace. This is a string of the form:
@ -1134,7 +1132,6 @@ class Template
return $tokens; return $tokens;
} }
/** /**
* Compiles code and writes to cache if needed * Compiles code and writes to cache if needed
*/ */

View file

@ -43,7 +43,7 @@ if ($row = DB()->fetch_row($sql))
{ {
$subject = trim(html_entity_decode($_POST['subject'])); $subject = trim(html_entity_decode($_POST['subject']));
$message = trim(html_entity_decode($_POST['message'])); $message = trim(html_entity_decode($_POST['message']));
if(!$subject) $errors[] = $lang['EMPTY_SUBJECT_EMAIL']; if(!$subject) $errors[] = $lang['EMPTY_SUBJECT_EMAIL'];
if(!$message) $errors[] = $lang['EMPTY_MESSAGE_EMAIL']; if(!$message) $errors[] = $lang['EMPTY_MESSAGE_EMAIL'];

View file

@ -93,7 +93,7 @@ switch ($mode)
*/ */
case 'editprofile': case 'editprofile':
if (IS_GUEST) login_redirect(); if (IS_GUEST) login_redirect();
// field => can_edit // field => can_edit
$profile_fields = array( $profile_fields = array(
'user_active' => IS_ADMIN, 'user_active' => IS_ADMIN,
@ -355,7 +355,7 @@ foreach ($profile_fields as $field => $can_edit)
$errors[] = sprintf($lang['BIRTHDAY_TO_LOW'], $bb_cfg['birthday_min_age']); $errors[] = sprintf($lang['BIRTHDAY_TO_LOW'], $bb_cfg['birthday_min_age']);
} }
} }
$pr_data['user_birthday'] = $user_birthday; $pr_data['user_birthday'] = $user_birthday;
$db_data['user_birthday'] = $user_birthday; $db_data['user_birthday'] = $user_birthday;
} }
@ -521,7 +521,6 @@ foreach ($profile_fields as $field => $can_edit)
} }
$tp_data['USER_OCC'] = $pr_data['user_occ']; $tp_data['USER_OCC'] = $pr_data['user_occ'];
break; break;
/** /**
* Интересы * Интересы
@ -553,8 +552,7 @@ foreach ($profile_fields as $field => $can_edit)
} }
$tp_data['USER_SKYPE'] = $pr_data['user_skype']; $tp_data['USER_SKYPE'] = $pr_data['user_skype'];
break; break;
/** /**
* Twitter * Twitter
*/ */
@ -571,7 +569,7 @@ foreach ($profile_fields as $field => $can_edit)
} }
$tp_data['USER_TWITTER'] = $pr_data['user_twitter']; $tp_data['USER_TWITTER'] = $pr_data['user_twitter'];
break; break;
/** /**
* Выбор шаблона (edit) * Выбор шаблона (edit)
*/ */

View file

@ -120,7 +120,7 @@ $template->assign_vars(array(
'SKYPE' => $profiledata['user_skype'], 'SKYPE' => $profiledata['user_skype'],
'TWITTER' => $profiledata['user_twitter'], 'TWITTER' => $profiledata['user_twitter'],
'USER_POINTS' => $profiledata['user_points'], 'USER_POINTS' => $profiledata['user_points'],
'GENDER' => ($bb_cfg['gender'] && $profiledata['user_gender']) ? $lang['GENDER_SELECT'][$profiledata['user_gender']] : '', 'GENDER' => ($bb_cfg['gender']) ? $lang['GENDER_SELECT'][$profiledata['user_gender']] : '',
'BIRTHDAY' => ($bb_cfg['birthday_enabled'] && $profiledata['user_birthday'] != '0000-00-00') ? $profiledata['user_birthday'] : '', 'BIRTHDAY' => ($bb_cfg['birthday_enabled'] && $profiledata['user_birthday'] != '0000-00-00') ? $profiledata['user_birthday'] : '',
'AGE' => ($bb_cfg['birthday_enabled'] && $profiledata['user_birthday'] != '0000-00-00') ? birthday_age($profiledata['user_birthday']) : '', 'AGE' => ($bb_cfg['birthday_enabled'] && $profiledata['user_birthday'] != '0000-00-00') ? birthday_age($profiledata['user_birthday']) : '',
@ -189,13 +189,13 @@ else if (IS_MOD)
// Show users torrent-profile // Show users torrent-profile
if (IS_AM || $profile_user_id || !bf($profiledata['user_opt'], 'user_opt', 'user_dls')) if (IS_AM || $profile_user_id || !bf($profiledata['user_opt'], 'user_opt', 'user_dls'))
{ {
require(INC_DIR .'ucp/viewtorrent.php'); require(INC_DIR .'ucp/viewtorrent.php');
} }
// Ajax bt_userdata // Ajax bt_userdata
if (IS_AM || $profile_user_id) if (IS_AM || $profile_user_id)
{ {
show_bt_userdata($profiledata['user_id']); show_bt_userdata($profiledata['user_id']);
} }
else else
{ {
@ -227,13 +227,13 @@ if (IS_ADMIN)
$user_restrictions = array(); $user_restrictions = array();
if (bf($profiledata['user_opt'], 'user_opt', 'dis_avatar')) $user_restrictions[] = $lang['HIDE_AVATARS']; if (bf($profiledata['user_opt'], 'user_opt', 'dis_avatar')) $user_restrictions[] = $lang['HIDE_AVATARS'];
if (bf($profiledata['user_opt'], 'user_opt', 'dis_sig')) $user_restrictions[] = $lang['SHOW_CAPTION']; if (bf($profiledata['user_opt'], 'user_opt', 'dis_sig')) $user_restrictions[] = $lang['SHOW_CAPTION'];
if (bf($profiledata['user_opt'], 'user_opt', 'dis_passkey')) $user_restrictions[] = $lang['DOWNLOAD_TORRENT']; if (bf($profiledata['user_opt'], 'user_opt', 'dis_passkey')) $user_restrictions[] = $lang['DOWNLOAD_TORRENT'];
if (bf($profiledata['user_opt'], 'user_opt', 'dis_pm')) $user_restrictions[] = $lang['SEND_PM']; if (bf($profiledata['user_opt'], 'user_opt', 'dis_pm')) $user_restrictions[] = $lang['SEND_PM'];
if (bf($profiledata['user_opt'], 'user_opt', 'dis_post')) $user_restrictions[] = $lang['SEND_MESSAGE']; if (bf($profiledata['user_opt'], 'user_opt', 'dis_post')) $user_restrictions[] = $lang['SEND_MESSAGE'];
if (bf($profiledata['user_opt'], 'user_opt', 'dis_post_edit')) $user_restrictions[] = $lang['EDIT_POST']; if (bf($profiledata['user_opt'], 'user_opt', 'dis_post_edit')) $user_restrictions[] = $lang['EDIT_POST'];
if (bf($profiledata['user_opt'], 'user_opt', 'dis_topic')) $user_restrictions[] = $lang['NEW_THREADS']; if (bf($profiledata['user_opt'], 'user_opt', 'dis_topic')) $user_restrictions[] = $lang['NEW_THREADS'];
$template->assign_var('USER_RESTRICTIONS', join('</li><li>', $user_restrictions)); $template->assign_var('USER_RESTRICTIONS', join('</li><li>', $user_restrictions));

View file

@ -13,9 +13,9 @@ $not_auth_forums_sql = ($excluded_forums_csv) ? "
" : ''; " : '';
$sql = DB()->fetch_rowset(" $sql = DB()->fetch_rowset("
SELECT SELECT
f.forum_id, f.forum_name, t.topic_title, f.forum_id, f.forum_name, t.topic_title,
tor.tor_type, tor.size, tor.tor_type, tor.size,
sn.seeders, sn.leechers, tr.* sn.seeders, sn.leechers, tr.*
FROM ". BB_FORUMS ." f, ". BB_TOPICS ." t, ". BB_BT_TRACKER ." tr, ". BB_BT_TORRENTS ." tor, ". BB_BT_TRACKER_SNAP ." sn FROM ". BB_FORUMS ." f, ". BB_TOPICS ." t, ". BB_BT_TRACKER ." tr, ". BB_BT_TORRENTS ." tor, ". BB_BT_TRACKER_SNAP ." sn
WHERE tr.user_id = {$profiledata['user_id']} WHERE tr.user_id = {$profiledata['user_id']}
@ -51,18 +51,18 @@ if ($releasing)
$is_gold = ''; $is_gold = '';
if ($tr_cfg['gold_silver_enabled']) if ($tr_cfg['gold_silver_enabled'])
{ {
if ($row['tor_type'] == TOR_TYPE_GOLD) if ($row['tor_type'] == TOR_TYPE_GOLD)
{ {
$is_gold = '<img src="images/tor_gold.gif" width="16" height="15" title="'. $lang['GOLD'] .'" />&nbsp;'; $is_gold = '<img src="images/tor_gold.gif" width="16" height="15" title="'. $lang['GOLD'] .'" />&nbsp;';
} }
elseif ($row['tor_type'] == TOR_TYPE_SILVER) elseif ($row['tor_type'] == TOR_TYPE_SILVER)
{ {
$is_gold = '<img src="images/tor_silver.gif" width="16" height="15" title="'. $lang['SILVER'] .'" />&nbsp;'; $is_gold = '<img src="images/tor_silver.gif" width="16" height="15" title="'. $lang['SILVER'] .'" />&nbsp;';
} }
} }
$topic_title = wbr($row['topic_title']); $topic_title = wbr($row['topic_title']);
$template->assign_block_vars('released', array( $template->assign_block_vars('released', array(
'ROW_CLASS' => !($i % 2) ? 'row1' : 'row2', 'ROW_CLASS' => !($i % 2) ? 'row1' : 'row2',
'FORUM_NAME' => htmlCHR($row['forum_name']), 'FORUM_NAME' => htmlCHR($row['forum_name']),
@ -70,11 +70,11 @@ if ($releasing)
'U_VIEW_FORUM' => FORUM_URL . $row['forum_id'], 'U_VIEW_FORUM' => FORUM_URL . $row['forum_id'],
'U_VIEW_TOPIC' => TOPIC_URL . $row['topic_id'], 'U_VIEW_TOPIC' => TOPIC_URL . $row['topic_id'],
'TOR_TYPE' => $is_gold, 'TOR_TYPE' => $is_gold,
'TOPIC_SEEDERS' => ($row['seeders']) ? $row['seeders'] : 0, 'TOPIC_SEEDERS' => ($row['seeders']) ? $row['seeders'] : 0,
'TOPIC_LEECHERS' => ($row['leechers']) ? $row['leechers'] : 0, 'TOPIC_LEECHERS' => ($row['leechers']) ? $row['leechers'] : 0,
'SPEED_UP' => ($row['speed_up']) ? humn_size($row['speed_up'], 0, 'KB') .'/s' : '-', 'SPEED_UP' => ($row['speed_up']) ? humn_size($row['speed_up'], 0, 'KB') .'/s' : '-',
)); ));
$releasing_count++; $releasing_count++;
} }
} }
@ -86,18 +86,18 @@ if ($seeding)
$is_gold = ''; $is_gold = '';
if ($tr_cfg['gold_silver_enabled']) if ($tr_cfg['gold_silver_enabled'])
{ {
if ($row['tor_type'] == TOR_TYPE_GOLD) if ($row['tor_type'] == TOR_TYPE_GOLD)
{ {
$is_gold = '<img src="images/tor_gold.gif" width="16" height="15" title="'. $lang['GOLD'] .'" />&nbsp;'; $is_gold = '<img src="images/tor_gold.gif" width="16" height="15" title="'. $lang['GOLD'] .'" />&nbsp;';
} }
elseif ($row['tor_type'] == TOR_TYPE_SILVER) elseif ($row['tor_type'] == TOR_TYPE_SILVER)
{ {
$is_gold = '<img src="images/tor_silver.gif" width="16" height="15" title="'. $lang['SILVER'] .'" />&nbsp;'; $is_gold = '<img src="images/tor_silver.gif" width="16" height="15" title="'. $lang['SILVER'] .'" />&nbsp;';
} }
} }
$topic_title = wbr($row['topic_title']); $topic_title = wbr($row['topic_title']);
$template->assign_block_vars('seed', array( $template->assign_block_vars('seed', array(
'ROW_CLASS' => !($i % 2) ? 'row1' : 'row2', 'ROW_CLASS' => !($i % 2) ? 'row1' : 'row2',
'FORUM_NAME' => htmlCHR($row['forum_name']), 'FORUM_NAME' => htmlCHR($row['forum_name']),
@ -105,11 +105,11 @@ if ($seeding)
'U_VIEW_FORUM' => FORUM_URL . $row['forum_id'], 'U_VIEW_FORUM' => FORUM_URL . $row['forum_id'],
'U_VIEW_TOPIC' => TOPIC_URL . $row['topic_id'], 'U_VIEW_TOPIC' => TOPIC_URL . $row['topic_id'],
'TOR_TYPE' => $is_gold, 'TOR_TYPE' => $is_gold,
'TOPIC_SEEDERS' => ($row['seeders']) ? $row['seeders'] : 0, 'TOPIC_SEEDERS' => ($row['seeders']) ? $row['seeders'] : 0,
'TOPIC_LEECHERS' => ($row['leechers']) ? $row['leechers'] : 0, 'TOPIC_LEECHERS' => ($row['leechers']) ? $row['leechers'] : 0,
'SPEED_UP' => ($row['speed_up']) ? humn_size($row['speed_up'], 0, 'KB') .'/s' : '-', 'SPEED_UP' => ($row['speed_up']) ? humn_size($row['speed_up'], 0, 'KB') .'/s' : '-',
)); ));
$seeding_count++; $seeding_count++;
} }
} }
@ -121,20 +121,20 @@ if ($leeching)
$is_gold = ''; $is_gold = '';
if ($tr_cfg['gold_silver_enabled']) if ($tr_cfg['gold_silver_enabled'])
{ {
if ($row['tor_type'] == TOR_TYPE_GOLD) if ($row['tor_type'] == TOR_TYPE_GOLD)
{ {
$is_gold = '<img src="images/tor_gold.gif" width="16" height="15" title="'.$lang['GOLD'].'" />&nbsp;'; $is_gold = '<img src="images/tor_gold.gif" width="16" height="15" title="'.$lang['GOLD'].'" />&nbsp;';
} }
elseif ($row['tor_type'] == TOR_TYPE_SILVER) elseif ($row['tor_type'] == TOR_TYPE_SILVER)
{ {
$is_gold = '<img src="images/tor_silver.gif" width="16" height="15" title="'.$lang['SILVER'].'" />&nbsp;'; $is_gold = '<img src="images/tor_silver.gif" width="16" height="15" title="'.$lang['SILVER'].'" />&nbsp;';
} }
} }
$compl_size = ($row['remain'] && $row['size'] && $row['size'] > $row['remain']) ? ($row['size'] - $row['remain']) : 0; $compl_size = ($row['remain'] && $row['size'] && $row['size'] > $row['remain']) ? ($row['size'] - $row['remain']) : 0;
$compl_perc = ($compl_size) ? floor($compl_size * 100 / $row['size']) : 0; $compl_perc = ($compl_size) ? floor($compl_size * 100 / $row['size']) : 0;
$topic_title = wbr($row['topic_title']); $topic_title = wbr($row['topic_title']);
$template->assign_block_vars('leech', array( $template->assign_block_vars('leech', array(
'ROW_CLASS' => !($i % 2) ? 'row1' : 'row2', 'ROW_CLASS' => !($i % 2) ? 'row1' : 'row2',
'FORUM_NAME' => htmlCHR($row['forum_name']), 'FORUM_NAME' => htmlCHR($row['forum_name']),
@ -143,11 +143,11 @@ if ($leeching)
'U_VIEW_TOPIC' => TOPIC_URL . $row['topic_id'], 'U_VIEW_TOPIC' => TOPIC_URL . $row['topic_id'],
'COMPL_PERC' => $compl_perc, 'COMPL_PERC' => $compl_perc,
'TOR_TYPE' => $is_gold, 'TOR_TYPE' => $is_gold,
'TOPIC_SEEDERS' => ($row['seeders']) ? $row['seeders'] : 0, 'TOPIC_SEEDERS' => ($row['seeders']) ? $row['seeders'] : 0,
'TOPIC_LEECHERS' => ($row['leechers']) ? $row['leechers'] : 0, 'TOPIC_LEECHERS' => ($row['leechers']) ? $row['leechers'] : 0,
'SPEED_DOWN' => ($row['speed_down']) ? humn_size($row['speed_down'], 0, 'KB') .'/s' : '-', 'SPEED_DOWN' => ($row['speed_down']) ? humn_size($row['speed_down'], 0, 'KB') .'/s' : '-',
)); ));
$leeching_count++; $leeching_count++;
} }
} }
@ -159,4 +159,4 @@ $template->assign_vars(array(
'L_SEEDINGS' => "{$lang['SEEDING']}: ". (($seeding_count) ? "<b>$seeding_count</b>" : '0'), 'L_SEEDINGS' => "{$lang['SEEDING']}: ". (($seeding_count) ? "<b>$seeding_count</b>" : '0'),
'L_LEECHINGS' => "{$lang['LEECHING']}: ". (($leeching_count) ? "<b>$leeching_count</b>" : '0'), 'L_LEECHINGS' => "{$lang['LEECHING']}: ". (($leeching_count) ? "<b>$leeching_count</b>" : '0'),
'USER_DLS' => $releasing_count || $seeding_count || $leeching_count, 'USER_DLS' => $releasing_count || $seeding_count || $leeching_count,
)); ));

View file

@ -24,7 +24,7 @@ if ($bb_cfg['show_latest_news'])
} }
if ($bb_cfg['show_network_news']) if ($bb_cfg['show_network_news'])
{ {
$datastore->enqueue('network_news'); $datastore->enqueue('network_news');
} }
// Init userdata // Init userdata
@ -368,7 +368,7 @@ if ($bb_cfg['birthday_check_day'] && $bb_cfg['birthday_enabled'])
{ {
$week_list = $today_list = array(); $week_list = $today_list = array();
$week_all = $today_all = false; $week_all = $today_all = false;
if ($stats['birthday_week_list']) if ($stats['birthday_week_list'])
{ {
shuffle($stats['birthday_week_list']); shuffle($stats['birthday_week_list']);

View file

@ -4,7 +4,7 @@ The following is an email sent to you by an administrator of "{SITENAME}". If th
{BOARD_EMAIL} {BOARD_EMAIL}
Include this full email (particularly the headers). Include this full email (particularly the headers).
Message sent to you follows: Message sent to you follows:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View file

@ -10,7 +10,6 @@
</style> </style>
<div id="infobox-body"> <div id="infobox-body">
<p>Information for copyright holders.</p> <p>Information for copyright holders.</p>

View file

@ -5,7 +5,7 @@
<fieldset class="pad_6"> <fieldset class="pad_6">
<legend class="med bold mrg_2 warnColor1">USER AGREEMENT</legend> <legend class="med bold mrg_2 warnColor1">USER AGREEMENT</legend>
<div class="bCenter"> <div class="bCenter">
<style type="text/css"> <style type="text/css">
#infobox-body p { margin-top: 1em; margin-bottom: 1em; } #infobox-body p { margin-top: 1em; margin-bottom: 1em; }

View file

@ -234,7 +234,6 @@ $lang['RULES_MODERATE'] = 'You <b>can</b> moderate this forum';
$lang['NO_TOPICS_POST_ONE'] = 'There are no posts in this forum.<br />Click on the <b>Post New Topic</b> link on this page to post one.'; $lang['NO_TOPICS_POST_ONE'] = 'There are no posts in this forum.<br />Click on the <b>Post New Topic</b> link on this page to post one.';
// //
// Viewtopic // Viewtopic
// //
@ -696,7 +695,6 @@ $lang['ASC'] = 'Ascending';
$lang['DESC'] = 'Descending'; $lang['DESC'] = 'Descending';
$lang['ORDER'] = 'Order'; $lang['ORDER'] = 'Order';
// //
// Group control panel // Group control panel
// //
@ -842,14 +840,9 @@ $lang['NOT_AUTHORISED'] = 'Not Authorised';
$lang['YOU_BEEN_BANNED'] = 'You have been banned from this forum.<br />Please contact the webmaster or board administrator for more information.'; $lang['YOU_BEEN_BANNED'] = 'You have been banned from this forum.<br />Please contact the webmaster or board administrator for more information.';
// //
// Viewonline // Viewonline
// //
$lang['REG_USERS_ONLINE'] = 'Who is online registered users: %d and ';
$lang['HIDDEN_USERS_ONLINE'] = 'hidden users: %d';
$lang['GUEST_USERS_ONLINE'] = 'Online Guests: %d';
$lang['ALL_USERS_ONLINE'] = 'All users:';
$lang['ONLINE_EXPLAIN'] = 'users active over the past five minutes'; $lang['ONLINE_EXPLAIN'] = 'users active over the past five minutes';
$lang['LAST_UPDATED'] = 'Last Updated'; $lang['LAST_UPDATED'] = 'Last Updated';
@ -1542,7 +1535,7 @@ $lang['EXPAND'] = 'Expand';
$lang['SWITCH'] = 'Switch'; $lang['SWITCH'] = 'Switch';
$lang['EMPTY_ATTACH_ID'] = 'Missing file identifier!'; $lang['EMPTY_ATTACH_ID'] = 'Missing file identifier!';
$lang['TOR_NOT_FOUND'] = 'File is missing on the server!'; $lang['TOR_NOT_FOUND'] = 'File is missing on the server!';
$lang['ERROR_BUILD'] = 'Error: unable to build a list of files'; $lang['ERROR_BUILD'] = 'The content of this torrent file can not be viewed on the site (it was not possible to build a list of files)';
$lang['TORFILE_INVALID'] = 'Torrent file is corrupt'; $lang['TORFILE_INVALID'] = 'Torrent file is corrupt';
// FILELIST // FILELIST
@ -2579,7 +2572,7 @@ $lang['SELF_MODERATED'] = 'Users can <b>move</b> their topics to another forum';
$lang['BT_ANNOUNCE_URL_HEAD'] = 'Announce URL'; $lang['BT_ANNOUNCE_URL_HEAD'] = 'Announce URL';
$lang['BT_ANNOUNCE_URL'] = 'Announce url'; $lang['BT_ANNOUNCE_URL'] = 'Announce url';
$lang['BT_ANNOUNCE_URL_EXPL'] = 'you can define additional allowed urls in "includes/announce_urls.php"'; $lang['BT_ANNOUNCE_URL_EXPL'] = 'you can define additional allowed urls in "includes/torrent_announce_urls.php"';
$lang['BT_DISABLE_DHT'] = 'Disable DHT network'; $lang['BT_DISABLE_DHT'] = 'Disable DHT network';
$lang['BT_DISABLE_DHT_EXPL'] = 'Disable Peer Exchange and DHT (recommended for private networks, only url announce)'; $lang['BT_DISABLE_DHT_EXPL'] = 'Disable Peer Exchange and DHT (recommended for private networks, only url announce)';
$lang['BT_CHECK_ANNOUNCE_URL'] = 'Verify announce url'; $lang['BT_CHECK_ANNOUNCE_URL'] = 'Verify announce url';
@ -2979,4 +2972,25 @@ $lang['MC_COMMENT'] = array(
'title' => 'Violation from %s', 'title' => 'Violation from %s',
'type' => 'Violation', 'type' => 'Violation',
), ),
); );
$lang['SITEMAP'] = 'Sitemap';
$lang['SITEMAP_ADMIN'] = 'Manage sitemap';
$lang['SITEMAP_CREATED'] = 'Sitemap created';
$lang['SITEMAP_AVAILABLE'] = 'and is available at';
$lang['SITEMAP_NOT_CREATED'] = 'Sitemap is not yet created';
$lang['SITEMAP_NOTIFY_SEARCH'] = 'Notification of the search engine';
$lang['SITEMAP_SENT'] = 'send completed';
$lang['SITEMAP_ERROR'] = 'sending error';
$lang['SITEMAP_OPTIONS'] = 'Options';
$lang['SITEMAP_CREATE'] = 'Create / update the sitemap';
$lang['SITEMAP_NOTIFY'] = 'Notify search engines about new version of sitemap';
$lang['SITEMAP_WHAT_NEXT'] = 'What to do next?';
$lang['SITEMAP_GOOGLE_1'] = 'Register your site at <a href="http://www.google.com/webmasters/" target="_blank">Google Webmaster</a> using your Google account.';
$lang['SITEMAP_GOOGLE_2'] = '<a href="https://www.google.com/webmasters/tools/sitemap-list" target="_blank">Add sitemap</a> of site you registered.';
$lang['SITEMAP_YANDEX_1'] = 'Register your site at <a href="http://webmaster.yandex.ru/sites/" target="_blank">Yandex Webmaster</a> using your Yandex account.';
$lang['SITEMAP_YANDEX_2'] = '<a href="http://webmaster.yandex.ru/site/map.xml" target="_blank">Add sitemap</a> of site you registered.';
$lang['SITEMAP_ADD_TITLE'] = 'Additional pages for sitemap';
$lang['SITEMAP_ADD_PAGE'] = 'Additional pages';
$lang['SITEMAP_ADD_EXP_1'] = 'You can specify additional pages on your site (for example, <b>http://torrentpier.me/memberlist.php</b>) which should be included in your sitemap file that you creating.';
$lang['SITEMAP_ADD_EXP_2'] = 'Each reference must begin with http(s):// and a new line!';

View file

@ -4,7 +4,7 @@ Charset: UTF-8
{BOARD_EMAIL} {BOARD_EMAIL}
Включите данное сообщение целиком (особенно заголовки). Включите данное сообщение целиком (особенно заголовки).
Отправленное вам сообщение: Отправленное вам сообщение:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View file

@ -10,7 +10,6 @@
</style> </style>
<div id="infobox-body"> <div id="infobox-body">
<p>Информация для правообладателей.</p> <p>Информация для правообладателей.</p>

View file

@ -5,7 +5,7 @@
<fieldset class="pad_6"> <fieldset class="pad_6">
<legend class="med bold mrg_2 warnColor1">ПОЛЬЗОВАТЕЛЬСКОЕ СОГЛАШЕНИЕ</legend> <legend class="med bold mrg_2 warnColor1">ПОЛЬЗОВАТЕЛЬСКОЕ СОГЛАШЕНИЕ</legend>
<div class="bCenter"> <div class="bCenter">
<style type="text/css"> <style type="text/css">
#infobox-body p { margin-top: 1em; margin-bottom: 1em; } #infobox-body p { margin-top: 1em; margin-bottom: 1em; }

View file

@ -234,7 +234,6 @@ $lang['RULES_MODERATE'] = 'Вы <b>можете</b> модерировать э
$lang['NO_TOPICS_POST_ONE'] = 'В этом форуме пока нет сообщений<br />Кликните <b>Начать новую тему</b>, и ваше сообщение станет первым.'; $lang['NO_TOPICS_POST_ONE'] = 'В этом форуме пока нет сообщений<br />Кликните <b>Начать новую тему</b>, и ваше сообщение станет первым.';
// //
// Viewtopic // Viewtopic
// //
@ -696,7 +695,6 @@ $lang['ASC'] = 'по возрастанию';
$lang['DESC'] = 'по убыванию'; $lang['DESC'] = 'по убыванию';
$lang['ORDER'] = ''; // не нужно, в английском используется в контексте 'Order ascending'; $lang['ORDER'] = ''; // не нужно, в английском используется в контексте 'Order ascending';
// //
// Group control panel // Group control panel
// //
@ -842,14 +840,9 @@ $lang['NOT_AUTHORISED'] = 'Нет доступа';
$lang['YOU_BEEN_BANNED'] = 'Вам был закрыт доступ к форуму<br />Обратитесь к вебмастеру или администратору сайта за дополнительной информацией'; $lang['YOU_BEEN_BANNED'] = 'Вам был закрыт доступ к форуму<br />Обратитесь к вебмастеру или администратору сайта за дополнительной информацией';
// //
// Viewonline // Viewonline
// //
$lang['REG_USERS_ONLINE'] = 'Сейчас на сайте зарегистрированных пользователей: %d и ';
$lang['HIDDEN_USERS_ONLINE'] = 'скрытых пользователей: %d';
$lang['GUEST_USERS_ONLINE'] = 'Сейчас на сайте гостей: %d';
$lang['ALL_USERS_ONLINE'] = 'Всех:';
$lang['ONLINE_EXPLAIN'] = 'данные за последние пять минут'; $lang['ONLINE_EXPLAIN'] = 'данные за последние пять минут';
$lang['LAST_UPDATED'] = 'Последнее изменение'; $lang['LAST_UPDATED'] = 'Последнее изменение';
@ -1542,7 +1535,7 @@ $lang['EXPAND'] = 'Развернуть';
$lang['SWITCH'] = 'Переключить'; $lang['SWITCH'] = 'Переключить';
$lang['EMPTY_ATTACH_ID'] = 'Отсутствует идентификатор файла!'; $lang['EMPTY_ATTACH_ID'] = 'Отсутствует идентификатор файла!';
$lang['TOR_NOT_FOUND'] = 'Файл отсутствует на сервере!'; $lang['TOR_NOT_FOUND'] = 'Файл отсутствует на сервере!';
$lang['ERROR_BUILD'] = 'Ошибка: не удалось выстроить список файлов'; $lang['ERROR_BUILD'] = 'Содержимое данного торрент-файла не может быть просмотрено на сайте (не удалось выстроить список файлов)';
$lang['TORFILE_INVALID'] = 'Торрент-файл поврежден!'; $lang['TORFILE_INVALID'] = 'Торрент-файл поврежден!';
// FILELIST // FILELIST
@ -2579,7 +2572,7 @@ $lang['SELF_MODERATED'] = 'Автор топика может перенести
$lang['BT_ANNOUNCE_URL_HEAD'] = 'Announce URL'; $lang['BT_ANNOUNCE_URL_HEAD'] = 'Announce URL';
$lang['BT_ANNOUNCE_URL'] = 'Announce url'; $lang['BT_ANNOUNCE_URL'] = 'Announce url';
$lang['BT_ANNOUNCE_URL_EXPL'] = 'дополнительные разрешенные адреса можно задать в "includes/announce_urls.php"'; $lang['BT_ANNOUNCE_URL_EXPL'] = 'дополнительные разрешенные адреса можно задать в "includes/torrent_announce_urls.php"';
$lang['BT_DISABLE_DHT'] = 'Запретить DHT сети'; $lang['BT_DISABLE_DHT'] = 'Запретить DHT сети';
$lang['BT_DISABLE_DHT_EXPL'] = 'Запретить обмен пирами и DHT (рекомендовано для приватных сетей, только url announce)'; $lang['BT_DISABLE_DHT_EXPL'] = 'Запретить обмен пирами и DHT (рекомендовано для приватных сетей, только url announce)';
$lang['BT_CHECK_ANNOUNCE_URL'] = 'Проверять announce url'; $lang['BT_CHECK_ANNOUNCE_URL'] = 'Проверять announce url';
@ -2979,4 +2972,25 @@ $lang['MC_COMMENT'] = array(
'title' => 'Нарушение от %s', 'title' => 'Нарушение от %s',
'type' => 'Нарушение', 'type' => 'Нарушение',
), ),
); );
$lang['SITEMAP'] = 'Карта сайта (sitemap)';
$lang['SITEMAP_ADMIN'] = 'Управление картой сайта (sitemap)';
$lang['SITEMAP_CREATED'] = 'Файл sitemap создан';
$lang['SITEMAP_AVAILABLE'] = 'и доступен по адресу';
$lang['SITEMAP_NOT_CREATED'] = 'Файл sitemap еще не создан';
$lang['SITEMAP_NOTIFY_SEARCH'] = 'Уведомление поисковой системы';
$lang['SITEMAP_SENT'] = 'отправка завершена';
$lang['SITEMAP_ERROR'] = 'ошибка отправки';
$lang['SITEMAP_OPTIONS'] = 'Опции';
$lang['SITEMAP_CREATE'] = 'Создать / обновить файл sitemap';
$lang['SITEMAP_NOTIFY'] = 'Уведомить поисковые системы о наличии новой версии файла sitemap';
$lang['SITEMAP_WHAT_NEXT'] = 'Что сделать дальше?';
$lang['SITEMAP_GOOGLE_1'] = 'Зарегистрируйте ваш сайт в <a href="http://www.google.com/webmasters/" target="_blank">Google Webmaster</a> с использованием вашей учетной записи Google.';
$lang['SITEMAP_GOOGLE_2'] = '<a href="https://www.google.com/webmasters/tools/sitemap-list" target="_blank">Добавьте файл sitemap</a> зарегистрированного вами сайта.';
$lang['SITEMAP_YANDEX_1'] = 'Зарегистрируйте ваш сайт в <a href="http://webmaster.yandex.ru/sites/" target="_blank">Yandex Webmaster</a> с использованием вашей учетной записи Yandex.';
$lang['SITEMAP_YANDEX_2'] = '<a href="http://webmaster.yandex.ru/site/map.xml" target="_blank">Добавьте файл sitemap</a> зарегистрированного вами сайта.';
$lang['SITEMAP_ADD_TITLE'] = 'Дополнительные страницы для sitemap';
$lang['SITEMAP_ADD_PAGE'] = 'Дополнительные страницы';
$lang['SITEMAP_ADD_EXP_1'] = 'Здесь вы можете указать дополнительные страницы сайта (например <b>http://torrentpier.me/memberlist.php</b>), которые должны быть включены в создаваемый файл вами файл sitemap.';
$lang['SITEMAP_ADD_EXP_2'] = 'Каждая ссылка должна начинаться с http(s):// и новой строки!';

View file

@ -4,7 +4,7 @@ Charset: UTF-8
{BOARD_EMAIL} {BOARD_EMAIL}
Увімкніть дане повідомлення (особливо заголовки). Увімкніть дане повідомлення (особливо заголовки).
Надіслане повідомлення: Надіслане повідомлення:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View file

@ -10,7 +10,6 @@
</style> </style>
<div id="infobox-body"> <div id="infobox-body">
<p>Інформація для правовласників.</p> <p>Інформація для правовласників.</p>

View file

@ -5,7 +5,7 @@
<fieldset class="pad_6"> <fieldset class="pad_6">
<legend class="med bold mrg_2 warnColor1">УГОДА</legend> <legend class="med bold mrg_2 warnColor1">УГОДА</legend>
<div class="bCenter"> <div class="bCenter">
<style type="text/css"> <style type="text/css">
#infobox-body p { margin-top: 1em; margin-bottom: 1em; } #infobox-body p { margin-top: 1em; margin-bottom: 1em; }

View file

@ -234,7 +234,6 @@ $lang['RULES_MODERATE'] = 'Ви <b>можете</b> модерувати цей
$lang['NO_TOPICS_POST_ONE'] = 'У цьому форумі поки немає повідомлень<br />Натисніть <b>Почати нову тему</b>, і ваше повідомлення буде першим.'; $lang['NO_TOPICS_POST_ONE'] = 'У цьому форумі поки немає повідомлень<br />Натисніть <b>Почати нову тему</b>, і ваше повідомлення буде першим.';
// //
// Viewtopic // Viewtopic
// //
@ -696,7 +695,6 @@ $lang['ASC'] = 'за зростанням';
$lang['DESC'] = 'за спаданням'; $lang['DESC'] = 'за спаданням';
$lang['ORDER'] = ''; // не потрібно, в англійській використовується в контексті 'ascending Order'; $lang['ORDER'] = ''; // не потрібно, в англійській використовується в контексті 'ascending Order';
// //
// Group control panel // Group control panel
// //
@ -842,14 +840,9 @@ $lang['NOT_AUTHORISED'] = 'Немає доступу';
$lang['YOU_BEEN_BANNED'] = 'Вам був закритий доступ до форуму<br />Зверніться до вебмайстру або адміністратору сайту за додатковою інформацією'; $lang['YOU_BEEN_BANNED'] = 'Вам був закритий доступ до форуму<br />Зверніться до вебмайстру або адміністратору сайту за додатковою інформацією';
// //
// Viewonline // Viewonline
// //
$lang['REG_USERS_ONLINE'] = 'Зараз на сайті зареєстрованих користувачів: %d ';
$lang['HIDDEN_USERS_ONLINE'] = 'прихованих користувачів: %d';
$lang['GUEST_USERS_ONLINE'] = 'Зараз на сайті гостей: %d';
$lang['ALL_USERS_ONLINE'] = 'Усіх:';
$lang['ONLINE_EXPLAIN'] = "дані за останні п'ять хвилин"; $lang['ONLINE_EXPLAIN'] = "дані за останні п'ять хвилин";
$lang['LAST_UPDATED'] = 'Остання зміна'; $lang['LAST_UPDATED'] = 'Остання зміна';
@ -1542,7 +1535,7 @@ $lang['EXPAND'] = 'Розгорнути';
$lang['SWITCH'] = 'Перейти'; $lang['SWITCH'] = 'Перейти';
$lang['EMPTY_ATTACH_ID'] = 'Відсутній ідентифікатор файла!'; $lang['EMPTY_ATTACH_ID'] = 'Відсутній ідентифікатор файла!';
$lang['TOR_NOT_FOUND'] = 'Файл відсутній на сервері!'; $lang['TOR_NOT_FOUND'] = 'Файл відсутній на сервері!';
$lang['ERROR_BUILD'] = 'Помилка: не вдалося побудувати список файлів'; $lang['ERROR_BUILD'] = 'Вміст даного торрент-файлу не може бути переглянуто на сайті (не вдалося вибудувати список файлів)';
$lang['TORFILE_INVALID'] = 'Торрент-файл пошкоджений!'; $lang['TORFILE_INVALID'] = 'Торрент-файл пошкоджений!';
// FILELIST // FILELIST
@ -2579,7 +2572,7 @@ $lang['SELF_MODERATED'] = 'Автор топіка може перенести
$lang['BT_ANNOUNCE_URL_HEAD'] = 'Announce URL'; $lang['BT_ANNOUNCE_URL_HEAD'] = 'Announce URL';
$lang['BT_ANNOUNCE_URL'] = 'Announce url'; $lang['BT_ANNOUNCE_URL'] = 'Announce url';
$lang['BT_ANNOUNCE_URL_EXPL'] = 'додаткові дозволені адреси можна задати в "includes/announce_urls.php"'; $lang['BT_ANNOUNCE_URL_EXPL'] = 'додаткові дозволені адреси можна задати в "includes/torrent_announce_urls.php"';
$lang['BT_DISABLE_DHT'] = 'Заборонити DHT мережі'; $lang['BT_DISABLE_DHT'] = 'Заборонити DHT мережі';
$lang['BT_DISABLE_DHT_EXPL'] = 'Заборонити обмін пiрами та DHT (рекомендовано для приватних мереж, тільки url announce)'; $lang['BT_DISABLE_DHT_EXPL'] = 'Заборонити обмін пiрами та DHT (рекомендовано для приватних мереж, тільки url announce)';
$lang['BT_CHECK_ANNOUNCE_URL'] = 'Перевіряти announce url'; $lang['BT_CHECK_ANNOUNCE_URL'] = 'Перевіряти announce url';
@ -2979,4 +2972,25 @@ $lang['MC_COMMENT'] = array(
'title' => 'Порушення від %s', 'title' => 'Порушення від %s',
'type' => 'Порушення', 'type' => 'Порушення',
), ),
); );
$lang['SITEMAP'] = 'Карта сайту (sitemap)';
$lang['SITEMAP_ADMIN'] = 'Управління картою сайту (sitemap)';
$lang['SITEMAP_CREATED'] = 'Файл sitemap створений';
$lang['SITEMAP_AVAILABLE'] = 'і доступний за адресою';
$lang['SITEMAP_NOT_CREATED'] = 'Файл sitemap ще не створено';
$lang['SITEMAP_NOTIFY_SEARCH'] = 'Повідомлення пошукової системи';
$lang['SITEMAP_SENT'] = 'відправка завершена';
$lang['SITEMAP_ERROR'] = 'помилка відсилання';
$lang['SITEMAP_OPTIONS'] = 'Опції';
$lang['SITEMAP_CREATE'] = 'Створити / оновити файл sitemap';
$lang['SITEMAP_NOTIFY'] = 'Повідомити пошукові системи про наявність нової версії файлу sitemap';
$lang['SITEMAP_WHAT_NEXT'] = 'Що зробити далі?';
$lang['SITEMAP_GOOGLE_1'] = 'Зареєструйте ваш сайт в <a href="http://www.google.com/webmasters/" target="_blank">Google Webmaster</a> з використанням вашого облікового запису Google.';
$lang['SITEMAP_GOOGLE_2'] = '<a href="https://www.google.com/webmasters/tools/sitemap-list" target="_blank">Додайте файл sitemap</a> зареєстрованого вами сайту.';
$lang['SITEMAP_YANDEX_1'] = 'Зареєструйте ваш сайт в <a href="http://webmaster.yandex.ru/sites/" target="_blank">Yandex Webmaster</a> з використанням вашого облікового запису Yandex.';
$lang['SITEMAP_YANDEX_2'] = '<a href="http://webmaster.yandex.ru/site/map.xml" target="_blank">Додайте файл sitemap</a> зареєстрованого вами сайту.';
$lang['SITEMAP_ADD_TITLE'] = 'Додаткові сторінки для sitemap';
$lang['SITEMAP_ADD_PAGE'] = 'Додаткові сторінки';
$lang['SITEMAP_ADD_EXP_1'] = 'Тут ви можете вказати додаткові сторінки сайту (наприклад <b>http://torrentpier.me/memberlist.php</b>), які повинні бути включені в створюваний файл вами файл sitemap.';
$lang['SITEMAP_ADD_EXP_2'] = 'Кожне посилання має починатись з http(s):// і нової рядки!';

View file

@ -103,13 +103,13 @@ if (isset($_POST['login']))
$login_errors[] = $lang['ERROR_LOGIN']; $login_errors[] = $lang['ERROR_LOGIN'];
if(!$mod_admin_login) if (!$mod_admin_login)
{ {
$login_err = CACHE('bb_login_err')->get('l_err_'. USER_IP); $login_err = CACHE('bb_login_err')->get('l_err_'. USER_IP);
if($login_err > $bb_cfg['invalid_logins']) $need_captcha = true; if ($login_err > $bb_cfg['invalid_logins']) $need_captcha = true;
if($login_err > 50) if ($login_err > 50)
{ {
// забанить ип :) // TODO temp ban ip
} }
CACHE('bb_login_err')->set('l_err_'. USER_IP, ($login_err + 1), 3600); CACHE('bb_login_err')->set('l_err_'. USER_IP, ($login_err + 1), 3600);
} }

View file

@ -16,7 +16,7 @@ if ($do == 'attach_rules')
{ {
bb_die('invalid forum_id'); bb_die('invalid forum_id');
} }
require(BB_ROOT .'attach_mod/attachment_mod.php'); require(ATTACH_DIR .'attachment_mod.php');
// Display the allowed Extension Groups and Upload Size // Display the allowed Extension Groups and Upload Size
$auth = auth(AUTH_ALL, $forum_id, $userdata); $auth = auth(AUTH_ALL, $forum_id, $userdata);
$_max_filesize = $attach_config['max_filesize']; $_max_filesize = $attach_config['max_filesize'];
@ -138,7 +138,7 @@ elseif ($do == 'info')
</html> </html>
<?php <?php
} }
else else
{ {
bb_die('Invalid mode'); bb_die('Invalid mode');
} }

View file

@ -162,7 +162,6 @@ switch ($mode)
// Functions // Functions
// //
class bb_poll class bb_poll
{ {
var $err_msg = ''; var $err_msg = '';

View file

@ -6,7 +6,7 @@ define('BB_ROOT', './');
require(BB_ROOT ."common.php"); require(BB_ROOT ."common.php");
require(INC_DIR .'bbcode.php'); require(INC_DIR .'bbcode.php');
require(INC_DIR .'functions_post.php'); require(INC_DIR .'functions_post.php');
require(BB_ROOT .'attach_mod/attachment_mod.php'); require(ATTACH_DIR .'attachment_mod.php');
$page_cfg['load_tpl_vars'] = array('post_icons'); $page_cfg['load_tpl_vars'] = array('post_icons');

View file

@ -7,7 +7,6 @@ Disallow: /modcp.php
Disallow: /posting.php Disallow: /posting.php
Disallow: /privmsg.php Disallow: /privmsg.php
Disallow: /profile.php Disallow: /profile.php
Disallow: /viewonline.php
Host: torrentpier.me Host: torrentpier.me
Sitemap: http://torrentpier.me/sitemap.php Sitemap: http://torrentpier.me/sitemap/sitemap.xml

View file

@ -588,7 +588,7 @@ if ($post_mode)
$forum_id = (int) $first_post['forum_id']; $forum_id = (int) $first_post['forum_id'];
$is_unread_t = is_unread($first_post['topic_last_post_time'], $topic_id, $forum_id); $is_unread_t = is_unread($first_post['topic_last_post_time'], $topic_id, $forum_id);
$topic_title = $first_post['topic_title']; $topic_title = $first_post['topic_title'];
if (count($orig_word)) if (count($orig_word))
{ {
$topic_title = preg_replace($orig_word, $replacement_word, $topic_title); $topic_title = preg_replace($orig_word, $replacement_word, $topic_title);
@ -614,7 +614,7 @@ if ($post_mode)
{ {
$message = preg_replace($orig_word, $replacement_word, $message); $message = preg_replace($orig_word, $replacement_word, $message);
} }
$template->assign_block_vars('t.p', array( $template->assign_block_vars('t.p', array(
'ROW_NUM' => $row_num, 'ROW_NUM' => $row_num,
'POSTER_ID' => $post['poster_id'], 'POSTER_ID' => $post['poster_id'],
@ -700,21 +700,21 @@ else
<br /><br /> <br /><br />
<a href="index.php">'. $lang['INDEX_RETURN'] .'</a> <a href="index.php">'. $lang['INDEX_RETURN'] .'</a>
'); ');
} }
} }
if ($my_topics) $SQL['WHERE'][] = "t.topic_poster = $poster_id_val"; if ($my_topics) $SQL['WHERE'][] = "t.topic_poster = $poster_id_val";
if ($text_match_sql) if ($text_match_sql)
{ {
$search_match_topics_csv = ''; $search_match_topics_csv = '';
$title_match_topics = get_title_match_topics($text_match_sql, $forum_selected); $title_match_topics = get_title_match_topics($text_match_sql, $forum_selected);
if (!$search_match_topics_csv = join(',', $title_match_topics)) if (!$search_match_topics_csv = join(',', $title_match_topics))
{ {
bb_die($lang['NO_SEARCH_MATCH']); bb_die($lang['NO_SEARCH_MATCH']);
} }
$where_id = ($title_match) ? 't.topic_id' : 'p.post_id'; $where_id = ($title_match) ? 't.topic_id' : 'p.post_id';
$SQL['WHERE'][] = "$where_id IN($search_match_topics_csv)"; $SQL['WHERE'][] = "$where_id IN($search_match_topics_csv)";
prevent_huge_searches($SQL); prevent_huge_searches($SQL);

0
upload/sitemap/.keep Normal file
View file

View file

@ -4,19 +4,12 @@ define('IN_ADMIN', true);
define('BB_ROOT', './../'); define('BB_ROOT', './../');
require(BB_ROOT .'common.php'); require(BB_ROOT .'common.php');
############################################################################
$peers_in_last_minutes = array(30, 15, 5, 1); $peers_in_last_minutes = array(30, 15, 5, 1);
$peers_in_last_sec_limit = 300; $peers_in_last_sec_limit = 300;
############################################################################
$announce_interval = intval($bb_cfg['announce_interval']); $announce_interval = intval($bb_cfg['announce_interval']);
$stat = array(); $stat = array();
define('TMP_TRACKER_TABLE', 'tmp_tracker'); define('TMP_TRACKER_TABLE', 'tmp_tracker');
DB()->query(" DB()->query("
@ -39,7 +32,6 @@ $stat += DB()->fetch_row("SELECT COUNT(*) AS p_within_ann FROM ". TMP_TRACKER_TA
// All peers, "max_peer_time" // All peers, "max_peer_time"
$stat += DB()->fetch_row("SELECT COUNT(*) AS p_all, SUM(speed_up) as speed_up, SUM(speed_down) as speed_down, UNIX_TIMESTAMP() - MIN(update_time) AS max_peer_time, UNIX_TIMESTAMP() - MAX(update_time) AS last_peer_time FROM ". TMP_TRACKER_TABLE); $stat += DB()->fetch_row("SELECT COUNT(*) AS p_all, SUM(speed_up) as speed_up, SUM(speed_down) as speed_down, UNIX_TIMESTAMP() - MIN(update_time) AS max_peer_time, UNIX_TIMESTAMP() - MAX(update_time) AS last_peer_time FROM ". TMP_TRACKER_TABLE);
// Active users // Active users
$stat += DB()->fetch_row("SELECT COUNT(DISTINCT user_id) AS u_bt_active FROM ". TMP_TRACKER_TABLE); $stat += DB()->fetch_row("SELECT COUNT(DISTINCT user_id) AS u_bt_active FROM ". TMP_TRACKER_TABLE);
// All bt-users // All bt-users
@ -47,7 +39,6 @@ $stat += DB()->fetch_row("SELECT COUNT(*) AS u_bt_all FROM ". BB_BT_USERS);
// All bb-users // All bb-users
$stat += DB()->fetch_row("SELECT COUNT(*) AS u_bb_all FROM ". BB_USERS); $stat += DB()->fetch_row("SELECT COUNT(*) AS u_bb_all FROM ". BB_USERS);
// Active torrents // Active torrents
$stat += DB()->fetch_row("SELECT COUNT(DISTINCT topic_id) AS tor_active FROM ". TMP_TRACKER_TABLE); $stat += DB()->fetch_row("SELECT COUNT(DISTINCT topic_id) AS tor_active FROM ". TMP_TRACKER_TABLE);
// With seeder // With seeder
@ -55,7 +46,6 @@ $stat += DB()->fetch_row("SELECT COUNT(DISTINCT topic_id) AS tor_with_seeder FRO
// All torrents // All torrents
$stat += DB()->fetch_row("SELECT COUNT(*) AS tor_all, SUM(size) AS torrents_size FROM ". BB_BT_TORRENTS); $stat += DB()->fetch_row("SELECT COUNT(*) AS tor_all, SUM(size) AS torrents_size FROM ". BB_BT_TORRENTS);
// Last xx minutes // Last xx minutes
$peers_in_last_min = array(); $peers_in_last_min = array();
foreach ($peers_in_last_minutes as $t) foreach ($peers_in_last_minutes as $t)

View file

@ -124,7 +124,6 @@ tr.hl-tr:hover td { background-color: #CFC !important; }
<!-- IF TPL_CRON_EDIT --> <!-- IF TPL_CRON_EDIT -->
<h1>{L_CRON_EDIT_HEAD}</h1> <h1>{L_CRON_EDIT_HEAD}</h1>
<a href="admin_cron.php?mode=list">{L_CRON_LIST}</a> <a href="admin_cron.php?mode=list">{L_CRON_LIST}</a>
<br /><br /> <br /><br />

View file

@ -62,7 +62,4 @@
</form> </form>
<!--========================================================================--> <!--========================================================================-->
<!-- ENDIF / TPL_EDIT_FORUM_AUTH --> <!-- ENDIF / TPL_EDIT_FORUM_AUTH -->

View file

@ -96,10 +96,8 @@ table.log_filters td {
</tr> </tr>
</table> </table>
<div class="spacer_8"></div> <div class="spacer_8"></div>
<table class="forumline"> <table class="forumline">
<tr> <tr>
<th>{L_ACTS_LOG_LOGS_ACTION}</th> <th>{L_ACTS_LOG_LOGS_ACTION}</th>
@ -208,7 +206,7 @@ table.log_filters td {
</div> </div>
</td> </td>
<!-- ENDIF --> <!-- ENDIF -->
</tr></table> </tr></table>
</fieldset> </fieldset>
<!-- ENDIF --> <!-- ENDIF -->

View file

@ -30,7 +30,7 @@
</form> </form>
<script type="text/javascript"> <script type="text/javascript">
function checkForm(formObj) function checkForm(formObj)
{ {
formErrors = false; formErrors = false;

View file

@ -0,0 +1,122 @@
<style>
.btn{
color: rgb(255, 255, 255);
text-decoration: none;
padding: 2px 7px;
font-size: 12px;
border-radius: 3px;
}
.btn-success {
background-image: -moz-linear-gradient(top, #62c462, #51a351);
background-image: -ms-linear-gradient(top, #62c462, #51a351);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));
background-image: -webkit-linear-gradient(top, #62c462, #51a351);
background-image: -o-linear-gradient(top, #62c462, #51a351);
background-image: linear-gradient(top, #62c462, #51a351);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#51a351', GradientType=0);
border-color: #51a351 #51a351 #387038;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:dximagetransform.microsoft.gradient(enabled=false);
}
.btn-success:active,
.btn-success:disabled,
.btn-success:focus,
.btn-success:hover,
.btn-warning:active,
.btn-warning:disabled,
.btn-warning:focus,
.btn-warning:hover {
text-decoration: none;
color: rgb(255, 255, 255);
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.btn-warning:active,
.btn-warning:disabled,
.btn-warning:focus,
.btn-warning:hover {
background-color: #f89406;
}
.btn-success:active,
.btn-success:disabled,
.btn-success:focus,
.btn-success:hover {
background-color: #51a351;
}
.btn-warning {
background-color: #faa732;
background-image: -moz-linear-gradient(top, #fbb450, #f89406);
background-image: -ms-linear-gradient(top, #fbb450, #f89406);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));
background-image: -webkit-linear-gradient(top, #fbb450, #f89406);
background-image: -o-linear-gradient(top, #fbb450, #f89406);
background-image: linear-gradient(top, #fbb450, #f89406);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbb450', endColorstr='#f89406', GradientType=0);
border-color: #f89406 #f89406 #ad6704;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:dximagetransform.microsoft.gradient(enabled=false);
}
.td_pads { padding: 10px 15px !important; }
</style>
<script type="text/javascript">
ajax.sitemap = function(mode) {
ajax.exec({
action : 'sitemap',
mode : mode
});
}
ajax.callback.sitemap = function(data) {
if(data.mode == 'create') $('#mess_time').html(data.html);
else $('#sitemap').html(data.html);
}
</script>
<h1>{L_SITEMAP_ADMIN}</h1>
<form action="admin_sitemap.php" method="post">
<table class="forumline">
<tr class="row1">
<td width="25%"><span class="gen"><b>{L_INFORMATION}:</b></span></td>
<td class="td_pads"><div id="mess_time">{MESSAGE}</div></td>
</tr>
<tr class="row1">
<td width="25%"><span class="gen"><b>{L_SITEMAP_OPTIONS}:</b></span></td>
<td class="td_pads">
<a href="#" class="btn btn-success" onclick="ajax.sitemap('create'); return false;">{L_SITEMAP_CREATE}</a>&nbsp;&nbsp;
<a href="#" class="btn btn-warning" onclick="ajax.sitemap('search_update'); return false;">{L_SITEMAP_NOTIFY}</a><br />
<div id="sitemap"></div>
</td>
</tr>
<tr>
<th colspan="2">{L_SITEMAP_WHAT_NEXT}</th>
</tr>
<tr>
<td class="row1" colspan="2">
<p>1. {L_SITEMAP_GOOGLE_1}</p>
<p>2. {L_SITEMAP_GOOGLE_2}</p>
<p>3. {L_SITEMAP_YANDEX_1}</p>
<p>4. {L_SITEMAP_YANDEX_2}</p>
</td>
</tr>
<tr>
<th colspan="2">{L_SITEMAP_ADD_TITLE}</th>
</tr>
<tr class="row1">
<td class="row1">
<span class="gen"><b>{L_SITEMAP_ADD_PAGE}:</b></span>
</td>
<td>
<textarea name="static_sitemap" rows="5" cols="70">{STATIC_SITEMAP}</textarea><br />
<p>{L_SITEMAP_ADD_EXP_1} <b style="color: #993300;">{L_SITEMAP_ADD_EXP_2}</b></p>
</td>
</tr>
<tr>
<td class="catBottom" colspan="2">
<input type="submit" name="submit" value="{L_SUBMIT}" class="mainoption" />&nbsp;&nbsp;
<input type="reset" value="{L_RESET}" class="liteoption" />
</td>
</tr>
</table>
</form>

View file

@ -3,7 +3,7 @@
<tr> <tr>
<th class="thHead" colspan="2">{L_EDIT_REPORT_MODULE}</th> <th class="thHead" colspan="2">{L_EDIT_REPORT_MODULE}</th>
</tr> </tr>
<tr> <tr>
<td class="row1" width="40%" valign="top"><span class="gen">{L_REPORT_MODULE}:</span></td> <td class="row1" width="40%" valign="top"><span class="gen">{L_REPORT_MODULE}:</span></td>
<td class="row2"> <td class="row2">
<span class="gen">{MODULE_TITLE}</span><br /> <span class="gen">{MODULE_TITLE}</span><br />

View file

@ -42,7 +42,7 @@
</tr> </tr>
<!-- END switch_no_modules --> <!-- END switch_no_modules -->
<!-- END installed_modules --> <!-- END installed_modules -->
<!-- BEGIN inactive_modules --> <!-- BEGIN inactive_modules -->
<tr class="row3 med"> <tr class="row3 med">
<td colspan="3" class="catTitle">{L_INACTIVE_MODULES}</td> <td colspan="3" class="catTitle">{L_INACTIVE_MODULES}</td>

View file

@ -1,7 +1,7 @@
<form action="{S_REPORT_ACTION}" method="post"> <form action="{S_REPORT_ACTION}" method="post">
<!-- BEGIN switch_report_errors --> <!-- BEGIN switch_report_errors -->
<table cellpadding="4" cellspacing="1" border="0" width="100%" align="center" class="forumline"> <table cellpadding="4" cellspacing="1" border="0" width="100%" align="center" class="forumline">
<tr> <tr>
<td class="row1" align="center"><span class="gen"> <td class="row1" align="center"><span class="gen">
<!-- BEGIN report_errors --> <!-- BEGIN report_errors -->
{switch_report_errors.report_errors.MESSAGE}<br /> {switch_report_errors.report_errors.MESSAGE}<br />
@ -11,7 +11,7 @@
</table> </table>
<br /> <br />
<!-- END switch_report_errors --> <!-- END switch_report_errors -->
<table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center"> <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center">
<tr> <tr>
<th class="thHead" colspan="2">{L_ADD_REASON}</th> <th class="thHead" colspan="2">{L_ADD_REASON}</th>

View file

@ -139,7 +139,7 @@ a.seed:visited, a.seedmed:visited, a.seedsmall:visited {
color: #006600; text-decoration: none; color: #006600; text-decoration: none;
} }
a.points, a.pointsmed, a.pointssmall, a.points, a.pointsmed, a.pointssmall,
a.points:visited, a.pointsmed:visited, a.pointssmall:visited, .points a.points:visited, a.pointsmed:visited, a.pointssmall:visited, .points
{ {
color: blue; text-decoration: none; color: blue; text-decoration: none;
} }
@ -434,7 +434,7 @@ table.message td {
} }
.cat, td.cat, td.catTitle, td.catHead, td.catBottom { .cat, td.cat, td.catTitle, td.catHead, td.catBottom {
padding: 5px 4px 6px; padding: 5px 4px 0;
background: #E0E5E9 url(../images/cellpic.gif) repeat-x; background: #E0E5E9 url(../images/cellpic.gif) repeat-x;
} }
.catTitle { .catTitle {
@ -1532,5 +1532,4 @@ div#autocomplete_popup span.regenerate {
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);
background-repeat: repeat-x; background-repeat: repeat-x;
border-color: #dca7a7; border-color: #dca7a7;
} }

View file

@ -42,7 +42,6 @@
<!--========================================================================--> <!--========================================================================-->
<!-- ENDIF / SELECT_GROUP --> <!-- ENDIF / SELECT_GROUP -->
<!-- IF GROUP_INFO --> <!-- IF GROUP_INFO -->
<!--========================================================================--> <!--========================================================================-->
@ -217,7 +216,7 @@
<td>{pending.PM}</td> <td>{pending.PM}</td>
<td>{pending.EMAIL}</td> <td>{pending.EMAIL}</td>
<td>{pending.FROM}</td> <td>{pending.FROM}</td>
<td class="small">{pending.JOINED}</td> <td>{pending.JOINED}</td>
<td>{pending.POSTS}</td> <td>{pending.POSTS}</td>
<td>{pending.WWW}</td> <td>{pending.WWW}</td>
</tr> </tr>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 781 B

Before After
Before After

View file

@ -116,11 +116,6 @@
</p> </p>
<!-- END last --> <!-- END last -->
<p class="f_stat_inline hidden">
<span class="f_stat_topics"><em>{L_TOPICS_SHORT}:</em> {c.f.TOPICS}</span>
<span class="f_stat_posts"><em>{L_POSTS_SHORT}:</em> {c.f.POSTS}</span>
</p>
<!-- ELSE / start of !c.f.POSTS --> <!-- ELSE / start of !c.f.POSTS -->
{L_NO_POSTS} {L_NO_POSTS}
<!-- ENDIF --> <!-- ENDIF -->
@ -156,7 +151,7 @@
<!-- ENDIF --> <!-- ENDIF -->
<div id="board_stats"> <div id="board_stats">
<h3 class="cat_title"><a href="{U_VIEWONLINE}">{L_WHOSONLINE}</a></h3> <h3 class="cat_title">{L_WHOSONLINE}</h3>
<div id="board_stats_wrap"> <div id="board_stats_wrap">
<table class="forums"> <table class="forums">

View file

@ -21,7 +21,6 @@
<h4 class="tCenter mrg_16">{L_ENTER_PASSWORD}</h4> <h4 class="tCenter mrg_16">{L_ENTER_PASSWORD}</h4>
<!-- ENDIF --> <!-- ENDIF -->
<div class="mrg_16"> <div class="mrg_16">
<table class="borderless bCenter"> <table class="borderless bCenter">
<tr> <tr>

View file

@ -47,7 +47,6 @@
<!--========================================================================--> <!--========================================================================-->
<!-- ENDIF / TPL_MODCP_IP --> <!-- ENDIF / TPL_MODCP_IP -->
<!-- IF TPL_MODCP_MOVE --> <!-- IF TPL_MODCP_MOVE -->
<!--========================================================================--> <!--========================================================================-->
@ -115,7 +114,6 @@
<!--========================================================================--> <!--========================================================================-->
<!-- ENDIF / TPL_MODCP_MOVE --> <!-- ENDIF / TPL_MODCP_MOVE -->
<div class="bottom_info"> <div class="bottom_info">
<div class="spacer_4"></div> <div class="spacer_4"></div>

View file

@ -249,7 +249,7 @@ if ( (typeof(window.opera) != "undefined" && window.opera.version() < 13) || (wi
<a href="{U_SEARCH}"><b>{L_SEARCH}</b></a><span style="color:#CDCDCD;">|</span> <a href="{U_SEARCH}"><b>{L_SEARCH}</b></a><span style="color:#CDCDCD;">|</span>
<a href="{U_TERMS}"><b style="color: #993300;">{L_TERMS}</b></a><span style="color:#CDCDCD;">|</span> <a href="{U_TERMS}"><b style="color: #993300;">{L_TERMS}</b></a><span style="color:#CDCDCD;">|</span>
<a href="{U_GROUP_CP}"><b>{L_USERGROUPS}</b></a><span style="color:#CDCDCD;">|</span> <a href="{U_GROUP_CP}"><b>{L_USERGROUPS}</b></a><span style="color:#CDCDCD;">|</span>
<a href="{U_MEMBERLIST}"><b>{L_MEMBERLIST}</b></a><span style="color:#CDCDCD;">|</span> <a href="{U_MEMBERLIST}"><b>{L_MEMBERLIST}</b></a>
</td> </td>
<td class="nowrap" align="right"> <td class="nowrap" align="right">
<!-- BEGIN switch_report_list --> <!-- BEGIN switch_report_list -->
@ -518,13 +518,5 @@ $(document).ready(function() {
</div> </div>
<!-- ENDIF / ERROR_MESSAGE --> <!-- ENDIF / ERROR_MESSAGE -->
<!-- IF INFO_MESSAGE -->
<div class="info_msg_wrap">
<table class="info_msg">
<tr><td><div class="msg">{INFO_MESSAGE}</div></td></tr>
</table>
</div>
<!-- ENDIF / INFO_MESSAGE -->
<!-- page_header.tpl END --> <!-- page_header.tpl END -->
<!-- module_xx.tpl START --> <!-- module_xx.tpl START -->

View file

@ -71,7 +71,7 @@
</tr> </tr>
<tr id="view_message" class="hidden"> <tr id="view_message" class="hidden">
<td colspan="2"> <td colspan="2">
<div class="view-message"></div> <div class="view-message"></div>
</td> </td>
</tr> </tr>
<!-- IF POSTING_USERNAME --> <!-- IF POSTING_USERNAME -->
@ -109,9 +109,8 @@
</tr> </tr>
<!-- END switch_smilies_extra --> <!-- END switch_smilies_extra -->
</table><!--/smilies--> </table><!--/smilies-->
</td>
</td> <td class="vTop pad_0 w100"><!-- INCLUDE posting_editor.tpl --></td>
<td class="vTop pad_0 w100"><!-- INCLUDE posting_editor.tpl --></td>
</tr> </tr>
<!-- IF IN_PM --> <!-- IF IN_PM -->
<!-- ELSEIF LOGGED_IN --> <!-- ELSEIF LOGGED_IN -->

View file

@ -29,7 +29,6 @@
<!--========================================================================--> <!--========================================================================-->
<!-- ENDIF / TPL_ADD_ATTACHMENT --> <!-- ENDIF / TPL_ADD_ATTACHMENT -->
<!-- IF TPL_POSTED_ATTACHMENTS --> <!-- IF TPL_POSTED_ATTACHMENTS -->
<!--========================================================================--> <!--========================================================================-->

View file

@ -15,30 +15,32 @@ function emoticon(text) {
<table width="100%" cellpadding="10"> <table width="100%" cellpadding="10">
<tr> <tr>
<td> <td>
<table class="forumline"> <table class="forumline">
<tr> <tr>
<th>{L_EMOTICONS}</th> <th>{L_EMOTICONS}</th>
</tr> </tr>
<tr> <tr>
<td class="row1"> <td class="row1">
<table class="borderless w100" cellpadding="5"> <table class="borderless w100" cellpadding="5">
<!-- BEGIN smilies_row --> <!-- BEGIN smilies_row -->
<tr align="center"> <tr align="center">
<!-- BEGIN smilies_col --> <!-- BEGIN smilies_col -->
<td><a href="javascript:emoticon('{smilies_row.smilies_col.SMILEY_CODE}')"><img src="{smilies_row.smilies_col.SMILEY_IMG}" border="0" alt="{smilies_row.smilies_col.SMILEY_DESC}" title="{smilies_row.smilies_col.SMILEY_DESC}" /></a></td> <td><a href="javascript:emoticon('{smilies_row.smilies_col.SMILEY_CODE}')"><img src="{smilies_row.smilies_col.SMILEY_IMG}" border="0" alt="{smilies_row.smilies_col.SMILEY_DESC}" title="{smilies_row.smilies_col.SMILEY_DESC}" /></a></td>
<!-- END smilies_col --> <!-- END smilies_col -->
</tr> </tr>
<!-- END smilies_row --> <!-- END smilies_row -->
<!-- BEGIN switch_smilies_extra --> <!-- BEGIN switch_smilies_extra -->
<tr align="center"> <tr align="center">
<td colspan="{S_SMILIES_COLSPAN}"><span class="nav"><a href="{U_MORE_SMILIES}" onclick="open_window('{U_MORE_SMILIES}', 250, 300);return false" target="_smilies" class="nav">{L_MORE_EMOTICONS}</a></td> <td colspan="{S_SMILIES_COLSPAN}"><span class="nav"><a href="{U_MORE_SMILIES}" onclick="open_window('{U_MORE_SMILIES}', 250, 300);return false" target="_smilies" class="nav">{L_MORE_EMOTICONS}</a></td>
</tr> </tr>
<!-- END switch_smilies_extra --> <!-- END switch_smilies_extra -->
</table></td> </table>
</tr> </td>
<tr> </tr>
<td class="row2" align="center"><br /><span class="med"><a href="javascript:window.close();" class="med">{L_CLOSE_WINDOW}</a></span></td> <tr>
</tr> <td class="row2" align="center"><br /><span class="med"><a href="javascript:window.close();" class="med">{L_CLOSE_WINDOW}</a></span></td>
</table></td> </tr>
</table>
</td>
</tr> </tr>
</table> </table>

View file

@ -571,7 +571,6 @@ var TPL = {
submit_fn : {} submit_fn : {}
}; };
/* /*
------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------
-- el_attr -------------------------------------------------------------------------------------- -- el_attr --------------------------------------------------------------------------------------
@ -4722,7 +4721,6 @@ $(function(){
<div id="tyt_faq_url"> <a href="http://rutracker.org/forum/viewtopic.php?t=2135853" target="_blank"><b>тут</b></a> </div> <div id="tyt_faq_url"> <a href="http://rutracker.org/forum/viewtopic.php?t=2135853" target="_blank"><b>тут</b></a> </div>
<!--/tyt_faq_url--> <!--/tyt_faq_url-->
<!--wtf_faq_url--> <!--wtf_faq_url-->
<div id="wtf_faq_url"> <a href="http://rutracker.org/forum/viewtopic.php?t=488848#other" target="_blank"><b>Что это значит?</b></a> </div> <div id="wtf_faq_url"> <a href="http://rutracker.org/forum/viewtopic.php?t=488848#other" target="_blank"><b>Что это значит?</b></a> </div>
<!--/wtf_faq_url--> <!--/wtf_faq_url-->
@ -4767,7 +4765,6 @@ $(function(){
<div id="file_list"> <a href="http://rutracker.org/forum/viewtopic.php?p=21307338#21307338" target="_blank"><b>Как создать список файлов?</b></a></div> <div id="file_list"> <a href="http://rutracker.org/forum/viewtopic.php?p=21307338#21307338" target="_blank"><b>Как создать список файлов?</b></a></div>
<!--/file_list--> <!--/file_list-->
<!--faq_traclist--> <!--faq_traclist-->
<div id="faq_traclist"> <a href="http://rutracker.org/forum/viewtopic.php?t=2525182" target="_blank"><b>Как быстро создать треклист с указанием битрейта</b></a></div> <div id="faq_traclist"> <a href="http://rutracker.org/forum/viewtopic.php?t=2525182" target="_blank"><b>Как быстро создать треклист с указанием битрейта</b></a></div>
<!--/faq_traclist--> <!--/faq_traclist-->

View file

@ -2,22 +2,6 @@
<div id="pm_header"> <div id="pm_header">
<!-- IF PM_BOX_SIZE_INFO --> <!-- IF PM_BOX_SIZE_INFO -->
<table class="bordered pm_box_size pad_2 floatL">
<tr>
<td colspan="3" class="row1 med tCenter nowrap">{BOX_SIZE_STATUS}</td>
</tr>
<tr>
<td colspan="3" class="row3">
<div class="spacer_8 progress" style="width: {INBOX_LIMIT_IMG_WIDTH}px;"></div>
</td>
</tr>
<tr class="row1 small">
<td width="30%">0%</td>
<td width="40%" class="tCenter">50%</td>
<td width="30%" class="tRight">100%</td>
</tr>
</table>
<table class="bordered pm_box_size pad_2 floatR"> <table class="bordered pm_box_size pad_2 floatR">
<tr> <tr>
<td colspan="3" class="row1 med tCenter nowrap">{BOX_SIZE_STATUS}</td> <td colspan="3" class="row1 med tCenter nowrap">{BOX_SIZE_STATUS}</td>

View file

@ -1,5 +1,5 @@
<table cellspacing="2" cellpadding="2" border="0" width="100%"> <table cellspacing="2" cellpadding="2" border="0" width="100%">
<tr> <tr>
<td class="nav"><a href="{U_INDEX}" class="nav">{T_INDEX}</a></td> <td class="nav"><a href="{U_INDEX}" class="nav">{T_INDEX}</a></td>
</tr> </tr>
</table> </table>

View file

@ -1,13 +1,13 @@
<form action="{S_REPORT_ACTION}" method="post"> <form action="{S_REPORT_ACTION}" method="post">
<table cellpadding="2" cellspacing="2" border="0" width="100%" align="center"> <table cellpadding="2" cellspacing="2" border="0" width="100%" align="center">
<tr> <tr>
<td class="nav"><a href="{U_INDEX}" class="nav">{T_INDEX}</a></td> <td class="nav"><a href="{U_INDEX}" class="nav">{T_INDEX}</a></td>
</tr> </tr>
</table> </table>
<!-- BEGIN switch_report_errors --> <!-- BEGIN switch_report_errors -->
<table cellpadding="4" cellspacing="1" border="0" width="80%" align="center" class="forumline"> <table cellpadding="4" cellspacing="1" border="0" width="80%" align="center" class="forumline">
<tr> <tr>
<td class="row1" align="center"><span class="gen"> <td class="row1" align="center"><span class="gen">
<!-- BEGIN report_errors --> <!-- BEGIN report_errors -->
{switch_report_errors.report_errors.MESSAGE}<br /> {switch_report_errors.report_errors.MESSAGE}<br />
@ -17,9 +17,9 @@
</table> </table>
<br /> <br />
<!-- END switch_report_errors --> <!-- END switch_report_errors -->
<table cellpadding="4" cellspacing="1" border="0" width="80%" align="center" class="forumline"> <table cellpadding="4" cellspacing="1" border="0" width="80%" align="center" class="forumline">
<tr> <tr>
<th class="thHead" colspan="2">{L_WRITE_REPORT}</th> <th class="thHead" colspan="2">{L_WRITE_REPORT}</th>
</tr> </tr>
<tr> <tr>

Some files were not shown because too many files have changed in this diff Show more