<!--#include file="../../Conn.asp" -->
<!--#include file="../../Comm/Site_Class.asp" -->
<%
PagePath = "../../"

Set Qsite = New Site_Class

Qsite.SiteConfig_Master()
%>
<!--#include file="../Check_Login.asp" -->
<%
Qsite.Check_AdminFlag(arrAdminFlag(1 , 3))

Dim EduId
Dim EduBeginDate,EduEndDate,EduSchool,EduProfession,EduQualification,EduNote

Set Rs = server.CreateObject("ADODB.recordset")

If Request.Form <> "" Then
	EduId = Qsite.chgStr(Trim(Request.Form("EduId")))
	EduBeginDate = Qsite.chgStr(Trim(Request.Form("EduBeginDate")))
	EduEndDate = Qsite.chgStr(Trim(Request.Form("EduEndDate")))
	EduSchool = Qsite.chgStr(Trim(Request.Form("EduSchool")))
	EduProfession = Qsite.chgStr(Trim(Request.Form("EduProfession")))
	EduQualification = Qsite.chgStr(Trim(Request.Form("EduQualification")))
	EduNote = Qsite.chgStr(Trim(Request.Form("EduNote")))
	
	If EduId = "" Or IsNull(EduId) Or Not IsNumeric(EduId) Then EduId = 0
	
	If EduBeginDate = "" Or IsNull(EduBeginDate) Then
		Qsite.ShowMsg "请输入开始时间" , ""
	End If
	If EduEndDate = "" Or IsNull(EduEndDate) Then EduEndDate = "至今"
	If EduSchool = "" Or IsNull(EduSchool) Then
		Qsite.ShowMsg "请输入学校" , ""
	End If
	If EduProfession = "" Or IsNull(EduProfession) Then
		Qsite.ShowMsg "请输入专业" , ""
	End If
	If EduQualification = "" Or IsNull(EduQualification) Then
		Qsite.ShowMsg "请选择学历" , ""
	End If
	
	Conn.Execute("update EduTbl set EduBeginDate = '"& EduBeginDate &"' , EduEndDate = '"& EduEndDate &"' , EduSchool = '"& EduSchool &"' , EduProfession = '"& EduProfession &"' , EduQualification = '"& EduQualification &"' , EduNote = '"& EduNote &"' where EduId = "& EduId)
	
	
	Response.Write("<script language=""javascript"">alert(""修改成功"");opener.location.reload();window.close();</script>")
	Response.End()
	
End If

EduId = Qsite.chgStr(Trim(Request.QueryString("EduId")))

If EduId = "" Or IsNull(EduId) Or Not IsNumeric(EduId) Then EduId = 0

If EduId = 0 Then
	Response.Write("非法参数")
	Response.End()
End If



Rs.Open "select * from EduTbl where EduId = "& EduId , Conn , 1 , 1
If Rs.Eof Then
	EduBeginDate = ""
	EduEndDate = ""
	EduSchool = ""
	EduProfession = ""
	EduQualification = ""
	EduNote = ""
Else
	EduBeginDate = Rs("EduBeginDate")
	EduEndDate = Rs("EduEndDate")
	EduSchool = Rs("EduSchool")
	EduProfession = Rs("EduProfession")
	EduQualification = Rs("EduQualification")
	EduNote = Rs("EduNote")
End If
Rs.Close
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>教育情况修改</title>
<link href="../skins/css/main.css" rel="stylesheet" type="text/css">
<script language="javascript" src="../../Comm/Comm.js"></script>
<script language="javascript">
	function CheckForm()
	{
		if(!checkLength("EduBeginDate" , "开始时间" , 1 , 20))
			return false;
		if(!checkLength("EduSchool" , "学校" , 1 , 100))
			return false;
		if(!checkLength("EduProfession" , "专业" , 1 , 100))
			return false;
		if(PerForm.EduQualification.value == "")
		{
			alert("请选择学历");
			return false;
		}
		if(!checkLength("EduNote" , "专业描述" , 0 , 500))
			return false;
		return true;
	}
</script>
</head>

<body>
<form name="MemForm" method="post" action="Person_EditEdu.asp" style="margin:0" onSubmit="return CheckForm();">
<table width="100%" border="0" cellspacing="1" cellpadding="5">
	<tr>
		<td height="25" colspan="2" class="td_title">教育情况修改
			<input name="EduId" type="hidden" id="EduId" value="<%=EduId%>"></td>
	</tr>
	<tr>
		<td width="25%" height="23" class="td_content">时间：</td>
		<td width="75%" class="td_content">从
											<input name="EduBeginDate" type="text" class="input_1" id="EduBeginDate" value="<%=EduBeginDate%>" size="20" />
											到
											<input name="EduEndDate" type="text" class="input_1" id="EduEndDate" value="<%=EduEndDate%>" size="20" />
											<br>
				(格式：2007-09，后面一项目不填表示至今)</td>
	</tr>
	<tr>
		<td height="23" class="td_content">学校：</td>
		<td class="td_content"><input name="EduSchool" type="text" class="input_1" id="EduSchool" value="<%=EduSchool%>" size="50" /></td>
	</tr>
	<tr>
		<td height="23" class="td_content">专业：</td>
		<td class="td_content"><input name="EduProfession" type="text" class="input_1" id="EduProfession" value="<%=EduProfession%>" size="30" /></td>
	</tr>
	<tr>
		<td height="23" class="td_content">学历：</td>
		<td class="td_content"><select name="EduQualification" class="input_1" id="EduQualification">
						<option value="" <%If EduQualification = "" Then Response.Write("selected")%>>请选择</option>
						<%
						Rs.Open "select * from QualificationTbl order by QualificationId asc" , Conn , 1 , 1
						Do While Not Rs.Eof
							Response.Write("<option value="""& Rs("QualificationName") &""" ")
							If Rs("QualificationName") = EduQualification Then Response.Write("selected")
							Response.Write(">"& Rs("QualificationName") &"</option>")
						Rs.MoveNext
						Loop
						Rs.Close
						%>
					</select></td>
	</tr>
	<tr>
		<td height="23" class="td_content">专业描述：</td>
		<td class="td_content"><textarea name="EduNote" cols="50" rows="10" class="input_1" id="EduNote"><%=EduNote%></textarea></td>
	</tr>
	<tr>
		<td height="23" class="td_content">&nbsp;</td>
		<td class="td_content"><input name="Submit" type="submit" class="input_1" value=" 确  定 ">
		&nbsp;&nbsp;
		<input name="Submit" type="button" class="input_1" value=" 关  闭 " onClick="javascript:window.close();"></td>
	</tr>
</table>
</form>
</body>
</html>
