⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 setroleaction.jsp

📁 包括所有开发文档以及数据库文件
💻 JSP
字号:
<%@ page language="java" import="bo.*,java.util.Vector"
	contentType="text/html;charset=GBK"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>

		<base href="<%=basePath%>">

		<title>权限管理系统</title>

		<meta http-equiv="Content-Type" content="text/html; charset=GBK">
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<link href="qxgl.css" rel="stylesheet" type="text/css" />
	</head>
	<body>
		<%
			String roleId = (String) request.getAttribute("roleId");
			Vector roleAction = (Vector) request.getAttribute("roleAction");
			Vector roleAction1 = (Vector) request.getAttribute("roleAction1");
			if (roleId != null) {
		%>
		<table width="700" align="center">
			<tr>
				<td class="td1" align="center">
					<a href="selectAllRoleUser.do?roleId=<%=roleId%>">【查看所包含的用户】</a>
				</td>
				<td class="td1" align="center">
					<a href="selectRoleAction.do?roleId=<%=roleId%>">【查看角色权限】</a>
				</td>
				<td class="td1" align="center">
					<a href="selectRoleAllAction.do?roleId=<%=roleId%>">【查看角色总权限】</a>
				</td>
				<td class="td1" align="center">
					<a href="selectGroupByRole.do?roleId=<%=roleId%>">【查看所属组】</a>
				</td>
				<td class="td1" align="center">
					<a href="setRoleAction.do?roleId=<%=roleId%>">【设置角色权限】</a>
				</td>
			</tr>
			<tr>
				<td colspan="5">
					<form name="formset" action="saveRoleAction.do">
						<table align="center" class="td1" width="100%">
							<tr>
								<td valign="middle" class="td2" align="center">
									<input type="hidden" name="roleId" value="<%=roleId%>">
									<input type="checkbox" checked id="chxall" disabled />
								</td>
								<td class=td2 align="center">
									序号
								</td>
								<td class=td2 align="center">
									权限ID
								</td>
								<td class=td2 align="center">
									权限名
								</td>
								<td class=td2 align="center">
									权限描述
								</td>
							</tr>

							<%
										for (int i = 0; i < roleAction1.size() && roleAction1 != null; i++) {
										Action allRoleAction1 = (Action) roleAction1.get(i);
										Action allRoleAction = (Action) roleAction1.get(0);
										int roleactionid = 0;
										int roleactionid1 = 1;
										for (int j = 0; j < roleAction.size(); j++) {
									allRoleAction = (Action) roleAction.get(j);
									roleactionid = allRoleAction.getActionId();
									roleactionid1 = allRoleAction1.getActionId();
									if (roleactionid == roleactionid1)
										break;
										}
										if (roleactionid == roleactionid1) {
							%>
							<tr>
								<td align="center" class="td1">

									<input type="checkbox" name="actionIds"
										value="<%=allRoleAction1.getActionId()%>" checked>
								</td>
								<td class=td1 align="center">
									<%=i + 1%>
								</td>
								<td class=td1 align="center">
									<%=allRoleAction1.getActionId()%>
								</td>
								<td class=td1 align="center">
									<%=allRoleAction1.getActionName()%>
								</td>
								<td class=td1 align="center">
									<%=allRoleAction1.getActionDescription()%>
								</td>
							</tr>
							<%
							} else {
							%>
							<tr>
								<td align="center" class="td1">

									<input type="checkbox" name="actionIds"
										value="<%=allRoleAction1.getActionId()%>">
								</td>
								<td align="center" class="td1">
									<%=i + 1%>
								</td>
								<td align="center" class="td1">
									<%=allRoleAction1.getActionId()%>
								</td>
								<td align="center" class="td1">
									<%=allRoleAction1.getActionName()%>
								</td>
								<td align="center" class="td1">
									<%=allRoleAction1.getActionDescription()%>
								</td>
							</tr>
							<%
									}
									}
							%>
							<tr>
								<td colspan="5" align="center">
									<input type="submit" value="保存设置"
										style="width: 100px; height: 20px" width="50px" height="50px"
										class="input2">
								</td>
							</tr>

						</table>
					</form>
				</td>
			</tr>
		</table>
		<%
		}
		%>

	</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -