📄 clubblacklist.jsp
字号:
<%@ page language="java" contentType="text/html;charset=UTF-8" %>
<%@ include file="../GVinc/gvInclude.jsp" %>
<%@ include file="clubMasterPass.jsp" %>
<jsp:useBean id="cci" scope="request" class="com.gamvan.club.ClubClassInfo"/>
<jsp:useBean id="cbe" scope="request" class="com.gamvan.club.user.ClubBlackEdit"/>
<%
//权限判断共享代码
boolean ispass = false;
//ArrayEdit ae = new ArrayEdit();
ispass = ae.txtsArray(gvcmgTxt,9,"|");
if(!ispass){
out.print(prtCenter2("您无权进行此项操作!","",2));
out.close();
}
//权限判断代码结束
String act = "0";
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(prtCenter2("提前解禁成功","",2));
}else if(act.equals("2")){
cbe.updateBlackOver(bIDs, 0);
out.print(prtCenter2("解除提前解禁成功","",2));
}else if(act.equals("3")){
cbe.delBlackUser(bIDs);
out.print(prtCenter2("删除成功","clubBlackList.jsp",1));
}else{
out.print(prtCenter2("请选择操作内容","",2));
}
out.close();
if(true)return;
}
%>
<html>
<head>
<title>今晚在线-社区管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="css.css" rel="stylesheet" type="text/css">
</head>
<body>
<script type="text/javascript" src="../GVscript/GVjumpPage.js"></script>
<table width="99%" border="0" align="center" cellpadding="2" cellspacing="2" bgcolor="#e6e6e6">
<tr>
<td align="center"><strong>社区用户列表</strong></td>
</tr>
</table>
<table width="99%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#9AA8CB">
<form name="form2" method="get" action=""> <tr bgcolor="#f6f6f6">
<td bgcolor="#e6e6e6">
<a href="clubBlackEdit.jsp">点击这里加入黑名单</a></td>
</tr>
</form>
</table>
<table width="99%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#e6e6e6">
<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;
int iPage = 1;
if(request.getParameter("iPage")!=null){
iPage = Integer.parseInt(request.getParameter("iPage"));
}
Pageable rs;
String sqlCommand;
sqlCommand = "Select * From GVclubBlackList order by bID desc";
//out.print(sqlCommand);
String blackUserName="",blackTxt="", byUserName, byAddTime, byUserIp="";
int bID=0, blackDate=0, blackOver=0;
boolean isAfter=false;
try{
cr.setSqlCommand(sqlCommand);
cr.setPageNum(30); //设置每页显是行数
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);
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?uName=<%=blackUserName%>" 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="clubBlackEdit.jsp?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="36" colspan="11" bgcolor="#f6f6f6">
<strong>「<%=totalPage%>」</strong>
<%
out.print(pageJump1(totalPage, iPage, "clubBlackList.jsp?"));
%>
</td></tr>
<tr bgcolor="#f6f6f6">
<td height="36" 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>
<br>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -