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


<%    
    sendto=request("sendto")
	curpage=Request.QueryString("curpage") 
    strId=request("id")	
	

	'检查系统有无 名单 
	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 GongWenSee where (sid is null)" 
		rssended.open rssendedsql,conn,1,3
	
		dim mysendto
		mysendto=split(sendto,"|",-1,1)
		for each sendtoinf in mysendto
				set Rscheck=Conn.Execute("select * from GongWenSee where  fid='"&strId&"' and  处理人='"&sendtoinf&"'")
				if   Rscheck.eof and   Rscheck.bof then  '检查是否重发
					rssended.addnew
					rssended("fid")=strId
					rssended("处理人")=sendtoinf
					rssended("处理IP")="" 
					rssended.update
				end if
		next
		rssended.close


        sql="update GongWen  set 是否转发='已转发'  where  id='"&strId& "'"
        conn.execute(sql) 


rssended.close
response.redirect   "zhuanfa.asp?curpage="&curpage&"&id="&strId
                             
%>

<%="zhuanfam.asp?curpage="&curpage&"&id="&strId%>
