예제 #1
0
파일: bbs0an.php 프로젝트: bianle/www2
    }
    /* </div>: dirty way ... for closing <div class="doc"> */
}
require_once 'www2-funcs.php';
require_once 'www2-board.php';
login_init();
bbs_session_modify_user_mode(BBS_MODE_CSIE_ANNOUNCE);
if (isset($_GET["p"])) {
    $numpath = $_GET["p"];
    $brdarr = array();
    $bid = $numpath;
    settype($bid, "integer");
    if ($bid == 0) {
        html_error_quit("错误的版面");
    }
    $board = bbs_getbname($bid);
    if (!$board) {
        html_error_quit("错误的讨论区");
    }
    if ($bid != bbs_getboard($board, $brdarr)) {
        html_error_quit("错误的讨论区");
    }
    $board = $brdarr['NAME'];
    $path = bbs_ann_num2path($numpath, $currentuser["userid"]);
    if ($path == false) {
        html_error_quit("错误的文章");
    }
    $path = substr($path, 10, strlen($path) - 9);
} else {
    if (isset($_GET['path'])) {
        $path = trim($_GET['path']);
예제 #2
0
파일: topics.php 프로젝트: bianle/www2
<?php

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) {
예제 #3
0
파일: bbscon.php 프로젝트: bianle/www2
<?php

require "www2-funcs.php";
require "www2-board.php";
login_init();
bbs_session_modify_user_mode(BBS_MODE_READING);
$brdarr = array();
if (isset($_GET["bid"])) {
    $brdnum = $_GET["bid"];
    settype($brdnum, "integer");
    if ($brdnum == 0) {
        html_error_quit("错误的讨论区!");
    }
    $board = bbs_getbname($brdnum);
    if (!$board) {
        html_error_quit("错误的讨论区");
    }
    if ($brdnum != bbs_getboard($board, $brdarr)) {
        html_error_quit("错误的讨论区");
    }
} else {
    html_error_quit("错误的讨论区");
}
//$isnormalboard=bbs_normalboard($board);
$lookupuser = array();
$guestUID = bbs_getuser("guest", $lookupuser);
$isnormalboard = bbs_checkreadperm($guestUID, $brdnum);
$usernum = $currentuser["index"];
if (!$isnormalboard && bbs_checkreadperm($usernum, $brdnum) == 0) {
    html_error_quit("错误的讨论区");
}