Пример #1
0
}
$bname = $barr["NAME"];
// check if can post
if (bbs_checkreadperm($uid, $bid) == 0) {
    print "没有阅读权限。";
    exit;
}
if (bbs_is_readonly_board($barr)) {
    print "版面为只读状态。";
    exit;
}
if (bbs_checkpostperm($uid, $bid) == 0) {
    print "没有发表权限。";
    exit;
}
if (bbs_deny_me($userid, $bname)) {
    print "您被取消了发表权限。";
    exit;
}
// check from
$fromsite = $_POST["site"];
$fromboard = $_POST["fromboard"];
// check title and content
$title = $_POST["title"];
if ($title == "") {
    print "没有文章标题。";
    exit;
}
// get content
$fname_origin = "tmp/remotepost_{$rpid}_origin";
$fname = "tmp/remotepost_{$rpid}";
Пример #2
0
// 检查用户能否阅读该版
$brdarr = array();
$brdnum = bbs_getboard($board, $brdarr);
if ($brdnum == 0) {
    html_error_quit("错误的讨论区");
}
$board = $brdarr["NAME"];
bbs_set_onboard($brdnum, 1);
$usernum = $currentuser["index"];
if (bbs_checkreadperm($usernum, $brdnum) == 0) {
    html_error_quit("错误的讨论区");
}
if (bbs_checkpostperm($usernum, $brdnum) == 0) {
    html_error_quit("错误的讨论区或者您无权在此讨论区发表文章");
}
if (bbs_deny_me($userid, $board)) {
    html_error_quit("您被管理员取消了本版的发文权限");
}
if (bbs_is_readonly_board($brdarr)) {
    html_error_quit("不能在只读讨论区发表文章");
}
if (bbs_member_post_perm($usernum, $brdnum) == 0) {
    html_error_quit("本版为驻版可写版面,非驻版用户不能发表文章");
}
if (isset($_GET["reid"])) {
    $reid = $_GET["reid"];
    if (bbs_is_noreply_board($brdarr)) {
        html_error_quit("本版只可发表文章,不可回复文章!");
    }
} else {
    $reid = 0;
Пример #3
0
 /**
  * function isDeny check whether board deny user
  *
  * @param User $user
  * @return boolean true|false
  * @access public
  */
 public function isDeny($user)
 {
     return bbs_deny_me($user->userid, $this->NAME) != 0;
 }