<!--#include file="conn.asp"-->
<!--#include file="webconfig.asp"-->
<!--#include file="szwyadmin/ubbcode/UBBCode.asp" -->
<%
function HTMLEncode2(fString)
	fString = Replace(fString, CHR(13), "")
	fString = Replace(fString, CHR(10) & CHR(10), "</P><P>")
	fString = Replace(fString, CHR(10), "<BR>")
	HTMLEncode2 = fString
end function
%>
<%
email=request("email")
if request("studentname")="" then
response.write "<script LANGUAGE='javascript'>alert('请输入学生姓名！');history.go(-1);</script>"
response.End
end if
if request("parentname")="" then
response.write "<script LANGUAGE='javascript'>alert('请输入家长姓名！');history.go(-1);</script>"
response.End
end if
if request("year")="" then
response.write "<script LANGUAGE='javascript'>alert('请输入出生年月！');history.go(-1);</script>"
response.End
end if
if request("sfid")="" then
response.write "<script LANGUAGE='javascript'>alert('请输入身份证号码！');history.go(-1);</script>"
response.End
end if
if request("minzu")="" then
response.write "<script LANGUAGE='javascript'>alert('请输入民族！');history.go(-1);</script>"
response.End
end if
if request("byyx")="" then
response.write "<script LANGUAGE='javascript'>alert('请输入毕业学校！');history.go(-1);</script>"
response.End
end if
if request("sgtz")="" then
response.write "<script LANGUAGE='javascript'>alert('请输入身高体重！');history.go(-1);</script>"
response.End
end if
if request("address")="" then
response.write "<script LANGUAGE='javascript'>alert('请输入家庭地址！');history.go(-1);</script>"
response.End
end if
if request("sbxl")="" then
response.write "<script LANGUAGE='javascript'>alert('请输入所报学历！');history.go(-1);</script>"
response.End
end if
if request("grdh")="" then
response.write "<script LANGUAGE='javascript'>alert('请输入个人电话！');history.go(-1);</script>"
response.End
end if
if request("jtdh")="" then
response.write "<script LANGUAGE='javascript'>alert('请输入家庭电话！');history.go(-1);</script>"
response.End
end if


	if Instr(email,".")<=0 or Instr(email,"@")<=0 or len(email)<10 or len(email)>50 then
	response.write "<script language='javascript'>"
	response.write "alert('您输入的电子邮件地址格式不正确，请检查后重新输入！');"
	response.write "location.href='javascript:history.go(-1)';"							
	response.write "</script>"	
	response.end
	end if
if request("post")="" then
response.write "<script LANGUAGE='javascript'>alert('请输入邮政编码！');history.go(-1);</script>"
response.End
end if
if request("gaokao")="" then
response.write "<script LANGUAGE='javascript'>alert('请输入高考或会考成绩！');history.go(-1);</script>"
response.End
end if

set rs=server.CreateObject("adodb.recordset")
rs.open "select  * from  wsbm ",conn,1,3
rs.Addnew
rs("zy")=request("zy")
rs("studentname")=request("studentname")
rs("parentname")=request("parentname")
rs("age")=request("age")
rs("sex")=request("sex")
rs("year")=request("year")
rs("month")=request("month")
rs("day")=request("day")
rs("sfid")=request("sfid")
rs("minzu")=request("minzu")
rs("jiguan")=request("jiguan")
rs("xueli")=request("xueli")
rs("byyx")=request("byyx")
rs("techang")=request("techang")
rs("sgtz")=request("sgtz")
rs("zzmm")=request("zzmm")
rs("address")=request("address")
rs("sbxl")=request("sbxl")
rs("sjhm")=request("sjhm")
rs("grdh")=request("grdh")
rs("jtdh")=request("jtdh")
rs("email")=request("email")
rs("post")=request("post")
rs("gaokao")=request("gaokao")
rs("beizhu")=request("beizhu")
rs("status")=request("status")
'rs("pei4")=request("pei4")
'rs("zhmc4")=request("zhmc4")
'rs("zh4")=request("zh4")
'rs("adm_address")=request("adm_address")
'rs("adm_post")=request("adm_post")
'rs("adm_tel")=request("adm_tel")
'rs("adm_fax")=request("adm_fax")
'rs("adm_msn")=request("adm_msn")
'rs("adm_qq")=request("adm_qq")
'rs("fei1")=request("fei1")
'rs("fei2")=request("fei2")
'rs("fei3")=request("fei3")
'rs("fei4")=request("fei4")
rs.update
rs.close
set rs=nothing
response.write "<script language='javascript'>"
response.write "alert('报名成功！');"
response.write "location.href='wsbm.asp';"			
response.write "</script>"
 %> 
