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


<%
    groupid=request("groupid")
    groupname=request("groupname")
    sendto=request("sendto")



'检查系统有无 名单 
if sendto<>"" then
dim mysendto1
mysendto1=split(sendto,"|",-1,1)
for each sendtoinf in mysendto1
      set rscheck=server.createobject("adodb.recordset")
      rscheckSQL="select * from teachers where TName ='"&sendtoinf&"'" 
      rscheck.open rscheckSQL,conn,1,3
	  if  rscheck.eof and  rscheck.bof then
	      response.redirect   "FindError.asp?tname="&sendtoinf
	  end if 
next
end if



'标记发送文件给个人
set rssended=server.createobject("adodb.recordset")
rssendedsql="select * from teachergroup where (id is null)" 
rssended.open rssendedsql,conn,1,3
dim mysendto
mysendto=split(sendto,"|",-1,1)
for each sendtoinf in mysendto
    if  trim(sendtoinf)<>"" then
    rssended.addnew
	rssended("owner")=request.cookies("tname")
    rssended("groupid")=groupid
	rssended("groupname")=groupname
    rssended("tname")=sendtoinf
    rssended.update
	end if 
next
	

rssended.close
response.redirect   "modifyfenzu.asp?groupid="&groupid&"&groupname="&groupname
%>


