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

<%  
   cid=Request( "cid" )  
   begindate=Request( "begindate" ) 
   enddate=request("enddate") 
   xingming=request("xingming")
   zhibanren=request("zhibanren")
   
  
   if zhibanren<>"" then
   
      set rscheck=server.createobject("adodb.recordset")
      rscheckSQL="select * from teachers where TName ='"&zhibanren&"'" 
      rscheck.open rscheckSQL,conn,1,3
	  if  rscheck.eof and  rscheck.bof then
	      response.redirect   "FindError.asp?tname="&zhibanren
	  end if 
   
   set RsPlan=server.createobject("adodb.recordset")
   RsPlansql="select * from CalendarPlan where  cid='"&cID&"'" 
   RsPlan.open RsPlansql,conn,1,3
 
   RsPlan("username")=zhibanren
   RsPlan("planValue")=RsPlan("planValue")&"--->"&request.cookies("tname")
   RsPlan.update
   RsPlan.close
	
   set RsPlan=nothing  
   end if
   conn.close
   set conn=nothing
   response.redirect   "ZhiRiList.asp?begindate="&begindate&"&enddate="&enddate&"&xingming="&xingming
   
%>
 <%=CID%>
 

 