killer, в БД нужно добавить
ALTER TABLE `bb_bt_users`
ADD COLUMN `torrent_pass_version` int(11) NOT NULL DEFAULT 0 AFTER `points_yesterday`,
ADD COLUMN `downloaded` bigint(20) unsigned NOT NULL DEFAULT 0 AFTER `torrent_pass_version`,
ADD COLUMN `uploaded` bigint(20) unsigned NOT NULL DEFAULT 0 AFTER `downloaded`,
ADD COLUMN `max_up_speed` bigint(20) NOT NULL DEFAULT 0 AFTER `uploaded`,
ADD COLUMN `max_down_speed` bigint(20) NOT NULL DEFAULT 0 AFTER `max_up_speed`,
ADD COLUMN `u_down_today` bigint(20) NOT NULL DEFAULT 0 AFTER `max_down_speed`,
ADD COLUMN `u_up_today` bigint(20) NOT NULL DEFAULT 0 AFTER `u_down_today`,
ADD COLUMN `u_release_today` bigint(20) NOT NULL DEFAULT 0 AFTER `u_up_today`,
ADD COLUMN `u_bonus_today` bigint(20) NOT NULL DEFAULT 0 AFTER `u_release_today`,
ADD COLUMN `u_up_speed_today` bigint(20) NOT NULL DEFAULT 0 AFTER `u_bonus_today`,
ADD COLUMN `u_down_speed_today` bigint(20) NOT NULL DEFAULT 0 AFTER `u_up_speed_today`
ALTER TABLE `bb_bt_torrents`
ADD COLUMN `private` tinyint(1) NOT NULL DEFAULT 0 AFTER `tor_type`,
ADD COLUMN `seeders` mediumint(8) NOT NULL DEFAULT 0 AFTER `tor_announcers`,
ADD COLUMN `leechers` mediumint(8) NOT NULL DEFAULT 0 AFTER `seeders`,
ADD COLUMN `mtime` int(11) NOT NULL AFTER `leechers`,
ADD COLUMN `flags` int(11) NOT NULL AFTER `mtime`,
ADD COLUMN `ctime` int(11) NOT NULL AFTER `flags`
Затем изменить код
functions.php
// '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_DL' => humn_size($btu['u_down_today']),
'TD_UL' => humn_size($btu['u_up_today']),
'TD_REL' => humn_size($btu['u_release_today']),
'TD_BONUS' => humn_size($btu['u_bonus_today']),
clean_dlstat.php
/*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_yesterday = u_up_today,
down_yesterday = u_down_today,
up_release_yesterday = u_release_today,
up_bonus_yesterday = u_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
");*/
DB()->query("
UPDATE
". BB_BT_USERS ."
SET
u_up_today = 0,
u_down_today = 0,
u_release_today = 0,
u_bonus_today = 0,
points_today = 0
");
tr_cleanup_and_dlstat.php
// Update TOTAL user's dlstat
/* DB()->query("
UPDATE
". BB_BT_USERS ." u,
". NEW_BB_BT_LAST_USERSTAT ." ub
SET
u.u_up_total = u.u_up_total + ub.up_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_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
");*/
// Update TOTAL user's dlstat
DB()->query("
UPDATE
". BB_BT_USERS ." u,
". NEW_BB_BT_LAST_USERSTAT ." ub
SET
u.u_up_total = u.u_up_total + ub.up_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_bonus = u.u_up_bonus + ub.bonus_add,
u.u_up_today = u.u_up_today + ub.up_add,
u.u_down_today = u.u_down_today + ub.down_add,
u.u_release_today = u.u_release_today + ub.release_add,
u.u_bonus_today = u.u_bonus_today + ub.bonus_add
WHERE u.user_id = ub.user_id
");