300 order by $sort_clause limit $offset,$n"); top_host_table_start($sort_by); $i = $offset+1; while ($host = mysql_fetch_object($result)) { if ($sort_by == "total_credit") { show_host_row($host, $i, false, true); $i++; } else { if (!host_inactive_ndays($host, 7)) { show_host_row($host, $i, false, true); $i++; } } } mysql_free_result($result); echo "\n"; if ($offset > 0) { $new_offset = $offset - $n; echo "Last $n | "; } $new_offset = $offset + $n; echo "Next $n"; if ($offset < 1000) { page_tail(true); end_cache(TOP_PAGES_TTL,$cache_args); } else { page_tail(); } ?>