📄 updaterole.jsp
字号:
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ page contentType="text/html;charset=GBK"%>
<%@ page import="java.util.*"%>
<%@ page import="to.model.Right.*"%>
<%@ page import="to.model.Role.*"%>
<%@ page import="to.model.Login.*"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<title>修改角色</title>
<style type="text/css">
table{font-size:13px}
</style>
</head>
<body>
<form action="EditSaveRoleAction.do" name="form1" method="get">
<table cellspacing="1" cellpadding="1" border="0" width="800" align="center">
<tr>
<td colspan="4"></td>
</tr>
<%
loginItem li=(loginItem)session.getAttribute("user");
if(li==null)
{
response.sendRedirect("OfficeLogin.jsp");
}
if(!(li.getRoleName().equals("系统管理员")))
{
response.sendRedirect("Office.jsp");
}
%>
<tr>
<td colspan="4" height="1"><hr/></td>
</tr>
<tr bgcolor="#006699">
<th colspan="4" align="center"><font color="White">修改角色</font></th>
</tr>
<tr>
<td colspan="4" align="center" height="21"></td>
</tr>
<%
RoleItem ri=(RoleItem)request.getAttribute("ri");
%>
<tr>
<td width="244"> </td>
<td align="center" width="169">角色编号:</td>
<td width="232">
<input type="text" name="RoleID" value="<%=ri.getRoleID()%>" readonly/>
</td>
<td width="150"> </td>
</tr>
<tr>
<td width="244"> </td>
<td align="center" width="169">角色名称:</td>
<td width="232">
<input type="text" name="RoleName" value="<%=ri.getRoleName()%>"/>
</td>
<td width="150"> </td>
</tr>
<tr>
<td width="244"> </td>
<td align="center" width="169">角色权限:</td>
<td width="232">
<select name="RightID" size="1">
<%
RoleBean rb=new RoleBean();
Collection c=rb.getRightName();
Iterator it=(Iterator)c.iterator();
while(it.hasNext())
{
RightItem ri1=(RightItem)it.next();
int RightID=ri1.getRightID();
String RightName=ri1.getRightName();
if(ri.getRightID()==RightID)
{
%>
<option value="<%=RightID%>" selected="selected"><%=RightName%></option>
<%
}
else
{
%>
<option value="<%=RightID%>"><%=RightName%></option>
<%
}
}
%>
</select>
</td>
<td width="150"> </td>
</tr>
<tr>
<td width="244"> </td>
<td width="169"> </td>
<td width="232"> </td>
<td width="150"> </td>
</tr>
<tr>
<td width="244"> </td>
<td align="right" width="169">
<input type="submit" value="提交"/>
</td>
<td align="left" width="232">
<input type="reset" value="重置"/>
</td>
<td width="150"> </td>
</tr>
<tr>
<td width="241" colspan="4" height="31"> </td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -