📄 grant.jsp
字号:
<%@ page import="com.everstar.usermanage.*,
com.everstar.database.Database" %>
<%//jsp:useBean id="dbConn" scope="request" class="com.everstar.database.Database"/%>
<%
// if the login user is not administrator
HttpSession AuthInfoPool=request.getSession();
if (!Auth.checkAdmin(AuthInfoPool))
{
out.println("the logined user is not administrator");
return;
}
%>
<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>
select user name and subsystem
</td>
</table></td>
</table>
<p>
<form action="listUserPerm.jsp" method="post">
User:<select name="userid">
<%
Database dbConn = new Database();
if (dbConn == null)
{
out.println("no avaliable connect... ");
return;
}
UserList allUser = new UserList(dbConn);
int[] userIDList = allUser.Users();
for(int i=0; i < userIDList.length; i++)
{
User theUser = allUser.getUser(userIDList[i]);
out.println("<option value=\""+userIDList[i]+"\">"+theUser.getUserName()+"</option>");
}
%>
</select> Subsystem:
<select name="systemid">
<%
Database dbConn1 = new Database();
if (dbConn1 == null)
{
out.println("no avaliable connect... ");
return;
}
SubSystemList allSubSys = new SubSystemList(dbConn1);
int[] allSubSysId = allSubSys.subSystemList();
for(int i=0; i < allSubSysId.length; i++)
{
SubSystem theSystem = allSubSys.getSubSystem(allSubSysId[i]);
out.println("<option value=\""+allSubSysId[i]+"\">"+theSystem.getSystemName()+"</option>");
}
%>
</select>
<input type="submit" value="确定">
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -