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

<%  
   id=request("id")
   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
       
   if  trim(banbie)=""  and   trim(kemu)=""  then 
          set rsdel=server.createobject("adodb.recordset")
          sqldel="delete   from  kechengbiao  where     ID='"&id& "'"
          rsdel.open sqldel,conn,1,1
          rsdel.close
   
   else
			
		   set RsPlan=server.createobject("adodb.recordset")
		   RsPlansql="select * from kechengbiao where    ID='"&id& "'"
		   RsPlan.open RsPlansql,conn,1,3
		   
		   RsPlan("年级")=jibie
		   RsPlan("班别")=banbie
		   RsPlan("自录科目")=kemu
		 
		   RsPlan.update
		   RsPlan.close
   end if
	
   set RsPlan=nothing  
 
   conn.close
   set conn=nothing
  response.redirect   "MyKeCheng.asp"
%>
<%=RsPlansql%> 

 