📄 order_1_1.jsp
字号:
<%@ page contentType="text/html; charset=GB2312" %>
<%@ page import="com.hzs.order.*" %>
<jsp:useBean id="dbHandle" class="com.hzs.order.DBHandle" scope="page" />
<%
if (session.getAttribute("grade")==null || !(session.getAttribute("grade").equals("1") || session.getAttribute("grade").equals("6")))
{
%>
<jsp:forward page="con_error.jsp">
<jsp:param name="error_nm" value="非 法 操 作" />
<jsp:param name="error_all" value="非法操作,您并不是管理员!" />
</jsp:forward>
<%
}
%>
<html>
<head>
<title>添加新用户</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css/global.css" type="text/css">
<script language="javascript" src="js/global.js"></script>
<script language="JavaScript">
<!--
function confirm_all()
{
GxTrimStr(document.fo_main.tx_nm);
if (GxIsEmpty(document.fo_main.tx_nm))
{
document.fo_main.tx_nm.select();
alert("用户名不能为空!");
return false;
}
GxTrimStr(document.fo_main.tx_pass);
if (GxIsEmpty(document.fo_main.tx_pass))
{
document.fo_main.tx_pass.select();
alert("密码不能为空!");
return false;
}
GxTrimStr(document.fo_main.tx_passcon);
if (GxIsEmpty(document.fo_main.tx_passcon))
{
document.fo_main.tx_passcon.select();
alert("确认密码不能为空!");
return false;
}
if (document.fo_main.tx_pass.value!=document.fo_main.tx_passcon.value)
{
document.fo_main.tx_pass.select();
alert("两次输入的密码不一致!");
return false;
}
return true;
}
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" background="images/menu.gif">
<h2>---添加新用户---</h2>
<p><br>
</p>
<form name="fo_main" method="post" action="order_1_2.jsp" onsubmit="return confirm_all();">
<table width="520" align="center">
<tr>
<th>用 户 名:</th>
<td colspan="3">
<input type="text" name="tx_nm" maxlength="20" size="20">
</td>
</tr>
<tr>
<th>密 码:</th>
<td>
<input type="password" name="tx_pass" size="20" maxlength="20">
</td>
<th>确认密码:</th>
<td>
<input type="password" name="tx_passcon" size="20" maxlength="20">
</td>
</tr>
<tr>
<th>所属工作组:</th>
<td colspan="3">
<select name="sel_group">
<%
try{
Vector groups=new Vector();
dbHandle.connect();
groups=dbHandle.select("SELECT cp_groupnm FROM all_group");
if(groups.size()>0){
%>
<option value=<%=groups.elementAt(0)%> selected><%=groups.elementAt(0)%></option>
<%
for(int i=1;i<groups.size();i++){
%>
<option value=<%=groups.elementAt(i)%>><%=groups.elementAt(i)%></option>
<%
}
}else{
%>
<jsp:forward page="con_error.jsp">
<jsp:param name="error_nm" value="数 据 库 错 误" />
<jsp:param name="error_all" value="用户组数据表中没有记录"/>
</jsp:forward>
<%
}
}catch(DBException e){
%>
<jsp:forward page="con_error.jsp">
<jsp:param name="error_nm" value="数 据 库 错 误" />
<jsp:param name="error_all" value="<%=e.getMessage()%>"/>
</jsp:forward>
<%
}finally{
dbHandle.close();
}
%>
</select>
</td>
</tr>
<tr>
<td colspan="2">
<div align="center">
<input type="submit" name="sb1" value="添 加">
</div>
</td>
<td colspan="2">
<div align="center">
<input type="button" name="bt1" value="关 闭" onclick="self.close();">
</div>
</td>
</tr>
</table>
</form>
<p> </p>
<p> </p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -