} } // Add the moderator $username = $group_moderator['username']; $user_id = $group_moderator['user_id']; generate_user_info($group_moderator, $bb_cfg['default_dateformat'], $is_moderator, $from, $posts, $joined, $pm, $email, $www, $user_time, $avatar); $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) { $group_type = $lang['GROUP_HIDDEN']; } $i = 0; $template->assign_vars(array('ROW_NUMBER' => $i + ($start + 1), 'GROUP_INFO' => true, 'PAGE_TITLE' => $lang['GROUP_CONTROL_PANEL'], 'GROUP_NAME' => htmlCHR($group_info['group_name']), 'GROUP_DESCRIPTION' => bbcode2html($group_info['group_description']), 'GROUP_SIGNATURE' => bbcode2html($group_info['group_signature']), 'GROUP_AVATAR' => get_avatar(GROUP_AVATAR_MASK . $group_id, $group_info['avatar_ext_id'], true), 'GROUP_DETAILS' => $group_details, 'GROUP_TIME' => !empty($group_info['group_time']) ? sprintf('%s <span class="posted_since">(%s)</span>', bb_date($group_info['group_time']), delta_time($group_info['group_time'])) : $lang['NONE'], 'MOD_USER' => profile_url($group_moderator), 'MOD_AVATAR' => $avatar, 'MOD_FROM' => $from, 'MOD_JOINED' => $joined, 'MOD_POSTS' => $posts, 'MOD_PM' => $pm, 'MOD_EMAIL' => $email, 'MOD_WWW' => $www, 'MOD_TIME' => !empty($group_info['mod_time']) ? bb_date($group_info['mod_time']) : $lang['NONE'], 'U_SEARCH_USER' => "search.php?mode=searchuser", 'U_SEARCH_RELEASES' => "tracker.php?srg={$group_id}", 'U_GROUP_RELEASES' => "group.php?view=releases&" . POST_GROUPS_URL . "={$group_id}", 'U_GROUP_MEMBERS' => "group.php?view=members&" . POST_GROUPS_URL . "={$group_id}", 'U_GROUP_CONFIG' => "group_edit.php?g={$group_id}", 'RELEASE_GROUP' => $group_info['release_group'] ? true : false, 'GROUP_TYPE' => $group_type, 'S_GROUP_OPEN_TYPE' => GROUP_OPEN, 'S_GROUP_CLOSED_TYPE' => GROUP_CLOSED, 'S_GROUP_HIDDEN_TYPE' => GROUP_HIDDEN, 'S_GROUP_OPEN_CHECKED' => $group_info['group_type'] == GROUP_OPEN ? ' checked="checked"' : '', 'S_GROUP_CLOSED_CHECKED' => $group_info['group_type'] == GROUP_CLOSED ? ' checked="checked"' : '', 'S_GROUP_HIDDEN_CHECKED' => $group_info['group_type'] == GROUP_HIDDEN ? ' checked="checked"' : '', 'S_HIDDEN_FIELDS' => $s_hidden_fields, 'S_MODE_SELECT' => $select_sort_mode, 'S_ORDER_SELECT' => $select_sort_order, 'S_GROUP_ACTION' => "group.php?" . POST_GROUPS_URL . "={$group_id}")); switch ($view_mode) { case 'releases': // TODO Correct SQL to posts with attach and limit them, optimization if (!$group_info['release_group']) { set_die_append_msg(false, false, $group_id); bb_die($lang['NOT_A_RELEASE_GROUP']); } // Count releases for pagination $all_releases = DB()->fetch_rowset("\n\t\t\t\tSELECT p.topic_id, p.forum_id, p.poster_id, t.topic_title, t.topic_time, f.forum_name, u.username, u.avatar_ext_id, u.user_opt, u.user_rank\n\t\t\t\tFROM " . BB_POSTS . " p\n\t\t\t\tLEFT JOIN " . BB_TOPICS . " t ON(p.topic_id = t.topic_id)\n\t\t\t\tLEFT JOIN " . BB_FORUMS . " f ON(p.forum_id= f.forum_id)\n\t\t\t\tLEFT JOIN " . BB_USERS . " u ON(p.poster_id = u.user_id)\n\t\t\t\tWHERE p.poster_rg_id = {$group_id}\n\t\t\t\tORDER BY t.topic_time DESC\n\t\t\t\tLIMIT {$rel_limit}\n\t\t\t"); $count_releases = count($all_releases); generate_pagination(GROUP_URL . $group_id . "&view=releases", $count_releases, $per_page, $start); $sql = "\n\t\t\t\tSELECT p.topic_id, p.forum_id, p.poster_id, t.topic_title, t.topic_time, f.forum_name, u.username, u.avatar_ext_id, u.user_opt, u.user_rank\n\t\t\t\tFROM " . BB_POSTS . " p\n\t\t\t\tLEFT JOIN " . BB_TOPICS . " t ON(p.topic_id = t.topic_id)\n\t\t\t\tLEFT JOIN " . BB_FORUMS . " f ON(p.forum_id= f.forum_id)\n\t\t\t\tLEFT JOIN " . BB_USERS . " u ON(p.poster_id = u.user_id)\n\t\t\t\tWHERE p.poster_rg_id = {$group_id}\n\t\t\t\tORDER BY t.topic_time DESC\n\t\t\t\tLIMIT {$start}, {$per_page}\n\t\t\t"; if (!($releases = DB()->fetch_rowset($sql))) { set_die_append_msg(false, false, $group_id); bb_die($lang['NO_SEARCH_MATCH']);
} DB()->query("UPDATE " . BB_TOPICS . " SET topic_status = " . TOPIC_UNLOCKED . " WHERE topic_id = {$tor['topic_id']} LIMIT 1"); } else { $this->verify_mod_rights($tor['forum_id']); } // Подтверждение изменения статуса, выставленного другим модератором if ($tor['tor_status'] != TOR_NOT_APPROVED && $tor['checked_user_id'] != $userdata['user_id'] && $tor['checked_time'] + 2 * 3600 > TIMENOW) { if (empty($this->request['confirmed'])) { $msg = $lang['TOR_STATUS_OF'] . " {$lang['TOR_STATUS_NAME'][$tor['tor_status']]}\n\n"; $msg .= ($username = get_username($tor['checked_user_id'])) ? $lang['TOR_STATUS_CHANGED'] . html_entity_decode($username) . ", " . delta_time($tor['checked_time']) . $lang['TOR_BACK'] . "\n\n" : ""; $msg .= $lang['PROCEED'] . '?'; $this->prompt_for_confirm($msg); } } change_tor_status($attach_id, $new_status); $this->response['status'] = $bb_cfg['tor_icons'][$new_status] . ' <b> ' . $lang['TOR_STATUS_NAME'][$new_status] . '</b> · ' . profile_url($userdata) . ' · <i>' . delta_time(TIMENOW) . $lang['TOR_BACK'] . '</i>'; if ($bb_cfg['tor_comment'] && ($comment && $comment != $lang['COMMENT'] || in_array($new_status, $bb_cfg['tor_reply']))) { if ($tor['poster_id'] > 0) { $subject = sprintf($lang['TOR_MOD_TITLE'], $tor['topic_title']); $message = sprintf($lang['TOR_MOD_MSG'], get_username($tor['poster_id']), make_url(TOPIC_URL . $tor['topic_id']), $bb_cfg['tor_icons'][$new_status] . ' ' . $lang['TOR_STATUS_NAME'][$new_status]); if ($comment && $comment != $lang['COMMENT']) { $message .= "\n\n[b]" . $lang['COMMENT'] . '[/b]: ' . $comment; } send_pm($tor['poster_id'], $subject, $message, $userdata['user_id']); cache_rm_user_sessions($tor['poster_id']); } } break; case 'status_reply': if (!$bb_cfg['tor_comment']) { $this->ajax_die($lang['MODULE_OFF']);
<?php /** * Initialize some defaults needed for DokuWiki */ // start timing Dokuwiki execution function delta_time($start = 0) { return microtime(true) - (double) $start; } define('DOKU_START_TIME', delta_time()); global $config_cascade; $config_cascade = array(); // if available load a preload config file $preload = fullpath(dirname(__FILE__)) . '/preload.php'; if (@file_exists($preload)) { include $preload; } // define the include path if (!defined('DOKU_INC')) { define('DOKU_INC', fullpath(dirname(__FILE__) . '/../') . '/'); } // define Plugin dir if (!defined('DOKU_PLUGIN')) { define('DOKU_PLUGIN', DOKU_INC . 'lib/plugins/'); } // define config path (packagers may want to change this to /etc/dokuwiki/) if (!defined('DOKU_CONF')) { define('DOKU_CONF', DOKU_INC . 'conf/'); } // check for error reporting override or set error reporting to sane values
} else { if (!($tpl_name = DB()->fetch_row("SELECT tpl_name FROM " . BB_TOPIC_TPL . " WHERE tpl_id = {$tpl_id} LIMIT 1", 'tpl_name'))) { $this->ajax_die("Шаблон [id: {$tpl_id}] не найден в БД"); } $new_tpl_id = $tpl_id; $this->response['msg'] = "Включен шаблон {$tpl_name}"; } DB()->query("UPDATE " . BB_FORUMS . " SET forum_tpl_id = {$new_tpl_id} WHERE forum_id = {$forum_id} LIMIT 1"); break; // сохранение изменений // сохранение изменений case 'save': if ($tpl_data['tpl_last_edit_tm'] > $this->request['tpl_l_ed_tst'] && $tpl_data['tpl_last_edit_by'] != $userdata['user_id']) { $last_edit_by_username = get_username(intval($tpl_data['tpl_last_edit_by'])); $msg = "Изменения не были сохранены!\n\n"; $msg .= 'Шаблон был отредактирован: ' . html_entity_decode($last_edit_by_username) . ', ' . delta_time($tpl_data['tpl_last_edit_tm']) . " назад\n\n"; $this->ajax_die($msg); } $sql = "UPDATE " . BB_TOPIC_TPL . " SET " . DB()->build_array('UPDATE', $sql_args) . " WHERE tpl_id = {$tpl_id} LIMIT 1"; if (!@DB()->query($sql)) { $sql_error = DB()->sql_error(); } $this->response['tpl_id'] = $tpl_id; $this->response['tpl_name'] = $tpl_name; $this->response['html']['tpl-last-edit-time'] = bb_date(TIMENOW, 'd-M-y H:i'); $this->response['html']['tpl-last-edit-by'] = $userdata['username']; break; // создание нового шаблона // создание нового шаблона case 'new': $sql = "INSERT INTO " . BB_TOPIC_TPL . DB()->build_array('INSERT', $sql_args);
<?php define('IN_FORUM', true); define('BB_SCRIPT', 'callseed'); define('BB_ROOT', './'); require BB_ROOT . 'common.php'; // Init userdata $user->session_start(array('req_login' => true)); $topic_id = (int) request_var('t', 0); $t_data = topic_info($topic_id); $forum_id = $t_data['forum_id']; set_die_append_msg($forum_id, $topic_id); if ($t_data['seeders'] > 2) { bb_die(sprintf($lang['CALLSEED_HAVE_SEED'], $t_data['seeders'])); } elseif ($t_data['call_seed_time'] > TIMENOW - 86400) { $time_left = delta_time($t_data['call_seed_time'] + 86400, TIMENOW, 'days'); bb_die(sprintf($lang['CALLSEED_MSG_SPAM'], $time_left)); } $ban_user_id = array(); $sql = DB()->fetch_rowset("SELECT ban_userid FROM " . BB_BANLIST . " WHERE ban_userid != 0"); foreach ($sql as $row) { $ban_user_id[] = ',' . $row['ban_userid']; } $ban_user_id = join('', $ban_user_id); $user_list = DB()->fetch_rowset("\n\tSELECT DISTINCT dl.user_id, u.user_opt, tr.user_id as active_dl\n\tFROM " . BB_BT_DLSTATUS . " dl\n\tLEFT JOIN " . BB_USERS . " u ON(u.user_id = dl.user_id)\n\tLEFT JOIN " . BB_BT_TRACKER . " tr ON(tr.user_id = dl.user_id)\n\tWHERE dl.topic_id = {$topic_id}\n\t\tAND dl.user_status IN (" . DL_STATUS_COMPLETE . ", " . DL_STATUS_DOWN . ")\n\t\tAND dl.user_id NOT IN ({$userdata['user_id']}, " . EXCLUDED_USERS_CSV . $ban_user_id . ")\n\t\tAND u.user_active = 1\n\tGROUP BY dl.user_id\n"); $subject = sprintf($lang['CALLSEED_SUBJECT'], $t_data['topic_title']); $message = sprintf($lang['CALLSEED_TEXT'], make_url(TOPIC_URL . $topic_id), $t_data['topic_title'], make_url(DOWNLOAD_URL . $t_data['attach_id'])); if ($user_list) { foreach ($user_list as $row) { if (!empty($row['active_dl'])) { continue;
// get the db sizes list($search_data_size, $search_index_size, $search_tables_size) = get_db_sizes(); // calculate the final (estimated) values $final_search_tables_size = ''; if ($search_tables_size) { $start_search_tables_size = $last_session_data['search_size']; $final_search_tables_size = $start_search_tables_size + round(($search_tables_size - $start_search_tables_size) * (100 / $session_percent)); } // calculate various times $session_time = $last_session_data['session_time']; $session_average_cycle_time = round($session_time / $last_session_data['session_cycles']); $session_estimated_time = round($session_time * (100 / $session_percent)) - $session_time; // create the percent boxes create_percent_box('session', create_percent_color($session_percent), $session_percent); create_percent_box('total', create_percent_color($total_percent), $total_percent); $template->assign_vars(array('L_NEXT' => $next_button, 'L_TIME_LAST_POSTS_ADMIN' => sprintf($lang['TIME_LAST_POSTS'], $num_rows), 'PROCESSING_POSTS' => sprintf($lang['PROCESSED_POST_IDS'], $start_post_id, $end_post_id), 'PROCESSING_MESSAGES' => $processing_messages, 'PROGRESS_BAR_IMG' => $progress_bar_img, 'SESSION_DETAILS' => sprintf($lang['PROCESS_DETAILS'], $session_posts_processed - $num_rows + 1, $session_posts_processed, $session_posts_processing), 'SESSION_PERCENT' => sprintf($lang['PERCENT_COMPLETED'], round($session_percent, 2)), 'TOTAL_DETAILS' => sprintf($lang['PROCESS_DETAILS'], $total_posts_processed - $num_rows + 1, $total_posts_processed, $total_posts), 'TOTAL_PERCENT' => sprintf($lang['PERCENT_COMPLETED'], round($total_percent, 2)), 'LAST_CYCLE_TIME' => delta_time(TIMENOW), 'SESSION_TIME' => delta_time($last_session_data['start_time']), 'SESSION_AVERAGE_CYCLE_TIME' => delta_time($session_average_cycle_time, 0), 'SESSION_ESTIMATED_TIME' => delta_time($session_estimated_time, 0), 'SEARCH_TABLES_SIZE' => humn_size($search_tables_size), 'FINAL_SEARCH_TABLES_SIZE' => humn_size($final_search_tables_size), 'SEARCH_DATA_SIZE' => humn_size($search_data_size), 'SEARCH_INDEX_SIZE' => humn_size($search_index_size), 'START_POST' => $last_session_data['start_post_id'], 'POST_LIMIT' => $num_rows, 'TIME_LIMIT' => $time_limit, 'REFRESH_RATE' => $refresh_rate, 'S_REBUILD_SEARCH_ACTION' => $form_action)); } else { // create the page // used only with the select input $post_limit_hidden = $def_post_limit > $total_posts ? $total_posts : $def_post_limit; $s_hidden_fields = '<input type="hidden" name="post_limit_stored" value="' . $post_limit_hidden . '" />'; $s_hidden_fields .= '<input type="hidden" name="total_posts_stored" value="' . $total_posts . '" />'; $next_start_post_id = 0; $last_saved_processing = ''; $clear_search_disabled = ''; if ($last_session_data['rebuild_session_id']) { $last_saved_post_id = $last_session_data['end_post_id']; $next_start_post_id = $last_saved_post_id + 1; $last_saved_date = bb_date($last_session_data['end_time']); // check our last status if ($last_session_data['rebuild_session_status'] == REBUILD_SEARCH_PROCESSED) {
// Предупреждение $mc_class = 'warning'; break; case 4: // Нарушение $mc_class = 'danger'; break; default: $mc_class = ''; break; } $mc_select_type = array(); foreach ($lang['MC_COMMENT'] as $key => $value) { $mc_select_type[$key] = $value['type']; } $template->assign_block_vars('postrow', array('ROW_CLASS' => !($i % 2) ? 'row1' : 'row2', 'POST_ID' => $post_id, 'IS_NEWEST' => $post_id == $newest, 'POSTER_NAME' => profile_url(array('username' => $poster, 'user_rank' => $user_rank)), 'POSTER_NAME_JS' => addslashes($poster), 'POSTER_RANK' => $poster_rank, 'RANK_IMAGE' => $rank_image, 'POSTER_JOINED' => $bb_cfg['show_poster_joined'] ? $poster_longevity : '', 'POSTER_JOINED_DATE' => $poster_joined, 'POSTER_POSTS' => $bb_cfg['show_poster_posts'] ? $poster_posts : '', 'POSTER_FROM' => $bb_cfg['show_poster_from'] ? wbr($poster_from) : '', 'POSTER_BOT' => $poster_id == BOT_UID, 'POSTER_ID' => $poster_id, 'POSTER_AUTHOR' => $poster_id == $t_data['topic_poster'], 'POSTER_GENDER' => $bb_cfg['gender'] ? gender_image($postrow[$i]['user_gender']) : '', 'POSTED_AFTER' => $prev_post_time ? delta_time($postrow[$i]['post_time'], $prev_post_time) : '', 'IS_UNREAD' => is_unread($postrow[$i]['post_time'], $topic_id, $forum_id), 'IS_FIRST_POST' => !$start && $post_id == $t_data['topic_first_post_id'], 'MOD_CHECKBOX' => $moderation && ($start || defined('SPLIT_FORM_START')), 'POSTER_AVATAR' => $poster_avatar, 'POST_NUMBER' => $i + $start + 1, 'POST_DATE' => $post_date, 'MESSAGE' => $message, 'SIGNATURE' => $user_sig, 'EDITED_MESSAGE' => $l_edited_by, 'PM' => $pm_btn, 'PROFILE' => $profile_btn, 'QUOTE' => $quote_btn, 'EDIT' => $edit_btn, 'DELETE' => $delpost_btn, 'IP' => $ip_btn, 'POSTER_BIRTHDAY' => $bb_cfg['birthday_enabled'] && $this_date == $poster_birthday ? '<img src="' . $images['icon_birthday'] . '" alt="" title="' . $lang['HAPPY_BIRTHDAY'] . '" border="0" />' : '', 'MC_COMMENT' => $mc_type ? bbcode2html($mc_comment) : '', 'MC_BBCODE' => $mc_type ? $mc_comment : '', 'MC_CLASS' => $mc_class, 'MC_TITLE' => sprintf($lang['MC_COMMENT'][$mc_type]['title'], $mc_user_id), 'MC_SELECT_TYPE' => build_select("mc_type_{$post_id}", array_flip($mc_select_type), $mc_type), 'RG_AVATAR' => $rg_avatar, 'RG_NAME' => $rg_name, 'RG_URL' => GROUP_URL . $rg_id, 'RG_FIND_URL' => 'tracker.php?srg=' . $rg_id, 'RG_SIG' => $rg_signature, 'RG_SIG_ATTACH' => $postrow[$i]['attach_rg_sig'])); if ($postrow[$i]['post_attachment'] && $is_auth['auth_download'] && function_exists('display_post_attachments')) { display_post_attachments($post_id, $postrow[$i]['post_attachment']); } if ($moderation && !defined('SPLIT_FORM_START') && ($start || $post_id == $t_data['topic_first_post_id'])) { define('SPLIT_FORM_START', TRUE); } if ($poster_id != BOT_UID) { $prev_post_time = $postrow[$i]['post_time']; } } set_tracks(COOKIE_TOPIC, $tracking_topics, $topic_id, $max_post_time); if (defined('SPLIT_FORM_START')) { $template->assign_vars(array('SPLIT_FORM' => true, 'START' => $start, 'S_SPLIT_ACTION' => "modcp.php", 'POST_FORUM_URL' => POST_FORUM_URL, 'POST_TOPIC_URL' => POST_TOPIC_URL)); } // Quick Reply
$seeds = $tor['seeders']; $leechs = $tor['leechers']; $s_last = $tor['seeder_last_seen']; $att_id = $tor['attach_id']; $size = $tor['size']; $tor_magnet = create_magnet($tor['info_hash'], $passkey['auth_key'], $userdata['session_logged_in']); $compl = $tor['complete_count']; $dl_sp = $dl ? humn_size($dl, 0, 'KB') . '/s' : '0 KB/s'; $ul_sp = $ul ? humn_size($ul, 0, 'KB') . '/s' : '0 KB/s'; $dl_class = isset($tor['dl_status']) ? $dl_link_css[$tor['dl_status']] : 'genmed'; $row_class = !($row_num & 1) ? $row_class_1 : $row_class_2; $row_num++; $cat_id = !$hide_cat && isset($tor['cat_id']) ? $tor['cat_id'] : ''; $forum_id = !$hide_forum && isset($tor['forum_id']) ? $tor['forum_id'] : ''; $poster_id = !$hide_author && isset($tor['poster_id']) ? $tor['poster_id'] : ''; $template->assign_block_vars('tor', array('CAT_ID' => $cat_id, 'CAT_TITLE' => $cat_id ? $cat_title_html[$cat_id] : '', 'FORUM_ID' => $forum_id, 'FORUM_NAME' => $forum_id ? $forum_name_html[$forum_id] : '', 'TOPIC_ID' => $tor['topic_id'], 'TOPIC_TITLE' => wbr($tor['topic_title']), 'TOPIC_TIME' => bb_date($tor['topic_time'], 'd-M-y') . ' <b>·</b> ' . delta_time($tor['topic_time']), 'POST_ID' => $tor['post_id'], 'POSTER_ID' => $poster_id, 'USERNAME' => $hide_author ? '' : profile_url(array('username' => $tor['username'], 'user_rank' => $tor['user_rank'])), 'ROW_CLASS' => $row_class, 'ROW_NUM' => $row_num, 'DL_CLASS' => $dl_class, 'IS_NEW' => !IS_GUEST && $tor['reg_time'] > $lastvisit, 'USER_AUTHOR' => !IS_GUEST && $poster_id == $user_id, 'ATTACH_ID' => $att_id, 'MAGNET' => $tor_magnet, 'TOR_TYPE' => is_gold($tor['tor_type']), 'TOR_FROZEN' => !IS_AM ? isset($bb_cfg['tor_frozen'][$tor['tor_status']]) : '', 'TOR_STATUS_ICON' => $bb_cfg['tor_icons'][$tor['tor_status']], 'TOR_STATUS_TEXT' => $lang['TOR_STATUS_NAME'][$tor['tor_status']], 'TOR_SIZE_RAW' => $size, 'TOR_SIZE' => humn_size($size), 'UL_SPEED' => $ul_sp, 'DL_SPEED' => $dl_sp, 'SEEDS' => $seeds ? $seeds : 0, 'SEEDS_TITLE' => $seeds ? $lang['SEEDERS'] : $lang['SEED_NOT_SEEN'] . ":\n " . ($s_last ? bb_date($s_last, $date_format) : $lang['NEVER']), 'LEECHS' => $leechs ? $leechs : 0, 'COMPLETED' => $compl ? $compl : 0, 'REPLIES' => $tor['topic_replies'], 'VIEWS' => $tor['topic_views'], 'ADDED_RAW' => $tor['reg_time'], 'ADDED_TIME' => bb_date($tor['reg_time'], $time_format), 'ADDED_DATE' => bb_date($tor['reg_time'], $date_format, false))); } } } else { $template->assign_vars(array('TOR_NOT_FOUND' => true, 'NO_MATCH_MSG' => $lang['BT_NO_SEARCHABLE_FORUMS'])); } // Pagination if ($tor_count) { $base_url = "{$tracker_url}?search_id={$search_id}"; $search_matches = $tor_count == 1 ? sprintf($lang['FOUND_SEARCH_MATCH'], $tor_count) : sprintf($lang['FOUND_SEARCH_MATCHES'], $tor_count); $search_max = "(max: {$tor_search_limit})"; generate_pagination($base_url, $tor_count, $per_page, $start); $template->assign_vars(array('MATCHES' => $search_matches, 'SERACH_MAX' => $search_max)); } if (empty($cat_forum)) { bb_die($lang['BT_NO_SEARCHABLE_FORUMS']);
} } } if ($s_mode != 'full' && $seeders) { $seeders[strlen($seeders) - 9] = ' '; $template->assign_vars(array('SEED_LIST' => $seeders, 'SEED_COUNT' => $seed_count ? $seed_count : 0)); } if ($s_mode != 'full' && $leechers) { $leechers[strlen($leechers) - 9] = ' '; $template->assign_vars(array('LEECH_LIST' => $leechers, 'LEECH_COUNT' => $leech_count ? $leech_count : 0)); } } unset($peers); // Show "seeder last seen info" if ($s_mode == 'count' && !$seed_count || !$seeders && !defined('SEEDER_EXIST')) { $last_seen_time = $tor_info['seeder_last_seen'] ? delta_time($tor_info['seeder_last_seen']) : $lang['NEVER']; $template->assign_vars(array('SEEDER_LAST_SEEN' => sprintf($lang['SEEDER_LAST_SEEN'], $last_seen_time))); } } $template->assign_block_vars('tor_title', array('U_DOWNLOAD_LINK' => $download_link)); if ($peers_cnt > $max_peers_before_overflow && $s_mode == 'full') { $template->assign_vars(array('PEERS_DIV_STYLE' => $peers_div_style_overflow)); $template->assign_vars(array('PEERS_OVERFLOW' => true)); } else { $template->assign_vars(array('PEERS_DIV_STYLE' => $peers_div_style_normal)); } } if ($bb_cfg['bt_allow_spmode_change'] && $s_mode != 'full') { $template->assign_vars(array('PEERS_FULL_LINK' => true, 'SPMODE_FULL_HREF' => "viewtopic.php?" . POST_TOPIC_URL . "={$bt_topic_id}&spmode=full#seeders")); } $template->assign_vars(array('SHOW_DL_LIST_LINK' => ($bb_cfg['bt_show_dl_list'] || $bb_cfg['allow_dl_list_names_mode']) && $t_data['topic_dl_type'] == TOPIC_DL_TYPE_DL, 'SHOW_TOR_ACT' => $tor_reged && $show_peers && (!isset($bb_cfg['tor_no_tor_act'][$tor_info['tor_status']]) || IS_AM), 'S_MODE_COUNT' => $s_mode == 'count', 'S_MODE_NAMES' => $s_mode == 'names', 'S_MODE_FULL' => $s_mode == 'full', 'PEER_EXIST' => $seeders || $leechers || defined('SEEDER_EXIST') || defined('LEECHER_EXIST'), 'SEED_EXIST' => $seeders || defined('SEEDER_EXIST'), 'LEECH_EXIST' => $leechers || defined('LEECHER_EXIST'), 'TOR_HELP_LINKS' => $bb_cfg['tor_help_links'], 'CALL_SEED' => $bb_cfg['callseed'] && $tor_reged && !isset($bb_cfg['tor_no_tor_act'][$tor_info['tor_status']]) && $seed_count < 3 && $tor_info['call_seed_time'] < TIMENOW - 86400));
function birthday_age($date) { global $bb_cfg; if (!$date) { return; } $tz = TIMENOW + 3600 * $bb_cfg['board_timezone']; return delta_time(strtotime($date, $tz)); }