Example #1
0
function sysvote_is_admin($currentuser)
{
    global $sysVoteConfig;
    if (bbs_is_bm($sysVoteConfig["BRDNUM"], $currentuser["index"])) {
        return TRUE;
    } else {
        return FALSE;
    }
}
Example #2
0
 function bbs_can_edit_article($board, $article, $user)
 {
     if (bbs_is_bm($board["NUM"], $user["index"]) || bbs_is_owner($article, $user)) {
         return 1;
     } else {
         return 0;
     }
 }
Example #3
0
<?php 
    @(include "pc/pcconf.php");
    if (isset($pcconfig["BOARD"])) {
        ?>
		<div class="mi"><a href="bbsdoc.php?board=<?php 
        echo $pcconfig["BOARD"];
        ?>
">Blog论坛</a></div>
<?php 
    }
    if ($currentuser && $currentuser["index"]) {
        //blog manage menu
        if (isset($pcconfig["BOARD"])) {
            $brdarr = array();
            $pcconfig["BRDNUM"] = bbs_getboard($pcconfig["BOARD"], $brdarr);
            if (bbs_is_bm($pcconfig["BRDNUM"], $currentuser["index"])) {
                ?>
		<div class="mi"><a href="pc/pcadmin_rec.php">Blog管理</a></div>
<?php 
            }
        }
    }
    //blog manage menu
    ?>
		<div class="lmi"><a href="pc/index.php?id=SYSOP">帮助主题</a></div>
		</div>
<?php 
}
// defined(BBS_HAVE_BLOG)
if ($currentuser["userid"] != "guest") {
    ?>
Example #4
0
require "www2-funcs.php";
require "www2-board.php";
login_init();
bbs_session_modify_user_mode(BBS_MODE_READING);
if (isset($_GET["board"])) {
    $board = $_GET["board"];
} else {
    html_error_quit("错误的讨论区");
}
$brdarr = array();
$bid = bbs_getboard($board, $brdarr);
if ($bid == 0) {
    html_error_quit("错误的讨论区");
}
$usernum = $currentuser["index"];
if (!bbs_is_bm($bid, $usernum)) {
    html_error_quit("你不是版主");
}
$board = $brdarr['NAME'];
$brd_encode = urlencode($board);
bbs_board_nav_header($brdarr, "自定版面封禁理由");
if (isset($_GET['act'])) {
    switch ($_GET['act']) {
        case 'set':
            if (!isset($_POST['setreason'])) {
                html_error_quit("错误的参数");
            }
            $setreason = $_POST['setreason'];
            switch (bbs_setdenyreason($board, $setreason)) {
                case -1:
                    html_error_quit("讨论区错误");
Example #5
0
        }
    }
    $ret = bbs_start_vote($board, $type, $numlogin, $numpost, $numstay, $numday, $trueflag, $ipflag, $title, $ball_desp, $ball_maxdays, $ball_maxtkt, $ball_totalitems, $items[0], $items[1], $items[2], $items[3], $items[4], $items[5], $items[6], $items[7], $items[8], $items[9]);
    if ($ret <= 0) {
        html_error_quit("开投票错误." . $ret);
    } else {
        html_success_quit("开投票成功<br/><a href='bbsdoc.php?board=" . $board . "'>返回本讨论区</a>");
    }
}
$usernum = $currentuser["index"];
$brdarr = array();
$brdnum = bbs_getboard($board, $brdarr);
if ($brdnum == 0) {
    html_error_quit("错误的讨论区");
}
if (!bbs_is_bm($brdnum, $usernum)) {
    html_error_quit("你不是版主");
}
bbs_board_nav_header($brdarr, "新开投票");
?>
<script type="text/javascript">
<!--//
var maxitemnum=10;
var defaultitem=3;
function doGenerate(){
	var oSelectType=document.getElementById("oType");
	var type=oSelectType.value;
	var targetDiv=document.getElementById("oDiv");
	var content="";
	var i;
	if  ( (type=="1")  || (type=="2")  || (type=="3") ){
Example #6
0
function pc_is_manager($currentuser)
{
    global $pcconfig;
    if (!$currentuser || !$currentuser["index"]) {
        return FALSE;
    }
    $ret = bbs_is_bm($pcconfig["BRDNUM"], $currentuser["index"]);
    return $ret;
}
Example #7
0
$isnormalboard = bbs_safe_getboard(0, $board, $brdarr);
if (is_null($isnormalboard)) {
    html_error_quit("错误的讨论区");
}
$board = $brdarr["NAME"];
$brdnum = $brdarr["BID"];
if ($brdarr["FLAG"] & BBS_BOARD_GROUP) {
    $i = get_secname_index($brdarr["SECNUM"]);
    if ($i >= 0) {
        Header("Location: bbsboa.php?group=" . $i . "&group2=" . $brdnum);
        return;
    }
    html_error_quit("错误的讨论区");
}
$usernum = $currentuser["index"];
$isbm = bbs_is_bm($brdnum, $usernum);
$managemode = isset($_GET["manage"]);
if ($managemode) {
    if (!$isbm) {
        html_error_quit("你不是版主");
    }
    define('ARTCNT', 50);
} else {
    define('ARTCNT', 20);
}
if ($managemode) {
    if (isset($_GET["ftype"])) {
        $ftype = intval($_GET["ftype"]);
        if ($ftype != $dir_modes["NORMAL"] && $ftype != $dir_modes["DELETED"]) {
            $ftype = $dir_modes["NORMAL"];
        }
Example #8
0
    if (defined("ENABLE_JSMATH") && $use_tex && $articles[0]["IS_TEX"]) {
        $url .= "&tex=yes";
    }
    header($url);
    exit;
}
if (isset($_GET["ftype"])) {
    $ftype = intval($_GET["ftype"]);
} else {
    $ftype = $dir_modes["NORMAL"];
}
$dir_perm = bbs_is_permit_mode($ftype, 1);
if (!$dir_perm) {
    html_error_quit("错误的模式");
}
if ($ftype == $dir_modes["DELETED"] && !bbs_is_bm($brdnum, $usernum)) {
    html_error_quit("你不能看这个东西哟。");
}
$total = bbs_countarticles($brdnum, $ftype);
if ($total <= 0) {
    html_error_quit("错误的文章号,原文可能已经被删除");
}
$articles = array();
if ($dir_perm == 1) {
    //sorted
    $articles = array();
    $num = bbs_get_records_from_id($brdarr["NAME"], $id, $ftype, $articles);
    if ($num <= 0) {
        html_error_quit("错误的文章号,原文可能已经被删除<script>clearArticleDiv(" . $id . ");</script>");
    }
    if ($ftype == $dir_modes["ZHIDING"]) {