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

<%
  
   
  
  studentname = TRIM( Request( "studentname" ) )
  strmemo = TRIM( Request( "memo" ) )
  fenshu = TRIM( Request( "fenshu" ) )
  rizhidate=Request("rizhidate")
 
  louhao = TRIM( Request( "louhao"))
  shehao = TRIM( Request( "shehao"))
  

dim mysendto1
mysendto1=split(studentname,"|",-1,1)
for each sendtoinf in mysendto1
   set Rssave=server.createobject("adodb.recordset")
       Rssavesql="select * from banwurizhi where (id is null)" 
       Rssave.open Rssavesql,conn,1,3
       Rssave.addnew
	   Rssave("years")=request.cookies("nowxueqi")
	   Rssave("类别")="宿舍管理"
       Rssave("rizhidate")=rizhidate
       Rssave("rizhiType")="宿舍管理"
	   
	   Rssave("宿舍楼名称")=louhao
	   Rssave("宿舍号")=shehao
	 
	   str1=split(sendtoinf,".",-1,1)
     		   
			  
	   Set RsJiLu=Server.CreateObject("Adodb.Recordset")
       sqlJiLu="select * from students  where Years='"&request.cookies("nowxueqi")&"'  and     id='"&str1(0)&"'"
       RsJiLu.open sqlJiLu,conn,1,1
	  
	  
	  
	   Rssave("Grade")=RsJiLu("grade")
	   Rssave("class")=RsJiLu("class")
	   
	   Rssave("tongyibianhao")=RsJiLu("tongyibianhao")
	   
       Rssave("number")=RsJiLu("number")
	   Rssave("studentname")=str1(1) 
	   
	   
	   Rssave("shuoming")=strmemo
	   Rssave("fenshu")=fenshu
	   Rssave("updatetime")=now
	   Rssave("teachers")=request.cookies("tname")
       strip=Request.ServerVariables("REMOTE_ADDR")
       Rssave("upip")=strip
	  
	  
       Rssave.update
       Rssave.close
next

	response.redirect   "SheYuanDeyuList.asp?louhao="&louhao&"&shehao="&shehao
%>

