<!--#include file="conn.asp"-->
<!--#include file="ConnUser.asp"-->
<!--#include file="config.asp"-->
<!--#include file="char.inc"-->
<!--#include file="md5.asp"-->
<!--#include file="ChkURL.asp"-->
<!--#include file="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")=checkstr(request("zy"))
rs("studentname")=checkstr(request("studentname"))
rs("parentname")=checkstr(request("parentname"))
rs("age")=checkstr(request("age"))
rs("sex")=checkstr(request("sex"))
rs("year")=checkstr(request("year"))
rs("month")=checkstr(request("month"))
rs("day")=checkstr(request("day"))
rs("sfid")=checkstr(request("sfid"))
rs("minzu")=checkstr(request("minzu"))
rs("jiguan")=checkstr(request("jiguan"))
rs("xueli")=checkstr(request("xueli"))
rs("byyx")=checkstr(request("byyx"))
rs("techang")=checkstr(request("techang"))
rs("sgtz")=checkstr(request("sgtz"))
rs("zzmm")=checkstr(request("zzmm"))
rs("address")=checkstr(request("address"))
rs("sbxl")=checkstr(request("sbxl"))
rs("sjhm")=checkstr(request("sjhm"))
rs("grdh")=checkstr(request("grdh"))
rs("jtdh")=checkstr(request("jtdh"))
rs("email")=checkstr(request("email"))
rs("post")=checkstr(request("post"))
rs("gaokao")=checkstr(request("gaokao"))
rs("beizhu")=checkstr(request("beizhu"))
rs("status")=checkstr(request("status"))
rs.update
rs.close
set rs=nothing
response.write "<script language='javascript'>"
response.write "alert('报名成功！');"
response.write "location.href='wsbm.asp';"			
response.write "</script>"
 %> 