clubBlackList.jsp
上传用户:u_thks
上传日期:2022-07-31
资源大小:1910k
文件大小:6k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

Java

  1. <%@ page language="java" contentType="text/html;charset=UTF-8" %>
  2. <%@ include file="../GVinc/gvInclude.jsp" %>
  3. <%@ include file="clubMasterPass.jsp" %>
  4. <jsp:useBean id="cci" scope="request" class="com.gamvan.club.ClubClassInfo"/>
  5. <jsp:useBean id="cbe" scope="request" class="com.gamvan.club.user.ClubBlackEdit"/>
  6. <% 
  7. //权限判断共享代码
  8. boolean ispass = false;
  9. //ArrayEdit ae = new ArrayEdit();
  10. ispass = ae.txtsArray(gvcmgTxt,9,"|");
  11. if(!ispass){
  12. out.print(prtCenter2("您无权进行此项操作!","",2));
  13. out.close();
  14. }
  15. //权限判断代码结束
  16. String act = "0";
  17. if(request.getParameter("act")!=null){
  18. act = request.getParameter("act");
  19. }
  20. if(request.getMethod().equals("POST")){
  21.  String [] bIDs;
  22. bIDs = request.getParameterValues("bID");
  23. if(act.equals("1")){
  24. cbe.updateBlackOver(bIDs, 1);
  25. out.print(prtCenter2("提前解禁成功","",2));
  26. }else if(act.equals("2")){
  27. cbe.updateBlackOver(bIDs, 0);
  28. out.print(prtCenter2("解除提前解禁成功","",2));
  29. }else if(act.equals("3")){
  30. cbe.delBlackUser(bIDs);
  31. out.print(prtCenter2("删除成功","clubBlackList.jsp",1));
  32. }else{
  33. out.print(prtCenter2("请选择操作内容","",2));
  34. }
  35. out.close();
  36. if(true)return;
  37. }
  38. %>
  39. <html>
  40. <head>
  41. <title>今晚在线-社区管理</title>
  42. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  43. <link href="css.css" rel="stylesheet" type="text/css">
  44. </head>
  45. <body>
  46. <script type="text/javascript" src="../GVscript/GVjumpPage.js"></script>
  47. <table width="99%" border="0" align="center" cellpadding="2" cellspacing="2" bgcolor="#e6e6e6">
  48.   <tr>
  49.     <td align="center"><strong>社区用户列表</strong></td>
  50.   </tr>
  51. </table>
  52. <table width="99%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#9AA8CB">
  53.  <form name="form2" method="get" action=""> <tr bgcolor="#f6f6f6">
  54.     <td bgcolor="#e6e6e6">
  55. <a href="clubBlackEdit.jsp">点击这里加入黑名单</a></td>
  56.   </tr>
  57.   </form>
  58. </table>
  59. <table width="99%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#e6e6e6">
  60. <form name="form1" method="post" action="">
  61.     <tr>
  62.       <td width="40" align="center"><strong>操作</strong></td>
  63.       <td width="100" align="center"><strong>用户ID</strong></td>
  64.       <td width="30" align="center"><strong>状态</strong></td>
  65.       <td align="center"><strong>原因</strong></td>
  66.       <td width="110" align="center"><strong>被黑地点</strong></td>
  67.       <td width="115" align="center"><strong>操作时间</strong></td>
  68.   <td width="30" align="center"><strong>天</strong></td>
  69.   <td width="80" align="center"><strong>操作人</strong><strong></strong></td>
  70.   <td width="50" align="center"><strong>编辑</strong></td>
  71.     </tr>
  72. <% 
  73. int totalPage = 0;
  74. int iPage = 1;
  75. if(request.getParameter("iPage")!=null){
  76. iPage = Integer.parseInt(request.getParameter("iPage"));
  77. }
  78. Pageable rs;
  79. String sqlCommand;
  80. sqlCommand = "Select * From GVclubBlackList order by bID desc";
  81. //out.print(sqlCommand);
  82. String blackUserName="",blackTxt="", byUserName, byAddTime, byUserIp="";
  83. int bID=0, blackDate=0, blackOver=0;
  84. boolean isAfter=false;
  85. try{
  86. cr.setSqlCommand(sqlCommand);
  87. cr.setPageNum(30); //设置每页显是行数
  88. cr.setPage(iPage); //设置当前页
  89. rs = cr.gvrs(); //
  90. int pageRows = cr.getPageRows(); //返回当前页行数
  91. totalPage = cr.getTotalPage();
  92. java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("yyyy-MM-dd");
  93. //String isDate = sdf.format(new java.util.Date());
  94. String isDate = new String();
  95. Calendar Now =Calendar.getInstance();
  96. int year = Now.get(Calendar.YEAR);
  97. int mon = Now.get(Calendar.MONTH);
  98. int day = Now.get(Calendar.DAY_OF_MONTH);
  99. if(pageRows>0){
  100. for(int i=0; i<pageRows; i++){ 
  101. bID = rs.getInt(1);
  102. blackUserName = rs.getString(2);
  103. blackTxt = rs.getString(4);
  104. blackDate = rs.getInt(5);
  105. blackOver = rs.getInt(6);
  106. byUserName = rs.getString(7);
  107. byAddTime = rs.getString(8);
  108. byUserIp= rs.getString(9);
  109. ccID = rs.getInt(10);
  110. java.util.Date date1 = sdf.parse(byAddTime);
  111. isDate = String.valueOf(year) + "-" + String.valueOf(mon+1) + "-" + String.valueOf(day-blackDate);
  112. java.util.Date date0 = sdf.parse(isDate);
  113. isAfter = date0.after(date1);
  114. %>
  115. <tr align="center" bgcolor="#f6f6f6">
  116. <td bgcolor="#f6f6f6"><input name="bID" type="checkbox" id="bID" value="<%=bID%>">
  117. </td><td>
  118. <a href="../userInfo.jsp?uName=<%=blackUserName%>" target="_blank"><%=blackUserName%></a>
  119. </td>
  120. <td>
  121. <%
  122. //out.print(Now);
  123. if(isAfter){
  124. out.print("<font color=#bb0000>解</font>");
  125. }else{
  126. if(blackOver==1){
  127. out.print("<font color=#bb0000>解</font>");
  128. }else{
  129. out.print("禁");
  130. }
  131. }
  132. %>
  133. </td><td>
  134. <%=blackTxt%>
  135. </td><td>
  136. <%
  137. if(ccID==0){
  138. out.print("全部版面");
  139. }else{
  140. cci.classInfo(ccID);
  141. out.print(cci.getName());
  142. }
  143. %>
  144. </td>
  145. <td>
  146. <span class="smallTxt"><%=byAddTime%></span>
  147. </td>
  148. <td>
  149. <span class="smallTxt"><%=blackDate%></span>
  150. </td>
  151. <td>
  152. <%=byUserName%>
  153. </td>
  154. <td><a href="clubBlackEdit.jsp?bID=<%=bID%>">编辑</a></td>
  155. </tr>
  156. <%
  157. rs.next();
  158. }
  159. rs.close();
  160. cr.closeAll();
  161. }else{
  162. out.print("<tr bgcolor="#f6f6f6"><td height="30" colspan="20" align="center">黑名单暂无用户信息</td></tr>");
  163. }
  164. }catch(Exception e){
  165. out.print(e.toString()+"<tr bgcolor="#f6f6f6"><td height="30" colspan="20" align="center">意外错误,程序中止!</td></tr>");
  166. }finally{
  167. cr.closeAll();
  168. }
  169. %>
  170. <tr bgcolor="#f6f6f6">
  171. <td height="36" colspan="11" bgcolor="#f6f6f6">
  172. <strong>「<%=totalPage%>」</strong>
  173. <%
  174. out.print(pageJump1(totalPage, iPage, "clubBlackList.jsp?"));
  175. %>
  176. </td></tr>
  177.     <tr bgcolor="#f6f6f6">
  178.       <td height="36" colspan="11" bgcolor="#f6f6f6">
  179. <select name="act" id="act">
  180. <option value="0" selected>请选择操作项目</option>
  181. <option value="1">给用户提前解禁</option>
  182. <option value="2">解除用户提前解禁</option>
  183. <option value="3">删除黑名单记录同时解禁</option>
  184. </select>
  185. &nbsp;&nbsp;&nbsp;&nbsp;
  186. <input name="gvSubmit" type="submit" id="gvSubmit" value="确定操作"></td>
  187. </tr>
  188. </form>
  189. </table>
  190. <br>
  191. </body>
  192. </html>