mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
r580
Фиксы багов по запросам на форуме, большое спасибо всем запостившим найденное; удаление поиска пользователей с отключенными ЛС (после r600 будет универсальная обработка для поля bf в базе данных); фикс ошибки из-за которой не учитывались сообщения пользователя в счетчике его сообщений; пара фиксов предыдущих ревизий. git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@580 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
parent
0865fbbd29
commit
43b028988d
25 changed files with 193 additions and 246 deletions
|
@ -638,27 +638,27 @@ CREATE TABLE IF NOT EXISTS `bb_cron` (
|
|||
-- Дамп данных таблицы `bb_cron`
|
||||
--
|
||||
|
||||
INSERT INTO `bb_cron` VALUES ('', 0, 'Site backup', 'site_backup.php', 'daily', '1', '05:00:00', 10, '', '', NULL, 1, '', 0, 1, 0);
|
||||
INSERT INTO `bb_cron` VALUES ('', 0, 'DB backup', 'db_backup.php', 'daily', '1', '05:00:00', 20, '', '', NULL, 1, '', 0, 1, 0);
|
||||
INSERT INTO `bb_cron` VALUES ('', 1, 'Avatars cleanup', 'avatars_cleanup.php', 'weekly', '1', '05:00:00', 30, '', '', NULL, 1, '', 0, 1, 0);
|
||||
INSERT INTO `bb_cron` VALUES ('', 1, 'Board maintenance', 'bb_maintenance.php', 'daily', NULL, '05:00:00', 40, '', '', NULL, 1, '', 0, 1, 0);
|
||||
INSERT INTO `bb_cron` VALUES ('', 1, 'Prune forums', 'prune_forums.php', 'daily', NULL, '05:00:00', 50, '', '', NULL, 1, '', 0, 1, 0);
|
||||
INSERT INTO `bb_cron` VALUES ('', 1, 'Prune topic moved stubs', 'prune_topic_moved.php', 'daily', NULL, '05:00:00', 60, '', '', NULL, 1, '', 0, 1, 0);
|
||||
INSERT INTO `bb_cron` VALUES ('', 1, 'Logs cleanup', 'clean_log.php', 'daily', NULL, '05:00:00', 70, '', '', NULL, 1, '', 0, 1, 0);
|
||||
INSERT INTO `bb_cron` VALUES ('', 1, 'Tracker maintenance', 'tr_maintenance.php', 'daily', NULL, '05:00:00', 90, '', '', NULL, 1, '', 0, 1, 0);
|
||||
INSERT INTO `bb_cron` VALUES ('', 1, 'Clean dlstat', 'clean_dlstat.php', 'daily', NULL, '05:00:00', 100, '', '', NULL, 1, '', 0, 1, 0);
|
||||
INSERT INTO `bb_cron` VALUES ('', 1, 'Prune inactive users', 'prune_inactive_users.php', 'daily', NULL, '05:00:00', 110, '', '', NULL, 1, '', 0, 1, 0);
|
||||
INSERT INTO `bb_cron` VALUES ('', 1, 'Sessions cleanup', 'sessions_cleanup.php', 'interval', NULL, NULL, 255, '', '', '00:03:00', 0, '', 0, 0, 0);
|
||||
INSERT INTO `bb_cron` VALUES ('', 1, 'DS update ''cat_forums''', 'ds_update_cat_forums.php', 'interval', NULL, NULL, 255, '', '', '00:05:00', 0, '', 0, 0, 0);
|
||||
INSERT INTO `bb_cron` VALUES ('', 1, 'DS update ''stats''', 'ds_update_stats.php', 'interval', NULL, NULL, 255, '', '', '00:10:00', 0, '', 0, 0, 0);
|
||||
INSERT INTO `bb_cron` VALUES ('', 1, 'Flash topic view', 'flash_topic_view.php', 'interval', NULL, NULL, 255, '', '', '00:10:00', 0, '', 0, 0, 0);
|
||||
INSERT INTO `bb_cron` VALUES ('', 1, 'Clean search results', 'clean_search_results.php', 'interval', NULL, NULL, 255, '', '', '00:10:00', 0, '', 0, 0, 0);
|
||||
INSERT INTO `bb_cron` VALUES ('', 1, 'Tracker cleanup and dlstat', 'tr_cleanup_and_dlstat.php', 'interval', NULL, NULL, 20, '', '', '00:15:00', 0, '', 0, 0, 0);
|
||||
INSERT INTO `bb_cron` VALUES ('', 1, 'Make tracker snapshot', 'tr_make_snapshot.php', 'interval', NULL, NULL, 10, '', '', '00:10:00', 0, '', 0, 0, 0);
|
||||
INSERT INTO `bb_cron` VALUES ('', 1, 'Seeder last seen', 'tr_update_seeder_last_seen.php', 'interval', NULL, NULL, 255, '', '', '01:00:00', 0, '', 0, 0, 0);
|
||||
INSERT INTO `bb_cron` VALUES ('', 1, 'Captcha', 'captcha_gen_gc.php', 'daily', NULL, '05:00:00', 120, '', '', NULL, 0, '', 0, 0, 0);
|
||||
INSERT INTO `bb_cron` VALUES ('', 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 ('', 1, 'Cache garbage collector', 'cache_gc.php', 'interval', NULL, NULL, 255, '', '', '00:05:00', 0, '', 0, 0, 0);
|
||||
INSERT INTO `bb_cron` VALUES (1, 0, 'Site backup', 'site_backup.php', 'daily', '1', '05:00:00', 10, '', '', NULL, 1, '', 0, 1, 0);
|
||||
INSERT INTO `bb_cron` VALUES (2, 0, 'DB backup', 'db_backup.php', 'daily', '1', '05:00:00', 20, '', '', NULL, 1, '', 0, 1, 0);
|
||||
INSERT INTO `bb_cron` VALUES (3, 1, 'Avatars cleanup', 'avatars_cleanup.php', 'weekly', '1', '05:00:00', 30, '', '', NULL, 1, '', 0, 1, 0);
|
||||
INSERT INTO `bb_cron` VALUES (4, 1, 'Board maintenance', 'bb_maintenance.php', 'daily', NULL, '05:00:00', 40, '', '', NULL, 1, '', 0, 1, 0);
|
||||
INSERT INTO `bb_cron` VALUES (5, 1, 'Prune forums', 'prune_forums.php', 'daily', NULL, '05:00:00', 50, '', '', NULL, 1, '', 0, 1, 0);
|
||||
INSERT INTO `bb_cron` VALUES (6, 1, 'Prune topic moved stubs', 'prune_topic_moved.php', 'daily', NULL, '05:00:00', 60, '', '', NULL, 1, '', 0, 1, 0);
|
||||
INSERT INTO `bb_cron` VALUES (7, 1, 'Logs cleanup', 'clean_log.php', 'daily', NULL, '05:00:00', 70, '', '', NULL, 1, '', 0, 1, 0);
|
||||
INSERT INTO `bb_cron` VALUES (8, 1, 'Tracker maintenance', 'tr_maintenance.php', 'daily', NULL, '05:00:00', 90, '', '', NULL, 1, '', 0, 1, 0);
|
||||
INSERT INTO `bb_cron` VALUES (9, 1, 'Clean dlstat', 'clean_dlstat.php', 'daily', NULL, '05:00:00', 100, '', '', NULL, 1, '', 0, 1, 0);
|
||||
INSERT INTO `bb_cron` VALUES (10, 1, 'Prune inactive users', 'prune_inactive_users.php', 'daily', NULL, '05:00:00', 110, '', '', NULL, 1, '', 0, 1, 0);
|
||||
INSERT INTO `bb_cron` VALUES (11, 1, 'Sessions cleanup', 'sessions_cleanup.php', 'interval', NULL, NULL, 255, '', '', '00:03:00', 0, '', 0, 0, 0);
|
||||
INSERT INTO `bb_cron` VALUES (12, 1, 'DS update ''cat_forums''', 'ds_update_cat_forums.php', 'interval', NULL, NULL, 255, '', '', '00:05:00', 0, '', 0, 0, 0);
|
||||
INSERT INTO `bb_cron` VALUES (13, 1, 'DS update ''stats''', 'ds_update_stats.php', 'interval', NULL, NULL, 255, '', '', '00:10:00', 0, '', 0, 0, 0);
|
||||
INSERT INTO `bb_cron` VALUES (14, 1, 'Flash topic view', 'flash_topic_view.php', 'interval', NULL, NULL, 255, '', '', '00:10:00', 0, '', 0, 0, 0);
|
||||
INSERT INTO `bb_cron` VALUES (15, 1, 'Clean search results', 'clean_search_results.php', 'interval', NULL, NULL, 255, '', '', '00:10:00', 0, '', 0, 0, 0);
|
||||
INSERT INTO `bb_cron` VALUES (16, 1, 'Tracker cleanup and dlstat', 'tr_cleanup_and_dlstat.php', 'interval', NULL, NULL, 20, '', '', '00:15:00', 0, '', 0, 0, 0);
|
||||
INSERT INTO `bb_cron` VALUES (17, 1, 'Make tracker snapshot', 'tr_make_snapshot.php', 'interval', NULL, NULL, 10, '', '', '00:10:00', 0, '', 0, 0, 0);
|
||||
INSERT INTO `bb_cron` VALUES (18, 1, 'Seeder last seen', 'tr_update_seeder_last_seen.php', 'interval', NULL, NULL, 255, '', '', '01:00:00', 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 (21, 1, 'Cache garbage collector', 'cache_gc.php', 'interval', NULL, NULL, 255, '', '', '00:05:00', 0, '', 0, 0, 0);
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
|
|
@ -13,6 +13,26 @@ $confirm = request_var('confirm', '');
|
|||
|
||||
if ($confirm)
|
||||
{
|
||||
DB()->query("
|
||||
CREATE TABLE IF NOT EXISTS `bb_poll_users` (
|
||||
`topic_id` int(10) unsigned NOT NULL,
|
||||
`user_id` int(11) NOT NULL,
|
||||
`vote_ip` varchar(32) NOT NULL,
|
||||
`vote_dt` int(11) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`topic_id`,`user_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8
|
||||
");
|
||||
|
||||
DB()->query("
|
||||
CREATE TABLE IF NOT EXISTS `bb_poll_votes` (
|
||||
`topic_id` int(10) unsigned NOT NULL,
|
||||
`vote_id` tinyint(4) unsigned NOT NULL,
|
||||
`vote_text` varchar(255) NOT NULL,
|
||||
`vote_result` mediumint(8) unsigned NOT NULL,
|
||||
PRIMARY KEY (`topic_id`,`vote_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8
|
||||
");
|
||||
|
||||
DB()->query("
|
||||
INSERT INTO bb_poll_votes
|
||||
(topic_id, vote_id, vote_text, vote_result)
|
||||
|
|
|
@ -88,10 +88,7 @@ if ($submit && $mode == 'extensions')
|
|||
$extensions['_' . $extension_change_list[$i]]['group_id'] = intval($group_select_list[$i]);
|
||||
}
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM ' . BB_EXTENSIONS . '
|
||||
ORDER BY ext_id';
|
||||
|
||||
$sql = 'SELECT * FROM ' . BB_EXTENSIONS . ' ORDER BY ext_id';
|
||||
if ( !($result = DB()->sql_query($sql)) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, 'Couldn\'t get Extension Informations.', '', __LINE__, __FILE__, $sql);
|
||||
|
@ -153,7 +150,7 @@ if ($submit && $mode == 'extensions')
|
|||
'ADD_EXTENSION_EXPLAIN' => $extension_explain)
|
||||
);
|
||||
|
||||
if (!$error)
|
||||
if (!@$error)
|
||||
{
|
||||
// check extension
|
||||
$sql = 'SELECT extension
|
||||
|
@ -184,7 +181,7 @@ if ($submit && $mode == 'extensions')
|
|||
}
|
||||
}
|
||||
|
||||
if (!$error)
|
||||
if (!@$error)
|
||||
{
|
||||
$sql_ary = array(
|
||||
'group_id' => (int) $extension_group,
|
||||
|
@ -394,7 +391,7 @@ if ($submit && $mode == 'groups')
|
|||
}
|
||||
}
|
||||
|
||||
if (!$error)
|
||||
if (!@$error)
|
||||
{
|
||||
$filesize = ($size_select == 'kb') ? round($filesize * 1024) : ( ($size_select == 'mb') ? round($filesize * 1048576) : $filesize );
|
||||
|
||||
|
|
|
@ -19,20 +19,20 @@ $errors = $user_id_sql = array();
|
|||
|
||||
if (isset($_POST['submit']))
|
||||
{
|
||||
if(!$subject) $errors[] = $lang['EMPTY_SUBJECT'];
|
||||
if(!$message) $errors[] = $lang['EMPTY_MESSAGE'];
|
||||
if(!$group_id) $errors[] = $lang['GROUP_NOT_EXIST'];
|
||||
|
||||
if(!$errors)
|
||||
if (!$subject) $errors[] = $lang['EMPTY_SUBJECT'];
|
||||
if (!$message) $errors[] = $lang['EMPTY_MESSAGE'];
|
||||
if (!$group_id) $errors[] = $lang['GROUP_NOT_EXIST'];
|
||||
|
||||
if (!$errors)
|
||||
{
|
||||
$sql = DB()->fetch_rowset("SELECT ban_userid FROM ". BB_BANLIST ." WHERE ban_userid != 0");
|
||||
|
||||
|
||||
foreach ($sql as $row)
|
||||
{
|
||||
$user_id_sql[] = ','. $row['ban_userid'];
|
||||
}
|
||||
$user_id_sql = join('', $user_id_sql);
|
||||
|
||||
|
||||
if ($group_id != -1)
|
||||
{
|
||||
$user_list = DB()->fetch_rowset("
|
||||
|
@ -54,9 +54,9 @@ if (isset($_POST['submit']))
|
|||
AND user_id NOT IN(". EXCLUDED_USERS_CSV . $user_id_sql .")
|
||||
");
|
||||
}
|
||||
|
||||
|
||||
require(INC_DIR .'emailer.class.php');
|
||||
|
||||
|
||||
foreach ($user_list as $i => $row)
|
||||
{
|
||||
$emailer = new emailer($bb_cfg['smtp_delivery']);
|
||||
|
@ -76,11 +76,9 @@ if (isset($_POST['submit']))
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Generate page
|
||||
//
|
||||
|
||||
$sql = "SELECT group_id, group_name
|
||||
FROM ". BB_GROUPS ."
|
||||
WHERE group_single_user = 0
|
||||
|
@ -93,7 +91,6 @@ foreach (DB()->fetch_rowset($sql) as $row)
|
|||
$groups[$row['group_name']] = $row['group_id'];
|
||||
}
|
||||
|
||||
|
||||
$template->assign_vars(array(
|
||||
'MESSAGE' => $message,
|
||||
'SUBJECT' => $subject,
|
||||
|
@ -104,4 +101,4 @@ $template->assign_vars(array(
|
|||
'S_GROUP_SELECT' => build_select(POST_GROUPS_URL, $groups),
|
||||
));
|
||||
|
||||
print_page('admin_mass_email.tpl', 'admin');
|
||||
print_page('admin_mass_email.tpl', 'admin');
|
|
@ -83,7 +83,7 @@ elseif ($mode == 'add' || $mode == 'edit')
|
|||
{
|
||||
DB()->query("INSERT INTO ". BB_TOPIC_TPL_OLD ." (tpl_name, tpl_script, tpl_template, tpl_desc)
|
||||
VALUES ('". DB()->escape($tpl_name) ."', '". DB()->escape($tpl_script) ."', '". DB()->escape($tpl_template) ."', '". DB()->escape($tpl_desc) ."')");
|
||||
$message = $lang['ADEDD'];
|
||||
$message = $lang['ADDED'];
|
||||
}
|
||||
|
||||
bb_die($message);
|
||||
|
|
|
@ -1118,18 +1118,6 @@ else
|
|||
$select_sql .= " WHERE u.user_active = 0
|
||||
AND u.user_id <> ".GUEST_UID;
|
||||
|
||||
break;
|
||||
case 'disabled_pms':
|
||||
$text = $lang['SEARCH_FOR_DISABLED_PMS'];
|
||||
|
||||
$total_sql .= "SELECT COUNT(user_id) AS total
|
||||
FROM ".BB_USERS."
|
||||
WHERE user_allow_pm = 0
|
||||
AND user_id <> ".GUEST_UID;
|
||||
|
||||
$select_sql .= " WHERE u.user_allow_pm = 0
|
||||
AND u.user_id <> ".GUEST_UID;
|
||||
|
||||
break;
|
||||
default:
|
||||
message_die(GENERAL_MESSAGE, $lang['SEARCH_INVALID']);
|
||||
|
|
|
@ -16,7 +16,7 @@ if (file_exists(BB_DISABLED))
|
|||
}
|
||||
|
||||
// Load actions required modules
|
||||
switch ($ajax->action)
|
||||
switch ($ajax->action)
|
||||
{
|
||||
case 'view_post':
|
||||
require(INC_DIR . 'bbcode.php');
|
||||
|
@ -120,17 +120,17 @@ class ajax_common
|
|||
// Check that requested action is valid
|
||||
$action = $this->action;
|
||||
|
||||
if (!$action || !is_string($action))
|
||||
if (!$action || !is_string($action))
|
||||
{
|
||||
$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);
|
||||
}
|
||||
|
||||
// Auth check
|
||||
switch ($action_params[AJAX_AUTH])
|
||||
switch ($action_params[AJAX_AUTH])
|
||||
{
|
||||
// GUEST
|
||||
case 'guest':
|
||||
|
@ -138,7 +138,7 @@ class ajax_common
|
|||
|
||||
// USER
|
||||
case 'user':
|
||||
if (IS_GUEST)
|
||||
if (IS_GUEST)
|
||||
{
|
||||
$this->ajax_die($lang['NEED_TO_LOGIN_FIRST']);
|
||||
}
|
||||
|
@ -146,7 +146,7 @@ class ajax_common
|
|||
|
||||
// MOD
|
||||
case 'mod':
|
||||
if (!IS_AM)
|
||||
if (!IS_AM)
|
||||
{
|
||||
$this->ajax_die($lang['ONLY_FOR_MOD']);
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ class ajax_common
|
|||
|
||||
// ADMIN
|
||||
case 'admin':
|
||||
if (!IS_ADMIN)
|
||||
if (!IS_ADMIN)
|
||||
{
|
||||
$this->ajax_die($lang['ONLY_FOR_ADMIN']);
|
||||
}
|
||||
|
@ -164,7 +164,7 @@ class ajax_common
|
|||
|
||||
// SUPER_ADMIN
|
||||
case 'super_admin':
|
||||
if (!IS_SUPER_ADMIN)
|
||||
if (!IS_SUPER_ADMIN)
|
||||
{
|
||||
$this->ajax_die($lang['ONLY_FOR_SUPER_ADMIN']);
|
||||
}
|
||||
|
@ -209,7 +209,7 @@ class ajax_common
|
|||
{
|
||||
$this->response['action'] = $this->action;
|
||||
|
||||
if (DBG_USER && SQL_DEBUG && !empty($_COOKIE['sql_log']))
|
||||
if (DBG_USER && SQL_DEBUG && !empty($_COOKIE['sql_log']))
|
||||
{
|
||||
$this->response['sql_log'] = get_sql_log();
|
||||
}
|
||||
|
@ -223,9 +223,9 @@ class ajax_common
|
|||
*/
|
||||
function ob_handler($contents)
|
||||
{
|
||||
if (DBG_USER)
|
||||
if (DBG_USER)
|
||||
{
|
||||
if ($contents)
|
||||
if ($contents)
|
||||
{
|
||||
$this->response['raw_output'] = $contents;
|
||||
}
|
||||
|
@ -233,9 +233,9 @@ class ajax_common
|
|||
|
||||
$response_js = bb_json_encode($this->response);
|
||||
|
||||
if (GZIP_OUTPUT_ALLOWED && !defined('NO_GZIP'))
|
||||
if (GZIP_OUTPUT_ALLOWED && !defined('NO_GZIP'))
|
||||
{
|
||||
if (UA_GZIP_SUPPORTED && strlen($response_js) > 2000)
|
||||
if (UA_GZIP_SUPPORTED && strlen($response_js) > 2000)
|
||||
{
|
||||
header('Content-Encoding: gzip');
|
||||
$response_js = gzencode($response_js, 1);
|
||||
|
@ -252,19 +252,19 @@ class ajax_common
|
|||
{
|
||||
global $user;
|
||||
|
||||
if (!$user->data['session_admin'])
|
||||
if (!$user->data['session_admin'])
|
||||
{
|
||||
if (empty($this->request['user_password']))
|
||||
if (empty($this->request['user_password']))
|
||||
{
|
||||
$this->prompt_for_password();
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
$login_args = array(
|
||||
'login_username' => $user->data['username'],
|
||||
'login_password' => $_POST['user_password'],
|
||||
);
|
||||
if (!$user->login($login_args, true))
|
||||
if (!$user->login($login_args, true))
|
||||
{
|
||||
$this->ajax_die('Wrong password');
|
||||
}
|
||||
|
@ -302,7 +302,7 @@ class ajax_common
|
|||
|
||||
$is_auth = auth(AUTH_MOD, $forum_id, $userdata);
|
||||
|
||||
if (!$is_auth['auth_mod'])
|
||||
if (!$is_auth['auth_mod'])
|
||||
{
|
||||
$this->ajax_die($lang['ONLY_FOR_MOD']);
|
||||
}
|
||||
|
|
|
@ -138,7 +138,7 @@ switch($this->request['type'])
|
|||
$this->ajax_die(sprintf($lang['MAX_SMILIES_PER_POST'], $bb_cfg['max_smilies']));
|
||||
}
|
||||
}
|
||||
DB()->query("UPDATE ". BB_POSTS_TEXT ." SET post_text = '". DB()->escape($text) ."' WHERE post_id = $post_id");
|
||||
DB()->query("UPDATE ". BB_POSTS_TEXT ." SET post_text = '". DB()->escape($text) ."' WHERE post_id = $post_id LIMIT 1");
|
||||
if ($post['topic_last_post_id'] != $post['post_id'] && $userdata['user_id'] == $post['poster_id'])
|
||||
{
|
||||
DB()->query("UPDATE ". BB_POSTS ." SET post_edit_time = '". TIMENOW ."', post_edit_count = post_edit_count + 1 WHERE post_id = $post_id LIMIT 1");
|
||||
|
@ -298,14 +298,14 @@ switch($this->request['type'])
|
|||
'post_id' => $post_id,
|
||||
'post_text' => $message,
|
||||
));
|
||||
|
||||
|
||||
if ($bb_cfg['topic_notify_enabled'])
|
||||
{
|
||||
$notify = !empty($this->request['notify']);
|
||||
user_notification('reply', $post, $post['topic_title'], $post['forum_id'], $topic_id, $notify);
|
||||
}
|
||||
|
||||
$this->response['redirect'] = make_url(POST_URL ."$post_id#$post_id");
|
||||
|
||||
$this->response['redirect'] = make_url(POST_URL . "$post_id#$post_id");
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -54,9 +54,9 @@ $domain_name = 'torrentpier.me'; // Enter here your primary d
|
|||
$domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $domain_name;
|
||||
|
||||
// Increase number of revision after update
|
||||
$bb_cfg['tp_version'] = '2.5 (unstable)';
|
||||
$bb_cfg['tp_version'] = '2.6 (unstable)';
|
||||
$bb_cfg['tp_release_date'] = '02-02-2014';
|
||||
$bb_cfg['tp_release_state'] = 'R579';
|
||||
$bb_cfg['tp_release_state'] = 'R580';
|
||||
|
||||
// Database
|
||||
$charset = 'utf8';
|
||||
|
|
|
@ -248,15 +248,16 @@ else if (@$_POST['joingroup'])
|
|||
|
||||
$emailer->from($bb_cfg['sitename'] ." <{$bb_cfg['board_email']}>");
|
||||
$emailer->email_address($moderator['username'] ." <{$moderator['user_email']}>");
|
||||
|
||||
|
||||
$emailer->use_template('group_request', $moderator['user_lang']);
|
||||
|
||||
|
||||
$emailer->assign_vars(array(
|
||||
'USER' => $userdata['username'],
|
||||
'SITENAME' => $bb_cfg['sitename'],
|
||||
'GROUP_MODERATOR' => $moderator['username'],
|
||||
'U_GROUPCP' => make_url(GROUP_URL . $group_id),
|
||||
));
|
||||
|
||||
$emailer->send();
|
||||
$emailer->reset();
|
||||
}
|
||||
|
@ -305,15 +306,15 @@ else
|
|||
|
||||
$emailer->from($bb_cfg['sitename'] ." <{$bb_cfg['board_email']}>");
|
||||
$emailer->email_address($row['username'] ." <{$row['user_email']}>");
|
||||
|
||||
|
||||
$emailer->use_template('group_added', $row['user_lang']);
|
||||
|
||||
|
||||
$emailer->assign_vars(array(
|
||||
'SITENAME' => $bb_cfg['sitename'],
|
||||
'GROUP_NAME' => $group_info['group_name'],
|
||||
'U_GROUPCP' => make_url(GROUP_URL . $group_id),
|
||||
));
|
||||
|
||||
|
||||
$emailer->send();
|
||||
$emailer->reset();
|
||||
}
|
||||
|
@ -380,13 +381,13 @@ else
|
|||
$emailer->use_template('group_approved', $row['user_lang']);
|
||||
$emailer->email_address($row['username'] ." <{$row['user_email']}>");
|
||||
}
|
||||
|
||||
|
||||
$emailer->assign_vars(array(
|
||||
'SITENAME' => $bb_cfg['sitename'],
|
||||
'GROUP_NAME' => $group_info['group_name'],
|
||||
'U_GROUPCP' => make_url(GROUP_URL . $group_id),
|
||||
));
|
||||
|
||||
|
||||
$emailer->send();
|
||||
$emailer->reset();
|
||||
}
|
||||
|
@ -402,7 +403,7 @@ else
|
|||
WHERE user_id = ". $group_info['group_moderator'] ."
|
||||
");
|
||||
|
||||
// Members
|
||||
// Members
|
||||
$count_members = DB()->fetch_rowset("
|
||||
SELECT u.username, u.user_rank, u.user_id, u.user_opt, u.user_posts, u.user_regdate, u.user_from, u.user_website, u.user_email, ug.user_pending, ug.user_time
|
||||
FROM ". BB_USER_GROUP ." ug, ". BB_USERS ." u
|
||||
|
@ -412,7 +413,7 @@ else
|
|||
AND u.user_id = ug.user_id
|
||||
ORDER BY u.username
|
||||
");
|
||||
$count_members = count($count_members);
|
||||
$count_members = count($count_members);
|
||||
|
||||
// Get user information for this group
|
||||
$modgroup_pending_count = 0;
|
||||
|
@ -514,16 +515,16 @@ else
|
|||
|
||||
generate_user_info($group_moderator, $bb_cfg['default_dateformat'], $is_moderator, $from, $posts, $joined, $pm, $email, $www, $user_time);
|
||||
|
||||
$group_type = '';
|
||||
if($group_info['group_type'] == GROUP_OPEN)
|
||||
{
|
||||
$group_type = $lang['GROUP_OPEN'];
|
||||
}
|
||||
elseif($group_info['group_type'] == GROUP_CLOSED)
|
||||
$group_type = '';
|
||||
if ($group_info['group_type'] == GROUP_OPEN)
|
||||
{
|
||||
$group_type = $lang['GROUP_OPEN'];
|
||||
}
|
||||
elseif ($group_info['group_type'] == GROUP_CLOSED)
|
||||
{
|
||||
$group_type = $lang['GROUP_CLOSED'];
|
||||
}
|
||||
elseif($group_info['group_type'] == GROUP_HIDDEN)
|
||||
elseif ($group_info['group_type'] == GROUP_HIDDEN)
|
||||
{
|
||||
$group_type = $lang['GROUP_HIDDEN'];
|
||||
}
|
||||
|
@ -546,7 +547,7 @@ else
|
|||
'MOD_WWW' => $www,
|
||||
'MOD_TIME' => ( !empty($group_info['group_time']) ) ? bb_date($group_info['group_time']) : $lang['NONE'],
|
||||
'U_SEARCH_USER' => "search.php?mode=searchuser",
|
||||
'GROUP_TYPE' => $group_type,
|
||||
'GROUP_TYPE' => $group_type,
|
||||
'S_GROUP_OPEN_TYPE' => GROUP_OPEN,
|
||||
'S_GROUP_CLOSED_TYPE' => GROUP_CLOSED,
|
||||
'S_GROUP_HIDDEN_TYPE' => GROUP_HIDDEN,
|
||||
|
|
|
@ -272,9 +272,7 @@ function update_post_stats($mode, $post_data, $forum_id, $topic_id, $post_id, $u
|
|||
}
|
||||
else if ($post_data['first_post'])
|
||||
{
|
||||
$sql = "SELECT MIN(post_id) AS first_post_id
|
||||
FROM " . BB_POSTS . "
|
||||
WHERE topic_id = $topic_id";
|
||||
$sql = "SELECT MIN(post_id) AS first_post_id FROM " . BB_POSTS . " WHERE topic_id = $topic_id";
|
||||
if (!($result = DB()->sql_query($sql)))
|
||||
{
|
||||
message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql);
|
||||
|
@ -290,7 +288,7 @@ function update_post_stats($mode, $post_data, $forum_id, $topic_id, $post_id, $u
|
|||
$topic_update_sql .= 'topic_replies = topic_replies - 1';
|
||||
}
|
||||
}
|
||||
else if ($mode != 'poll_delete')
|
||||
else
|
||||
{
|
||||
$forum_update_sql .= ", forum_last_post_id = $post_id" . (($mode == 'newtopic') ? ", forum_topics = forum_topics $sign" : "");
|
||||
$topic_update_sql = "topic_last_post_id = $post_id, topic_last_post_time = ". TIMENOW . (($mode == 'reply') ? ", topic_replies = topic_replies $sign" : ", topic_first_post_id = $post_id");
|
||||
|
@ -304,14 +302,18 @@ function update_post_stats($mode, $post_data, $forum_id, $topic_id, $post_id, $u
|
|||
|
||||
if ($topic_update_sql != '')
|
||||
{
|
||||
$sql = "UPDATE " . BB_TOPICS . " SET
|
||||
$topic_update_sql
|
||||
WHERE topic_id = $topic_id";
|
||||
$sql = "UPDATE " . BB_TOPICS . " SET $topic_update_sql WHERE topic_id = $topic_id";
|
||||
if (!DB()->sql_query($sql))
|
||||
{
|
||||
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
}
|
||||
|
||||
$sql = "UPDATE " . BB_USERS . " SET user_posts = user_posts $sign WHERE user_id = $user_id";
|
||||
if (!DB()->sql_query($sql))
|
||||
{
|
||||
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -365,18 +367,18 @@ function user_notification($mode, &$post_data, &$topic_title, &$forum_id, &$topi
|
|||
{
|
||||
require(INC_DIR .'emailer.class.php');
|
||||
$emailer = new emailer($bb_cfg['smtp_delivery']);
|
||||
|
||||
|
||||
$orig_word = $replacement_word = array();
|
||||
obtain_word_list($orig_word, $replacement_word);
|
||||
|
||||
|
||||
if (count($orig_word))
|
||||
{
|
||||
$topic_title = preg_replace($orig_word, $replacement_word, $topic_title);
|
||||
}
|
||||
|
||||
|
||||
$u_topic = make_url(TOPIC_URL . $topic_id .'&view=newest#newest');
|
||||
$unwatch_topic = make_url(TOPIC_URL ."$topic_id&unwatch=topic");
|
||||
|
||||
|
||||
foreach ($watch_list as $row)
|
||||
{
|
||||
$emailer->from($bb_cfg['sitename'] ." <{$bb_cfg['board_email']}>");
|
||||
|
@ -393,7 +395,7 @@ function user_notification($mode, &$post_data, &$topic_title, &$forum_id, &$topi
|
|||
|
||||
$emailer->send();
|
||||
$emailer->reset();
|
||||
|
||||
|
||||
$update_watched_sql[] = $row['user_id'];
|
||||
}
|
||||
$update_watched_sql = join(',', $update_watched_sql);
|
||||
|
|
|
@ -496,7 +496,7 @@ function report_notify($mode)
|
|||
|
||||
require(INC_DIR .'emailer.class.php');
|
||||
$emailer = new emailer($bb_cfg['smtp_delivery']);
|
||||
|
||||
|
||||
$emailer->from($bb_cfg['sitename'] ." <{$bb_cfg['board_email']}>");
|
||||
|
||||
// Send emails
|
||||
|
|
|
@ -52,7 +52,7 @@ if ( $row = DB()->sql_fetchrow($result) )
|
|||
|
||||
$emailer->from($bb_cfg['sitename'] ." <{$bb_cfg['board_email']}>");
|
||||
$emailer->email_address($row['username'] ." <{$row['user_email']}>");
|
||||
|
||||
|
||||
$emailer->use_template('admin_welcome_activated', $row['user_lang']);
|
||||
|
||||
$emailer->assign_vars(array(
|
||||
|
|
|
@ -30,7 +30,7 @@ $sql = "SELECT username, user_id, user_rank, user_email, user_lang
|
|||
FROM " . BB_USERS . "
|
||||
WHERE user_id = $user_id
|
||||
";
|
||||
|
||||
|
||||
if ($row = DB()->fetch_row($sql))
|
||||
{
|
||||
$username = $row['username'];
|
||||
|
@ -54,7 +54,7 @@ if ($row = DB()->fetch_row($sql))
|
|||
|
||||
$emailer->from($userdata['username'] ." <{$userdata['user_email']}>");
|
||||
$emailer->email_address($username ." <$user_email>");
|
||||
|
||||
|
||||
$emailer->use_template('profile_send_email', $user_lang);
|
||||
$emailer->set_subject($subject);
|
||||
|
||||
|
|
|
@ -905,7 +905,7 @@ if ($submit && !$errors)
|
|||
|
||||
$sql_args = DB()->build_array('UPDATE', $db_data);
|
||||
|
||||
DB()->query("UPDATE ". BB_USERS ." SET $sql_args WHERE user_id = {$pr_data['user_id']}");
|
||||
DB()->query("UPDATE ". BB_USERS ." SET $sql_args WHERE user_id = {$pr_data['user_id']} LIMIT 1");
|
||||
|
||||
if ($pr_data['user_id'] != $userdata['user_id'])
|
||||
{
|
||||
|
|
|
@ -47,7 +47,7 @@ if ( isset($_POST['submit']) )
|
|||
|
||||
$emailer->from($bb_cfg['sitename'] ." <{$bb_cfg['board_email']}>");
|
||||
$emailer->email_address("$username <{$row['user_email']}>");
|
||||
|
||||
|
||||
$emailer->use_template('user_activate_passwd', $row['user_lang']);
|
||||
|
||||
$emailer->assign_vars(array(
|
||||
|
|
|
@ -2703,8 +2703,7 @@ $lang['LIST_OF_PATTERNS'] = 'List of patterns';
|
|||
$lang['ADD_TEMPLATE'] = 'Add the template';
|
||||
$lang['TEMPLATE_DISABLE'] = 'Template disabled';
|
||||
$lang['FOR_NEW_TEMPLATE'] = 'for new patterns!';
|
||||
$lang['ADEDD'] = 'added';
|
||||
$lang['CHANGED'] = 'changed';
|
||||
$lang['CHANGED'] = 'Changed';
|
||||
$lang['REMOVED'] = 'Removed';
|
||||
$lang['QUESTION'] = 'Are you sure want to delete?';
|
||||
$lang['NOT_CHOOSE'] = 'you do not choose';
|
||||
|
@ -3138,7 +3137,6 @@ $lang['SEARCH_FOR_BANNED'] = 'Searching banned users';
|
|||
$lang['SEARCH_FOR_ADMINS'] = 'Searching Administrators';
|
||||
$lang['SEARCH_FOR_MODS'] = 'Searching Moderators';
|
||||
$lang['SEARCH_FOR_DISABLED'] = 'Searching for disabled users';
|
||||
$lang['SEARCH_FOR_DISABLED_PMS'] = 'Searching for users with disabled Private Messages';
|
||||
$lang['SEARCH_FOR_POSTCOUNT_GREATER'] = 'Searching for users with a post count greater than %d';
|
||||
$lang['SEARCH_FOR_POSTCOUNT_LESSER'] = 'Searching for users with a post count less than %d';
|
||||
$lang['SEARCH_FOR_POSTCOUNT_RANGE'] = 'Searching for users with a post count between %d and %d';
|
||||
|
@ -3171,7 +3169,6 @@ $lang['SEARCH_USERS_GROUPS_EXPLAIN'] = 'View all members of the selected group.'
|
|||
$lang['SEARCH_USERS_RANKS_EXPLAIN'] = 'View all carriers of the selected rank.';
|
||||
$lang['BANNED_USERS'] = 'Banned Users';
|
||||
$lang['DISABLED_USERS'] = 'Disabled Users';
|
||||
$lang['USERS_DISABLED_PMS'] = 'Users with disabled PMs';
|
||||
$lang['SEARCH_USERS_MISC_EXPLAIN'] = 'Administrators - All users with Administrator powers; Moderators - All forum moderators; Banned Users - All accounts that have been banned on these forums; Disabled Users - All users with disabled accounts (either manually disabled or never verified their email address); Users with disabled PMs - Selects users who have the Private Messages priviliges removed (Done via User Management)';
|
||||
$lang['POSTCOUNT'] = 'Postcount';
|
||||
$lang['EQUALS'] = 'Equals';
|
||||
|
|
|
@ -2718,8 +2718,7 @@ $lang['LIST_OF_PATTERNS'] = 'Список шаблонов';
|
|||
$lang['ADD_TEMPLATE'] = 'Добавить шаблон';
|
||||
$lang['TEMPLATE_DISABLE'] = 'Шаблон отключен';
|
||||
$lang['FOR_NEW_TEMPLATE'] = 'для новых шаблонов!';
|
||||
$lang['ADEDD_TPL'] = 'добавлено';
|
||||
$lang['CHANGED'] = 'изменено';
|
||||
$lang['CHANGED'] = 'Изменено';
|
||||
$lang['REMOVED'] = 'Удалено';
|
||||
$lang['QUESTION'] = 'Вы уверены, что хотите удалить?';
|
||||
$lang['NOT_CHOOSE'] = 'вы ничего не выбрали';
|
||||
|
@ -3164,7 +3163,6 @@ $lang['SEARCH_FOR_BANNED'] = 'Поиск забаненных пользоват
|
|||
$lang['SEARCH_FOR_ADMINS'] = 'Поиск администраторов';
|
||||
$lang['SEARCH_FOR_MODS'] = 'Поиск модераторов';
|
||||
$lang['SEARCH_FOR_DISABLED'] = 'Поиск отключенных пользователей';
|
||||
$lang['SEARCH_FOR_DISABLED_PMS'] = 'Поиск пользователей с отключенными личными сообщениями';
|
||||
$lang['SEARCH_FOR_POSTCOUNT_GREATER'] = 'Поиск пользователей с количеством сообщений более %d';
|
||||
$lang['SEARCH_FOR_POSTCOUNT_LESSER'] = 'Поиск пользователей с количеством сообщений менее %d';
|
||||
$lang['SEARCH_FOR_POSTCOUNT_RANGE'] = 'Поиск пользователей с количеством сообщений от %d до %d';
|
||||
|
@ -3197,7 +3195,6 @@ $lang['SEARCH_USERS_GROUPS_EXPLAIN'] = 'Просмотреть всех член
|
|||
$lang['SEARCH_USERS_RANKS_EXPLAIN'] = 'Просмотреть всех носителей выбранного звания.';
|
||||
$lang['BANNED_USERS'] = 'Забаненные пользователи';
|
||||
$lang['DISABLED_USERS'] = 'Отключенные пользователи';
|
||||
$lang['USERS_DISABLED_PMS'] = 'Пользователи с отключенными ЛС';
|
||||
$lang['SEARCH_USERS_MISC_EXPLAIN'] = 'Администраторы - все пользователи с правами администратора; Модераторы - все модераторы форумов; Забаненные пользователи - все учётные записи, запрещённые на трекере; отключенные пользователи - все пользователи с отключенными учётными записями (вручную, или не подтвердившие свой адрес email); Пользователи с отключенными ЛС - Пользователи, не имеющие права пользоваться личными сообщениями (установлено через управление пользователями)';
|
||||
$lang['POSTCOUNT'] = 'Число сообщений';
|
||||
$lang['EQUALS'] = 'Равно';
|
||||
|
|
|
@ -138,7 +138,7 @@ for ($i=ord('A'), $cnt=ord('Z'); $i <= $cnt; $i++)
|
|||
$select_letter .= ': ';
|
||||
for ($i=224, $cnt=255; $i <= $cnt; $i++)
|
||||
{
|
||||
$select_letter .= ($by_letter == iconv('windows-1251', 'UTF-8', chr($i))) ? '<b>'. iconv('windows-1251', 'UTF-8', chr($i-32)) .'</b> ' : '<a class="genmed" href="'. ("memberlist.php?letter=%". strtoupper(base_convert($i, 10, 16)) ."&mode=$mode&order=$sort_order") .'">'. iconv('windows-1251', 'UTF-8', chr($i-32)) .'</a> ';
|
||||
$select_letter .= ($by_letter == iconv('windows-1251', 'UTF-8', chr($i))) ? '<b>'. iconv('windows-1251', 'UTF-8', chr($i-32)) .'</b> ' : '<a class="genmed" href="'. ("memberlist.php?letter=%". strtoupper(base_convert($i, 10, 16)) ."&mode=$mode&order=$sort_order") .'">'. iconv('windows-1251', 'UTF-8', chr($i-32)) .'</a> ';
|
||||
}
|
||||
|
||||
$select_letter .= ': ';
|
||||
|
@ -152,9 +152,7 @@ $template->assign_vars(array(
|
|||
));
|
||||
|
||||
// per-letter selection end
|
||||
$sql = "SELECT username, user_id, user_rank, user_opt, user_posts, user_regdate, user_from, user_website, user_email
|
||||
FROM ". BB_USERS ."
|
||||
WHERE user_id NOT IN(". EXCLUDED_USERS_CSV .")";
|
||||
$sql = "SELECT username, user_id, user_rank, user_opt, user_posts, user_regdate, user_from, user_website, user_email FROM ". BB_USERS ." WHERE user_id NOT IN(". EXCLUDED_USERS_CSV .")";
|
||||
if ( $username )
|
||||
{
|
||||
$username = preg_replace('/\*/', '%', clean_username($username));
|
||||
|
@ -173,25 +171,24 @@ if ($result = DB()->fetch_rowset($sql))
|
|||
$posts = $row['user_posts'];
|
||||
$pm = ($bb_cfg['text_buttons']) ? '<a class="txtb" href="'. (PM_URL . "?mode=post&". POST_USERS_URL ."=$user_id") .'">'. $lang['SEND_PM_TXTB'] .'</a>' : '<a href="' . (PM_URL . "?mode=post&". POST_USERS_URL ."=$user_id") .'"><img src="' . $images['icon_pm'] . '" alt="' . $lang['SEND_PRIVATE_MESSAGE'] . '" title="' . $lang['SEND_PRIVATE_MESSAGE'] . '" border="0" /></a>';
|
||||
|
||||
if (bf($row['user_opt'], 'user_opt', 'viewemail') || IS_AM)
|
||||
{
|
||||
$email_uri = ($bb_cfg['board_email_form']) ? ("profile.php?mode=email&". POST_USERS_URL ."=$user_id") : 'mailto:'. $row['user_email'];
|
||||
if (bf($row['user_opt'], 'user_opt', 'viewemail') || IS_AM)
|
||||
{
|
||||
$email_uri = ($bb_cfg['board_email_form']) ? ("profile.php?mode=email&". POST_USERS_URL ."=$user_id") : 'mailto:'. $row['user_email'];
|
||||
$email = '<a class="editable" href="'. $email_uri .'">'. $row['user_email'] .'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$email = '';
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$email = '';
|
||||
}
|
||||
|
||||
if ($row['user_website'])
|
||||
{
|
||||
$www = ($bb_cfg['text_buttons']) ? '<a class="txtb" href="'. $row['user_website'] .'" target="_userwww">'. $lang['VISIT_WEBSITE_TXTB'] .'</a>' : '<a class="txtb" href="'. $row['user_website'] .'" target="_userwww"><img src="' . $images['icon_www'] . '" alt="' . $lang['VISIT_WEBSITE'] . '" title="' . $lang['VISIT_WEBSITE'] . '" border="0" /></a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$www = '';
|
||||
}
|
||||
if ($row['user_website'])
|
||||
{
|
||||
$www = ($bb_cfg['text_buttons']) ? '<a class="txtb" href="'. $row['user_website'] .'" target="_userwww">'. $lang['VISIT_WEBSITE_TXTB'] .'</a>' : '<a class="txtb" href="'. $row['user_website'] .'" target="_userwww"><img src="' . $images['icon_www'] . '" alt="' . $lang['VISIT_WEBSITE'] . '" title="' . $lang['VISIT_WEBSITE'] . '" border="0" /></a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$www = '';
|
||||
}
|
||||
|
||||
$row_class = !($i % 2) ? 'row1' : 'row2';
|
||||
$template->assign_block_vars('memberrow', array(
|
||||
|
@ -211,10 +208,11 @@ if ($result = DB()->fetch_rowset($sql))
|
|||
}
|
||||
else
|
||||
{
|
||||
$template->assign_block_vars('no_username', array(
|
||||
'NO_USER_ID_SPECIFIED' => $lang['NO_USER_ID_SPECIFIED'] )
|
||||
);
|
||||
$template->assign_block_vars('no_username', array(
|
||||
'NO_USER_ID_SPECIFIED' => $lang['NO_USER_ID_SPECIFIED'],
|
||||
));
|
||||
}
|
||||
|
||||
$paginationurl = "memberlist.php?mode=$mode&order=$sort_order&letter=$by_letter";
|
||||
if ($paginationusername) $paginationurl .= "&username=$paginationusername";
|
||||
if ( $mode != 'topten' || $bb_cfg['topics_per_page'] < 10 )
|
||||
|
|
|
@ -86,7 +86,7 @@ switch ($mode)
|
|||
bb_die('Вы не выбрали, за что голосуете');
|
||||
}
|
||||
|
||||
DB()->query("INSERT IGNORE INTO ". BB_POLL_USERS ." (topic_id, user_id, vote_dt) VALUES ($topic_id, {$userdata['user_id']}, ". TIMENOW .")");
|
||||
DB()->query("INSERT IGNORE INTO ". BB_POLL_USERS ." (topic_id, user_id, vote_ip, vote_dt) VALUES ($topic_id, {$userdata['user_id']}, '". USER_IP ."', ". TIMENOW .")");
|
||||
|
||||
CACHE('bb_poll_data')->rm("poll_$topic_id");
|
||||
|
||||
|
|
|
@ -167,11 +167,11 @@ if ($post_info = DB()->fetch_row($sql))
|
|||
|
||||
if ($post_info['forum_status'] == FORUM_LOCKED && !$is_auth['auth_mod'])
|
||||
{
|
||||
message_die(GENERAL_MESSAGE, $lang['FORUM_LOCKED']);
|
||||
message_die(GENERAL_MESSAGE, $lang['FORUM_LOCKED']);
|
||||
}
|
||||
elseif ($mode != 'newtopic' && $post_info['topic_status'] == TOPIC_LOCKED && !$is_auth['auth_mod'])
|
||||
{
|
||||
message_die(GENERAL_MESSAGE, $lang['TOPIC_LOCKED']);
|
||||
message_die(GENERAL_MESSAGE, $lang['TOPIC_LOCKED']);
|
||||
}
|
||||
|
||||
if ($mode == 'editpost' || $mode == 'delete')
|
||||
|
@ -246,21 +246,21 @@ if (!$is_auth[$is_auth_type])
|
|||
|
||||
if ($mode == 'newtopic' && $topic_tpl && $post_info['topic_tpl_id'])
|
||||
{
|
||||
if($tor_status = join(',', $bb_cfg['tor_cannot_new']))
|
||||
{
|
||||
if ($tor_status = join(',', $bb_cfg['tor_cannot_new']))
|
||||
{
|
||||
$sql = DB()->fetch_rowset("SELECT t.topic_title, t.topic_id, tor.tor_status
|
||||
FROM ". BB_BT_TORRENTS ." tor, ". BB_TOPICS ." t
|
||||
WHERE poster_id = {$userdata['user_id']}
|
||||
AND tor.topic_id = t.topic_id
|
||||
AND tor.tor_status IN ($tor_status)
|
||||
ORDER BY tor.reg_time
|
||||
ORDER BY tor.reg_time
|
||||
");
|
||||
|
||||
$topics = '';
|
||||
foreach($sql as $row)
|
||||
{
|
||||
$topics .= $bb_cfg['tor_icons'][$row['tor_status']] .'<a href="'. TOPIC_URL . $row['topic_id'] .'">'. $row['topic_title'] .'</a><div class="spacer_12"></div>';
|
||||
}
|
||||
$topics = '';
|
||||
foreach($sql as $row)
|
||||
{
|
||||
$topics .= $bb_cfg['tor_icons'][$row['tor_status']] .'<a href="'. TOPIC_URL . $row['topic_id'] .'">'. $row['topic_title'] .'</a><div class="spacer_12"></div>';
|
||||
}
|
||||
if ($topics) bb_die($topics . $lang['UNEXECUTED_RELEASE']);
|
||||
}
|
||||
require(INC_DIR .'topic_templates.php');
|
||||
|
@ -415,38 +415,38 @@ elseif ( ($submit || $confirm) && !$topic_has_new_posts )
|
|||
if (defined('TORRENT_ATTACH_ID') && $bb_cfg['bt_newtopic_auto_reg'] && !$error_msg)
|
||||
{
|
||||
include(INC_DIR .'functions_torrent.php');
|
||||
if(!DB()->fetch_row("SELECT attach_id FROM ". BB_BT_TORRENTS ." WHERE attach_id = ". TORRENT_ATTACH_ID))
|
||||
if (!DB()->fetch_row("SELECT attach_id FROM ". BB_BT_TORRENTS ." WHERE attach_id = ". TORRENT_ATTACH_ID))
|
||||
{
|
||||
if($bb_cfg['premod'])
|
||||
if ($bb_cfg['premod'])
|
||||
{
|
||||
// Получение списка id форумов начиная с parent
|
||||
$forum_parent = $forum_id;
|
||||
if ($post_info['forum_parent']) $forum_parent = $post_info['forum_parent'];
|
||||
$count_sql = "
|
||||
SELECT forum_id
|
||||
FROM ". BB_FORUMS ."
|
||||
WHERE forum_parent = $forum_parent
|
||||
";
|
||||
$count_rowset = DB()->fetch_rowset($count_sql);
|
||||
$sub_forums = array();
|
||||
foreach ($count_rowset as $count_row)
|
||||
{
|
||||
if ($count_row['forum_id'] != $forum_id) $sub_forums[] = $count_row['forum_id'];
|
||||
}
|
||||
$sub_forums[] = $forum_id;
|
||||
$sub_forums = join(',', $sub_forums);
|
||||
// Подсчёт проверенных релизов в форумах раздела
|
||||
$count_checked_releases = DB()->fetch_row("
|
||||
SELECT COUNT(*) AS checked_releases
|
||||
FROM ". BB_BT_TORRENTS ."
|
||||
WHERE poster_id = ". $userdata['user_id'] ."
|
||||
AND forum_id IN($sub_forums)
|
||||
AND tor_status IN(". TOR_APPROVED .",". TOR_DOUBTFUL .",". TOR_TMP .")
|
||||
LIMIT 1
|
||||
", 'checked_releases');
|
||||
|
||||
if ($count_checked_releases || IS_AM) tracker_register(TORRENT_ATTACH_ID, 'newtopic', TOR_NOT_APPROVED);
|
||||
else tracker_register(TORRENT_ATTACH_ID, 'newtopic', TOR_PREMOD);
|
||||
// Получение списка id форумов начиная с parent
|
||||
$forum_parent = $forum_id;
|
||||
if ($post_info['forum_parent']) $forum_parent = $post_info['forum_parent'];
|
||||
$count_rowset = DB()->fetch_rowset("SELECT forum_id FROM ". BB_FORUMS ." WHERE forum_parent = $forum_parent");
|
||||
$sub_forums = array();
|
||||
foreach ($count_rowset as $count_row)
|
||||
{
|
||||
if ($count_row['forum_id'] != $forum_id) $sub_forums[] = $count_row['forum_id'];
|
||||
}
|
||||
$sub_forums[] = $forum_id;
|
||||
$sub_forums = join(',', $sub_forums);
|
||||
// Подсчёт проверенных релизов в форумах раздела
|
||||
$count_checked_releases = DB()->fetch_row("
|
||||
SELECT COUNT(*) AS checked_releases
|
||||
FROM ". BB_BT_TORRENTS ."
|
||||
WHERE poster_id = ". $userdata['user_id'] ."
|
||||
AND forum_id IN($sub_forums)
|
||||
AND tor_status IN(". TOR_APPROVED .",". TOR_DOUBTFUL .",". TOR_TMP .")
|
||||
LIMIT 1
|
||||
", 'checked_releases');
|
||||
if ($count_checked_releases || IS_AM)
|
||||
{
|
||||
tracker_register(TORRENT_ATTACH_ID, 'newtopic', TOR_NOT_APPROVED);
|
||||
}
|
||||
else
|
||||
{
|
||||
tracker_register(TORRENT_ATTACH_ID, 'newtopic', TOR_PREMOD);
|
||||
}
|
||||
}
|
||||
else tracker_register(TORRENT_ATTACH_ID, 'newtopic', TOR_NOT_APPROVED);
|
||||
}
|
||||
|
@ -467,7 +467,7 @@ elseif ( ($submit || $confirm) && !$topic_has_new_posts )
|
|||
}
|
||||
}
|
||||
|
||||
if( $refresh || $error_msg || ($submit && $topic_has_new_posts) )
|
||||
if ($refresh || $error_msg || ($submit && $topic_has_new_posts))
|
||||
{
|
||||
$username = ( !empty($_POST['username']) ) ? clean_username($_POST['username']) : '';
|
||||
$subject = ( !empty($_POST['subject']) ) ? clean_title($_POST['subject']) : '';
|
||||
|
@ -518,7 +518,7 @@ else
|
|||
define('WORD_LIST_OBTAINED', TRUE);
|
||||
}
|
||||
|
||||
if($post_info['post_attachment'] && !IS_AM) $message = $post_info['topic_title'];
|
||||
if ($post_info['post_attachment'] && !IS_AM) $message = $post_info['topic_title'];
|
||||
|
||||
// Use trim to get rid of spaces placed there by MS-SQL 2000
|
||||
$quote_username = ( trim($post_info['post_username']) != '' ) ? $post_info['post_username'] : $post_info['username'];
|
||||
|
@ -528,10 +528,10 @@ else
|
|||
// hide sid
|
||||
$message = preg_replace('#(?<=[\?&;]sid=)[a-zA-Z0-9]{12}#', 'sid', $message);
|
||||
|
||||
if ( !empty($orig_word) )
|
||||
if (!empty($orig_word))
|
||||
{
|
||||
$subject = ( !empty($subject) ) ? preg_replace($orig_word, $replace_word, $subject) : '';
|
||||
$message = ( !empty($message) ) ? preg_replace($orig_word, $replace_word, $message) : '';
|
||||
$subject = (!empty($subject)) ? preg_replace($orig_word, $replace_word, $subject) : '';
|
||||
$message = (!empty($message)) ? preg_replace($orig_word, $replace_word, $message) : '';
|
||||
}
|
||||
|
||||
if ( !preg_match('/^Re:/', $subject) && strlen($subject) > 0 )
|
||||
|
@ -560,9 +560,7 @@ if (IS_GUEST || ($mode == 'editpost' && $post_info['poster_id'] == GUEST_UID))
|
|||
$template->assign_var('POSTING_USERNAME');
|
||||
}
|
||||
|
||||
//
|
||||
// Notify checkbox
|
||||
//
|
||||
if (!IS_GUEST)
|
||||
{
|
||||
if ($mode != 'editpost' || ($mode == 'editpost' && $post_info['poster_id'] != GUEST_UID))
|
||||
|
@ -571,9 +569,7 @@ if (!IS_GUEST)
|
|||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Topic type selection
|
||||
//
|
||||
$topic_type_toggle = '';
|
||||
if ( $mode == 'newtopic' || ( $mode == 'editpost' && $post_data['first_post'] ) )
|
||||
{
|
||||
|
@ -616,7 +612,7 @@ if ($post_info['allow_reg_tracker'] && $post_data['first_post'] && ($topic_dl_ty
|
|||
WHERE p.post_id = $post_id
|
||||
";
|
||||
$result = DB()->fetch_row($sql);
|
||||
if(!empty($result['attach_id']))
|
||||
if (!empty($result['attach_id']))
|
||||
{
|
||||
if (!$topic_type_toggle)
|
||||
{
|
||||
|
@ -669,9 +665,7 @@ $template->set_filenames(array(
|
|||
'body' => 'posting.tpl',
|
||||
));
|
||||
|
||||
//
|
||||
// Output the data to the template
|
||||
//
|
||||
$template->assign_vars(array(
|
||||
'FORUM_NAME' => htmlCHR($forum_name),
|
||||
'PAGE_TITLE' => $page_title,
|
||||
|
@ -708,9 +702,7 @@ if ($mode == 'editpost' && $post_data['last_post'] && !$post_data['first_post'])
|
|||
));
|
||||
}
|
||||
|
||||
//
|
||||
// Topic review
|
||||
//
|
||||
if( $mode == 'reply' && $is_auth['auth_read'] )
|
||||
{
|
||||
topic_review($topic_id);
|
||||
|
|
|
@ -1100,7 +1100,7 @@ else if ( $submit || $refresh || $mode != '' )
|
|||
message_die(GENERAL_ERROR, 'Could not update private message new/read status for user', '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
cache_rm_user_sessions ($to_userdata['user_id']);
|
||||
cache_rm_user_sessions ($to_userdata['user_id']);
|
||||
|
||||
if ( bf($to_userdata['user_opt'], 'user_opt', 'notify_pm') && !empty($to_userdata['user_email']) && $to_userdata['user_active'] && $bb_cfg['pm_notify_enabled'] )
|
||||
{
|
||||
|
@ -1109,7 +1109,7 @@ else if ( $submit || $refresh || $mode != '' )
|
|||
|
||||
$emailer->from($bb_cfg['sitename'] ." <{$bb_cfg['board_email']}>");
|
||||
$emailer->email_address($to_userdata['username'] ." <{$to_userdata['user_email']}>");
|
||||
|
||||
|
||||
$emailer->use_template('privmsg_notify', $to_userdata['user_lang']);
|
||||
|
||||
$emailer->assign_vars(array(
|
||||
|
|
|
@ -128,7 +128,7 @@
|
|||
</tr>
|
||||
<!-- END forums_exist -->
|
||||
<tr>
|
||||
<td class="row1" nowrap="nowrap"><span class="gen"><select name="misc" class="post"><option value="admins" selected="selected">{L_ADMINISTRATORS}</option><option value="mods">{L_MODERATORS}</option><option value="banned">{L_BANNED_USERS}</option><option value="disabled">{L_DISABLED_USERS}</option><option value="disabled_pms">{L_USERS_DISABLED_PMS}</option></select> <input type="submit" class="post2" class="post2" name="search_misc" value="{L_SEARCH}" /></span></td>
|
||||
<td class="row1" nowrap="nowrap"><span class="gen"><select name="misc" class="post"><option value="admins" selected="selected">{L_ADMINISTRATORS}</option><option value="mods">{L_MODERATORS}</option><option value="banned">{L_BANNED_USERS}</option><option value="disabled">{L_DISABLED_USERS}</option></select> <input type="submit" class="post2" class="post2" name="search_misc" value="{L_SEARCH}" /></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row2"><span class="small">{L_SEARCH_USERS_MISC_EXPLAIN}</span></td>
|
||||
|
|
|
@ -147,8 +147,6 @@
|
|||
|
||||
<!-- IF ATTACHBOX --><!-- INCLUDE posting_attach.tpl --><!-- ENDIF -->
|
||||
|
||||
<!-- IF POLLBOX --><!-- INCLUDE posting_poll.tpl --><!-- ENDIF -->
|
||||
|
||||
</table>
|
||||
|
||||
</form>
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
<tbody class="pad_4">
|
||||
<tr>
|
||||
<th colspan="2" class="thHead">{L_ADD_POLL}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>{L_POLL_QUESTION}</b></td>
|
||||
<td><input type="text" name="poll_title" size="50" maxlength="255" value="{POLL_TITLE}" /></td>
|
||||
</tr>
|
||||
<!-- BEGIN poll_option_rows -->
|
||||
<tr>
|
||||
<td><b>{L_POLL_OPTION}</b></td>
|
||||
<td>
|
||||
<input type="text" name="poll_option_text[{poll_option_rows.S_POLL_OPTION_NUM}]" size="50" maxlength="255" value="{poll_option_rows.POLL_OPTION}" />
|
||||
<input type="submit" name="edit_poll_option" value="{L_UPDATE}" />
|
||||
<input type="submit" name="del_poll_option[{poll_option_rows.S_POLL_OPTION_NUM}]" value="{L_DELETE}" />
|
||||
</td>
|
||||
</tr>
|
||||
<!-- END poll_option_rows -->
|
||||
<tr>
|
||||
<td><b>{L_POLL_OPTION}</b></td>
|
||||
<td>
|
||||
<input type="text" name="add_poll_option_text" size="50" maxlength="255" value="{ADD_POLL_OPTION}" />
|
||||
<input type="submit" name="add_poll_option" value="{L_ADD_OPTION}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>{L_POLL_FOR}</b></td>
|
||||
<td>
|
||||
<input type="text" name="poll_length" size="3" maxlength="3" value="{POLL_LENGTH}" />
|
||||
<b>{L_DAYS}</b>
|
||||
<span class="small">{L_POLL_FOR_EXPLAIN}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- BEGIN switch_poll_delete_toggle -->
|
||||
<tr>
|
||||
<td><b>{L_DELETE_POLL}</b></td>
|
||||
<td><input type="checkbox" name="poll_delete" /></td>
|
||||
</tr>
|
||||
<!-- END switch_poll_delete_toggle -->
|
||||
</tbody>
|
Loading…
Add table
Add a link
Reference in a new issue