mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 13:54:02 -07:00
r395
расширенная торрент-статистика sql ALTER TABLE bb_bt_users ADD `up_today` bigint(20) unsigned NOT NULL default '0'; ALTER TABLE bb_bt_users ADD `down_today` bigint(20) unsigned NOT NULL default '0'; ALTER TABLE bb_bt_users ADD `up_release_today` bigint(20) unsigned NOT NULL default '0'; ALTER TABLE bb_bt_users ADD `up_bonus_today` bigint(20) unsigned NOT NULL default '0'; ALTER TABLE bb_bt_users ADD `points_today` float(16,2) unsigned NOT NULL default '0.00'; ALTER TABLE bb_bt_users ADD `up_yesterday` bigint(20) unsigned NOT NULL default '0'; ALTER TABLE bb_bt_users ADD `down_yesterday` bigint(20) unsigned NOT NULL default '0'; ALTER TABLE bb_bt_users ADD `up_release_yesterday` bigint(20) unsigned NOT NULL default '0'; ALTER TABLE bb_bt_users ADD `up_bonus_yesterday` bigint(20) unsigned NOT NULL default '0'; ALTER TABLE bb_bt_users ADD `points_yesterday` float(16,2) unsigned NOT NULL default '0.00'; git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@395 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
parent
9532c6feaf
commit
7a7f80be46
7 changed files with 38 additions and 10 deletions
|
@ -96,7 +96,6 @@ switch($mode)
|
||||||
'WHOIS_INFO' => $new['whois_info'],
|
'WHOIS_INFO' => $new['whois_info'],
|
||||||
'SHOW_MOD_INDEX' => $new['show_mod_index'],
|
'SHOW_MOD_INDEX' => $new['show_mod_index'],
|
||||||
'BIRTHDAY_ENABLED' => $new['birthday_enabled'],
|
'BIRTHDAY_ENABLED' => $new['birthday_enabled'],
|
||||||
'L_BIRTHDAY_YEARS' => $lang['DELTA_TIME']['INTERVALS']['year'][2],
|
|
||||||
'BIRTHDAY_MAX_AGE' => $new['birthday_max_age'],
|
'BIRTHDAY_MAX_AGE' => $new['birthday_max_age'],
|
||||||
'BIRTHDAY_MIN_AGE' => $new['birthday_min_age'],
|
'BIRTHDAY_MIN_AGE' => $new['birthday_min_age'],
|
||||||
'BIRTHDAY_CHECK_DAY' => $new['birthday_check_day'],
|
'BIRTHDAY_CHECK_DAY' => $new['birthday_check_day'],
|
||||||
|
|
|
@ -97,4 +97,26 @@ DB()->query("
|
||||||
FROM ". BB_BT_TORSTAT ." tst
|
FROM ". BB_BT_TORSTAT ." tst
|
||||||
LEFT JOIN ". BB_BT_TORRENTS ." tor USING(topic_id)
|
LEFT JOIN ". BB_BT_TORRENTS ." tor USING(topic_id)
|
||||||
WHERE tor.topic_id IS NULL
|
WHERE tor.topic_id IS NULL
|
||||||
");
|
");
|
||||||
|
|
||||||
|
DB()->query("
|
||||||
|
UPDATE
|
||||||
|
". BB_BT_USERS ."
|
||||||
|
SET
|
||||||
|
up_yesterday = up_today,
|
||||||
|
down_yesterday = down_today,
|
||||||
|
up_release_yesterday = up_release_today,
|
||||||
|
up_bonus_yesterday = up_bonus_today,
|
||||||
|
points_yesterday = points_today
|
||||||
|
");
|
||||||
|
|
||||||
|
DB()->query("
|
||||||
|
UPDATE
|
||||||
|
". BB_BT_USERS ."
|
||||||
|
SET
|
||||||
|
up_today = 0,
|
||||||
|
down_today = 0,
|
||||||
|
up_release_today = 0,
|
||||||
|
up_bonus_today = 0,
|
||||||
|
points_today = 0
|
||||||
|
");
|
||||||
|
|
|
@ -128,10 +128,14 @@ if($bb_cfg['announce_type'] != 'xbt')
|
||||||
". BB_BT_USERS ." u,
|
". BB_BT_USERS ." u,
|
||||||
". NEW_BB_BT_LAST_USERSTAT ." ub
|
". NEW_BB_BT_LAST_USERSTAT ." ub
|
||||||
SET
|
SET
|
||||||
u.u_up_total = u.u_up_total + ub.up_add,
|
u.u_up_total = u.u_up_total + ub.up_add,
|
||||||
u.u_down_total = u.u_down_total + ub.down_add,
|
u.u_down_total = u.u_down_total + ub.down_add,
|
||||||
u.u_up_release = u.u_up_release + ub.release_add,
|
u.u_up_release = u.u_up_release + ub.release_add,
|
||||||
u.u_up_bonus = u.u_up_bonus + ub.bonus_add
|
u.u_up_bonus = u.u_up_bonus + ub.bonus_add,
|
||||||
|
u.up_today = u.up_today + ub.up_add,
|
||||||
|
u.down_today = u.down_today + ub.down_add,
|
||||||
|
u.up_release_today = u.up_release_today + ub.release_add,
|
||||||
|
u.up_bonus_today = u.up_bonus_today + ub.bonus_add
|
||||||
WHERE u.user_id = ub.user_id
|
WHERE u.user_id = ub.user_id
|
||||||
");
|
");
|
||||||
|
|
||||||
|
@ -216,8 +220,9 @@ if($bb_cfg['seed_bonus_enabled'] && $bb_cfg['seed_bonus_points'] && $bb_cfg['see
|
||||||
$user_regdate = (TIMENOW - $bb_cfg['seed_bonus_user_regdate'] * 86400);
|
$user_regdate = (TIMENOW - $bb_cfg['seed_bonus_user_regdate'] * 86400);
|
||||||
|
|
||||||
DB()->query("
|
DB()->query("
|
||||||
UPDATE ". BB_USERS ." u, tmp_bonus b
|
UPDATE ". BB_USERS ." u, ". BB_BT_USERS ." bu, tmp_bonus b
|
||||||
SET u.user_points = u.user_points + $user_points,
|
SET u.user_points = u.user_points + $user_points,
|
||||||
|
bu.points_today = bu.points_today + $user_points,
|
||||||
b.user_id = 0
|
b.user_id = 0
|
||||||
WHERE u.user_id = b.user_id
|
WHERE u.user_id = b.user_id
|
||||||
AND b.release_count <= $release
|
AND b.release_count <= $release
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
if (!defined('BB_ROOT')) die(basename(__FILE__));
|
if (!defined('BB_ROOT')) die(basename(__FILE__));
|
||||||
|
|
||||||
$can_edit_tpl = IS_SUPER_ADMIN;
|
$can_edit_tpl = IS_SUPER_ADMIN;
|
||||||
$edit_tpl_mode = ($can_edit_tpl && empty($_REQUEST['edit_tpl']));
|
$edit_tpl_mode = ($can_edit_tpl && !empty($_REQUEST['edit_tpl']));
|
||||||
|
|
||||||
// forum_data
|
// forum_data
|
||||||
$sql = "SELECT forum_name, allow_reg_tracker, forum_tpl_id FROM ". BB_FORUMS ." WHERE forum_id = $forum_id LIMIT 1";
|
$sql = "SELECT forum_name, allow_reg_tracker, forum_tpl_id FROM ". BB_FORUMS ." WHERE forum_id = $forum_id LIMIT 1";
|
||||||
|
|
|
@ -598,6 +598,7 @@ $lang['BIRTHDAY_ENABLE'] = 'Enable birthday';
|
||||||
$lang['BIRTHDAY_MAX_AGE'] = 'Max age';
|
$lang['BIRTHDAY_MAX_AGE'] = 'Max age';
|
||||||
$lang['BIRTHDAY_MIN_AGE'] = 'Min age';
|
$lang['BIRTHDAY_MIN_AGE'] = 'Min age';
|
||||||
$lang['BIRTHDAY_CHECK_DAY'] = 'Days to check for come shortly birthdays';
|
$lang['BIRTHDAY_CHECK_DAY'] = 'Days to check for come shortly birthdays';
|
||||||
|
$lang['YEARS'] = 'Years';
|
||||||
|
|
||||||
$lang['NO_THEMES'] = 'No Themes In database';
|
$lang['NO_THEMES'] = 'No Themes In database';
|
||||||
$lang['TIMEZONE'] = 'Timezone';
|
$lang['TIMEZONE'] = 'Timezone';
|
||||||
|
|
|
@ -604,6 +604,7 @@ $lang['BIRTHDAY_ENABLE'] = 'Показывать дни рождения';
|
||||||
$lang['BIRTHDAY_MAX_AGE'] = 'Максимальный возраст';
|
$lang['BIRTHDAY_MAX_AGE'] = 'Максимальный возраст';
|
||||||
$lang['BIRTHDAY_MIN_AGE'] = 'Минимальный возраст';
|
$lang['BIRTHDAY_MIN_AGE'] = 'Минимальный возраст';
|
||||||
$lang['BIRTHDAY_CHECK_DAY'] = 'Показывать ближайшие дни рождения за';
|
$lang['BIRTHDAY_CHECK_DAY'] = 'Показывать ближайшие дни рождения за';
|
||||||
|
$lang['YEARS'] = 'Лет';
|
||||||
|
|
||||||
$lang['NO_THEMES'] = 'В базе нет цветовых схем';
|
$lang['NO_THEMES'] = 'В базе нет цветовых схем';
|
||||||
$lang['TIMEZONE'] = 'Часовой пояс';
|
$lang['TIMEZONE'] = 'Часовой пояс';
|
||||||
|
|
|
@ -414,11 +414,11 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><h4>{L_BIRTHDAY_MAX_AGE}</h4></td>
|
<td><h4>{L_BIRTHDAY_MAX_AGE}</h4></td>
|
||||||
<td><input class="post" type="text" size="25" maxlength="100" name="birthday_max_age" value="{BIRTHDAY_MAX_AGE}" /> {L_BIRTHDAY_YEARS}</td>
|
<td><input class="post" type="text" size="25" maxlength="100" name="birthday_max_age" value="{BIRTHDAY_MAX_AGE}" /> {L_YEARS}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><h4>{L_BIRTHDAY_MIN_AGE}</h4></td>
|
<td><h4>{L_BIRTHDAY_MIN_AGE}</h4></td>
|
||||||
<td><input class="post" type="text" size="25" maxlength="100" name="birthday_min_age" value="{BIRTHDAY_MIN_AGE}" /> {L_BIRTHDAY_YEARS}</td>
|
<td><input class="post" type="text" size="25" maxlength="100" name="birthday_min_age" value="{BIRTHDAY_MIN_AGE}" /> {L_YEARS}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><h4>{L_BIRTHDAY_CHECK_DAY}</h4></td>
|
<td><h4>{L_BIRTHDAY_CHECK_DAY}</h4></td>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue