FAQ Заказ мода на адаптирование для TP II

Статус
В этой теме нельзя размещать новые ответы.
D

diim

Гость
А RSS по разделам и темам не кто не видел , многие спрашивают ?
 
R

Rusik

Гость
Поделитесь пожалуйста работоспособным RSS, если такой имеется.
 
R

Rusik

Гость
krumax, Вот за это - большое спасибо тебе! С датой не поможешь?
 

PheRum

Легенда
PHP:
$user_id = $userdata['user_id'];
if ($user_id > 0)
{
    if ($user_id)
    {
        DB()->query("UPDATE ". BB_USERS ." SET curpage_topic = $topic_id, curpage_topic_time = ". TIMENOW ." WHERE user_id = $user_id");
    }

    $sql = DB()->fetch_rowset("SELECT username, user_id, user_rank, curpage_topic_time
      FROM " . BB_USERS . "
      WHERE curpage_topic = $topic_id
      AND (curpage_topic_time > ".( TIMENOW - 300 ).")");

    $looking_list = '';
    foreach ($sql as $row)
    {
        $looking_list .= profile_url($row) .', ';
    }

    $template->assign_vars(array(
      'LOOKING_LIST' => $lang['WHOIS_LOOKING'] . ':  ' . $looking_list,
    ));
}

 
B

Bustra

Гость
MY-94,

PHP:
//up_down total
$row = DB()->fetch_row("SELECT ROUND(SUM(u_up_total+u_down_total))  AS pumped, ROUND(SUM(u_up_total)) AS upl, ROUND(SUM(u_down_total)) AS donl FROM " . BB_BT_USERS);
$data['total_dl_ul'] = $row['pumped'];
$data['upload'] = $row['upl'];
$data['download'] = $row['donl'];
//up_down total end

//active seeders begin
$row = DB()->fetch_row('SELECT COUNT(user_id) AS st  FROM '. BB_BT_TRACKER .' WHERE seeder = 1');
$data['active_seeders'] = number_format($row['st']);
//active seeders end

//active leechers begin
$row = DB()->fetch_row('SELECT COUNT(user_id) AS lt  FROM '. BB_BT_TRACKER .' WHERE seeder = 0');
$data['active_leechers'] = number_format($row['lt']);
//active leechers end

//active leechers begin
$row = DB()->fetch_row('SELECT COUNT(user_id) AS perv  FROM '. BB_BT_TRACKER .'');
$data['active_peers_all'] = number_format($row['perv']);
//active leechers end

//active seeders begin
$row = DB()->fetch_row('SELECT COUNT(DISTINCT user_id) AS stu  FROM '. BB_BT_TRACKER .' WHERE seeder = 1');
$data['active_seeders_u'] = number_format($row['stu']);
//active seeders end

//active leechers begin
$row = DB()->fetch_row('SELECT COUNT(DISTINCT user_id) AS ltu  FROM '. BB_BT_TRACKER .' WHERE seeder = 0');
$data['active_leechers_u'] = number_format($row['ltu']);
//active leechers end

//active torrents begin
$row = DB()->fetch_row('SELECT COUNT(DISTINCT tor.topic_id) AS tt , SUM(tor.size) AS ts
        FROM '. BB_BT_TRACKER .'  tr , '. BB_BT_TORRENTS .' tor
        WHERE tr.topic_id = tor.topic_id');
$data['active_tor'] = number_format($row['tt']);
$data['active_tor_size'] = $row['ts'];
//active torrents end

//all torrents begin
$row = DB()->fetch_row(' SELECT COUNT(*) as tn, SUM(size) AS tos
        FROM '. BB_BT_TORRENTS);
$data['all_tor'] = number_format($row['tn']);
$data['all_tor_size'] = $row['tos'];
//all torrents end

// users speed
$row = DB()->fetch_row('SELECT sum(speed_up) AS s_ul, sum(speed_down) AS s_dl
        FROM BB_BT_TRACKER');
$data['s_ul'] = $row['s_ul'];
$data['s_dl'] = $row['s_dl'];
// users speed

Держи...
 
Статус
В этой теме нельзя размещать новые ответы.
Сверху