<!--#include file="../../p_inc/Include_func.asp"-->
<!--#include file="../inc/public.asp"-->
<!--#include file="../inc/openconn.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="../css/style.css" rel=stylesheet type=text/css>
<style type="text/css">
<!--
body{font-family: Georgia, "Times New Roman", Times, serif;}
-->
</style>
<script>
function scrollWindow(){this.scroll(0, 6500000);sett=setTimeout('scrollWindow()',1);}
scrollWindow();
function scrollWindow2(){clearTimeout(sett)}
document.ondblclick=scrollWindow2;
</script>
<%
t3=Request("t3")
'Set oRs=conn.Execute("Select * From qingtiandy_url Order By Id Asc")
'Response.Write "<qingtiandy_url>"
'Do While Not oRs.Eof
'	zw_url=oRs("w_url")
'	zw_name=oRs("w_name")
'	Response.Write zw_url&"|||"&zw_name&"{###}"
'	oRs.MoveNext
'Loop


%>

<%IF t3="" Then%>
<table width="98%" border="0" cellspacing="0" cellpadding="0"  align=center class="tableBorder">
<form action="?t3=ok" method="post" name="form1">
	<tr> 
		<th class="tableHeaderText" height=25 colspan="2">酷站网址导航</th>
	</tr>
	<tr>
		<td width="81%" class=forumRowHighlight>
	  	<input type="submit" value="数据导入" id=submit name=submit> 
	  	没有任何的广告，纯净网址
		</td>
	</tr>
</form>	
</table>
<%

Else
	
	str=ReadAllTextFile("data.txt")
	qingtiandh_ltype1=GetContent(str,"<qingtiandh_ltype1>","</qingtiandh_ltype1>",0)	
	IF G_IS_SQL_User_DB="1" Then
		qingtiandh_ltype1="1|||1|||1|||||||||1|||1||||||6####"&qingtiandh_ltype1
	End IF
	qingtiandh_ltype1_a=Split(qingtiandh_ltype1,"####")
	For ii=0 To Ubound(qingtiandh_ltype1_a)-1
		s1=qingtiandh_ltype1_a(ii)
		s1_a=Split(s1,"|||")
		stypeid=s1_a(0)
		stypename=s1_a(1)
		stypename2=s1_a(2)
		stypecontent=s1_a(3)
		stypeurl=s1_a(4)
		stypeno=s1_a(5)
		stypehide=s1_a(6)
		stypehttpurl=s1_a(7)
		sm_type2=s1_a(8)

		Set oRss=Server.CreateObject(G_RS)
		oRss.open "Select * From qingtiandh_ltype1 Where typename='"&stypename&"' And m_type2="&sm_type2,conn,1,3

		
		IF oRss.Eof Then
			oRss.Addnew()
			IF G_IS_SQL_User_DB="0" Then
			oRss("typeid")=stypeid
			End IF
			oRss("typename")=stypename
			oRss("typename2")=stypename2
			oRss("typecontent")=stypecontent
			oRss("typeurl")=stypeurl
			oRss("typeno")=stypeno
			oRss("typehide")=stypehide
			oRss("typehttpurl")=stypehttpurl
			oRss("m_type2")=sm_type2
			oRss.Update()
			Response.Write stypename&"---"&sm_type2&"---<font color=blue>导入成功</font><br>"
			Response.Flush()
		Else
			Response.Write stypename&"---"&sm_type2&"---<font color=red>已经存在</font><br>"
			Response.Flush()			
		End IF
		
	Next	
	IF G_IS_SQL_User_DB="1" Then
		Conn.Execute("delete From qingtiandh_ltype1 where typeid=1")
	End IF
	
	
	
	qingtiandy_url=GetContent(str,"<qingtiandy_url2>","</qingtiandy_url2>",0)	
	qingtiandy_url_a=Split(qingtiandy_url,"####")
	For ii=0 To Ubound(qingtiandy_url_a)-1
		s1=qingtiandy_url_a(ii)
		s1_a=Split(s1,"|||")
		sid=s1_a(0)
		sm_type1=s1_a(1)
		sm_type3=s1_a(2)
		sm_name=s1_a(3)
		sm_color=s1_a(4)
		sm_look=s1_a(5)
		sm_url=s1_a(6)
		sm_content=s1_a(7)
		sm_time=s1_a(8)
		sm_no=s1_a(9)
		Set oRss=Server.CreateObject(G_RS)
		oRss.open "Select * From qingtiandh_List2 Where m_name='"&sm_name&"' And m_type1="&sm_type1,conn,1,3
		IF oRss.Eof Then		
			oRss.Addnew()
			oRss("m_type1")=sm_type1
			oRss("m_type3")=sm_type3
			oRss("m_name")=sm_name
			oRss("m_color")=sm_color
			oRss("m_look")=sm_look
			oRss("m_url")=sm_url
			oRss("m_content")=sm_content
			oRss("m_time")=sm_time
			oRss("m_no")=sm_no
			oRss.Update()
			Response.Write sm_name&"---"&sm_url&"---<font color=blue>导入成功</font><br>"
			Response.Flush()
		Else
			Response.Write sm_name&"---"&sm_url&"---<font color=red>已经存在</font><br>"
			Response.Flush()			
		End IF
	Next
	Response.Write "<font color=red><b>全部操作完成</b></font><br>"
End IF
%>


