<!-- #include file="conn.asp" -->
<!-- #include file="inc.asp" -->
<%
 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=request.form("pay")
 iname=trim(request.form("iname"))
 tel=request.form("tel")
 email=request.form("email")
 password=request.form("password")
 pas=Cint(request.form("pas"))
 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 pas="" then pas=2 else pas=4 end if
 set rs=server.createobject("adodb.recordset")
 sql="select * from student where id="&makeid("stu","in",request.form("id"))
 rs.open sql,conn,1,3
 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")=pas
if pas=2 then
 rs("idate")=now()
end if
 rs("password")=password
 rs("ip")=Request.ServerVariables("REMOTE_HOST")
 rs.update
 rs.close
 set rs=nothing
 session.Contents.Remove(editstu)
 response.write"<SCRIPT language=JavaScript>alert('学员信息修改成功！');"
 response.write"this.location.href='student.asp';</SCRIPT>" 
 response.end
 conn.close
 set conn=nothing
%>
 