📄 account_college.jsp
字号:
<%@ page contentType="text/html;charset=GBK" import="java.sql.*"%>
<%@ page errorPage="/public/errorBusy.jsp" %>
<%@ page import="java.sql.*" %>
<%@ include file="/public/check_admin.jsp" %>
<jsp:useBean id="conn" scope="page" class="SQLBean.DBConn"/>
<%
request.setCharacterEncoding("GBK");
%>
<script language="javascript">
function formCheck(theForm)
{
if(theForm.college_leader_id.value=="")
{
alert("用户名不能为空!");
theForm.college_leader_id.focus();
return false;
}
if(theForm.college_leader_password_1.value=="")
{
alert("密码不能为空!");
theForm.college_leader_password_1.focus();
return false;
}
if(theForm.college_leader_password_2.value=="")
{
alert("确认密码不能为空!");
theForm.college_leader_password_2.focus();
return false;
}
if(theForm.college_leader_name.value=="")
{
alert("真实姓名不能为空!");
theForm.college_leader_name.focus();
return false;
}
if(theForm.college_leader_password_1.value!=theForm.college_leader_password_2.value)
{
alert("确认密码不正确!");
theForm.college_leader_password_2.focus();
return false;
}
if(theForm.college_id.value=="")
{
alert("请选择所属院系!");
theForm.college_id.focus();
return false;
}
}
</script>
<html>
<head>
<title>院系领导账号管理</title>
<link rel="stylesheet" href="../../public/style.css">
</head>
<body class="ss">
<a href="account_college.jsp" class="a">添加账号</a>
<a href="account_college_m.jsp" class="a">管理账号</a>
<a href="javascript:window.location.reload()" class="a">刷新</a>
<a href="javascript:history.back()" class="a">返回</a>
<hr></hr>
<center>
<h3>添加院系领导账号</h3>
<form action="college_add.jsp" method="post" onSubmit="return formCheck(this)">
<table width="40%" border="0" cellspacing="0">
<tr>
<td width="40%">用户名:</td>
<td width="60%"><input name="college_leader_id" type="text" size="20" maxlength="20"></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td width="40%">密码:</td>
<td width="60%"><input name="college_leader_password_1" type="password" size="20" maxlength="20"></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td width="40%">确认密码:</td>
<td width="60%"><input name="college_leader_password_2" type="password" size="20" maxlength="20"></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td width="40%">真实姓名:</td>
<td width="60%"><input name="college_leader_name" type="text" size="20" maxlength="20"></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td width="40%">所属院系:</td>
<td><select name="college_id">
<option value="" selected >===请选择===</option>
<%
ResultSet rs_c=null;
rs_c=conn.executeQuery("select * from college");
while(rs_c.next())
out.println("<option value="+rs_c.getString("college_id")+">"+rs_c.getString("college_name")+"</option>");
conn.close();
%>
</select></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td width="40%"><div align="center"><input type="submit" name="Submit" value="添加"></div></td>
<td width="60%"><div align="center"><input type="reset" name="Submit" value="重置"></div></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<%
String msg=(String)request.getParameter("errmsg");
if(msg!=null&&!msg.equals("")){
%>
<tr>
<td colspan="2"><div align="center"><font color="red" size="3"><%=msg%></font></div></td>
</tr>
<%
}
%>
</table>
</form>
</center>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -