Esempio n. 1
0
        html_nologin();
        exit;
    } elseif (!strcmp($currentuser["userid"], "guest")) {
        html_init("gb2312");
        html_error_quit("guest 不能发表评论!\n<br>\n<a href=\"/\" target=\"_top\">现在登录</a>");
        exit;
    }
}
pc_html_init("gb2312", $pcconfig["BBSNAME"] . "Blog", "", "", "", 1);
if (!$rows) {
    html_error_quit("所评论的文章不存在!");
    exit;
}
$uid = $rows["uid"];
if (!$pc["ANONYCOMMENT"]) {
    if (!pc_can_comment($link, $uid)) {
        html_error_quit("对不起,您尚无该BLOG的评论权限!");
        exit;
    }
}
$userPermission = pc_get_user_permission($currentuser, $pc);
$sec = $userPermission["sec"];
$pur = $userPermission["pur"];
$tags = $userPermission["tags"];
if (!$tags[$rows["access"]]) {
    html_error_quit("对不起,您不能查看本条记录!");
    exit;
}
if ($act == "pst") {
    ?>
<br><center>		
Esempio n. 2
0
                mysql_query($query, $link);
            }
            @mysql_free_result($result);
        }
        pc_return("pccon.php?id=" . $rows["uid"] . "&nid=" . $rows["nid"] . "&s=all");
    } elseif ($act == "edit") {
        $query = "SELECT `subject`,`body`,`htmltag`,`uid`,`nid` FROM comments WHERE `cid` = '" . $cid . "' AND `username` = '" . $currentuser["userid"] . "' LIMIT 0 , 1 ;";
        $result = mysql_query($query);
        $rows = mysql_fetch_array($result);
        mysql_free_result($result);
        if (!$rows) {
            pc_html_init("gb2312", $pcconfig["BBSNAME"] . "Blog");
            html_error_quit("所选择的评论不存在!");
            exit;
        }
        if (!pc_can_comment($link, $rows["uid"])) {
            html_error_quit("对不起,您尚无该BLOG的评论权限!");
            exit;
        }
        //判定评论文章是否用了编辑器,根据情况调入 windinsn feb 22 , 2004
        if ($rows["htmltag"]) {
            pc_html_init("gb2312", $pcconfig["BBSNAME"] . "Blog", "", "", "", 1);
        } else {
            pc_html_init("gb2312", $pcconfig["BBSNAME"] . "Blog");
        }
        ?>
<br><center>
<form name="postform" action="pceditcom.php?act=edit2&cid=<?php 
        echo $cid;
        ?>
&id=<?php