<!-- #include file="conn.asp" -->
<%
 Call Check_Session("Agent")
 teach=trim(request.form("teach"))
 tarea=request.form("tarea")
 add=trim(request.form("add"))
 grade=trim(request.form("grade"))
 bus=trim(request.form("bus"))
 edu=request.form("edu")
 content=trim(request.form("content"))
 pay=trim(request.form("pay"))
 iname=trim(request.form("iname"))
 tel=trim(request.form("tel"))
 email=trim(request.form("email"))
 opens=Cint(request.form("open"))
 ip = Request.ServerVariables("HTTP_X_FORWARDED_FOR") 
 If ip = "" Then ip = Request.ServerVariables("REMOTE_ADDR") 
 if bus="" then bus="-" end if
 if content="" then content="无" end if
 if pay="" then pay="面议" end if
 if email="" then email="-" end if
 if teach="" or iname="" or add="" or tel="" then
response.write"<SCRIPT language=JavaScript>alert('请认真填写!!!');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if
 set rs=server.createobject("adodb.recordset")
 sql="select * from student"
 rs.open sql,conn,1,3
 rs.addnew
 rs("teach")=teach
 rs("tarea")=tarea
 rs("add")=add
 rs("grade")=grade
 rs("bus")=bus
 rs("edu")=edu
 rs("content")=content
 rs("pay")=pay
 rs("iname")=iname
 rs("email")=email
 rs("tel")=tel
 rs("pas")=2
 rs("hit")=0
 rs("ip")=ip
 rs("open")=opens
 rs("idate")=now()
 rs("city")=City_ID
 rs("agent")=Session("Agent_ID")
 rs.update
 rs.close
 set rs=nothing
 response.write"<SCRIPT language=JavaScript>alert('学员信息登记成功！');"
response.write"this.location.href='index.asp';</SCRIPT>" 
response.end
 conn.close
 set conn=nothing
%>
 