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

📄 teacher_edit.jsp

📁 远程教育系统中教师管理系统,包含完整的教师管理,包括现有教育体系中的复杂教师管理.推荐
💻 JSP
字号:
<%
/*
程序员:苏楠
用途:浏览老师信息,可修改或删除
时间:2003-8-19 10:30
*/
%>
<%@ page contentType="text/html;charset=gb2312" %> 
<%@ page language="java" %>
<%
//////////////////////////////////////////////////////////////
// Privilege Guarding

	String 	PrivXP="修改教师信息";
	String 	PrivME="00202";
	String 	PrivOUT="HTML"; // HTML | XSL | NONE
%>
<%@ include file="../pub/privGuarding.jsp" %>	
<%
// Privilege Guarding
//////////////////////////////////////////////////////////////
%>
<jsp:useBean id="work" scope="application" class="com.dbConnection.dbpool" />

<%!
	//判断字符串为空的话,赋值为"不详"
	String fixnull(String str)
	{
	    if(str == null || str.equals("null") || str.equals("null"))
			str = "不详";
			return str;
	
	}
%>
<%
String pageInt=request.getParameter("pageInt");
String id=request.getParameter("id");
String query="select id,name,password,email,phone,address,zip_code,gender,work_place,position,title,status,work_kind,teach_time,note,teach_level,to_char(reg_time,'yyyy-mm-dd') as reg_time from lrn_teacher_info where id='"+id+"'";

 String name="";
 String address="";
 String zip_code="";
 String phone="";
 String status="";
 String gender="";
 String work_place="";
 String position="";
 String title="";
 String email="";
 String note="";
 String teach_level="";
 String password="";
 String work_kind="";
 String teach_time="";
 String reg_time="";
 com.dbConnection.MyResultSet RS=work.executeQuery(query);
 if(RS!=null&&RS.next())
{ 
  name=RS.getString("name"); 
  address=fixnull(RS.getString("address"));
  zip_code=fixnull(RS.getString("zip_code")); 
  phone=fixnull(RS.getString("phone"));
  status=fixnull(RS.getString("status"));  
  gender=fixnull(RS.getString("gender")); 
  work_place=fixnull(RS.getString("work_place"));
  position=fixnull(RS.getString("position"));
  title=fixnull(RS.getString("title"));
  email=fixnull(RS.getString("email"));
  note=fixnull(RS.getString("note"));
  teach_level=fixnull(RS.getString("teach_level"));
  password=RS.getString("password");
 //String site=fixnull(RS.getString("site"));
  work_kind=fixnull(RS.getString("work_kind"));
  teach_time=fixnull(RS.getString("teach_time"));
  reg_time=fixnull(RS.getString("reg_time"));
}
work.close(RS);
%>
<html>
<link href="../css/style.css" rel="stylesheet" type="text/css">
<script language="javascript" src="../js/calender.js"></script>
<script language="javascript" src="../js/check.js"></script>
<script>
function pageGuarding()
{
        
	
	if(isNull(document.teacherinfo.name.value))
	{
	}
	else
	{
		alert("老师姓名为空!");
		document.teacherinfo.name.focus();
		document.teacherinfo.name.select();
		return false;
	}
	if(isNull(document.teacherinfo.password.value))
	{
	}
	else
	{
		alert("密码为空!");
		document.teacherinfo.password.focus();
		document.teacherinfo.password.select();
		return false;
	}
	
	if(comparestr_equal(document.teacherinfo.password.value,document.teacherinfo.rpassword.value))
         {
	 }
	else
	{
	alert("密码不一致");
	document.teacherinfo.password.focus();
	document.teacherinfo.password.select();
	return false;
	}
	
	if(isNull(document.teacherinfo.email.value))
	{
	}
	else
	{
		alert("邮件地址为空!");
		document.teacherinfo.email.focus();
		document.teacherinfo.email.select();
		return false;
	}
}
</script>
<script language=javascript>			
		function del()
		{
		if(confirm("你确实要删除<%=name%>老师吗?"))
		{
			window.location="delteacher.jsp?id=<%=id%>&name=<%=name%>&pageInt=<%=pageInt%>";
		}
		return true;
		}
</script>
<head>
<title>编辑老师信息 </title>
</head>
<body leftmargin=0 topmargin=0 bgcolor=FFFFFF>
<form name="teacherinfo" action="teacher_editexe.jsp" method="post" onsubmit="return pageGuarding()">
<input type="hidden" name="pageInt" value="<%=pageInt%>">
<input type="hidden" name="id" value="<%=id%>">
<input type="hidden" name="oldpassword" value="<%=password%>">
<table width="90%" border="0" align=center cellpadding="2" cellspacing="1"  bgcolor="3F6C61"> 
        <tr class="t08_bgwhite_p2"><td colspan="2" align="center">添加教师</td></tr>
	<tr><td class="t12_14_bgE3EAE9">教师编号*</td>
	    <td class="t08_bgwhite_p2"><%=id%></td>
	</tr>	
	<tr><td class="t12_14_bgE3EAE9">教师姓名*</td>
	    <td class="t08_bgwhite_p2"><input type="text" name="name" id="name" value="<%=name%>"></td>
	</tr>
	<tr><td class="t12_14_bgE3EAE9">登录密码*</td>
	    <td class="t08_bgwhite_p2"><input type="password" name="password" id="password" value="<%=password%>"></td>
	</tr>		
	<tr><td class="t12_14_bgE3EAE9">确认密码*</td>
	    <td class="t08_bgwhite_p2"><input type="password" name="rpassword" id="rpassword" value="<%=password%>"></td>
	</tr>		
	<tr><td class="t12_14_bgE3EAE9">电子邮件*</td>
	    <td class="t08_bgwhite_p2"><input type="text" name="email" id="email" value="<%=email%>"></td>
	</tr>	
	<tr><td class="t12_14_bgE3EAE9">联系电话</td>
	    <td class="t08_bgwhite_p2"><input type="text" name="phone" id="phone" value="<%=phone%>"></td>
	 </tr>		
	<tr><td class="t12_14_bgE3EAE9">通信地址</td>
	    <td class="t08_bgwhite_p2"><input type="text" name="address" id="address" value="<%=address%>"></td>
	    <td></td>
	</tr>		
	<tr><td class="t12_14_bgE3EAE9">邮政编码</td>
	    <td class="t08_bgwhite_p2"><input type="text" name="zip_code" id="zip_code" value="<%=zip_code%>"></td>
	    
	</tr>		
	<tr><td class="t12_14_bgE3EAE9">工作单位</td>
	    <td class="t08_bgwhite_p2"><input type="text" name="work_place" id="work_place" value="<%=work_place%>"></td>
	    
	</tr>	
	<tr><td class="t12_14_bgE3EAE9">职务</td>
	    <td class="t08_bgwhite_p2"><input type="text" name="position" id="position" value="<%=position%>"></td>
	    
	</tr>	
	<tr><td class="t12_14_bgE3EAE9">职称</td>
	    <td class="t08_bgwhite_p2"><input type="text" name="title" id="title" value="<%=title%>"></td>
	    
	</tr>	
	<tr><td class="t12_14_bgE3EAE9">性别</td>
	    <td class="t08_bgwhite_p2">
	            <select name="gender" id="gender">
                <option value="男" selected>男</option>
                <option value="女">女</option>
                </select>
            </td>
	   
	</tr>	
	<tr><td class="t12_14_bgE3EAE9">教师类型</td>
	    <td class="t08_bgwhite_p2">
<%
if(teach_level.equals("教师"))
{
%>
	            <select name="teach_level" id="teach_level">
                <option value="教师" selected>教师</option>
                <option value="助教">助教</option>
                </select>
<%
}
else
{
%>
	            <select name="teach_level" id="teach_level">
                <option value="教师">教师</option>
                <option value="助教" selected>助教</option>
<%
}
%>
                </select>
            </td>
	   
	</tr>		
	<tr>
	    <td class="t12_14_bgE3EAE9">状态</td>
	    <td class="t08_bgwhite_p2">
	    	<select name="status" id="status">
                <option value="0000" selected>有效</option>
                <option value="1111">停用</option>
            </select>
        </td>	    
	</tr>		
	<tr>
		<td class="t12_14_bgE3EAE9">工作性质</td>
	    <td class="t08_bgwhite_p2">
	    	<textarea class="smallarea" cols="55" name="work_kind" rows="12">
<%=work_kind%>
	    	</textarea>
	    </td>
	</tr>		
	<tr>
		<td class="t12_14_bgE3EAE9" > 教龄 </td>
	    <td class="t08_bgwhite_p2">
	    	<input type="text" name="teach_time" id="teach_time" value="<%=teach_time%>">
	    </td>
	 </tr>		
     <tr> 
     	<td  class="t12_14_bgE3EAE9">注册时间</td>
        <td  class="t11_12_bgwhite"> 
        	<input type="text" name="reg_time" size="14" value="<%=reg_time%>"> 
        	<input type="button" value="->" onclick="fPopCalendar(reg_time,reg_time)"> 
      	</td>
    </tr>
	<tr>
	    <td class="t12_14_bgE3EAE9">教师简介</td>
	    <td class="t08_bgwhite_p2">
	    	<textarea class="smallarea" cols="55" name="note" rows="12">
<%=note%>
	    	</textarea>
	    </td>
	</tr>	
<tr class="t05_bgwhite_p2_c">
	<td>
		<input type="submit" name="submit" value="修改信息">
	</td>		
	<td align="left">
		<input type="button" name="submit" value="删除老师" onclick="return del()">		
		<a href="listteacher.jsp?pageInt=<%=pageInt%>">返回教师列表</a>
	</td>	
</tr>
</table>	
</form>
</body>
</html>

⌨️ 快捷键说明

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