<!--#include file="../checkLogin.asp"-->
<!--#include file="../SQLconn.asp"-->
 

<%  
   xingqi=request("xingqi")
   jieci=request("jieci")
   jibie=request("jibie")
   banbie=request("banbie")
   kemu=request("kemu")
   tname=request.cookies("tname")
   
   '清除失效的课程表
   set rsdel=server.createobject("adodb.recordset")
   sqldel="delete   from kechengbiao  where 星期='"&xingqi& "'  and 节次 not in (select vname from  varset where name='作息时间') and 教师='"&request.cookies("tname")& "'"
   rsdel.open sqldel,conn,1,1
   rsdel.close
       
    
    
   set RsPlan=server.createobject("adodb.recordset")
   RsPlansql="select * from kechengbiao where  星期='"&xingqi& "'  and 节次='"&jieci& "' and 教师='"&request.cookies("tname")& "'"
   RsPlan.open RsPlansql,conn,1,3
   
   RsPlan.addnew
   RsPlan("学期")=request.cookies("nowxueqi") 
   RsPlan("星期")=xingqi
   RsPlan("节次")=jieci
   RsPlan("年级")=jibie
   RsPlan("班别")=banbie
   RsPlan("自录科目")=kemu
   RsPlan("教师")=request.cookies("tname")
   RsPlan("upname")=request.cookies("tname")
   RsPlan.update
   RsPlan.close
	
   set RsPlan=nothing  
 
   conn.close
   set conn=nothing
   response.redirect   "MyKeCheng.asp"
%>
<%=RsPlansql%> 

 