INSERT INTO `bb_config` VALUES ('new_tpls', '1'); расширенная торрент-статистика (часть 2) расширенное администрирование форума дополнительные проверки в ajax постинг git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@396 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
pherum83 2012-04-13 00:21:31 +00:00
commit c252d603dc
26 changed files with 233 additions and 98 deletions

View file

@ -1,5 +0,0 @@
This is a Subversion repository; use the 'svnadmin' tool to examine
it. Do not add, delete, or modify files here unless you know how
to avoid corrupting the repository.
Visit http://subversion.apache.org/ for more information.

View file

@ -485,6 +485,16 @@ CREATE TABLE IF NOT EXISTS `bb_bt_users` (
`u_down_total` bigint(20) unsigned NOT NULL DEFAULT '0',
`u_up_release` bigint(20) unsigned NOT NULL DEFAULT '0',
`u_up_bonus` bigint(20) unsigned NOT NULL DEFAULT '0',
`up_today` bigint(20) unsigned NOT NULL DEFAULT '0',
`down_today` bigint(20) unsigned NOT NULL DEFAULT '0',
`up_release_today` bigint(20) unsigned NOT NULL DEFAULT '0',
`up_bonus_today` bigint(20) unsigned NOT NULL DEFAULT '0',
`points_today` float(16,2) unsigned NOT NULL DEFAULT '0.00',
`up_yesterday` bigint(20) unsigned NOT NULL DEFAULT '0',
`down_yesterday` bigint(20) unsigned NOT NULL DEFAULT '0',
`up_release_yesterday` bigint(20) unsigned NOT NULL DEFAULT '0',
`up_bonus_yesterday` bigint(20) unsigned NOT NULL DEFAULT '0',
`points_yesterday` float(16,2) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`user_id`),
UNIQUE KEY `auth_key` (`auth_key`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
@ -676,6 +686,7 @@ INSERT INTO `bb_config` VALUES ('network_news_forum_id', '2');
INSERT INTO `bb_config` VALUES ('whois_info', 'http://ip-whois.net/ip_geo.php?ip=');
INSERT INTO `bb_config` VALUES ('show_mod_index', '1');
INSERT INTO `bb_config` VALUES ('premod', '0');
INSERT INTO `bb_config` VALUES ('new_tpls', '1');
-- --------------------------------------------------------
@ -1450,7 +1461,7 @@ CREATE TABLE IF NOT EXISTS `bb_users` (
-- Дамп данных таблицы `bb_users`
--
INSERT INTO `bb_users` VALUES (-1, 0, 'Anonymous', 'd41d8cd98f00b204e9800998ecf8427e', 0, 0, '0', 0, '0', 0, 5, 0.00, '', 0, 0, 0, 220, 0, '', 0, 0, 0, 0, '', '', '', '', '', '', '', '', '', '', 0, '', 0, 0);
INSERT INTO `bb_users` VALUES (-1, 0, 'Anonymous', 'd41d8cd98f00b204e9800998ecf8427e', 0, 0, '0', 0, '0', 0, 5, 0.00, '', 0, 0, 0, 0, 0, '', 0, 0, 0, 0, '', '', '', '', '', '', '', '', '', '', 0, '', 0, 0);
INSERT INTO `bb_users` VALUES (2, 1, 'admin', 'c3284d0f94606de1fd2af172aba15bf3', 0, 0, '0', 0, '0', 1, 1, 4.00, '', 0, 0, 0, 304, 1, '', 1, 0, 0, 0, 'admin@admin.com', '', '', '', '', '', '', '', '', '', 0, '', 0, 0);
INSERT INTO `bb_users` VALUES (-746, 0, 'bot', 'd41d8cd98f00b204e9800998ecf8427e', 0, 0, '0', 0, '0', 0, 0, 0.00, '', 0, 0, 0, 144, 0, 'bot.gif', 1, 0, 0, 0, 'bot@bot.bot', '', '', '', '', '', '', '', '', '', 0, '', 0, 0);

View file

@ -100,6 +100,7 @@ switch($mode)
'BIRTHDAY_MIN_AGE' => $new['birthday_min_age'],
'BIRTHDAY_CHECK_DAY' => $new['birthday_check_day'],
'PREMOD' => $new['premod'],
'NEW_TPLS' => $new['new_tpls'],
'SEED_BONUS_ENABLED' => $new['seed_bonus_enabled'],
'SEED_BONUS_TOR_SIZE' => $new['seed_bonus_tor_size'],
'SEED_BONUS_USER_REGDATE' => $new['seed_bonus_user_regdate'],

View file

@ -84,6 +84,7 @@ if ($mode)
$forum_parent = $row['forum_parent'];
$show_on_index = $row['show_on_index'];
$prune_days = $row['prune_days'];
$forum_tpl_id = $row['forum_tpl_id'];
$allow_reg_tracker = $row['allow_reg_tracker'];
$allow_porno_topic = $row['allow_porno_topic'];
$self_moderated = $row['self_moderated'];
@ -101,6 +102,7 @@ if ($mode)
$forum_id = '';
$show_on_index = 1;
$prune_days = 0;
$forum_tpl_id = 0;
$allow_reg_tracker = 0;
$allow_porno_topic = 0;
$self_moderated = 0;
@ -147,7 +149,7 @@ if ($mode)
'S_FORUM_DISPLAY_SORT_LIST' => $forum_display_sort_list,
'S_FORUM_DISPLAY_ORDER_LIST' => $forum_display_order_list,
'S_FORUM_ACTION' => "admin_forums.php",
'S_FORUM_ACTION' => 'admin_forums.php',
'S_HIDDEN_FIELDS' => $s_hidden_fields,
'S_SUBMIT_VALUE' => $buttonvalue,
'S_CAT_LIST' => $catlist,
@ -157,6 +159,7 @@ if ($mode)
'S_PARENT_FORUM' => $s_parent,
'CAT_LIST_CLASS' => ($forum_parent) ? 'hidden' : '',
'SHOW_ON_INDEX_CLASS' => (!$forum_parent) ? 'hidden' : '',
'TPL_SELECT' => get_select('forum_tpl', $forum_tpl_id, 'html', $lang['TEMPLATE_DISABLE']),
'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),
@ -186,6 +189,7 @@ if ($mode)
$forum_display_sort = intval($_POST['forum_display_sort']);
$forum_display_order = intval($_POST['forum_display_order']);
$forum_tpl_id = (int) $_POST['forum_tpl_select'];
$allow_reg_tracker = (int) $_POST['allow_reg_tracker'];
$allow_porno_topic = (int) $_POST['allow_porno_topic'];
$self_moderated = (int) $_POST['self_moderated'];
@ -221,8 +225,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, 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;
$columns = ' forum_name, cat_id, forum_desc, forum_order, forum_status, prune_days, forum_parent, show_on_index, forum_display_sort, forum_display_order, forum_tpl_id, 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, $forum_tpl_id, $allow_reg_tracker, $allow_porno_topic, $self_moderated". $value_sql;
DB()->query("INSERT INTO ". BB_FORUMS ." ($columns) VALUES ($values)");
@ -250,6 +254,7 @@ if ($mode)
$forum_display_order = intval($_POST['forum_display_order']);
$forum_display_sort = intval($_POST['forum_display_sort']);
$forum_tpl_id = (int) $_POST['forum_tpl_select'];
$allow_reg_tracker = (int) $_POST['allow_reg_tracker'];
$allow_porno_topic = (int) $_POST['allow_porno_topic'];
$self_moderated = (int) $_POST['self_moderated'];
@ -300,6 +305,7 @@ if ($mode)
prune_days = $prune_days,
forum_parent = $forum_parent,
show_on_index = $show_on_index,
forum_tpl_id = $forum_tpl_id,
allow_reg_tracker = $allow_reg_tracker,
allow_porno_topic = $allow_porno_topic,
self_moderated = $self_moderated,

View file

@ -162,6 +162,13 @@ switch ($field)
$this->response['update_ids']['u_ratio'] = (string) get_bt_ratio($btu);
break;
case 'user_points':
$value = htmlCHR($value);
$value = (float) str_replace(',', '.', $this->request['value']);
$value = sprintf('%.2f', $value);
$this->response['new_value'] = $value;
break;
default:
$this->ajax_die("invalid profile field: $field");
}

View file

@ -92,29 +92,35 @@ switch($mode)
case 'get_traf_stats':
$user_id = (int) $this->request['user_id'];
$btu = get_bt_userdata($user_id);
$profiledata = get_userdata($user_id);
$speed_up = ($btu['speed_up']) ? humn_size($btu['speed_up']).'/s' : '0 KB/s';
$speed_down = ($btu['speed_down']) ? humn_size($btu['speed_down']).'/s' : '0 KB/s';
$user_ratio = ($btu['u_down_total'] > MIN_DL_FOR_RATIO) ? '<b class="gen">'. get_bt_ratio($btu) .'</b>' : $lang['IT_WILL_BE_DOWN'] .' <b>'. humn_size(MIN_DL_FOR_RATIO) .'</b>';
$html = '
<tr class="row2">
<tr class="row3">
<th style="padding: 0;" class="stats-ext"></th>
<th>'. $lang['DOWNLOADED'] .'</th>
<th>'. $lang['UPLOADED'] .'</th>
<th>'. $lang['RELEASED'] .'</th>
<th>'. $lang['BONUS'] .'</th>
</tr>
<th>'. $lang['BONUS'] .'</th>';
$html .= ($bb_cfg['seed_bonus_enabled']) ? '<th>'. $lang['SEED_BONUS'] .'</th>' : '';
$html .= '</tr>
<tr class="row1">
<td class="stats-ext">'. $lang['TOTAL_TRAF'] .'</td>
<td id="u_down_total"><span class="editable bold leechmed">'. humn_size($btu['u_down_total']) .'</span></td>
<td id="u_up_total"><span class="editable bold seedmed">' .humn_size($btu['u_up_total']) .'</span></td>
<td id="u_up_release"><span class="editable bold seedmed">'. humn_size($btu['u_up_release']) .'</span></td>
<td id="u_up_bonus"><span class="editable bold seedmed">'. humn_size($btu['u_up_bonus']) .'</span></td>
</tr>
<td id="u_up_bonus"><span class="editable bold seedmed">'. humn_size($btu['u_up_bonus']) .'</span></td>';
$html .= ($bb_cfg['seed_bonus_enabled']) ? '<td id="user_points"><span class="editable bold points">'. $profiledata['user_points'] .'</b></td>' : '';
$html .= '</tr>
<tr class="row5">
<td colspan="1">'. $lang['MAX_SPEED'] .'</td>
<td colspan="2">'. $lang['DL_DL_SPEED'] .': '. $speed_down .'</span></td>
<td colspan="2">'. $lang['DL_UL_SPEED'] .': '. $speed_up .'</span></td>
</tr>
';
<td colspan="2">'. $lang['DL_DL_SPEED'] .': '. $speed_down .'</span></td>
<td colspan="1"></td>
</tr>';
$this->response['user_ratio'] = '
<th><a href="'. $bb_cfg['ratio_url_help'] .'" class="bold">'. $lang['USER_RATIO'] .'</a>:</th>

View file

@ -18,6 +18,25 @@ if (isset($this->request['post_id']))
AND f.forum_id = t.forum_id
AND p.post_id = pt.post_id
LIMIT 1");
if(!$post) $this->ajax_die('not post');
$is_auth = auth(AUTH_ALL, $post['forum_id'], $userdata, $post);
if ($post['topic_status'] == TOPIC_LOCKED && !$is_auth['auth_mod'])
{
$this->ajax_die($lang['TOPIC_LOCKED']);
}
}
elseif (isset($this->request['topic_id']))
{
$post_id = (int) $this->request['post_id'];
$post = DB()->fetch_row("SELECT t.*, f.*
FROM ". BB_TOPICS ." t, ". BB_FORUMS ." f
WHERE t.topic_id = $topic_id
AND f.forum_id = t.forum_id
LIMIT 1");
if(!$post) $this->ajax_die('not post');
$is_auth = auth(AUTH_ALL, $post['forum_id'], $userdata, $post);
}
if (!defined('WORD_LIST_OBTAINED'))
@ -31,10 +50,6 @@ if (!defined('WORD_LIST_OBTAINED'))
switch($this->request['type'])
{
case 'delete';
if(!$post) $this->ajax_die('not post');
$is_auth = auth(AUTH_ALL, $post['forum_id'], $userdata, $post);
if($post['post_id'] != $post['topic_first_post_id'] && ($is_auth['auth_mod'] || ($userdata['user_id'] == $post['poster_id'] && $is_auth['auth_delete'] && $post['topic_last_post_id'] == $post['post_id'] && $post['post_time'] + 3600*3 > TIMENOW)))
{
if (empty($this->request['confirmed']))
@ -52,9 +67,6 @@ switch($this->request['type'])
break;
case 'reply';
if(!$post) $this->ajax_die($lang['NOT_POST']);
$is_auth = auth(AUTH_ALL, $post['forum_id'], $userdata, $post);
if(bf($userdata['user_opt'], 'user_opt', 'allow_post'))
{
$this->ajax_die($lang['RULES_REPLY_CANNOT']);
@ -101,8 +113,6 @@ switch($this->request['type'])
case 'edit':
case 'editor':
if(!$post) $this->ajax_die($lang['NOT_POST']);
if((mb_strlen($post['post_text'], 'UTF-8') > 1000) || $post['post_attachment'] || ($post['topic_first_post_id'] == $post_id))
{
$this->response['redirect'] = make_url('posting.php?mode=editpost&p='. $post_id);
@ -202,12 +212,7 @@ switch($this->request['type'])
{
$this->ajax_die('empty topic_id');
}
$topic_id = (int) $this->request['topic_id'];
$t_data = DB()->fetch_row("SELECT t.*, f.*
FROM ". BB_TOPICS ." t, ". BB_FORUMS ." f
WHERE t.topic_id = $topic_id
AND f.forum_id = t.forum_id
LIMIT 1");
if(!$t_data) $this->ajax_die($lang['TOPIC_POST_NOT_EXIST']);
$is_auth = auth(AUTH_ALL, $t_data['forum_id'], $userdata, $t_data);
@ -219,6 +224,10 @@ switch($this->request['type'])
{
$this->ajax_die(sprintf($lang['SORRY_AUTH_REPLY'], strip_tags($is_auth['auth_reply_type'])));
}
if ($post['topic_status'] == TOPIC_LOCKED && !$is_auth['auth_mod'])
{
$this->ajax_die($lang['TOPIC_LOCKED']);
}
$message = (string) $this->request['message'];
$message = prepare_message($message);
@ -270,13 +279,13 @@ switch($this->request['type'])
}
}
DB()->sql_query("INSERT INTO " . BB_POSTS . " (topic_id, forum_id, poster_id, post_time, poster_ip) VALUES ($topic_id, ". $t_data['forum_id'] .", ". $userdata['user_id'] .", '". TIMENOW ."', '". USER_IP ."')");
DB()->sql_query("INSERT INTO " . BB_POSTS . " (topic_id, forum_id, poster_id, post_time, poster_ip) VALUES ($topic_id, ". $post['forum_id'] .", ". $userdata['user_id'] .", '". TIMENOW ."', '". USER_IP ."')");
$post_id = DB()->sql_nextid();
DB()->sql_query("INSERT INTO " . BB_POSTS_TEXT . " (post_id, post_text) VALUES ($post_id, '". DB()->escape($message) ."')");
update_post_stats('reply', $t_data, $t_data['forum_id'], $topic_id, $post_id, $userdata['user_id']);
update_post_stats('reply', $post, $post['forum_id'], $topic_id, $post_id, $userdata['user_id']);
add_search_words($post_id, stripslashes($message), stripslashes($t_data['topic_title']));
add_search_words($post_id, stripslashes($message), stripslashes($post['topic_title']));
update_post_html(array(
'post_id' => $post_id,
'post_text' => $message,

View file

@ -52,8 +52,8 @@ $bb_cfg = $tr_cfg = $page_cfg = array();
// Increase number of revision after update
$bb_cfg['tp_version'] = '2.4 (RC)';
$bb_cfg['tp_release_state'] = 'R394';
$bb_cfg['tp_release_date'] = '10-04-2012';
$bb_cfg['tp_release_state'] = 'R396';
$bb_cfg['tp_release_date'] = '13-04-2012';
// Database
$charset = 'utf8';

View file

@ -220,8 +220,11 @@ if($bb_cfg['seed_bonus_enabled'] && $bb_cfg['seed_bonus_points'] && $bb_cfg['see
$user_regdate = (TIMENOW - $bb_cfg['seed_bonus_user_regdate'] * 86400);
DB()->query("
UPDATE ". BB_USERS ." u, ". BB_BT_USERS ." bu, tmp_bonus b
SET u.user_points = u.user_points + $user_points,
UPDATE ". BB_USERS ." u
LEFT JOIN ". BB_BT_USERS ." bu ON(bu.user_id = u.user_id)
LEFT JOIN tmp_bonus b ON(b.user_id = u.user_id)
SET
u.user_points = u.user_points + $user_points,
bu.points_today = bu.points_today + $user_points,
b.user_id = 0
WHERE u.user_id = b.user_id

View file

@ -660,37 +660,25 @@ function delta_time ($timestamp_1, $timestamp_2 = TIMENOW, $granularity = 'auto'
return $GLOBALS['DeltaTime']->spellDelta($timestamp_1, $timestamp_2, $granularity);
}
function get_select ($type)
function get_select ($select, $selected = null, $return_as = 'html', $first_opt = '&raquo;&raquo; Выбрать ')
{
global $lang;
$select_ary = array();
switch ($type)
switch ($select)
{
case 'groups':
$sql = "SELECT group_id, group_name
FROM ". BB_GROUPS ."
WHERE group_single_user = 0
ORDER BY group_name";
$sql = "SELECT group_id, group_name FROM ". BB_GROUPS ." WHERE group_single_user = 0 ORDER BY group_name";
foreach (DB()->fetch_rowset($sql) as $row)
{
if (isset($select_ary[$row['group_name']]))
{
$cnt = md5($row['group_name']) .'_cnt';
$$cnt = @$$cnt + 1;
$row['group_name'] = $row['group_name'] . ' ['. (int) $$cnt .']';
}
$select_ary[$row['group_name']] = $row['group_id'];
}
$select_name = POST_GROUPS_URL;
$select_name = 'g';
break;
case 'forum_tpl':
$sql = "SELECT tpl_id, tpl_name FROM ". BB_TOPIC_TPL ." ORDER BY tpl_name";
$select_ary[$lang['SELECT']] = 0;
$select_ary[$first_opt] = 0;
foreach (DB()->fetch_rowset($sql) as $row)
{
$select_ary[$row['tpl_name']] = $row['tpl_id'];
@ -698,7 +686,8 @@ function get_select ($type)
$select_name = 'forum_tpl_select';
break;
}
return ($select_ary) ? build_select($select_name, $select_ary) : '';
return ($return_as == 'html') ? build_select($select_name, $select_ary, $selected) : $select_ary;
}
class html_common
@ -1237,8 +1226,21 @@ function show_bt_userdata ($user_id)
'MIN_DL_FOR_RATIO' => humn_size(MIN_DL_FOR_RATIO),
'MIN_DL_BYTES' => MIN_DL_FOR_RATIO,
'AUTH_KEY' => ($btu['auth_key']) ? $btu['auth_key'] : $lang['NONE'],
'SPEED_UP' => ($btu['speed_up']) ? humn_size($btu['speed_up']).'/s' : '0 KB/s',
'SPEED_DOWN' => ($btu['speed_down']) ? humn_size($btu['speed_down']).'/s' : '0 KB/s',
'TD_DL' => humn_size($btu['down_today']),
'TD_UL' => humn_size($btu['up_today']),
'TD_REL' => humn_size($btu['up_release_today']),
'TD_BONUS' => humn_size($btu['up_bonus_today']),
'TD_POINTS' => $btu['points_today'],
'YS_DL' => humn_size($btu['down_yesterday']),
'YS_UL' => humn_size($btu['up_yesterday']),
'YS_REL' => humn_size($btu['up_release_yesterday']),
'YS_BONUS' => humn_size($btu['up_bonus_yesterday']),
'YS_POINTS' => $btu['points_yesterday'],
'SPEED_UP' => humn_size($btu['speed_up'], 0, 'KB') .'/s',
'SPEED_DOWN' => humn_size($btu['speed_down'], 0, 'KB') .'/s',
));
}

View file

@ -417,6 +417,7 @@ define('MODCP_URL', "modcp.php?" .'f=');
define('PM_URL', "privmsg.php?" .'mode=post&amp;u=');
define('POST_URL', "viewtopic.php?" .'p=');
define('PROFILE_URL', "profile.php?" .'mode=viewprofile&amp;u=');
define('BONUS_URL', "profile.php?" .'mode=bonus');
define('TOPIC_URL', "viewtopic.php?" .'t=');
define('USER_AGENT', @strtolower($_SERVER['HTTP_USER_AGENT']));

View file

@ -0,0 +1,5 @@
<?php
if (!defined('BB_ROOT')) die(basename(__FILE__));
if($bb_cfg['seed_bonus_enabled'] || !$bb_cfg['seed_bonus_enabled']) bb_die($lang['MODULE_OFF']);

View file

@ -119,6 +119,7 @@ $template->assign_vars(array(
'OCCUPATION' => $profiledata['user_occ'],
'INTERESTS' => $profiledata['user_interests'],
'SKYPE' => $profiledata['user_skype'],
'USER_POINTS' => $profiledata['user_points'],
'GENDER' => ($bb_cfg['gender'] && $profiledata['user_gender']) ? $lang['GENDER_SELECT'][$profiledata['user_gender']] : '',
'BIRTHDAY' => ($bb_cfg['birthday_enabled'] && $profiledata['user_birthday']) ? realdate($profiledata['user_birthday'], 'Y-m-d') : '',
'AGE' => ($bb_cfg['birthday_enabled'] && $profiledata['user_birthday']) ? birthday_age($profiledata['user_birthday']) : '',

View file

@ -129,6 +129,8 @@ $lang['BT_UNSET_DLTYPE_ON_TOR_UNREG'] = 'Change topic status to "Normal" while u
$lang['LIST_FORUMS'] = 'List Forums';
$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['RELEASE_EXP'] = 'This page displays all forums. For each of them you can set the release type which should be posted in the forum.';
$lang['TPL_NONE'] = 'Don\'t use templates';

View file

@ -10,6 +10,7 @@ $lang['TRANSLATION_INFO'] = '';
// Common, these terms are used
// extensively on several pages
//
$lang['ADMIN'] = 'Administration';
$lang['FORUM'] = 'Forum';
$lang['CATEGORY'] = 'Category';
$lang['HIDE_CAT'] = 'Hide categories';
@ -1349,13 +1350,19 @@ $lang['ONLY_1_TOR_PER_TOPIC'] = 'You can register only one torrent in one topic'
$lang['VIEWING_USER_BT_PROFILE'] = 'Viewing torrent-profile :: %s'; // %s is username
$lang['CUR_ACTIVE_DLS'] = 'Currently active torrents';
$lang['TD_TRAF'] = 'Today';
$lang['YS_TRAF'] = 'Yesterday';
$lang['TOTAL_TRAF'] = 'Total';
$lang['USER_RATIO'] = 'Ratio';
$lang['MAX_SPEED'] = 'Speed';
$lang['BT_RATIO'] = 'Ratio';
$lang['DOWNLOADED'] = 'Downloaded';
$lang['UPLOADED'] = 'Uploaded';
$lang['RELEASED'] = 'Released';
$lang['BONUS'] = 'Bonus';
$lang['BONUS'] = 'On the rare';
$lang['SEED_BONUS'] = 'Seed Bonus';
$lang['EXCHANGE'] = 'Exchange';
$lang['IT_WILL_BE_DOWN'] = 'it will start to be considered after it will be downloaded';
$lang['SPMODE_FULL'] = 'Show peers in full details';
@ -1380,6 +1387,9 @@ $lang['ONLY_FOR_SUPER_ADMIN'] = 'This option only for super admins';
$lang['ACCESS'] = 'Access';
$lang['ACCESS_SRV_LOAD'] = 'Depend on server load';
$lang['LOGS'] = 'Topic history';
$lang['FORUM_LOGS'] = 'History Forum';
$lang['AUTOCLEAN'] = 'Autoclean:';
$lang['DESIGNER'] = 'Designer';
$lang['LAST_IP'] = 'Last IP:';
$lang['REG_IP'] = 'Registration IP:';
@ -1565,8 +1575,7 @@ $lang['TRACKER_S'] = 'on tracker';
// copyright
$lang['NOTICE'] = '!ATTENTION!';
$lang['POWERED'] = 'Powered by <a target="_blank" href="http://torrentpier.me">TorrentPier II</a> &copy; Meithar';
$lang['DIVE'] = 'The forum is submitted on base <a target="_blank" href="http://www.phpbb.com">phpBB</a> &copy; phpBB Group';
$lang['POWERED'] = 'Powered by <a target="_blank" href="http://torrentpier.me">TorrentPier II</a> &copy; Meithar, TorrentPier II Team';
$lang['COPY'] = 'The site does not give electronic versions of products, and is engaged only in a collecting and cataloguing of the references sent and published at a forum by our readers. If you are the legal owner of any submitted material and do not wish that the reference to him{it} was in our catalogue, contact us and we shall immediately remove her. Files for an exchange on tracker are given by users of a site, and the administration does not bear the responsibility for their maintenance. The request to not fill in the files protected by copyrights, and also files of the illegal maintenance!';
$lang['CALLSEED'] = 'Downloaded the call';

View file

@ -130,6 +130,8 @@ $lang['BT_UNSET_DLTYPE_ON_TOR_UNREG'] = 'Изменять статус топи
$lang['LIST_FORUMS'] = 'Список форумов';
$lang['LIST_OF_PATTERNS'] = 'Список шаблонов';
$lang['ADD_TEMPLATE'] = 'Добавить шаблон';
$lang['TEMPLATE_DISABLE'] = 'Шаблон отключен';
$lang['FOR_NEW_TEMPLATE'] = 'для новых шаблонов!';
$lang['RELEASE_EXP'] = 'На этой странице отображаются форумы, для которых можно выбрать шаблон нового топика (релиза).';
$lang['TPL_NONE'] = 'Не использовать шаблоны';

View file

@ -14,6 +14,7 @@ $lang['TRANSLATION_INFO'] = '';
// Common, these terms are used
// extensively on several pages
//
$lang['ADMIN'] = 'Администрирование';
$lang['FORUM'] = 'Форум';
$lang['CATEGORY'] = 'Категория';
$lang['HIDE_CAT'] = 'Скрыть категории';
@ -1356,12 +1357,18 @@ $lang['ONLY_1_TOR_PER_TOPIC'] = 'Вы не можете зарегистриро
$lang['VIEWING_USER_BT_PROFILE'] = 'Торрент-профиль'; // %s is username
$lang['CUR_ACTIVE_DLS'] = 'Текущие активные торренты';
$lang['TD_TRAF'] = 'Сегодня';
$lang['YS_TRAF'] = 'Вчера';
$lang['TOTAL_TRAF'] = 'Всего';
$lang['USER_RATIO'] = 'Рейтинг';
$lang['MAX_SPEED'] = 'Скорость';
$lang['DOWNLOADED'] = 'Скачано';
$lang['UPLOADED'] = 'Отдано';
$lang['RELEASED'] = 'На своих';
$lang['BONUS'] = 'Бонус';
$lang['BONUS'] = 'На редких';
$lang['SEED_BONUS'] = 'СидБонус';
$lang['EXCHANGE'] = 'Обменять';
$lang['IT_WILL_BE_DOWN'] = 'начнет учитываться после того как будет скачано';
$lang['SPMODE_FULL'] = 'Подробная статистика пиров';
@ -1386,6 +1393,9 @@ $lang['ONLY_FOR_SUPER_ADMIN'] = 'Эта опция доступна только
$lang['ACCESS'] = 'Доступ';
$lang['ACCESS_SRV_LOAD'] = 'Зависит от загрузки сервера';
$lang['LOGS'] = 'История темы';
$lang['FORUM_LOGS'] = 'История форума';
$lang['AUTOCLEAN'] = 'Авточистка:';
$lang['DESIGNER'] = 'Конструктор';
$lang['LAST_IP'] = 'Последний IP:';
$lang['REG_IP'] = 'IP регистрации:';
@ -1569,8 +1579,7 @@ $lang['TRACKER_S'] = 'по трекеру';
// copyright
$lang['NOTICE'] = '!ВНИМАНИЕ!';
$lang['POWERED'] = 'Powered by <a target="_blank" href="http://torrentpier.me">TorrentPier II</a> &copy; Meithar';
$lang['DIVE'] = 'Форум представлен на базе <a target="_blank" href="http://www.phpbb.com">phpBB</a> &copy; phpBB Group';
$lang['POWERED'] = 'Powered by <a target="_blank" href="http://torrentpier.me">TorrentPier II</a> &copy; Meithar, TorrentPier II Team';
$lang['COPY'] = 'Сайт не предоставляет электронные версии произведений, а занимается лишь коллекционированием и каталогизацией ссылок, присылаемых и публикуемых на форуме нашими читателями. Если вы являетесь правообладателем какого-либо представленного материала и не желаете, чтобы ссылка на него находилась в нашем каталоге, свяжитесь с нами, и мы незамедлительно удалим её. Файлы для обмена на трекере предоставлены пользователями сайта, и администрация не несёт ответственности за их содержание. Просьба не заливать файлы, защищенные авторскими правами, а также файлы нелегального содержания!';
$lang['CALLSEED'] = 'Позвать скачавших';

View file

@ -4,7 +4,7 @@
<div>
<h3>BitTorrent клиенты</h3>
<ul>
<li><a href="http://www.utorrent.com/" class="med"><b>uTorrent</b></a> <span class="med nowrap">(рекомендуемый: <b>3.1.2</b>)</span></li>
<li><a href="http://www.utorrent.com/" class="med"><b>uTorrent</b></a> <span class="med nowrap">(рекомендуемый: <b>3.1.3</b>)</span></li>
</ul>
</div>

View file

@ -42,6 +42,12 @@ switch ($mode)
require(INC_DIR .'ucp/usercp_email.php');
break;
case 'bonus':
if (IS_GUEST) login_redirect();
require(INC_DIR . 'ucp/usercp_bonus.php');
break;
default:
bb_die('Invalid mode');
}

View file

@ -329,6 +329,13 @@
<label><input type="radio" name="premod" value="0" <!-- IF not PREMOD -->checked="checked"<!-- ENDIF --> />{L_DISABLED}</label>
</td>
</tr>
<tr>
<td><h4>{L_DESIGNER}</h4></td>
<td>
<label><input type="radio" name="new_tpls" value="1" <!-- IF NEW_TPLS -->checked="checked"<!-- ENDIF --> />{L_ENABLED}</label>&nbsp;&nbsp;
<label><input type="radio" name="new_tpls" value="0" <!-- IF not NEW_TPLS -->checked="checked"<!-- ENDIF --> />{L_DISABLED}</label>
</td>
</tr>
<tr class="row3 med">
<td class="bold tCenter" colspan="2">{L_LATEST_NEWS}</td>

View file

@ -60,6 +60,10 @@ function toggle_cat_list (val)
<tr>
<td class="row1">{L_REG_TORRENTS}</td>
<td class="row2">{ALLOW_REG_TRACKER} &nbsp; {L_SELF_MODERATED}: {SELF_MODERATED} &nbsp; {L_ALLOW_PORNO_TOPIC}: {ALLOW_PORNO_TOPIC}</td>
</tr>
<tr>
<td class="row1">{L_DESIGNER}</td>
<td class="row2">{TPL_SELECT} - {L_FOR_NEW_TEMPLATE}</td>
</tr>
<tr>
<td class="row1">{L_FORUM_PRUNING}</td>

View file

@ -149,6 +149,12 @@ a.seed:visited, a.seedmed:visited, a.seedsmall:visited
{
color: #006600; text-decoration: none;
}
a.points, a.pointsmed, a.pointssmall,
a.points:visited, a.pointsmed:visited, a.pointssmall:visited, .points
{
color: blue; text-decoration: none;
}
/* Poster name in viewtopic */
.nick, .nick a {
color: #005A88 !important; font-size: 13px; font-weight: bold; text-decoration: none;
@ -599,11 +605,6 @@ 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; }
table.mod_ip div { max-height: 150px; overflow: auto;}
table.ratio { background: #F9F9F9; border: 1px solid #A5AFB4; border-collapse: separate; }
table.ratio th, table.ratio td { padding: 2px 12px; text-align: center; white-space: nowrap; font-size: 11px;}
table.ratio th { color: #000000; white-space: nowrap; }
table.ratio td { padding: 2px 24px; }
/* ---------------------------------- *
Forums on home page
* ---------------------------------- */

View file

@ -49,7 +49,6 @@
<div class="copyright tCenter">
{L_POWERED} <br />
{L_DIVE} <br />
</div>
</div>

View file

@ -90,6 +90,7 @@ $(document).ready(function(){
<var class="ajax-params">{action: "edit_user_profile", id: "u_down_total"}</var>
<var class="ajax-params">{action: "edit_user_profile", id: "u_up_release"}</var>
<var class="ajax-params">{action: "edit_user_profile", id: "u_up_bonus"}</var>
<var class="ajax-params">{action: "edit_user_profile", id: "user_points"}</var>
<script type="text/javascript">
ajax.callback.manage_user = function(data) {
@ -154,6 +155,12 @@ ajax.callback.gen_passkey = function(data){
</script>
<!-- ENDIF / SHOW_PASSKEY -->
<style type="text/css">
#traf-stats-tbl { width: 468px; background: #F9F9F9; border: 1px solid #A5AFB4; border-collapse: separate; }
#traf-stats-tbl th, #traf-stats-tbl td { padding: 2px 10px 3px; text-align: center; white-space: nowrap; font-size: 11px; }
#traf-stats-tbl th { padding: 2px <!-- IF $bb_cfg['seed_bonus_enabled'] -->11<!-- ELSE -->22<!-- ENDIF -->px 3px; }
</style>
<a name="editprofile"></a>
<h1 class="pagetitle">{L_VIEWING_PROFILE}</h1>
@ -398,24 +405,48 @@ ajax.callback.gen_passkey = function(data){
<tr>
<td colspan="2" class="pad_4">
<table id="traf-stats-tbl" <!-- IF TRAF_STATS -->style="display: none;"<!-- ENDIF --> class="ratio bCenter borderless" cellspacing="1" width="200">
<tr class="row2">
<table id="traf-stats-tbl" <!-- IF TRAF_STATS -->style="display: none;"<!-- ENDIF --> class="bCenter borderless" cellspacing="1">
<tr class="row3">
<th style="padding: 0;" class="stats-ext"></th>
<th>{L_DOWNLOADED}</th>
<th>{L_UPLOADED}</th>
<th>{L_RELEASED}</th>
<th>{L_BONUS}</th>
<!-- IF $bb_cfg['seed_bonus_enabled'] --><th>{L_SEED_BONUS}</th><!-- ENDIF -->
</tr>
<tr class="row1 stats-ext">
<td>{L_TD_TRAF}</td>
<td class="leech">{TD_DL}</td>
<td class="seed">{TD_UL}</td>
<td class="seed">{TD_REL}</td>
<td class="seed">{TD_BONUS}</td>
<!-- IF $bb_cfg['seed_bonus_enabled'] --><td class="points">{TD_POINTS}</td><!-- ENDIF -->
</tr>
<tr class="row5 stats-ext">
<td>{L_YS_TRAF}</td>
<td class="leech">{YS_DL}</td>
<td class="seed">{YS_UL}</td>
<td class="seed">{YS_REL}</td>
<td class="seed">{YS_BONUS}</td>
<!-- IF $bb_cfg['seed_bonus_enabled'] --><td class="points">{YS_POINTS}</td><!-- ENDIF -->
</tr>
<tr class="row1">
<td class="stats-ext">{L_TOTAL_TRAF}</td>
<td id="u_down_total"><span class="editable bold leechmed">{DOWN_TOTAL}</span></td>
<td id="u_up_total"><span class="editable bold seedmed">{UP_TOTAL}</span></td>
<td id="u_up_release"><span class="editable bold seedmed">{RELEASED}</span></td>
<td id="u_up_bonus"><span class="editable bold seedmed">{UP_BONUS}</span></td>
<!-- IF $bb_cfg['seed_bonus_enabled'] --><td id="user_points"><span class="editable bold points">{USER_POINTS}</b></td><!-- ENDIF -->
</tr>
<tr class="row5">
<td colspan="1">{L_MAX_SPEED}</td>
<td colspan="2">{L_DL_DL_SPEED}: {SPEED_DOWN}</td>
<td colspan="2">{L_DL_UL_SPEED}: {SPEED_UP}</td>
<!-- IF $bb_cfg['seed_bonus_enabled'] --><td colspan="1"><!-- IF EDIT_PROF --><a href="profile.php?mode=bonus">{L_EXCHANGE}</a><!-- ENDIF --></td><!-- ENDIF -->
</tr>
</table>
</td>
</tr>

View file

@ -635,8 +635,25 @@ td.topic_id { cursor: pointer; }
<!-- IF LOGGED_IN -->
<p class="med"><a href="{U_MARK_READ}">{L_MARK_TOPICS_READ}</a></p>
<!-- IF IS_AM -->
<p class="mrg_2 tRight">{L_AUTOCLEAN} <!-- IF PRUNE_DAYS --><b>{PRUNE_DAYS} {L_DAYS}</b><!-- ELSE -->{L_DISABLED}<!-- ENDIF --></p>
<!-- ENDIF -->
<!-- IF IS_ADMIN -->
<div class="med tCenter">
{L_ADMIN}:&nbsp;
<!-- IF $bb_cfg['new_tpls'] -->
<a href="posting.php?mode=new_rel&amp;f={FORUM_ID}&amp;edit_tpl=1" class="bold">{L_DESIGNER}</a> &nbsp;&middot;&nbsp;
<!-- ENDIF -->
<a href="admin/admin_log.php?f={FORUM_ID}&amp;db={$bb_cfg['log_days_keep']}">{L_FORUM_LOGS}</a> &nbsp;&middot;&nbsp;
<a href="admin/admin_forums.php?mode=editforum&amp;f={FORUM_ID}">{L_EDIT}</a> &nbsp;&middot;&nbsp;
<a href="admin/admin_forumauth.php?f={FORUM_ID}">{L_PERMISSIONS}</a> &nbsp;&middot;&nbsp;
<a href="admin/admin_forums.php?mode=deleteforum&amp;f={FORUM_ID}">{L_DELETE}</a>
</div>
<!-- ENDIF / IS_ADMIN -->
<!-- ENDIF / LOGGED_IN -->
<table width="100%" cellspacing="0">
<tr>
<td width="40%" class="small"><span>{S_AUTH_LIST}</span></td>

View file

@ -591,6 +591,7 @@ $template->assign_vars(array(
'SESSION_ADMIN' => $userdata['session_admin'],
'MOD_REDIRECT_URL' => $mod_redirect_url,
'MODERATION_ON' => $moderation,
'PRUNE_DAYS' => $forum_data['prune_days'],
));
print_page('viewforum.tpl');