<!-- #include file="conn.asp" -->
<!-- #include file="inc.asp" -->
<%
 Call Check_Session("Agent")
 iname=trim(request.form("iname"))
 sex=request.form("sex")
 teach=trim(request.form("teach"))
 school=trim(request.form("school"))
 tschool=request.form("tschool")
 shenfen=request.form("shenfen")
 spec=trim(request.form("spec"))
 edu=request.form("edu")
 tage=request.form("tage")
 tel=trim(request.form("tel"))
 email=trim(request.form("email"))
 qq=trim(request.form("qq"))
 ttime=trim(request.form("ttime"))
 tarea=trim(request.form("tarea"))
 pay=trim(request.form("pay"))
 types=Cint(request.form("types"))
 content=trim(request.form("content"))
 ip = Request.ServerVariables("HTTP_X_FORWARDED_FOR") 
 If ip = "" Then ip = Request.ServerVariables("REMOTE_ADDR") 
 if qq="" then qq=0 end if
 if content="" then content="无" end if
 if pay="" then pay="面议" end if
 if ttime="" then ttime="不限" end if
 if tarea="" then tarea="不限" end if
 if spec="" then spec="-" end if
 if edu="" then edu="-" end if
 if tage="" then tage="-" end if
 if shenfen="" then shenfen="-" end if
 if tschool="" then tschool="-" end if
 if email="" then email="-" end if
 if Cint(Request.Form("tch_id"))=Cint(Session("Tch_id")) then
 set rs=server.createobject("adodb.recordset")
 sql="select * from teacher"
 rs.open sql,conn,1,3
 rs.addnew
 rs("username")="-"
 rs("password")="-"
 rs("iname")=iname
 rs("sex")=sex
 rs("teach")=teach
 rs("school")=school
 rs("tschool")=tschool
 rs("shenfen")=shenfen
 rs("spec")=spec
 rs("edu")=edu
 rs("tage")=tage
 rs("tel")=tel
 rs("email")=email
 rs("qq")=qq
 rs("ttime")=ttime
 rs("tarea")=tarea
 rs("content")=content
 rs("pay")=pay
 rs("types")=types
 rs("pas")=1
 rs("ip")=ip
 rs("city")=city_id
 rs("agent")=session("agent_id")
 rs("idate")=now()
 rs.update
 rs.close
 set rs=nothing
response.write"<SCRIPT language=JavaScript>alert('教员信息登记成功！');"
response.write"this.location.href='index.asp';</SCRIPT>" 
response.end
else
response.write"<SCRIPT language=JavaScript>alert('非法修改！');"
response.write"this.location.href='index.asp';</SCRIPT>" 
response.end
end if
conn.close
set conn=nothing
%>