📄 lockuser.jsp
字号:
<%@ page import="com.everstar.usermanage.*" %>
<jsp:useBean id="dbConn" scope="request" class="com.everstar.database.Database"/>
<%
HttpSession AuthInfoPool=request.getSession();
if (!Auth.checkAdmin(AuthInfoPool))
{
out.println("the logined user is not administrator");
return;
}
String useridTemp = request.getParameter( "userid" );
UserList allUser = new UserList(dbConn);
int[] userIDList = allUser.Users();
if (useridTemp ==null)
{
%>
<html>
<head>
<title>锁定用户</title>
</head>
<body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080" alink="#ff0000">
<table class="pageHeaderBg" cellpadding="1" cellspacing="0" border="0" width="100%">
<td><table class="pageHeaderFg" cellpadding="3" cellspacing="0" border="0" width="100%">
<td>
<span class="pageTitle">
Users
:
lock User
</span>
</td>
</table></td>
</table>
<p>
<form action="lockUser.jsp" method="post">
<select name="userid">
<%
for(int i=0; i < userIDList.length; i++)
{
User theUser = allUser.getUser(userIDList[i]);
String theColor=null;
if (theUser.isLocked())
theColor="color: #ff0000";
else
theColor="color: #000000";
out.println("<option style=\""+theColor+"\" value=\""+userIDList[i]+"\">"+theUser.getUserName()+"</option>");
}
%>
</select>
<input type="submit" value="Lock">
</form>
<%
}
else
{
int theuserid = Integer.parseInt(useridTemp);
User theUser = allUser.getUser(theuserid);
if (theUser.isLocked())
{
theUser.unLockUser();
out.println("用户被解锁!");
}
else
{
theUser.lockUser();
out.println("用户被锁定!");
}
out.println("<a href='lockUser.jsp'>返回</a>");
}
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -