<!--#include file="../../p_inc/Include_func.asp"-->
<!--#include file="../inc/public.asp"-->
<!--#include file="../inc/openconn.asp"-->
<LINK href="../css/style.css" rel=stylesheet type=text/css>
<script>
 var sett;
 var i=1;
function $(id){return document.getElementById(id)}
function scrollWindow(){this.scroll(0, 6500000);sett=setTimeout('scrollWindow()',1);}
scrollWindow();
function scrollWindow2(){
if (i%2==1)
	clearTimeout(sett)
else
	scrollWindow();
	i++;
}
document.ondblclick=scrollWindow2;
</script>
<%
Response.Buffer=True
response.contenttype="text/html;charset=gb2312"
Server.ScriptTimeOut=9999999

tag=request("tag")
IF tag="feifa" Then
	response.Write "正在初始化....<br>"
'	response.Flush()
'	response.Write "正在过滤当前所用的模版，切换模版后需要重新过滤.....<br>"
'	str=Qingtiandy_getfilecontent(server.MapPath(Add_Root_Dir("/template/"&G_moban&"/html/top.html")))
'	clear_feifa_0721 str
'	str=Qingtiandy_getfilecontent(server.MapPath(Add_Root_Dir("/template/"&G_moban&"/html/button.html")))
'	clear_feifa_0721 str
'	str=Qingtiandy_getfilecontent(server.MapPath(Add_Root_Dir("/template/"&G_moban&"/html/index.html")))
'	clear_feifa_0721 str
'	str=Qingtiandy_getfilecontent(server.MapPath(Add_Root_Dir("/template/"&G_moban&"/html/detail.html")))
'	clear_feifa_0721 str
'	str=Qingtiandy_getfilecontent(server.MapPath(Add_Root_Dir("/template/"&G_moban&"/html/list.html")))
'	clear_feifa_0721 str
'	str=Qingtiandy_getfilecontent(server.MapPath(Add_Root_Dir("/template/"&G_moban&"/html/all.html")))
'	clear_feifa_0721 str
'	response.Flush()
'	response.Write "------------------------------------------------模版过滤完成-----------------------------------------<br>"
'	response.Flush()
	response.Write "正在加载当前使用数据库，请隔一段时间过滤一次.....<br>"
	response.Flush()
	Set rs=server.CreateObject(G_RS)
	rs.open "select m_name from qingtiandh_List order by m_time asc,id asc",conn,1,3
	str_m_star=""
	response.Write "开始过滤表.............qingtiandh_List.<br>"
	response.Flush()
	Do While Not rs.Eof
		'str_m_star=rs("m_star")
		str_m_star_temp=clear_feifa_0721(rs("m_name"))
		IF instr(str_m_star_temp,"$**$**$")>0 Then
			rs("m_name")=replace(str_m_star_temp,"$**$**$","**")
			rs.update
		End IF
		response.Flush()		
		rs.movenext
	Loop	
	rs.close	
	
	
	Set rs=server.CreateObject(G_RS)
	rs.open "select m_name from qingtiandh_List2 order by m_time asc,id asc",conn,1,3
	str_m_star=""
	response.Write "开始过滤表.............qingtiandh_List2.<br>"
	response.Flush()
	Do While Not rs.Eof
		'str_m_star=rs("m_star")
		str_m_star_temp=clear_feifa_0721(rs("m_name"))
		IF instr(str_m_star_temp,"$**$**$")>0 Then
			rs("m_name")=replace(str_m_star_temp,"$**$**$","**")
			rs.update
		End IF
		response.Flush()		
		rs.movenext
	Loop	
	rs.close
	
	Set rs=server.CreateObject(G_RS)
	rs.open "select typename,typename2 from qingtiandh_ltype1 order by typeid asc",conn,1,3
	str_m_star=""
	response.Write "开始过滤表.............qingtiandh_ltype1.<br>"
	response.Flush()
	Do While Not rs.Eof
		'str_m_star=rs("m_star")
		str_m_star_temp=clear_feifa_0721(rs("typename"))
		str_m_star_temp2=clear_feifa_0721(rs("typename2"))
		IF instr(str_m_star_temp,"$**$**$")>0 Then
			rs("typename")=replace(str_m_star_temp,"$**$**$","**")
			rs("typename2")=replace(str_m_star_temp2,"$**$**$","**")
			rs.update
		End IF
		response.Flush()		
		rs.movenext
	Loop	
	rs.close	
		
	Set rs=server.CreateObject(G_RS)
	rs.open "select typename,typename2 from qingtiandh_type1 order by typeid asc",conn,1,3
	str_m_star=""
	response.Write "开始过滤表.............qingtiandh_type1.<br>"
	response.Flush()
	Do While Not rs.Eof
		'str_m_star=rs("m_star")
		str_m_star_temp=clear_feifa_0721(rs("typename"))
		str_m_star_temp2=clear_feifa_0721(rs("typename2"))
		IF instr(str_m_star_temp,"$**$**$")>0 Then
			rs("typename")=replace(str_m_star_temp,"$**$**$","**")
			rs("typename2")=replace(str_m_star_temp2,"$**$**$","**")
			rs.update
		End IF
		response.Flush()		
		rs.movenext
	Loop	
	rs.close
	
	Set rs=server.CreateObject(G_RS)
	rs.open "select typename,typename2 from qingtiandh_type2 order by typeid asc",conn,1,3
	str_m_star=""
	response.Write "开始过滤表.............qingtiandh_type2.<br>"
	response.Flush()
	Do While Not rs.Eof
		'str_m_star=rs("m_star")
		str_m_star_temp=clear_feifa_0721(rs("typename"))
		str_m_star_temp2=clear_feifa_0721(rs("typename2"))
		IF instr(str_m_star_temp,"$**$**$")>0 Then
			rs("typename")=replace(str_m_star_temp,"$**$**$","**")
			rs("typename2")=replace(str_m_star_temp2,"$**$**$","**")
			rs.update
		End IF
		response.Flush()		
		rs.movenext
	Loop	
	rs.close
	
	Set rs=server.CreateObject(G_RS)
	rs.open "select typename,typename2 from qingtiandh_type3 order by typeid asc",conn,1,3
	str_m_star=""
	response.Write "开始过滤表.............qingtiandh_type3.<br>"
	response.Flush()
	Do While Not rs.Eof
		'str_m_star=rs("m_star")
		str_m_star_temp=clear_feifa_0721(rs("typename"))
		str_m_star_temp2=clear_feifa_0721(rs("typename2"))
		IF instr(str_m_star_temp,"$**$**$")>0 Then
			rs("typename")=replace(str_m_star_temp,"$**$**$","**")
			rs("typename2")=replace(str_m_star_temp2,"$**$**$","**")
			rs.update
		End IF
		response.Flush()		
		rs.movenext
	Loop	
	rs.close	
	
	Set rs=server.CreateObject(G_RS)
	rs.open "select list_name from qingtiandy_listurl order by id asc",conn,1,3
	str_m_star=""
	response.Write "开始过滤表.............qingtiandy_listurl.<br>"
	response.Flush()
	Do While Not rs.Eof
		'str_m_star=rs("m_star")
		str_m_star_temp=clear_feifa_0721(rs("list_name"))
		IF instr(str_m_star_temp,"$**$**$")>0 Then
			rs("list_name")=replace(str_m_star_temp,"$**$**$","**")
			rs.update
		End IF
		response.Flush()		
		rs.movenext
	Loop	
	rs.close		
	
	Set rs=server.CreateObject(G_RS)
	rs.open "select m_name from qingtiandy_tool order by id asc",conn,1,3
	str_m_star=""
	response.Write "开始过滤表.............qingtiandy_tool.<br>"
	response.Flush()
	Do While Not rs.Eof
		'str_m_star=rs("m_star")
		str_m_star_temp=clear_feifa_0721(rs("m_name"))
		IF instr(str_m_star_temp,"$**$**$")>0 Then
			rs("m_name")=replace(str_m_star_temp,"$**$**$","**")
			rs.update
		End IF
		response.Flush()		
		rs.movenext
	Loop	
	rs.close	
	
	
	response.Write "完成<br>"
	response.Flush()
	
'	Set rs=conn.execute("select m_Director from qingtiandy_movie order by m_date asc,id asc")
'	str_m_star=""
'	str_m_m_Director=""
'	str_m_m_content=""
'	Do While Not rs.Eof
'		str_m_m_Director=str_m_m_Director&rs("m_Director")&"$$$$"
'		rs.movenext
'	Loop		
'	response.Write "加载完毕，开始过滤《导演》.............."
'	response.Flush()
'	clear_feifa_0721 str_m_m_Director
'	response.Write "完成<br>"
'	response.Flush()
'	
'	Set rs=conn.execute("select m_content from qingtiandy_movie order by m_date asc,id asc")
'	str_m_star=""
'	str_m_m_Director=""
'	str_m_m_content=""
'	Do While Not rs.Eof
'		str_m_m_content=str_m_m_content&rs("m_content")&"$$$$"
'		rs.movenext
'	Loop		
'	response.Write "加载完毕，开始过滤《影片简介》..............<br>"
'	response.Flush()
'	clear_feifa_0721 str_m_m_content	
'	response.Write "完成<br>"
'	response.Flush()		
'	
'	response.Write "<font color=blue>全部完成</font><br>"
Else
	Response.Write "<a href='3.asp?tag=feifa'><font color=red>是否真的要清理?</font></a>"
End IF
%>













<%
Function clear_feifa_0721(str)
	IF str="" or isnull(str) Then
		clear_feifa_0721=""
		Exit Function
	End IF
	Dim pL,p_a,pL_1
	'过滤关键词----------------------------------------
	pL=Qingtiandy_getfilecontent(server.MapPath(Add_Root_Dir("/p_inc/Tag/xuni.txt")))
	p_a=split(pL,"|")
	For j=Lbound(p_a) To Ubound(p_a)
		pL_1=p_a(j)
		IF instr(str,pL_1)>0 Then
			'response.Write "<font color=red>"&pL_1&"</font> | "
			str=replace(str,pL_1,"$**$**$")
		End IF
	Next
	'过滤关键词----------------------------------------	
	clear_feifa_0721=str
End Function
%>