Esempio n. 1
0
include "funcs.php";
$bid = $_GET["bid"];
if (isset($_GET["page"])) {
    $page = $_GET["page"];
} else {
    $page = 0;
}
$bname = bbs_getbname($bid);
if ($bname == "") {
    ie("board not found.");
}
if (!bbs_checkreadperm($uid, $bid)) {
    ie("permission denied.");
}
bbs_checkorigin($bname);
$total = bbs_countarticles($bid, $dir_modes["ORIGIN"]);
$pagecount = ceil($total / PAGE_SIZE);
if ($page < 0) {
    $page = 0;
}
if ($page > $pagecount) {
    $page = $pagecount;
}
if ($page == 0) {
    $page = $pagecount;
}
$start = ($page - 1) * PAGE_SIZE + 1;
$count = PAGE_SIZE;
if ($page == $pagecount) {
    cache_header("nocache");
Esempio n. 2
0
$num = bbs_get_threads_from_gid($bid, $gid, $start, $articles, $haveprev);
if ($num == 0) {
    html_error_quit("错误的参数");
}
$pagesize = 20;
$totalpage = ($num - 1) / $pagesize + 1;
$totalpage = intval($totalpage);
if ($pno < 1 || $pno > $totalpage) {
    $pno = 1;
}
$startnum = ($pno - 1) * $pagesize;
$endnum = $startnum + $pagesize;
if ($endnum > $num) {
    $endnum = $num;
}
bbs_checkorigin($board);
$origins = array();
$origin_num = bbs_get_records_from_id($board, $gid, $dir_modes["ORIGIN"], $origins);
if ($origin_num == 0) {
    $origins[0]["ID"] = $origins[2]["ID"] = $gid;
}
if ($isnormalboard) {
    /* cache 判断索引修改时间 - atppp */
    $dotdirname = bbs_get_board_index($board, $dir_modes["NORMAL"]);
    if (cache_header("public", @filemtime($dotdirname), 300)) {
        return;
    }
}
page_header("同主题-" . htmlspecialchars($brdarr["DESC"]) . "-" . htmlspecialchars($articles[0]["TITLE"]), "<a href=\"bbsdoc.php?board=" . $brd_encode . "\">" . htmlspecialchars($brdarr["DESC"]) . "</a>");
?>
<a name="top"></a>