$pc = pc_load_infor($link, $currentuser["userid"]); if (!$pc || !pc_is_admin($currentuser, $pc)) { pc_db_close($link); html_error_quit("对不起,您要查看的Blog不存在"); exit; } pc_html_init("gb2312", $pc["NAME"]); $buserid = $_GET["userid"]; if ($_GET["act"] == "add" && $buserid) { $lookupuser = array(); if (bbs_getuser($buserid, $lookupuser) == 0) { echo "<script language=\"javascript\">用户" . $buserid . "不存在!</script>"; } else { $buserid = $lookupuser["userid"]; if (!pc_in_blacklist($link, $buserid, $pc["UID"])) { pc_add_blacklist($link, $buserid, $pc["UID"]); } } } if ($_GET["act"] == "del" && $buserid) { pc_del_blacklist($link, $buserid, $pc["UID"]); } $query = "SELECT * FROM blacklist WHERE uid = " . $pc[UID] . ";"; $result = mysql_query($query, $link); $num = mysql_num_rows($result); ?> <br/> <p align="center">Blog黑名单</p> <center> <table cellspacing=0 cellpadding=5 width=90% class=t1 border=0> <tr>
/* ** blog黑名单 ** windinsn Mar 5 , 2004 */ require "pcadmin_inc.php"; pc_admin_check_permission(); $link = pc_db_connect(); pc_html_init("gb2312", $pcconfig["BBSNAME"] . "Blog黑名单管理"); $buserid = $_GET["userid"]; if ($_GET["act"] == "add" && $buserid) { $lookupuser = array(); if (bbs_getuser($buserid, $lookupuser) == 0) { echo "<script language=\"javascript\">alert('用户" . $buserid . "不存在!');</script>"; } else { $buserid = $lookupuser["userid"]; pc_add_blacklist($link, $buserid); $action = $currentuser[userid] . " 封禁 " . $buserid . " 在Blog中的评论权限"; pc_logs($link, $action, "", $buserid); } } if ($_GET["act"] == "del" && $buserid) { pc_del_blacklist($link, $buserid); $action = $currentuser[userid] . " 恢复 " . $buserid . " 在Blog中的评论权限"; pc_logs($link, $action, "", $buserid); } $query = "SELECT * FROM blacklist WHERE uid = 0;"; $result = mysql_query($query, $link); $num = mysql_num_rows($result); pc_admin_navigation_bar(); ?> <br />