📄 role_operate.jsp
字号:
<%@ page contentType="text/html;charset=gb2312"%>
<%@ page import="java.util.Date" %>
<%@ page errorPage="/error/error.jsp" %>
<HTML>
<HEAD>
<TITLE>角色信息维护</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html"; charset="gb2312">
<link href="css/style.css" rel="stylesheet" type="text/css">
<script src="js/checkdata.js" type="text/javascript"></script>
</HEAD>
<script language="JavaScript">
function CloseWindow()
{
if (window.openor)
{
window.openor.location.href=window.openor.location.href;
}
}
function CheckSubmit(){
temp=document.all("RoleName").value;
temp.replace(" ","");
if (temp=="") document.all("RoleName").value=temp;
temp=document.all("Remark").value;
temp.replace(" ","");
if (temp=="") document.all("Remark").value=temp;
if ( (document.all("RoleName").value.length==0))
{
window.alert("请输入角色名称!");
document.all("RoleName").focus();
return false;
}
if (getLength(document.all("RoleName").value)>20)
{
window.alert("角色名称长度不能超过30位!");
document.all("RoleName").focus();
return false;
}
if (getLength(document.all("Remark").value)>100)
{
window.alert("用户说明长度不能超过100位!");
document.all("Remark").focus();
return false;
}
document.all("TRoleName").value=document.all("RoleName").value;
document.all("TRemark").value=document.all("Remark").value;
return true;
}
function ResetValue(){
if (document.all("TRoleName").value=="无"){
document.all("RoleName").value="";
}
else{
document.all("RoleName").value=document.all("TRoleName").value;
}
if (document.all("TRemark").value=="无"){
document.all("Remark").value="";
}
else{
document.all("Remark").value=document.all("TRemark").value;
}
}
function ResetValue1(){
document.all("RoleName").value="";
document.all("Remark").value="";
}
function modRole(){
r=CheckSubmit();
if (r) {
ask=confirm("你确定修改该记录吗?\n\n点“确定”继续,点“取消”返回");
if (ask){
sHref="Role_Operate1.jsp?TRoleID="+document.all("TRoleID").value
+"&TRoleName="+document.all("TRoleName").value
+"&TPurview=-1"
+"&TRemark="+document.all("TRemark").value
+"&TAction="+document.all("TAction").value;
window.open(sHref,"_self","left=0,top=0,width=2, height=2,status=no,menubar=no,location=no,resizable=no,alwaysRaised=yes,z-look=yes,depended=yes");
}
}
}
function addRole(){
r=CheckSubmit();
if (r) {
sHref="Role_Operate1.jsp?TRoleID="+document.all("TRoleID").value
+"&TRoleName="+document.all("TRoleName").value
+"&TPurview='-1'"
+"&TRemark="+document.all("TRemark").value
+"&TAction="+document.all("TAction").value;
window.open(sHref,"_self","left=0,top=0,width=2, height=2,status=no,menubar=no,location=no,resizable=no,alwaysRaised=yes,z-look=yes,depended=yes");
}
}
</script>
<%
String sRoleID =request.getParameter("TRoleID");
String sRoleName =request.getParameter("TRoleName");
String sRemark =request.getParameter("TRemark");
String sAction =request.getParameter("TAction");
%>
<BODY BGCOLOR=#FFFFFF border="0" LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 onunload="javascript:CloseWindow()">
<table align="center" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr >
<td> </td>
<td> </td>
<td align="center" height="20" background="images/bg_main2.png">角色信息维护</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
<% if (sAction.equals("mod")) { %>
<table align="center" name="Role" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
<td align="right"><font color="#31639C">角色:</font></td>
<% if (sRoleName.equals("无")) { %>
<td align="center" height="27"><input size="15" name="RoleName" style="border:1px solid #127ace; FONT-SIZE: 9pt; COLOR: #078bdf; FONT-FAMILY: Verdana; float:left" ></td>
<%
}
else{
%>
<td align="center" height="27"><input size="15" name="RoleName" style="border:1px solid #127ace; FONT-SIZE: 9pt; COLOR: #078bdf; FONT-FAMILY: Verdana; float:left" value=<%=sRoleName%>></td>
<%}%>
<td><font color="red"> * </font></td>
<td align="right"><font color="#31639C">说明:</font></td>
<% if (sRemark.equals("无")) { %>
<td align="center" height="27"><input size="15" name="Remark" style="border:1px solid #127ace; FONT-SIZE: 9pt; COLOR: #078bdf; FONT-FAMILY: Verdana; float:left" ></td>
<%
}
else{
%>
<td align="center" height="27"><input size="15" name="Remark" style="border:1px solid #127ace; FONT-SIZE: 9pt; COLOR: #078bdf; FONT-FAMILY: Verdana; float:left" value=<%=sRemark%>></td>
<%}%>
<td> </td>
</tr>
</table>
<table align="center" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td>
<table>
<tr>
<td>
<input type="hidden" name="TRoleID" value=<%=sRoleID%>>
<input type="hidden" name="TRoleName" value=<%=sRoleName%>>
<input type="hidden" name="TRemark" value=<%=sRemark%>>
<input type="hidden" name="TAction" value=<%=sAction%>>
<input type="button" value="提 交" name="B1" style="font-size: 12px; color: #078bdf; background: #ffffe0; line-height: 100%; font-family: 宋体; border: 1px solid #31639c; padding-top: 2px; padding-bottom: 0px"onclick="modRole();">
<input type="button" value="重 置" name="B2" style="font-size: 12px; color: #078bdf; background: #ffffe0; line-height: 100%; font-family: 宋体; border: 1px solid #31639c; padding-top: 2px; padding-bottom: 0px" onclick="ResetValue()">
<input type="button" value="取 消" name="B3" style="font-size: 12px; color: #078bdf; background: #ffffe0; line-height: 100%; font-family: 宋体; border: 1px solid #31639c; padding-top: 2px; padding-bottom: 0px" onclick="javascript:window.close()">
</td>
</tr>
</table>
</td>
<td> </td>
</tr>
</table>
<%}
else{
%>
<table align="center" name="Role" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
<td align="right"><font color="#31639C">角色:</font></td>
<td align="center" height="27"><input size="15" name="RoleName" style="border:1px solid #127ace; FONT-SIZE: 9pt; COLOR: #078bdf; FONT-FAMILY: Verdana; float:left" ></td>
<td><font color="red"> * </font></td>
<td align="right"><font color="#31639C">说明:</font></td>
<td align="center" height="27"><input size="15" name="Remark" style="border:1px solid #127ace; FONT-SIZE: 9pt; COLOR: #078bdf; FONT-FAMILY: Verdana; float:left" ></td>
<td> </td>
</tr>
</table>
<table align="center" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td>
<table>
<tr>
<td>
<input type="hidden" name="TRoleID" value=<%=sRoleID%>>
<input type="hidden" name="TRoleName" value=<%=sRoleName%>>
<input type="hidden" name="TRemark" value=<%=sRemark%>>
<input type="hidden" name="TAction" value=<%=sAction%>>
<input type="button" value="提 交" name="B1" style="font-size: 12px; color: #078bdf; background: #ffffe0; line-height: 100%; font-family: 宋体; border: 1px solid #31639c; padding-top: 2px; padding-bottom: 0px"onclick="addRole();">
<input type="button" value="重 置" name="B2" style="font-size: 12px; color: #078bdf; background: #ffffe0; line-height: 100%; font-family: 宋体; border: 1px solid #31639c; padding-top: 2px; padding-bottom: 0px" onclick="ResetValue1()">
<input type="button" value="取 消" name="B3" style="font-size: 12px; color: #078bdf; background: #ffffe0; line-height: 100%; font-family: 宋体; border: 1px solid #31639c; padding-top: 2px; padding-bottom: 0px" onclick="javascript:window.close()">
</td>
</tr>
</table>
</td>
<td> </td>
</tr>
</table>
<%}%>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -