cmBlacklist.jsp
上传用户:u_thks
上传日期:2022-07-31
资源大小:1910k
文件大小:9k
- <%@ page language="java" contentType="text/html;charset=UTF-8"
- errorPage="err.jsp" %>
- <%@ include file="./GVinc/gvImport.jsp" %>
- <jsp:useBean id="cci" scope="page" class="com.gamvan.club.classed.ClubClassInfo"/>
- <jsp:useBean id="cbe" scope="request" class="com.gamvan.club.user.ClubBlackEdit"/>
- <%@ include file="./GVinc/gvClassInfo.jsp" %>
- <%
- int iPage = 1;
- if(request.getParameter("iPage")!=null){
- iPage = Integer.parseInt(request.getParameter("iPage"));
- }
- String act = "";
- if(request.getParameter("act")!=null){
- act = request.getParameter("act");
- }
- if(request.getMethod().equals("POST")){
- String [] bIDs;
- bIDs = request.getParameterValues("bID");
- if(act.equals("1")){
- cbe.updateBlackOver(bIDs, 1);
- out.print(prtCenter("提前解禁成功","cmBlacklist.jsp?ccID="+ccID+"",1));
- }else if(act.equals("2")){
- cbe.updateBlackOver(bIDs, 0);
- out.print(prtCenter("解除提前解禁成功","cmBlacklist.jsp?ccID="+ccID+"",1));
-
- }else if(act.equals("3")){
- cbe.delBlackUser(bIDs);
- out.print(prtCenter("删除成功","cmBlacklist.jsp?ccID="+ccID+"",1));
- }else{
- out.print(prtCenter("请选择操作内容","",2));
- }
- out.close();
- if(true)return;
- }
- %>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title><%=clubTitle%>>><%
- if(ccIDD1>0){
- out.print(ccName2 +">>");
- }
- %>
- <%
- if(ccIDD>0){
- out.print(ccName1 +">>");
- }
- %>
- <%=ccName%>
- </title>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <link href="./GVimgs/favicon.ico" rel="Bookmark">
- <link rel="icon" href="./GVimgs/favicon.ico" type="image/x-icon" />
- <link rel="shortcut icon" href="./GVimgs/favicon.ico" type="image/x-icon" />
- <link href="./GVinc/main.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
- <DIV id="waitDiv" style="LEFT: 40%; VISIBILITY: hidden; POSITION: absolute; TOP: 20%; TEXT-ALIGN: center">
- <TABLE cellPadding=6 border=0>
- <TBODY><TR><TD align=middle>
- <IMG src="GVimgs/loading.gif" alt="请稍候..." width="30" height="30">
- <BR>
- <FONT color="red">数据载入中,请稍候...</FONT></TD></TR></TBODY></TABLE></DIV>
- <script language="javascript" type="text/javascript" src="GVscript/GVtopCode.js"></script>
- <script language="javascript" type="text/javascript" src="GVscript/GVshowMenu.js"></script>
- <script language="javascript" type="text/javascript" src="GVscriptInc/topBar.js"></script>
- <SCRIPT language="javascript">gv_showWait('waitDiv', 1); </SCRIPT>
- <%
- //权限判断开始
- if(ccID<=0){
- out.print(errs(3,"您所请求的版面不存在或已被删除!"));
- out.close();
- if(true) return;
- }
- if(!isPass(gvUserGradeTxt,34)){
- out.print(errs(1,"您的级别("+ gvUserGradeName +")不能进行此项操作,如果你还没有登陆,请先登陆!"));
- out.close();
- if(true) return;
- }
- %>
- <table width="99%" border="0" align="center" cellpadding="2" cellspacing="1" class="tab">
- <tr class="tab1">
- <td>
- <strong>您的位置</strong>>><a href="default.jsp" target="_parent">社区首页</a>>>
- <a href="main.jsp">进站画面</a>>>
- <%
- temp = "";
- if(ccIDD1>0){
- out.print("<a href="clubClass.jsp?ccID="+ ccID2 +"&ccStyle="+ ccStyle +"">"+ ccName2 +"</a>>>");
- temp = ccName2 + ">>";
- }
- %>
- <%
- if(ccIDD>0){
- out.print("<a href="clubClass.jsp?ccID="+ ccID1 +"&ccStyle="+ ccStyle +"">"+ ccName1 +"</a>>>");
- temp += ccName1 + ">>";
- }
- temp += ccName + ">>";
- %>
- <a href="clubClass.jsp?ccID=<%=ccID%>&ccStyle=<%=ccStyle%>"><%=ccName%></a>>>
- 黑名单管理
- <SCRIPT language="javascript">prtie('<%=clubName%>>><%=temp%> 黑名单管理');</SCRIPT>
- </td>
- </tr>
- </table>
- <table width="99%" border="0" align="center" cellpadding="2" cellspacing="1" class="tab">
- <tr>
- <td height="22" colspan="5" class="tab1">
- <strong>
- <a href="cmUserop.jsp?ccID=<%=ccID%>">更新管理员</a>
- <a href="clubClassManage.jsp?ccID=<%=ccID%>">更新版面寄语</a>
- <a href="cmAffiche.jsp?ccID=<%=ccID%>">管理公告</a>
-
- <a href="cmUserArticle.jsp?ccID=<%=ccID%>">文章批量管理</a>
-
- <a href="cmBlacklist.jsp?ccID=<%=ccID%>">黑名单管理</a>
- </strong>
- </td>
- </tr>
- <tr>
- <td colspan="5" class="tab3">
- </td>
- </tr>
- <tr>
- <td height="24" colspan="5" class="tab1"><strong>
- <a href="cmBlackEdit.jsp?ccID=<%=ccID%>">添加到黑名单</a>
- <a href="cmBlacklist.jsp?ccID=<%=ccID%>">黑名单列表</a>
- </strong></td>
- </tr>
- </table>
- <script language="JavaScript" type="text/javascript">tabline(1,4,"#ffffff");</script>
- <table width="99%" border="0" align="center" cellpadding="4" cellspacing="1" class="tab">
- <form name="form1" method="post" action="">
- <tr>
- <td width="40" align="center"><strong>操作</strong></td>
- <td width="100" align="center"><strong>用户ID</strong></td>
- <td width="30" align="center"><strong>状态</strong></td>
- <td align="center"><strong>原因</strong></td>
- <td width="110" align="center"><strong>被黑地点</strong></td>
- <td width="115" align="center"><strong>操作时间</strong></td>
- <td width="30" align="center"><strong>天</strong></td>
- <td width="80" align="center"><strong>操作人</strong><strong></strong></td>
- <td width="50" align="center"><strong>编辑</strong></td>
- </tr>
- <%
- int totalPage = 0;
- Pageable rs;
- String sql;
- sql= "Select * From GVclubBlackList where ccID="+ccID+" order by bID desc";
- //out.print(sqlCommand);
- String blackUserName="",byUserName, byAddTime, byUserIp="";
- int bID=0, userID=0;
- // int blackDate=0, blackOver=0;
- // String blackTxt="";
- boolean isAfter=false;
- try{
- cr.setSqlCommand(sql);
- cr.setPageNum(20); //设置每页显是行数
- cr.setPage(iPage); //设置当前页
- rs = cr.gvrs(); //
- int pageRows = cr.getPageRows(); //返回当前页行数
- totalPage = cr.getTotalPage();
-
-
- java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("yyyy-MM-dd");
- //String isDate = sdf.format(new java.util.Date());
- String isDate = new String();
- Calendar Now =Calendar.getInstance();
- int year = Now.get(Calendar.YEAR);
- int mon = Now.get(Calendar.MONTH);
- int day = Now.get(Calendar.DAY_OF_MONTH);
- if(pageRows>0){
- for(int i=0; i<pageRows; i++){
- bID = rs.getInt(1);
- blackUserName = rs.getString(2);
- blackTxt = rs.getString(4);
- blackDate = rs.getInt(5);
- blackOver = rs.getInt(6);
- byUserName = rs.getString(7);
- byAddTime = rs.getString(8);
- byUserIp= rs.getString(9);
- ccID = rs.getInt(10);
- userID = rs.getInt(11);
- java.util.Date date1 = sdf.parse(byAddTime);
- isDate = String.valueOf(year) + "-" + String.valueOf(mon+1) + "-" + String.valueOf(day-blackDate);
- java.util.Date date0 = sdf.parse(isDate);
- isAfter = date0.after(date1);
-
- %>
- <tr align="center" bgcolor="#f6f6f6">
- <td bgcolor="#f6f6f6"><input name="bID" type="checkbox" id="bID" value="<%=bID%>">
- </td><td>
- <a href="../userInfo.jsp?userID=<%=userID%>" target="_blank"><%=blackUserName%></a>
- </td>
- <td>
- <%
- //out.print(Now);
- if(isAfter){
- out.print("<font color=#bb0000>解</font>");
- }else{
- if(blackOver==1){
- out.print("<font color=#bb0000>解</font>");
- }else{
- out.print("禁");
- }
- }
- %>
- </td><td>
- <%=blackTxt%>
- </td><td>
- <%
- if(ccID==0){
- out.print("全部版面");
- }else{
- cci.classInfo(ccID);
- out.print(cci.getName());
- }
- %>
- </td>
- <td>
- <span class="smallTxt"><%=byAddTime%></span>
- </td>
- <td>
- <span class="smallTxt"><%=blackDate%></span>
- </td>
- <td>
- <%=byUserName%>
- </td>
- <td><a href="cmBlackEdit.jsp?ccID=<%=ccID%>&bID=<%=bID%>">编辑</a></td>
- </tr>
- <%
- rs.next();
- }
- rs.close();
- cr.closeAll();
- }else{
- out.print("<tr bgcolor="#f6f6f6"><td height="30" colspan="20" align="center">黑名单暂无用户信息</td></tr>");
- }
- }catch(Exception e){
- out.print(e.toString()+"<tr bgcolor="#f6f6f6"><td height="30" colspan="20" align="center">意外错误,程序中止!</td></tr>");
-
- }finally{
- cr.closeAll();
- }
- %>
- <tr bgcolor="#f6f6f6"><td height="30" colspan="11" bgcolor="#f6f6f6">
- <select name="act" id="act">
- <option value="0" selected>请选择操作项目</option>
- <option value="1">给用户提前解禁</option>
- <option value="2">解除用户提前解禁</option>
- <option value="3">删除黑名单记录同时解禁</option>
- </select>
-
- <input name="gvSubmit" type="submit" id="gvSubmit" value="确定操作"></td>
- </tr>
- </form>
- </table>
- <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
- <tr>
- <td><%
- out.print(pageJump(totalPage, iPage, "cmBlacklist.jsp?ccID="+ccID+"&"));
- %></td>
- </tr>
- </table>
- <script language="JavaScript" type="text/javascript">tabline(1,2,"#ffffff");</script>
- <%=Gfoot()%>
- </body>
- </html>