<!--#include file="../../p_inc/Include_func.asp"-->
<!--#include file="../inc/public.asp"-->
<!--#include file="../inc/openconn.asp"-->
<%
server.ScriptTimeout=3600
Response.Buffer=True
response.contenttype="text/html;charset=gb2312"
Function U2(u)
	on Error Resume Next
	dim Ads,Retrieval,GetRemoteData,cc
	Set Retrieval = Server.CreateObject(G_XMLHTTP)
	With Retrieval
	  .Open "Get", u, False, "", ""
	  .Send	  
	  GetRemoteData = .ResponseBody
	End With
	IF Retrieval.status<>200 then
		U2="http://60.191.124.233:8080"
	   '释放对象
	   Set Retrieval = Nothing 
	   Exit Function
	End if	   	
	Set Retrieval = Nothing	
	IF formatnumber(len(GetRemoteData)/1024*2,2)>1 then
		cc=Qingtiandy_BytesToBstr(GetRemoteData,"GB2312")
	Else
		cc=""
	End IF
	U2=cc
End Function

Function Urlg(u)
	str=U2(u)
	tStr=""
	IF Instr(str,"http://60.191.124.233:8080")>0 Then
		tStr="<font color=red>域名无法解析</font>"
	ElseIF Instr(str,"<li>确保浏览器的地址栏中显示的网站地址的拼写和格式正确无误。</li>")>0 Then
		tStr="<font color=red>您访问的网页不存在</font>"
	Else
		tStr="1"
	End IF
	Urlg=tStr
End Function
	
	
v=Bint(Request("v"))
action=Request("action")
IF action="" Then
	IF v=0 Then
		Session("a100203_url")=""
		Set oRs=Conn.Execute("Select * From qingtiandh_List Where m_look=1 Order By Id Desc")
		i=1
		Do While Not oRs.Eof
			IF i=1 Then
				fid=oRs("id")
				fm_url=oRs("m_url")
				fm_time=oRs("m_time")
				fm_type1=oRs("m_type1")
				fm_type2=oRs("m_type2")
				fm_name=oRs("m_name")
				fm_type3=oRs("m_type3")
			End IF
			zid=oRs("id")
			Session("a100203_url")=Session("a100203_url")&zid&","
			Response.Flush()
			i=i+1
			oRs.MoveNext
		Loop	
		Response.Write fid&"{####}"&fm_url&"{####}"&fm_name&"{####}"&fm_time&"{####}"&fm_type1&"{####}"&fm_type2&"{####}"&fm_type3&"{####}{ok}{####}"&Urlg(fm_url)&"{####}"&"1/"&i
	Else
		p=Split(Session("a100203_url"),",")
		IF Clng(Ubound(p))>Clng(v) Then
			oid=p(v)
			Set oRs=Conn.Execute("Select * From qingtiandh_List Where m_look=1 And id="&oid&" Order By Id Desc")
			IF Not oRs.Eof Then
				fid=oRs("id")
				fm_url=oRs("m_url")
				fm_time=oRs("m_time")
				fm_type1=oRs("m_type1")
				fm_type2=oRs("m_type2")
				fm_name=oRs("m_name")
				fm_type3=oRs("m_type3")			
			End IF
			Response.Write fid&"{####}"&fm_url&"{####}"&fm_name&"{####}"&fm_time&"{####}"&fm_type1&"{####}"&fm_type2&"{####}"&fm_type3&"{####}{ok}{####}"&Urlg(fm_url)&"{####}"&(v+1)&"/"&Ubound(p)+1
		Else
			Response.Write "{over}"	
		End IF
	End IF
ElseIF action="del" Then
	conn.Execute("Delete From qingtiandh_List Where ID="&v)
End IF
%>