<!--#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 LanguageId,LanguageType,LanguageDegree

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

If Request.Form <> "" Then
	LanguageId = Qsite.chgStr(Trim(Request.Form("LanguageId")))
	LanguageType = Qsite.chgStr(Trim(Request.Form("LanguageType")))
	LanguageDegree = Qsite.chgStr(Trim(Request.Form("LanguageDegree")))
	
	If LanguageId = "" Or IsNull(LanguageId) Or Not IsNumeric(LanguageId) Then LanguageId = 0
	
	If LanguageType = "" Or IsNull(LanguageType) Then
		Qsite.ShowMsg "请输入外语语种" , ""
	End If
	If LanguageDegree = "" Or IsNull(LanguageDegree) Then
		Qsite.ShowMsg "请选择掌握程度" , ""
	End If
	
	Conn.Execute("update LanguageTbl set LanguageType = '"& LanguageType &"' , LanguageDegree = '"& LanguageDegree &"' where LanguageId = "& LanguageId)
	
	
	Response.Write("<script language=""javascript"">alert(""修改成功"");opener.location.reload();window.close();</script>")
	Response.End()
	
End If

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

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

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

Rs.Open "select * from LanguageTbl where LanguageId = "& LanguageId , Conn , 1 , 1
If Rs.Eof Then
	LanguageType = ""
	LanguageDegree = ""
Else
	LanguageType = Rs("LanguageType")
	LanguageDegree = Rs("LanguageDegree")
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("LanguageType" , "外语语种" , 1 , 20))
			return false;
		if(PerForm.LanguageDegree.value == "")
		{
			alert("请选择掌握程度");
			return false;
		}
		return true;
	}
</script>
</head>

<body>
<form name="MemForm" method="post" action="Person_EditLanguage.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="LanguageId" type="hidden" id="LanguageId" value="<%=LanguageId%>"></td>
	</tr>
	<tr>
		<td width="25%" height="23" class="td_content">外语语种：</td>
		<td width="75%" class="td_content"><input name="LanguageType" type="text" class="input_1" id="LanguageType" value="<%=LanguageType%>" size="30" /></td>
	</tr>
	<tr>
		<td height="23" class="td_content">掌握程度：</td>
		<td class="td_content"><select name="LanguageDegree" id="LanguageDegree" class="input_bk_D2D2D2">
											<option value="" <%If LanguageDegree = "" Then Response.Write("selected")%>>--请选择--</option>
											<option value="一般" <%If LanguageDegree = "一般" Then Response.Write("selected")%>>一般</option>
											<option value="良好" <%If LanguageDegree = "良好" Then Response.Write("selected")%>>良好</option>
											<option value="熟练" <%If LanguageDegree = "熟练" Then Response.Write("selected")%>>熟练</option>
											<option value="精通" <%If LanguageDegree = "精通" Then Response.Write("selected")%>>精通</option>
										</select></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>
