$r_count = db_query("SELECT\n user\n FROM " . $pref . "stats"); $side = 20; $a_count = db_result($r_count); $count = $a_count['user']; // pages $pages = $count / $side; $pages = bcadd($pages, 0, 0); if (bcmul($pages, $side, 0) < $count) { $pages++; } // mem_nav if (!isset($page)) { $page = 1; } $data['mem_na'] = check_pages($count, $side, $page, 0, 'memberlist.php?method=' . $method . '&art=' . $art); $data['mem_nav'] = check_pages($count, $side, $page, 1, 'memberlist.php?method=' . $method . '&art=' . $art); // define LIMIT if ($page == 'last') { $page = $pages; } $page = intval($page); if ($page < 1) { $page = 1; } $start = ($page - 1) * $side; $limit = $start . ', ' . $side; $memberslist = ''; $r_user = db_query("SELECT\n user_id,\n\t user_name,\n\t user_mail,\n\t user_nomail,\n\t user_icq,\n\t user_hp,\n\t user_ort,\n\t post_count,\n\t user_join,\n\t user_lastpostt\n FROM " . $pref . "user ORDER BY " . $order . " " . $opt . " LIMIT " . $limit . " "); $i = 0; while ($user = db_result($r_user)) { if (U_ID < 1) {
// deleteicon $data['zeichen'] = ''; if (P_SHOWDELETED == 1) { $data['zeichen'] = ' <img src="templates/[styletemplate]/images/delete.gif" /> Thread verschoben<br />'; } // thread_nav $r_linkcount = db_query("SELECT\n COUNT(thread_id)\n FROM " . $pref . "thread WHERE link='" . $board['board_id'] . "'"); $a_linkcount = db_result($r_linkcount); list(, $linked) = each($a_linkcount); $th_count = $linked; $th_count += $board['threads']; if (P_SHOWDELETED == 1) { $th_count += $board['threads_del']; } $data['thread_nav'] = check_pages($th_count, $config['thread_rows'], $page, 0, 'board.php?boardid=' . $board['board_id']); // define LIMIT if ($page == 'last') { $page = $a_board['threads']; } $page = intval($page); if ($page < 1) { $page = 1; } $start = ($page - 1) * $config['thread_rows']; $limit = $start . ', ' . $config['thread_rows']; // threadrows-------------------------------- $r_thread = db_query("SELECT\n thread_id,\n\t\t\t board_id,\n replies,\n thread_autor,\n thread_topic,\n last_act_time,\n last_post_id,\n last_act_user,\n thread_icon,\n thread_views,\n\t\t\t thread_closed,\n sticky,\n deleted,\n replies_del,\n link\n FROM " . $pref . "thread WHERE board_id='" . $board['board_id'] . "' OR link='" . $board['board_id'] . "' ORDER BY sticky DESC,last_act_time DESC LIMIT " . $limit . " "); if (db_rows($r_thread) < 1) { $data['threads'] = '<tr><td class="cellb" colspan="6"><center><font color="[color_err]">Noch keine Threads angelegt.</font></center></td></tr>'; } else {
if (strlen($category['category_name']) > 30) { $category['category_name'] = substr($category['category_name'], 0, 27) . '...'; } // posts ------------------------------------------------- $count = $thread['replies'] + 1; if (P_SHOWDELETED == 1) { $count += $thread['replies_del']; } // pages $pages = $count / $config['post_rows']; $pages = bcadd($pages, 0, 0); if (bcmul($pages, $config['post_rows'], 0) < $count) { $pages++; } // thread_nav $data['thread_nav'] = check_pages($count, $config['post_rows'], $page, 1, 'showtopic.php?threadid=' . $threadid . '&boardid=' . $boardid); // define LIMIT if ($page == 'last') { $page = $pages; } $page = intval($page); if ($page < 1) { $page = 1; } $start = ($page - 1) * $config['post_rows']; $limit = $start . ', ' . $config['post_rows']; $post_num = ($page - 1) * $config['post_rows']; $session_var_name = 'b' . $boardid; $r_post = db_query("SELECT\n post_id,\n\t user_id,\n\t post_time,\n\t post_text,\n\t guest_name,\n\t post_ip,\n\t bcode,\n\t post_smilies,\n\t last_edit_by,\n\t last_edit_time,\n\t last_edit_ip,\n\t edit_count,\n\t deleted\n FROM " . $pref . "post WHERE thread_id='{$threadid}' LIMIT " . $limit . " "); if (db_rows($r_post) == 0) { $posts = '<tr><td colspan="2" class="cellb"><center>Keine Posts in diesem Thread</center></td></tr>';