mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
r383
Фикс управления моими сообщениями обновление дампа недочеты указание регистрации/переноса/порно топика при создании форума git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@383 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
parent
e6495e45d5
commit
89915f3d91
20 changed files with 740 additions and 652 deletions
File diff suppressed because it is too large
Load diff
|
@ -9,7 +9,8 @@ if (!empty($setmodules))
|
|||
require('./pagestart.php');
|
||||
// ACP Header - END
|
||||
|
||||
require(INC_DIR .'functions_group.php');
|
||||
require(INC_DIR .'functions_group.php');
|
||||
require(LANG_DIR .'lang_admin_bt.php');
|
||||
|
||||
$s = '';
|
||||
|
||||
|
@ -82,8 +83,10 @@ if ($mode)
|
|||
$forum_display_order = $row['forum_display_order'];
|
||||
$forum_parent = $row['forum_parent'];
|
||||
$show_on_index = $row['show_on_index'];
|
||||
$prune_enabled = ($row['prune_days']) ? HTML_CHECKED : '';
|
||||
$prune_days = $row['prune_days'];
|
||||
$allow_reg_tracker = $row['allow_reg_tracker'];
|
||||
$allow_porno_topic = $row['allow_porno_topic'];
|
||||
$self_moderated = $row['self_moderated'];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -97,8 +100,10 @@ if ($mode)
|
|||
$forum_display_order = 0;
|
||||
$forum_id = '';
|
||||
$show_on_index = 1;
|
||||
$prune_enabled = '';
|
||||
$prune_days = 0;
|
||||
$allow_reg_tracker = 0;
|
||||
$allow_porno_topic = 0;
|
||||
$self_moderated = 0;
|
||||
}
|
||||
|
||||
if (isset($_REQUEST['forum_parent']))
|
||||
|
@ -147,12 +152,14 @@ if ($mode)
|
|||
'S_SUBMIT_VALUE' => $buttonvalue,
|
||||
'S_CAT_LIST' => $catlist,
|
||||
'S_STATUS_LIST' => $statuslist,
|
||||
'S_PRUNE_ENABLED' => $prune_enabled,
|
||||
|
||||
'SHOW_ON_INDEX' => $show_on_index,
|
||||
'S_PARENT_FORUM' => $s_parent,
|
||||
'CAT_LIST_CLASS' => ($forum_parent) ? 'hidden' : '',
|
||||
'SHOW_ON_INDEX_CLASS' => (!$forum_parent) ? 'hidden' : '',
|
||||
'ALLOW_REG_TRACKER' => build_select('allow_reg_tracker', array($lang['DISALLOWED'] => 0, $lang['ALLOWED'] => 1), $allow_reg_tracker),
|
||||
'ALLOW_PORNO_TOPIC' => build_select('allow_porno_topic', array($lang['NO'] => 0, $lang['YES'] => 1), $allow_porno_topic),
|
||||
'SELF_MODERATED' => build_select('self_moderated', array($lang['NO'] => 0, $lang['YES'] => 1), $self_moderated),
|
||||
|
||||
'L_FORUM_TITLE' => $l_title,
|
||||
|
||||
|
@ -171,8 +178,7 @@ if ($mode)
|
|||
$forum_desc = DB()->escape(trim($_POST['forumdesc']));
|
||||
$forum_status = intval($_POST['forumstatus']);
|
||||
|
||||
$prune_enable = isset($_POST['prune_enable']);
|
||||
$prune_days = ($prune_enable) ? intval($_POST['prune_days']) : 0;
|
||||
$prune_days = intval($_POST['prune_days']);
|
||||
|
||||
$forum_parent = ($_POST['forum_parent'] != -1) ? intval($_POST['forum_parent']) : 0;
|
||||
$show_on_index = ($forum_parent) ? intval($_POST['show_on_index']) : 1;
|
||||
|
@ -180,6 +186,10 @@ if ($mode)
|
|||
$forum_display_sort = intval($_POST['forum_display_sort']);
|
||||
$forum_display_order = intval($_POST['forum_display_order']);
|
||||
|
||||
$allow_reg_tracker = (int) $_POST['allow_reg_tracker'];
|
||||
$allow_porno_topic = (int) $_POST['allow_porno_topic'];
|
||||
$self_moderated = (int) $_POST['self_moderated'];
|
||||
|
||||
if (!$forum_name)
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Can't create a forum without a name");
|
||||
|
@ -202,11 +212,6 @@ if ($mode)
|
|||
$forum_order = $max_order + 5;
|
||||
}
|
||||
|
||||
if ($prune_enable && !$prune_days)
|
||||
{
|
||||
message_die(GENERAL_MESSAGE, $lang['SET_PRUNE_DATA']);
|
||||
}
|
||||
|
||||
// Default permissions of public forum
|
||||
$field_sql = $value_sql = '';
|
||||
|
||||
|
@ -216,8 +221,8 @@ if ($mode)
|
|||
$value_sql .= ", $value";
|
||||
}
|
||||
|
||||
$columns = ' forum_name, cat_id, forum_desc, forum_order, forum_status, prune_days, forum_parent, show_on_index, forum_display_sort, forum_display_order'. $field_sql;
|
||||
$values = "'$forum_name', $cat_id, '$forum_desc', $forum_order, $forum_status, $prune_days, $forum_parent, $show_on_index, $forum_display_sort, $forum_display_order". $value_sql;
|
||||
$columns = ' forum_name, cat_id, forum_desc, forum_order, forum_status, prune_days, forum_parent, show_on_index, forum_display_sort, forum_display_order, allow_reg_tracker, allow_porno_topic, self_moderated'. $field_sql;
|
||||
$values = "'$forum_name', $cat_id, '$forum_desc', $forum_order, $forum_status, $prune_days, $forum_parent, $show_on_index, $forum_display_sort, $forum_display_order, $allow_reg_tracker, $allow_porno_topic, $self_moderated". $value_sql;
|
||||
|
||||
DB()->query("INSERT INTO ". BB_FORUMS ." ($columns) VALUES ($values)");
|
||||
|
||||
|
@ -238,15 +243,16 @@ if ($mode)
|
|||
$forum_name = DB()->escape(trim($_POST['forumname']));
|
||||
$forum_desc = DB()->escape(trim($_POST['forumdesc']));
|
||||
$forum_status = intval($_POST['forumstatus']);
|
||||
|
||||
$prune_enable = isset($_POST['prune_enable']);
|
||||
$prune_days = ($prune_enable) ? intval($_POST['prune_days']) : 0;
|
||||
$prune_days = intval($_POST['prune_days']);
|
||||
|
||||
$forum_parent = ($_POST['forum_parent'] != -1) ? intval($_POST['forum_parent']) : 0;
|
||||
$show_on_index = ($forum_parent) ? intval($_POST['show_on_index']) : 1;
|
||||
|
||||
$forum_display_order = intval($_POST['forum_display_order']);
|
||||
$forum_display_sort = intval($_POST['forum_display_sort']);
|
||||
$allow_reg_tracker = (int) $_POST['allow_reg_tracker'];
|
||||
$allow_porno_topic = (int) $_POST['allow_porno_topic'];
|
||||
$self_moderated = (int) $_POST['self_moderated'];
|
||||
|
||||
$forum_data = get_forum_data($forum_id);
|
||||
$old_cat_id = $forum_data['cat_id'];
|
||||
|
@ -284,24 +290,22 @@ if ($mode)
|
|||
$forum_order = $cat_forums[$old_cat_id]['f'][$old_parent]['forum_order'] - 5;
|
||||
}
|
||||
|
||||
if ($prune_enable && !$prune_days)
|
||||
{
|
||||
message_die(GENERAL_MESSAGE, $lang['SET_PRUNE_DATA']);
|
||||
}
|
||||
|
||||
DB()->query("
|
||||
UPDATE ". BB_FORUMS ." SET
|
||||
forum_name = '$forum_name',
|
||||
cat_id = $cat_id,
|
||||
forum_desc = '$forum_desc',
|
||||
forum_order = $forum_order,
|
||||
forum_status = $forum_status,
|
||||
prune_days = $prune_days,
|
||||
forum_parent = $forum_parent,
|
||||
show_on_index = $show_on_index,
|
||||
forum_name = '$forum_name',
|
||||
cat_id = $cat_id,
|
||||
forum_desc = '$forum_desc',
|
||||
forum_order = $forum_order,
|
||||
forum_status = $forum_status,
|
||||
prune_days = $prune_days,
|
||||
forum_parent = $forum_parent,
|
||||
show_on_index = $show_on_index,
|
||||
allow_reg_tracker = $allow_reg_tracker,
|
||||
allow_porno_topic = $allow_porno_topic,
|
||||
self_moderated = $self_moderated,
|
||||
forum_display_order = $forum_display_order,
|
||||
forum_display_sort = $forum_display_sort
|
||||
WHERE forum_id = $forum_id
|
||||
WHERE forum_id = $forum_id
|
||||
");
|
||||
|
||||
if ($cat_id != $old_cat_id)
|
||||
|
|
|
@ -81,6 +81,8 @@ class torrent
|
|||
|
||||
function build_filelist_array ()
|
||||
{
|
||||
global $lang;
|
||||
|
||||
$info = $this->tor_decoded['info'];
|
||||
|
||||
if (isset($info['name.utf-8']))
|
||||
|
|
|
@ -52,8 +52,8 @@ $bb_cfg = $tr_cfg = $page_cfg = array();
|
|||
|
||||
// Increase number of revision after update
|
||||
$bb_cfg['tp_version'] = '2.4 (beta)';
|
||||
$bb_cfg['tp_release_state'] = 'R381';
|
||||
$bb_cfg['tp_release_date'] = '06-03-2012';
|
||||
$bb_cfg['tp_release_state'] = 'R383';
|
||||
$bb_cfg['tp_release_date'] = '08-03-2012';
|
||||
|
||||
// Database
|
||||
$charset = 'utf8';
|
||||
|
|
|
@ -217,10 +217,8 @@ class ads_common
|
|||
define('AUTH_LIST_ALL', 0);
|
||||
|
||||
// forum's ACL types (phpbb_forums: auth_view, auth_read... values)
|
||||
# 'AUTH_ALL' 0
|
||||
define('AUTH_REG', 1);
|
||||
define('AUTH_ACL', 2);
|
||||
# 'AUTH_MOD' 3
|
||||
define('AUTH_ADMIN', 5);
|
||||
|
||||
// forum_perm bitfields - backward compatible with auth($type)
|
||||
|
@ -539,7 +537,7 @@ class Date_Delta
|
|||
60 => 'seconds', // set granularity to "seconds" if delta less then 1 minute
|
||||
10800 => 'minutes', // 3 hours
|
||||
259200 => 'hours', // 3 days
|
||||
31363200 => 'mday', // 12 months + 1d+12h
|
||||
31363200 => 'mday', // 12 months
|
||||
311040000 => 'mon', // 10 years
|
||||
);
|
||||
var $intervals = array();
|
||||
|
@ -979,7 +977,7 @@ function bt_show_ip ($ip, $port = '')
|
|||
{
|
||||
global $bb_cfg;
|
||||
|
||||
if (IS_MOD || IS_ADMIN)
|
||||
if (IS_AM)
|
||||
{
|
||||
$ip = decode_ip($ip);
|
||||
$ip .= ($port) ? ":$port" : '';
|
||||
|
@ -995,7 +993,7 @@ function bt_show_port ($port)
|
|||
{
|
||||
global $bb_cfg;
|
||||
|
||||
if (IS_MOD || IS_ADMIN)
|
||||
if (IS_AM)
|
||||
{
|
||||
return $port;
|
||||
}
|
||||
|
@ -2759,7 +2757,8 @@ function get_avatar ($avatar, $type, $allow_avatar = true, $height = '', $width
|
|||
|
||||
function set_die_append_msg ($forum_id = null, $topic_id = null)
|
||||
{
|
||||
global $lang, $template;
|
||||
global $userdata, $lang, $template;
|
||||
|
||||
$msg = '';
|
||||
$msg .= ($topic_id) ? '<p class="mrg_10"><a href="viewtopic.php?t='. $topic_id .'">'. $lang['CLICK_RETURN_TOPIC'] .'</a></p>' : '';
|
||||
$msg .= ($forum_id) ? '<p class="mrg_10"><a href="viewforum.php?f='. $forum_id .'">'. $lang['CLICK_RETURN_FORUM'] .'</a></p>' : '';
|
||||
|
|
|
@ -88,7 +88,7 @@ if ($topic_tpl = DB()->fetch_row($sql))
|
|||
'TORRENT_EXT_LEN' => strlen(TORRENT_EXT) + 1,
|
||||
'U_VIEW_FORUM' => append_sid(FORUM_URL . $post_info['forum_id']),
|
||||
|
||||
'REGULAR_TOPIC_BUTTON' => true, # (IS_MOD || IS_ADMIN),
|
||||
'REGULAR_TOPIC_BUTTON' => true, # (IS_AM),
|
||||
'REGULAR_TOPIC_HREF' => append_sid("posting.php?mode=newtopic&". POST_FORUM_URL .'='. $post_info['forum_id']),
|
||||
|
||||
'L_TITLE' => $lang['TPL']['RELEASE_NAME'],
|
||||
|
|
|
@ -670,4 +670,9 @@ $lang['PIC_SIZE'] = 'The maximum size of images';
|
|||
$lang['AUTO_DELETE_POSTED_PICS'] = 'Delete Images hosted in remote positions';
|
||||
$lang['SHOW_MOD_HOME_PAGE'] = 'Show on moderators the index.php';
|
||||
$lang['PREMOD_HELP'] = '<h4><span class="tor-icon tor-dup">∏</span> Pre-moderation</h4> <h6>If you do not have hands to the status of v, #, or T in this section, including subsections, the distribution will automatically receive this status</h6>';
|
||||
|
||||
$lang['SEED_BONUS'] = 'Seed Bonus';
|
||||
$lang['SEED_BONUS_ADD'] = '<h4>Adding seed bonus </h4> <h6> Number of hands handed out by the user and the size of bonuses for them (charging times an hour) </h6>';
|
||||
$lang['SEED_BONUS_RELEASE'] = 'to N-number of releases';
|
||||
$lang['SEED_BONUS_POINTS'] = 'bonuses in an hour';
|
||||
$lang['SEED_BONUS_TOR_SIZE'] = '<h4>Minimum distribution for which will be awarded bonuses </h4> <h6> If you want to calculate bonuses for all distribution, leave blank. </h6>';
|
||||
$lang['SEED_BONUS_USER_REGDATA'] = '<h4>Minimum length of user tracker, after which will be awarded bonuses </h4> <h6> If you want to accrue bonuses to all users, leave blank. </h6>';
|
||||
|
|
|
@ -61,6 +61,9 @@ $lang['FORUM_CFG_EXPL'] = 'Forum config';
|
|||
$lang['BT_SELECT_FORUMS'] = 'Forum options:';
|
||||
$lang['BT_SELECT_FORUMS_EXPL'] = 'hold down <i>Ctrl</i> while selecting multiple forums';
|
||||
|
||||
$lang['REG_TORRENTS'] = 'Register torrents';
|
||||
$lang['ALLOWED'] = 'Resolved';
|
||||
$lang['DISALLOWED'] = 'Prohibited';
|
||||
$lang['ALLOW_REG_TRACKER'] = 'Allowed forums for registering .torrents on tracker';
|
||||
$lang['ALLOW_PORNO_TOPIC'] = 'Allow post porno topics';
|
||||
$lang['SHOW_DL_BUTTONS'] = 'Show buttons for manually changing DL-status';
|
||||
|
|
|
@ -1167,6 +1167,7 @@ $lang['PM_QUOTA'] = 'PM Quota';
|
|||
$lang['BYTES'] = 'Bytes';
|
||||
$lang['KB'] = 'KB';
|
||||
$lang['MB'] = 'MB';
|
||||
$lang['GB'] = 'GB';
|
||||
$lang['ATTACH_SEARCH_QUERY'] = 'Search Attachments';
|
||||
$lang['TEST_SETTINGS'] = 'Test Settings';
|
||||
$lang['NOT_ASSIGNED'] = 'Not Assigned';
|
||||
|
@ -1712,3 +1713,15 @@ $lang['POST_PIN'] = 'Pin first post';
|
|||
$lang['POST_UNPIN'] = 'Unpin first post';
|
||||
$lang['POST_PINNED'] = 'First post pinned';
|
||||
$lang['POST_UNPINNED'] = 'First post unpinned';
|
||||
|
||||
// Óïðàâëåíèå ìîèìè ñîîáùåíèÿìè
|
||||
$lang['GOTO_MY_MESSAGE'] = 'Close and return to the list "My Messages"';
|
||||
$lang['DEL_MY_MESSAGE'] = 'Selected topics are removed from the "My Messages"';
|
||||
$lang['NO_TOPICS_MY_MESSAGE'] = 'No topics found in the list of your posts (maybe you have already removed them)';
|
||||
$lang['EDIT_MY_MESSAGE_LIST'] = 'edit list';
|
||||
$lang['SELECT_INVERT'] = 'select / invert';
|
||||
$lang['RESTORE_ALL_POSTS'] = 'Restore all posts';
|
||||
$lang['DEL_LIST_MY_MESSAGE'] = 'Delete the selected topic from the list';
|
||||
$lang['DEL_LIST_MY_MESSAGE_INFO'] = 'After removal of up to update the <b>entire list</b> it can be shown already deleted threads';
|
||||
$lang['DEL_LIST_INFO'] = 'To delete an order from the list, click on the icon to the left of the names of any section';
|
||||
$lang['INDEX_RETURN'] = 'Back to home page';
|
||||
|
|
|
@ -668,8 +668,6 @@ $lang['PIC_SIZE'] = 'Максимальный размер изображени
|
|||
$lang['AUTO_DELETE_POSTED_PICS'] = 'Удалять изображения размещенные в удаленных постах';
|
||||
$lang['SHOW_MOD_HOME_PAGE'] = 'Показывать модераторов на главной';
|
||||
$lang['PREMOD_HELP'] = '<h4><span class="tor-icon tor-dup">∏</span> Премодерация</h4> <h6>Если у пользователя нет раздач со статусом <span class="tor-icon tor-approved">√</span>, <span class="tor-icon tor-approved">#</span> или <span class="tor-icon tor-dup">T</span> в текущем разделе, включая подразделы, то раздача автоматически получает данный статус</h6>';
|
||||
|
||||
//сидбонус
|
||||
$lang['SEED_BONUS'] = 'Сид Бонус';
|
||||
$lang['SEED_BONUS_ADD'] = '<h4>Добавление сид бонуса</h4><h6>Кол-во раздаваемых раздач пользователем и размер начисления бонусов за них (начисления раз в час)</h6>';
|
||||
$lang['SEED_BONUS_RELEASE'] = 'до N-числа релизов';
|
||||
|
|
|
@ -61,6 +61,9 @@ $lang['FORUM_CFG_EXPL'] = 'Настройки форума';
|
|||
$lang['BT_SELECT_FORUMS'] = 'Форумы, в которых:';
|
||||
$lang['BT_SELECT_FORUMS_EXPL'] = 'для выделения нескольких форумов, отмечайте их с нажатой клавишей <i>Ctrl</i>';
|
||||
|
||||
$lang['REG_TORRENTS'] = 'Регистрация торрентов';
|
||||
$lang['ALLOWED'] = 'Разрешена';
|
||||
$lang['DISALLOWED'] = 'Запрещена';
|
||||
$lang['ALLOW_REG_TRACKER'] = 'Разрешена регистрация торрентов на трекере';
|
||||
$lang['ALLOW_PORNO_TOPIC'] = 'Разрешено создавать порно топики';
|
||||
$lang['SHOW_DL_BUTTONS'] = 'Показывать кнопки для изменения DL-статуса';
|
||||
|
|
|
@ -1174,6 +1174,7 @@ $lang['PM_QUOTA'] = 'Квота ЛС';
|
|||
$lang['BYTES'] = 'Байт';
|
||||
$lang['KB'] = 'KB';
|
||||
$lang['MB'] = 'MB';
|
||||
$lang['GB'] = 'GB';
|
||||
$lang['ATTACH_SEARCH_QUERY'] = 'Поиск вложений';
|
||||
$lang['TEST_SETTINGS'] = 'Проверить настройки';
|
||||
$lang['NOT_ASSIGNED'] = 'Не назначено';
|
||||
|
@ -1715,8 +1716,20 @@ $lang['DL_STOPPED'] = 'Остановил Скачивание/Раздачу';
|
|||
$lang['DL_UPD'] = 'Подключён: ';
|
||||
$lang['DL_INFO'] = 'показаны данные <i><b>только за текущую сессию</b></i>';
|
||||
|
||||
// Post PIN
|
||||
// Закрепление первого поста
|
||||
$lang['POST_PIN'] = 'Закрепить первый пост';
|
||||
$lang['POST_UNPIN'] = 'Открепить первый пост';
|
||||
$lang['POST_PINNED'] = 'Первый пост закреплён';
|
||||
$lang['POST_UNPINNED'] = 'Первый пост откреплён';
|
||||
|
||||
// Управление моими сообщениями
|
||||
$lang['GOTO_MY_MESSAGE'] = 'Закрыть и вернуться к списку "Мои сообщения"';
|
||||
$lang['DEL_MY_MESSAGE'] = 'Выбранные темы удалены из списка "Мои сообщения"';
|
||||
$lang['NO_TOPICS_MY_MESSAGE'] = 'Темы не найдены в списке ваших сообщений (возможно Вы их уже удалили)';
|
||||
$lang['EDIT_MY_MESSAGE_LIST'] = 'Редактировать список';
|
||||
$lang['SELECT_INVERT'] = 'отметить/инвертировать';
|
||||
$lang['RESTORE_ALL_POSTS'] = 'Восстановить все сообщения';
|
||||
$lang['DEL_LIST_MY_MESSAGE'] = 'Удалить выбранные темы из списка';
|
||||
$lang['DEL_LIST_MY_MESSAGE_INFO'] = 'После удаления и до обновления <b>всего списка</b> в нём могут быть показаны уже удаленные темы';
|
||||
$lang['DEL_LIST_INFO'] = 'Для удаления тем из списка нажмите на иконку слева от названия любого раздела';
|
||||
$lang['INDEX_RETURN'] = 'Вернуться на главную страницу';
|
|
@ -3,7 +3,7 @@
|
|||
define('IN_PHPBB', true);
|
||||
define('BB_SCRIPT', 'modcp');
|
||||
define('BB_ROOT', './');
|
||||
require(BB_ROOT ."common.php");
|
||||
require(BB_ROOT .'common.php');
|
||||
require(INC_DIR .'bbcode.php');
|
||||
require(INC_DIR .'functions_post.php');
|
||||
require_once(INC_DIR .'functions_admin.php');
|
||||
|
@ -145,7 +145,7 @@ $user->session_start(array('req_login' => true));
|
|||
// Check if user did or did not confirm. If they did not, forward them to the last page they were on
|
||||
if (isset($_POST['cancel']) || IS_GUEST)
|
||||
{
|
||||
$redirect = "index.php";
|
||||
$redirect = 'index.php';
|
||||
|
||||
if ($topic_id || $forum_id)
|
||||
{
|
||||
|
@ -156,7 +156,7 @@ if (isset($_POST['cancel']) || IS_GUEST)
|
|||
|
||||
// Start auth check
|
||||
$is_auth = auth(AUTH_ALL, $forum_id, $userdata);
|
||||
$is_moderator = (IS_MOD || IS_ADMIN);
|
||||
$is_moderator = (IS_AM);
|
||||
|
||||
if ($mode == 'ip')
|
||||
{
|
||||
|
|
|
@ -17,9 +17,9 @@ $user->session_start(array('req_login' => $bb_cfg['disable_search_for_guest']));
|
|||
if (isset($_POST['del_my_post']))
|
||||
{
|
||||
$template->assign_var('BB_DIE_APPEND_MSG', '
|
||||
<a href="#" onclick="window.close(); window.opener.focus();">Закрыть и вернуться к списку "Мои сообщения"</a>
|
||||
<a href="#" onclick="window.close(); window.opener.focus();">'. $lang['GOTO_MY_MESSAGE'] .'</a>
|
||||
<br /><br />
|
||||
<a href="index.php">Вернуться на главную страницу</a>
|
||||
<a href="index.php">'. $lang['INDEX_RETURN'] .'</a>
|
||||
');
|
||||
|
||||
if (IS_GUEST)
|
||||
|
@ -35,13 +35,31 @@ if (isset($_POST['del_my_post']))
|
|||
|
||||
if (DB()->affected_rows())
|
||||
{
|
||||
bb_die('Выбранные темы ['. count($_POST['topic_id_list']) .' шт.] удалены из списка "Мои сообщения"');
|
||||
//bb_die('Выбранные темы ['. count($_POST['topic_id_list']) .' шт.] удалены из списка "Мои сообщения"');
|
||||
bb_die($lang['DEL_MY_MESSAGE']);
|
||||
}
|
||||
else
|
||||
{
|
||||
bb_die("Темы не найдены в списке ваших сообщений (возможно вы их уже удалили)");
|
||||
bb_die($lang['NO_TOPICS_MY_MESSAGE']);
|
||||
}
|
||||
}
|
||||
else if(isset($_POST['add_my_post']))
|
||||
{
|
||||
$template->assign_var('BB_DIE_APPEND_MSG', '
|
||||
<a href="#" onclick="window.close(); window.opener.focus();">'. $lang['GOTO_MY_MESSAGE'] .'</a>
|
||||
<br /><br />
|
||||
<a href="index.php">'. $lang['INDEX_RETURN'] .'</a>
|
||||
');
|
||||
|
||||
if (IS_GUEST)
|
||||
{
|
||||
redirect('index.php');
|
||||
}
|
||||
|
||||
DB()->query("UPDATE ". BB_POSTS ." SET user_post = 1 WHERE poster_id = {$user->id}");
|
||||
|
||||
redirect("search.php?u={$user->id}");
|
||||
}
|
||||
|
||||
$tracking_topics = get_tracks('topic');
|
||||
$tracking_forums = get_tracks('forum');
|
||||
|
@ -569,7 +587,7 @@ if ($post_mode)
|
|||
));
|
||||
|
||||
$quote_btn = true;
|
||||
$edit_btn = $delpost_btn = $ip_btn = (IS_MOD || IS_ADMIN);
|
||||
$edit_btn = $delpost_btn = $ip_btn = (IS_AM);
|
||||
|
||||
// Topic posts block
|
||||
foreach ($topic_posts as $row_num => $post)
|
||||
|
@ -647,7 +665,21 @@ else
|
|||
if ($new_topics) $SQL['WHERE'][] = "t.topic_time > $lastvisit";
|
||||
if ($prev_days) $SQL['WHERE'][] = "$tbl.$time_field > ". $time_opt[$time_val]['sql'];
|
||||
if ($my_posts) $SQL['WHERE'][] = "p.poster_id = $poster_id_val";
|
||||
if ($my_posts && $user->id == $poster_id_val) $SQL['WHERE'][] = "p.user_post = 1";
|
||||
if ($my_posts && $user->id == $poster_id_val)
|
||||
{
|
||||
$SQL['WHERE'][] = "p.user_post = 1";
|
||||
|
||||
if($userdata['user_posts'])
|
||||
{
|
||||
$template->assign_var('BB_DIE_APPEND_MSG', '
|
||||
<form id="mod-action" method="POST" action="search.php">
|
||||
<input type="submit" name="add_my_post" value="'. $lang['RESTORE_ALL_POSTS'] .'" class="bold" onclick="if (!window.confirm( this.value +\'?\' )){ return false };" />
|
||||
</form>
|
||||
<br /><br />
|
||||
<a href="index.php">'. $lang['INDEX_RETURN'] .'</a>
|
||||
');
|
||||
}
|
||||
}
|
||||
if ($my_topics) $SQL['WHERE'][] = "t.topic_poster = $poster_id_val";
|
||||
|
||||
if ($text_match_sql)
|
||||
|
@ -779,13 +811,14 @@ if ($items_display)
|
|||
generate_pagination($url, $items_count, $per_page, $start);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'PAGE_TITLE' => $lang['SEARCH'],
|
||||
'PAGE_TITLE' => $lang['SEARCH'],
|
||||
|
||||
'SEARCH_MATCHES' => ($items_count) ? sprintf($lang['FOUND_SEARCH_MATCHES'], $items_count) : '',
|
||||
'DISPLAY_AS_POSTS' => $post_mode,
|
||||
|
||||
'DL_CONTROLS' => ($dl_search && $dl_user_id_val == $user_id),
|
||||
'DL_ACTION' => "dl_list.php",
|
||||
'DL_CONTROLS' => ($dl_search && $dl_user_id_val == $user_id),
|
||||
'DL_ACTION' => 'dl_list.php',
|
||||
'MY_POSTS' => ($my_posts && $user->id == $poster_id_val),
|
||||
));
|
||||
|
||||
print_page('search_results.tpl');
|
||||
|
@ -798,8 +831,7 @@ redirect(basename(__FILE__));
|
|||
//
|
||||
function fetch_search_ids ($sql, $search_type = SEARCH_TYPE_POST, $redirect_to_result = UA_IE)
|
||||
{
|
||||
global $lang, $search_id, $session_id;
|
||||
global $items_found, $per_page;
|
||||
global $lang, $search_id, $session_id, $items_found, $per_page;
|
||||
|
||||
$items_found = array();
|
||||
foreach (DB()->fetch_rowset($sql) as $row)
|
||||
|
|
|
@ -459,7 +459,7 @@
|
|||
<tr class="row3 med"><td colspan="2"></td></tr>
|
||||
<tr>
|
||||
<td>{L_SEED_BONUS_TOR_SIZE}</td>
|
||||
<td><input class="post" type="text" size="25" maxlength="100" name="seed_bonus_tor_size" value="{SEED_BONUS_TOR_SIZE}" /> GB</td>
|
||||
<td><input class="post" type="text" size="25" maxlength="100" name="seed_bonus_tor_size" value="{SEED_BONUS_TOR_SIZE}" /> {L_GB}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{L_SEED_BONUS_USER_REGDATA}</td>
|
||||
|
|
|
@ -36,7 +36,7 @@ function toggle_cat_list (val)
|
|||
</tr>
|
||||
<tr>
|
||||
<td class="row1">{L_FORUM_DESC}</td>
|
||||
<td class="row2"><textarea style="width: 96%;" rows="5" wrap="virtual" name="forumdesc" class="post">{DESCRIPTION}</textarea></td>
|
||||
<td class="row2"><textarea style="width: 96%;" rows="2" wrap="virtual" name="forumdesc" class="post">{DESCRIPTION}</textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1">{L_SF_PARENT_FORUM}</td>
|
||||
|
@ -47,27 +47,24 @@ function toggle_cat_list (val)
|
|||
<td class="row2"><select name="c">{S_CAT_LIST}</select></td>
|
||||
</tr>
|
||||
<tr id="show_on_index" class="{SHOW_ON_INDEX_CLASS}">
|
||||
<td class="row1">{L_SF_SHOW_ON_INDEX}</td>
|
||||
<td class="row2"><label for="show_on_index1"><input type="radio" name="show_on_index" id="show_on_index1" value="1" <!-- IF SHOW_ON_INDEX == 1 -->checked="checked"<!-- ENDIF --> /> {L_YES} </label><label for="show_on_index2"> <input type="radio" name="show_on_index" id="show_on_index2" value="0" <!-- IF SHOW_ON_INDEX == 0 -->checked="checked"<!-- ENDIF --> /> {L_NO} </label></td>
|
||||
<td class="row1">{L_SF_SHOW_ON_INDEX}</td>
|
||||
<td class="row2">
|
||||
<label><input type="radio" name="show_on_index" value="1" <!-- IF SHOW_ON_INDEX -->checked="checked"<!-- ENDIF --> />{L_YES}</label>
|
||||
<label><input type="radio" name="show_on_index" value="0" <!-- IF not SHOW_ON_INDEX -->checked="checked"<!-- ENDIF --> />{L_NO}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1">{L_FORUM_STATUS}</td>
|
||||
<td class="row2"><select name="forumstatus">{S_STATUS_LIST}</select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1">{L_FORUM_PRUNING}</td>
|
||||
<td class="row2">
|
||||
<table class="borderless">
|
||||
<tr>
|
||||
<td align="right">{L_ENABLED}</td>
|
||||
<td><input type="checkbox" name="prune_enable" value="1" {S_PRUNE_ENABLED} /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">{L_PRUNE_DAYS}</td>
|
||||
<td> <input type="text" name="prune_days" value="{PRUNE_DAYS}" size="5" class="post" /> {L_DAYS}</td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<td class="row1">{L_REG_TORRENTS}</td>
|
||||
<td class="row2">{ALLOW_REG_TRACKER} {L_SELF_MODERATED}: {SELF_MODERATED} {L_ALLOW_PORNO_TOPIC}: {ALLOW_PORNO_TOPIC}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1">{L_FORUM_PRUNING}</td>
|
||||
<td class="row2">{L_PRUNE_DAYS} <input type="text" name="prune_days" value="{PRUNE_DAYS}" size="4" class="post" /> {L_DAYS} <i class="med">(0 = {L_DISABLED})</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1">{L_SORT_BY}</td>
|
||||
<td class="row2">
|
||||
|
@ -76,7 +73,9 @@ function toggle_cat_list (val)
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="catBottom" colspan="2"><input type="submit" name="submit" value="{S_SUBMIT_VALUE}" class="mainoption" /></td>
|
||||
<td class="catBottom" colspan="2">
|
||||
<input type="submit" name="submit" value="{S_SUBMIT_VALUE}" class="mainoption" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
@ -202,7 +201,7 @@ function hl (id, on)
|
|||
<td class="small">{L_PRUNE}</td>
|
||||
</tr>
|
||||
<!-- BEGIN forumrow -->
|
||||
<tr class="row1" onmouseover="hl('fname_{catrow.forumrow.FORUM_ID}', 1);" onmouseout="hl('fname_{catrow.forumrow.FORUM_ID}', 0);">
|
||||
<tr class="row1 hl-tr" onmouseover="hl('fname_{catrow.forumrow.FORUM_ID}', 1);" onmouseout="hl('fname_{catrow.forumrow.FORUM_ID}', 0);">
|
||||
<td class="gen" align="center"><a class="gen" title="{L_MOVE_UP}" href="{catrow.forumrow.U_FORUM_MOVE_UP}"><b> ↑ </b></a><a class="gen" title="{L_MOVE_DOWN}" href="{catrow.forumrow.U_FORUM_MOVE_DOWN}"><b> ↓ </b></a></td>
|
||||
<td width="100%" {catrow.forumrow.SF_PAD}><a {catrow.forumrow.FORUM_DESC} class="{catrow.forumrow.FORUM_NAME_CLASS}" href="{catrow.forumrow.U_VIEWFORUM}" target="_new"><!-- IF catrow.forumrow.SHOW_ON_INDEX --><b><!-- ENDIF --><span id="fname_{catrow.forumrow.FORUM_ID}">{catrow.forumrow.FORUM_NAME}</span><!-- IF catrow.forumrow.SHOW_ON_INDEX --></b><!-- ENDIF --></a> <em class="med" style="color: grey">{L_TOPICS_SHORT}:</em> <span class="med">{catrow.forumrow.NUM_TOPICS}</span> <em class="med" style="color: grey">{L_POSTS_SHORT}:</em> <span class="med">{catrow.forumrow.NUM_POSTS}</span></td>
|
||||
<td class="med" align="center"><a class="med" href="{catrow.forumrow.U_FORUM_EDIT}"> {L_EDIT} </a></td>
|
||||
|
|
|
@ -594,6 +594,7 @@ a.selfMod, a.selfMod:visited { color: #0000FF; }
|
|||
|
||||
.view-message { border: 1px #A5AFB4 solid; padding: 4px; margin: 6px; overflow: auto; }
|
||||
.birthday { margin: 3px 0; padding: 2px 4px; max-height: 200px; overflow: auto;}
|
||||
td.topic_id { cursor: pointer; }
|
||||
|
||||
table.mod_ip { background: #F9F9F9; border: 1px solid #A5AFB4; border-collapse: separate;}
|
||||
table.mod_ip td { padding: 2px 5px; white-space: normal; font-size: 11px; }
|
||||
|
@ -851,7 +852,11 @@ fieldset.attach { width: 95%; margin: 14px auto; padding: 2px; clear: both; }
|
|||
* ---------------------------------- */
|
||||
a.tr-dl { font-weight: bold; }
|
||||
a.tr-dl:visited { color: #5493B4; font-weight: normal; }
|
||||
|
||||
.seed-leech { padding-left: 1px; padding-right: 0; }
|
||||
.tr_tm { margin-top: 2px; font-size: 10px; color: #676767; }
|
||||
.ch { font-style: italic; color: #0080FF; }
|
||||
#fs-sel-cat option.cat-title { font-weight: bold; color: #005A88; background: #F5F5F5; }
|
||||
tr.hl-tr:hover td { background-color: #F8F8F8 !important; }
|
||||
/* ================================================================ *
|
||||
Images
|
||||
* ================================================================ */
|
||||
|
|
|
@ -4,17 +4,16 @@
|
|||
|
||||
<div class="nav">
|
||||
<a href="{U_INDEX}">{T_INDEX}</a>
|
||||
<!-- IF not DL_CONTROLS -->
|
||||
<!-- IF MY_POSTS -->
|
||||
·
|
||||
<span id="show-edit-btn"><a href="#">Редактировать список</a></span>
|
||||
<span id="edit-sel-topics" style="display: none;"><a href="#" class="bold adm" onclick="$('input.topic-chbox').trigger('click'); return false;">отметить/инвертировать</a></span>
|
||||
<span id="show-edit-btn"><a href="#">{L_EDIT_MY_MESSAGE_LIST}</a></span>
|
||||
<span id="edit-sel-topics" style="display: none;"><a href="#" class="bold adm" onclick="$('input.topic-chbox').trigger('click'); return false;">{L_SELECT_INVERT}</a></span>
|
||||
<!-- ENDIF -->
|
||||
·
|
||||
<!-- IF LOGGED_IN --><a href="#" class="small normal" onclick="setCookie('{COOKIE_MARK}', 'all_forums'); window.location.reload(); return false;">{L_MARK_ALL_FORUMS_READ}</a><!-- ENDIF -->
|
||||
<!-- IF LOGGED_IN --><a href="#" class="med normal" onclick="setCookie('{COOKIE_MARK}', 'all_forums'); window.location.reload(); return false;">{L_MARK_ALL_FORUMS_READ}</a><!-- ENDIF -->
|
||||
</div>
|
||||
|
||||
<!-- IF DISPLAY_AS_POSTS -->
|
||||
|
||||
<table class="topic" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<th class="thHead td1">{L_AUTHOR}</th>
|
||||
|
@ -73,8 +72,8 @@
|
|||
<!-- ELSE / start of !DISPLAY_AS_POSTS -->
|
||||
|
||||
<!-- IF DL_CONTROLS -->
|
||||
<form method="post" action="{DL_ACTION}">
|
||||
<!-- ELSE -->
|
||||
<form method="POST" action="{DL_ACTION}">
|
||||
<!-- ELSEIF MY_POSTS -->
|
||||
<script type="text/javascript">
|
||||
ajax.in_edit_mode = false;
|
||||
|
||||
|
@ -127,14 +126,17 @@ function show_edit_options ()
|
|||
</script>
|
||||
|
||||
<div id="mod-action-content" style="display: none;">
|
||||
<form id="mod-action" method="post" action="search.php" target="_blank">
|
||||
<input type="submit" name="del_my_post" value="Удалить выбранные темы из списка" class="bold" onclick="if (!window.confirm( this.value +'?' )){ return false };" />
|
||||
<form id="mod-action" method="POST" action="{U_SEARCH}" target="_blank">
|
||||
<table class="borderless pad_0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td class="pad_4">
|
||||
<input type="submit" name="del_my_post" value="{L_DEL_LIST_MY_MESSAGE}" class="bold" onclick="if (!window.confirm( this.value +'?' )){ return false };" />
|
||||
</td>
|
||||
<td class="med" style="padding: 0 8px;">{L_DEL_LIST_MY_MESSAGE_INFO}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<style type="text/css">
|
||||
td.topic_id { cursor: pointer; }
|
||||
</style>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<table class="forumline forum">
|
||||
|
@ -186,23 +188,27 @@ td.topic_id { cursor: pointer; }
|
|||
</td>
|
||||
</tr>
|
||||
<!-- END t -->
|
||||
<!-- IF MY_POSTS -->
|
||||
<tr id="mod-action-row">
|
||||
<td colspan="6" id="mod-action-cell" class="row2">
|
||||
<!-- IF DL_CONTROLS -->
|
||||
<span id="ed-list-desc" class="small">{L_DEL_LIST_INFO}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
<tr>
|
||||
<td class="row2" colspan="6">
|
||||
<!-- IF DL_CONTROLS -->
|
||||
<input type="submit" name="dl_set_will" value="{L_DL_WILL}" class="liteoption" />
|
||||
<input type="submit" name="dl_set_down" value="{L_DL_DOWN}" class="liteoption" />
|
||||
<input type="submit" name="dl_set_complete" value="{L_DL_COMPLETE}" class="liteoption" />
|
||||
<input type="submit" name="dl_set_cancel" value="{L_DL_CANCEL}" class="liteoption" />
|
||||
<input type="hidden" name="redirect_type" value="search" />
|
||||
<input type="hidden" name="mode" value="set_topics_dl_status" />
|
||||
<!-- ELSE -->
|
||||
<span id="ed-list-desc" class="small">Для удаления тем из списка нажмите на иконку слева от названия любого раздела</span>
|
||||
<!-- ENDIF -->
|
||||
<!-- ELSE -->
|
||||
|
||||
<!-- ENDIF -->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row2" colspan="6"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- IF DL_CONTROLS -->
|
||||
|
|
|
@ -273,14 +273,6 @@ ajax.callback.view_post = function(data) {
|
|||
<!-- ENDIF / LOGGED_IN -->
|
||||
|
||||
<a name="results"></a>
|
||||
<style type="text/css">
|
||||
.seed-leech { padding-left: 1px; padding-right: 0; }
|
||||
.tr_tm { margin-top: 2px; font-size: 10px; color: #676767; }
|
||||
.ch { font-style: italic; color: #0080FF; }
|
||||
#fs-sel-cat option.cat-title { font-weight: bold; color: #005A88; background: #F5F5F5; }
|
||||
tr.hl-tr:hover td { background-color: #F8F8F8 !important; }
|
||||
</style>
|
||||
|
||||
<table class="forumline tablesorter" id="tor-tbl">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
|
@ -318,7 +318,7 @@ ajax.callback.gen_passkey = function(data){
|
|||
<b>{POSTS}</b>
|
||||
[ <a href="{U_SEARCH_USER}" class="med">{L_SEARCH_USER_POSTS}</a> ]
|
||||
[ <a href="{U_SEARCH_TOPICS}" class="med">{L_SEARCH_USER_TOPICS}</a> ]
|
||||
[ <a class="med" href={U_SEARCH_RELEASES}>{L_SEARCH_RELEASES}</a> ]
|
||||
[ <a class="med" href="{U_SEARCH_RELEASES}">{L_SEARCH_RELEASES}</a> ]
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue