<!--#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 EducateId
Dim EducateBeginDate,EducateEndDate,EducateAgencies,EducateAddr
Dim EducateCourses,EducateCertificates,EducateNote

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

If Request.Form <> "" Then
	EducateId = Qsite.chgStr(Trim(Request.Form("EducateId")))
	EducateBeginDate = Qsite.chgStr(Trim(Request.Form("EducateBeginDate")))
	EducateEndDate = Qsite.chgStr(Trim(Request.Form("EducateEndDate")))
	EducateAgencies = Qsite.chgStr(Trim(Request.Form("EducateAgencies")))
	EducateAddr = Qsite.chgStr(Trim(Request.Form("EducateAddr")))
	EducateCourses = Qsite.chgStr(Trim(Request.Form("EducateCourses")))
	EducateCertificates = Qsite.chgStr(Trim(Request.Form("EducateCertificates")))
	EducateNote = Qsite.chgStr(Trim(Request.Form("EducateNote")))
	
	If EducateId = "" Or IsNull(EducateId) Or Not IsNumeric(EducateId) Then EducateId = 0
	
	If EducateBeginDate = "" Or IsNull(EducateBeginDate) Then
		Qsite.ShowMsg "请输入开始时间" , ""
	End If
	If EducateEndDate = "" Or IsNull(EducateEndDate) Then EducateEndDate = "至今"
	If EducateAgencies = "" Or IsNull(EducateAgencies) Then
		Qsite.ShowMsg "请输入培训机构" , ""
	End If
	If EducateCourses = "" Or IsNull(EducateCourses) Then
		Qsite.ShowMsg "请输入培训课程" , ""
	End If
	
	Conn.Execute("update EducateTbl set EducateBeginDate = '"& EducateBeginDate &"' , EducateEndDate = '"& EducateEndDate &"' , EducateAgencies = '"& EducateAgencies &"' , EducateAddr = '"& EducateAddr &"' , EducateCourses ='"& EducateCourses &"' , EducateCertificates = '"& EducateCertificates &"' , EducateNote = '"& EducateNote &"' where EducateId = "& EducateId)
	
	
	Response.Write("<script language=""javascript"">alert(""修改成功"");opener.location.reload();window.close();</script>")
	Response.End()
	
End If

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

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

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

Rs.Open "select * from EducateTbl where EducateId = "& EducateId , Conn , 1 , 1
If Rs.Eof Then
	EducateBeginDate = ""
	EducateEndDate = ""
	EducateAgencies = ""
	EducateAddr = ""
	EducateCourses = ""
	EducateCertificates = ""
	EducateNote = ""
Else
	EducateBeginDate = Rs("EducateBeginDate")
	EducateEndDate = Rs("EducateEndDate")
	EducateAgencies = Rs("EducateAgencies")
	EducateAddr = Rs("EducateAddr")
	EducateCourses = Rs("EducateCourses")
	EducateCertificates = Rs("EducateCertificates")
	EducateNote = Rs("EducateNote")
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("EducateBeginDate" , "开始时间" , 1 , 20))
			return false;
		if(!checkLength("EducateEndDate" , "结束时间" , 0 , 20))
			return false;
		if(!checkLength("EducateAgencies" , "培训机构" , 1 , 100))
			return false;
		if(!checkLength("EducateAddr" , "培训地点" , 0 , 100))
			return false;
		if(!checkLength("EducateCourses" , "培训课程" , 1 , 100))
			return false;
		if(!checkLength("EducateCertificates" , "获得证书" , 0 , 100))
			return false;
		if(!checkLength("EducateNote" , "详细描述" , 0 , 500))
			return false;
		return true;
	}
</script>
</head>

<body>
<form name="MemForm" method="post" action="Person_EditEducate.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="EducateId" type="hidden" id="EducateId" value="<%=EducateId%>"></td>
	</tr>
	<tr>
		<td width="25%" height="23" class="td_content">时间：</td>
		<td width="75%" class="td_content">从
											<input name="EducateBeginDate" type="text" class="input_1" id="EducateBeginDate" value="<%=EducateBeginDate%>" size="20" />
											到
											<input name="EducateEndDate" type="text" class="input_1" id="EducateEndDate" value="<%=EducateEndDate%>" size="20" />
											<br>
				(格式：2007-09，后面一项目不填表示至今)</td>
	</tr>
	<tr>
		<td height="23" class="td_content">培训机构：</td>
		<td class="td_content"><input name="EducateAgencies" type="text" class="input_1" id="EducateAgencies" value="<%=EducateAgencies%>" size="50" /></td>
	</tr>
	<tr>
		<td height="23" class="td_content">培训地点：</td>
		<td class="td_content"><input name="EducateAddr" type="text" class="input_1" id="EducateAddr" value="<%=EducateAddr%>" size="50" /></td>
	</tr>
	<tr>
		<td height="23" class="td_content">培训课程：</td>
		<td class="td_content"><input name="EducateCourses" type="text" class="input_1" id="EducateCourses" value="<%=EducateCourses%>" size="50" /></td>
	</tr>
	<tr>
		<td height="23" class="td_content">获得证书：</td>
		<td class="td_content"><input name="EducateCertificates" type="text" class="input_1" id="EducateCertificates" value="<%=EducateCertificates%>" size="50" /></td>
	</tr>
	<tr>
		<td height="23" class="td_content">详细描述：</td>
		<td class="td_content"><textarea name="EducateNote" cols="50" rows="10" class="input_1" id="EducateNote"><%=EducateNote%></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=" 确  定 "> <input name="Submit" type="button" class="input_1" value=" 关  闭 " onClick="javascript:window.close();"></td>
	</tr>
</table>
</form>
</body>
</html>
