<!--#include file="Include_func.asp"-->
<!--#include file="openconn.asp"-->
<%
Function Rm(str)
	str=Replace(str,"""","“")
	Rm=str
End Function
v=Bint(Request("v"))
IF v="1" Then '百度
	RefreshIndexPage="1.1.1616.js"
	RefreshIndexPage_str="/p_inc/clickjs/"&RefreshIndexPage
	RefreshIndexPage2="1.2.1616.js"
	RefreshIndexPage_str2="/p_inc/clickjs/"&RefreshIndexPage2	
	RefreshTime=12*60*60 '自动刷新时间，单位是秒
	tFlag=False
	tPstr=""
	Pstr13=""
	IF N_Fso.IsFileExists(Add_Root_Dir(RefreshIndexPage_str)) Then
		tFlag=IsExistIndexPage(RefreshTime,Add_Root_Dir(RefreshIndexPage_str)) 'true：不需要重新读数据库	
	End IF
	IF Not  tFlag Then '重新读取数据库进行写入文件
		str_t=Qingtiandy_getHTTPPage_utf2("http://apps.1616.net/news/")
		str=str_t
		str=GetContent(str,"<h3>新浪热点</h3>","<h3>腾讯排行</h3>",0)
		str_url=body2s(str,"<li><a href=""","""","###",true)
		str_name=body2s(str,"<li>","</li>","###",true)
		str_name=LoseeeHtml(str_name)
		str_name=Rm(str_name)
		str_url_a=Split(str_url,"###")
		str_name_a=Split(str_name,"###")
		Pstr1="var qtCms_key_sina=[["""",""""]"
		For ki=0 To Ubound(str_url_a)
			Pstr1=Pstr1&",["""&Trim(str_name_a(ki))&""","""&Trim(str_url_a(ki))&"""]"				
		Next
		Pstr1=Pstr1&"];"
		
		
		str=str_t
		str=GetContent(str,"<h3>腾讯排行</h3>","<h3>网易新闻</h3>",0)
		str_url=body2s(str,"<li><a href=""","""","###",true)
		str_name=body2s(str,"<li>","</li>","###",true)
		str_name=LoseeeHtml(str_name)
		str_name=Rm(str_name)
		str_url_a=Split(str_url,"###")
		str_name_a=Split(str_name,"###")
		Pstr2="var qtCms_key_qq=[["""",""""]"
		For ki=0 To Ubound(str_url_a)
			Pstr2=Pstr2&",["""&Trim(str_name_a(ki))&""","""&Trim(str_url_a(ki))&"""]"				
		Next
		Pstr2=Pstr2&"];"


		str=str_t
		str=GetContent(str,"<h3>网易新闻</h3>","<h3>凤凰新闻</h3>",0)
		str_url=body2s(str,"<li><a href=""","""","###",true)
		str_name=body2s(str,"<li>","</li>","###",true)
		str_name=LoseeeHtml(str_name)
		str_name=Rm(str_name)
		str_url_a=Split(str_url,"###")
		str_name_a=Split(str_name,"###")
		Pstr3="var qtCms_key_163=[["""",""""]"
		For ki=0 To Ubound(str_url_a)
			Pstr3=Pstr3&",["""&Trim(str_name_a(ki))&""","""&Trim(str_url_a(ki))&"""]"				
		Next
		Pstr3=Pstr3&"];"	
		
		str=str_t
		str=GetContent(str,"<h3>凤凰新闻</h3>","<h3>图片新闻</h3>",0)
		str_url=body2s(str,"<li><a href=""","""","###",true)
		str_name=body2s(str,"<li>","</li>","###",true)
		str_name=LoseeeHtml(str_name)
		str_name=Rm(str_name)
		str_url_a=Split(str_url,"###")
		str_name_a=Split(str_name,"###")
		Pstr4="var qtCms_key_ifeng=[["""",""""]"
		For ki=0 To Ubound(str_url_a)
			Pstr4=Pstr4&",["""&Trim(str_name_a(ki))&""","""&Trim(str_url_a(ki))&"""]"				
		Next
		Pstr4=Pstr4&"];"
		
									
		str=str_t
		str=GetContent(str,"<h3>新浪评论</h3>","<h3>搜狐评论</h3>",0)
		str_url=body2s(str,"<li><a href=""","""","###",true)
		str_name=body2s(str,"<li>","</li>","###",true)
		str_name=LoseeeHtml(str_name)
		str_name=Rm(str_name)
		str_url_a=Split(str_url,"###")
		str_name_a=Split(str_name,"###")
		Pstr6="var qtCms_key_sinap=[["""",""""]"
		For ki=0 To Ubound(str_url_a)
			Pstr6=Pstr6&",["""&Trim(str_name_a(ki))&""","""&Trim(str_url_a(ki))&"""]"				
		Next
		Pstr6=Pstr6&"];"
		
				
		str=str_t
		str=GetContent(str,"<h3>搜狐评论</h3>","<h3>视频新闻</h3>",0)
		str_url=body2s(str,"<li><a href=""","""","###",true)
		str_name=body2s(str,"<li>","</li>","###",true)
		str_name=LoseeeHtml(str_name)
		str_name=Rm(str_name)
		str_url_a=Split(str_url,"###")
		str_name_a=Split(str_name,"###")
		Pstr7="var qtCms_key_qqp=[["""",""""]"
		For ki=0 To Ubound(str_url_a)
			Pstr7=Pstr7&",["""&Trim(str_name_a(ki))&""","""&Trim(str_url_a(ki))&"""]"				
		Next
		Pstr7=Pstr7&"];"
		

		str=str_t
		str=GetContent(str,"<h3>视频新闻</h3>","<h3>人在江湖</h3>",0)
		str_url=body2s(str,"<li><a href=""","""","###",true)
		str_name=body2s(str,"<li>","</li>","###",true)
		str_name=LoseeeHtml(str_name)
		str_name=Rm(str_name)
		str_url_a=Split(str_url,"###")
		str_name_a=Split(str_name,"###")
		Pstr9="var qtCms_key_other1=[["""",""""]"
		For ki=0 To Ubound(str_url_a)
			Pstr9=Pstr9&",["""&Trim(str_name_a(ki))&""","""&Trim(str_url_a(ki))&"""]"				
		Next
		Pstr9=Pstr9&"];"


		str=str_t
		str=GetContent(str,"<h3>人在江湖</h3>","<h3>天涯论坛</h3>",0)
		str_url=body2s(str,"<li><a href=""","""","###",true)
		str_name=body2s(str,"<li>","</li>","###",true)
		str_name=LoseeeHtml(str_name)
		str_name=Rm(str_name)
		str_url_a=Split(str_url,"###")
		str_name_a=Split(str_name,"###")
		Pstr10="var qtCms_key_other2=[["""",""""]"
		For ki=0 To Ubound(str_url_a)
			Pstr10=Pstr10&",["""&Trim(str_name_a(ki))&""","""&Trim(str_url_a(ki))&"""]"				
		Next
		Pstr10=Pstr10&"];"
		
		
		str=str_t
		str=GetContent(str,"<h3>天涯论坛</h3>","<h3>猫扑大杂烩</h3>",0)
		str_url=body2s(str,"<li><a href=""","""","###",true)
		str_name=body2s(str,"<li>","</li>","###",true)
		str_name=LoseeeHtml(str_name)
		str_name=Rm(str_name)
		str_url_a=Split(str_url,"###")
		str_name_a=Split(str_name,"###")
		Pstr11="var qtCms_key_other3=[["""",""""]"
		For ki=0 To Ubound(str_url_a)
			Pstr11=Pstr11&",["""&Trim(str_name_a(ki))&""","""&Trim(str_url_a(ki))&"""]"				
		Next
		Pstr11=Pstr11&"];"		
		

		str=str_t
		str=GetContent(str,"<h3>猫扑大杂烩</h3>","</ul>",0)
		str_url=body2s(str,"<li><a href=""","""","###",true)
		str_name=body2s(str,"<li>","</li>","###",true)
		str_name=LoseeeHtml(str_name)
		str_name=Rm(str_name)
		str_url_a=Split(str_url,"###")
		str_name_a=Split(str_name,"###")
		Pstr12="var qtCms_key_other4=[["""",""""]"
		For ki=0 To Ubound(str_url_a)
			Pstr12=Pstr12&",["""&Trim(str_name_a(ki))&""","""&Trim(str_url_a(ki))&"""]"				
		Next
		Pstr12=Pstr12&"];"	


		str=str_t
		str=GetContent(str,"<h4>新闻热搜词</h4>","<h4>新闻网站</h4>",0)
		str_url=body2s(str,"<a href=""","""","###",true)
		str_name=body2s(str,""">","</a>","###",true)
		str_name=LoseeeHtml(str_name)
		str_name=Rm(str_name)
		str_url_a=Split(str_url,"###")
		str_name_a=Split(str_name,"###")
		Pstr13=Pstr13&"var qtCms_key_s_1=[["""",""""]"
		For ki=0 To Ubound(str_url_a)
			Pstr13=Pstr13&",["""&Trim(str_name_a(ki))&""","""&Trim(str_url_a(ki))&"""]"				
		Next
		Pstr13=Pstr13&"];"


		str_t2=Qingtiandy_getHTTPPage("http://news.163.com/photo/")
		str=str_t2		
		str=body2s(str,"<ul class=""list_pic pic_3 clearfix"">","</ul>","###",true)
		str=body2s(str,"<li>","</li>","###",true)
		str_a=Split(str,"###")
		Pstr5="var qtCms_key_tu1=[["""",""""]"
		For ki=0 To Ubound(str_a)
			shref=GetContent(str_a(ki),"href=""","""",0)
			sSrc=GetContent(str_a(ki),"src=""","""",0)
			sAlt=GetContent(str_a(ki),"alt=""","""",0)
			sAlt=Rm(sAlt)
			Pstr5=Pstr5&",["""&Trim(shref)&""","""&Trim(sSrc)&""","""&Trim(sAlt)&"""]"				
		Next
		Pstr5=Pstr5&"];"

		str_t2=Qingtiandy_getHTTPPage_utf2("http://news.youku.com/focus/index")
		str=str_t2		
		str=body2s(str,"<ul class=""v"">","</ul>","###",true)
		str_a=Split(str,"###")
		Pstr8="var qtCms_key_tu2=[["""",""""]"
		For ki=0 To Ubound(str_a)
			shref=GetContent(str_a(ki),"href=""","""",0)
			sSrc=GetContent(str_a(ki),"src=""","""",0)
			sAlt=GetContent(str_a(ki),"alt=""","""",0)
			sAlt=Rm(sAlt)
			Pstr8=Pstr8&",["""&Trim(shref)&""","""&Trim(sSrc)&""","""&Trim(sAlt)&"""]"				
		Next
		Pstr8=Pstr8&"];"
		
		str_t2=Qingtiandy_getHTTPPage("http://news.baidu.com/n?cmd=4&class=rolling&pn=1&from=tab&sub=0")
		str=str_t2		
		str=GetContent(str,"国内新闻</a></div>","国际新闻</a></div>",0)
		str=body2s(str,"<div class=""p2"">","</div>","###",true)
		str_a=Split(str,"###")
		Pstr13=Pstr13&"var qtCms_key_main1=[["""",""""]"
		kkStr="var qtCms_key_main1=[["""",""""]"
		For ki=0 To Ubound(str_a)
			shref=GetContent(str_a(ki),"href=""","""",0)
			sAlt=GetContent(str_a(ki),"target=""_blank"">","</a>",0)
			sAlt=Rm(sAlt)
			Pstr13=Pstr13&",["""&Trim(shref)&""","""&Trim(sAlt)&"""]"	
			kkStr=kkStr&",["""&Trim(shref)&""","""&Trim(sAlt)&"""]"			
		Next
		Pstr13=Pstr13&"];"	
		
		
		
		
		
		str=str_t2		
		str=GetContent(str,"国际新闻</a></div>","军事新闻</a></div>",0)
		str=body2s(str,"<div class=""p2"">","</div>","###",true)
		str_a=Split(str,"###")
		Pstr13=Pstr13&"var qtCms_key_main2=[["""",""""]"
		For ki=0 To Ubound(str_a)
			shref=GetContent(str_a(ki),"href=""","""",0)
			sAlt=GetContent(str_a(ki),"target=""_blank"">","</a>",0)
			sAlt=Rm(sAlt)
			Pstr13=Pstr13&",["""&Trim(shref)&""","""&Trim(sAlt)&"""]"	
			kkStr=kkStr&",["""&Trim(shref)&""","""&Trim(sAlt)&"""]"				
		Next
		Pstr13=Pstr13&"];"			
		kkStr=kkStr&"];"
		
		
		
		str=str_t2		
		str=GetContent(str,"军事新闻</a></div>","财经新闻</a></div>",0)
		str=body2s(str,"<div class=""p2"">","</div>","###",true)
		str_a=Split(str,"###")
		Pstr13=Pstr13&"var qtCms_key_main3=[["""",""""]"
		For ki=0 To Ubound(str_a)
			shref=GetContent(str_a(ki),"href=""","""",0)
			sAlt=GetContent(str_a(ki),"target=""_blank"">","</a>",0)
			sAlt=Rm(sAlt)
			Pstr13=Pstr13&",["""&Trim(shref)&""","""&Trim(sAlt)&"""]"				
		Next
		Pstr13=Pstr13&"];"	
		
		str=str_t2		
		str=GetContent(str,"财经新闻</a></div>","互联网新闻</a></div>",0)
		str=body2s(str,"<div class=""p2"">","</div>","###",true)
		str_a=Split(str,"###")
		Pstr13=Pstr13&"var qtCms_key_main4=[["""",""""]"
		For ki=0 To Ubound(str_a)
			shref=GetContent(str_a(ki),"href=""","""",0)
			sAlt=GetContent(str_a(ki),"target=""_blank"">","</a>",0)
			sAlt=Rm(sAlt)
			Pstr13=Pstr13&",["""&Trim(shref)&""","""&Trim(sAlt)&"""]"				
		Next
		Pstr13=Pstr13&"];"
		
		str=str_t2		
		str=GetContent(str,"互联网新闻</a></div>","房产新闻</a></div>",0)
		str=body2s(str,"<div class=""p2"">","</div>","###",true)
		str_a=Split(str,"###")
		Pstr13=Pstr13&"var qtCms_key_main5=[["""",""""]"
		For ki=0 To Ubound(str_a)
			shref=GetContent(str_a(ki),"href=""","""",0)
			sAlt=GetContent(str_a(ki),"target=""_blank"">","</a>",0)
			sAlt=Rm(sAlt)
			Pstr13=Pstr13&",["""&Trim(shref)&""","""&Trim(sAlt)&"""]"				
		Next
		Pstr13=Pstr13&"];"
				
		
		str=str_t2		
		str=GetContent(str,"房产新闻</a></div>","汽车新闻</a></div>",0)
		str=body2s(str,"<div class=""p2"">","</div>","###",true)
		str_a=Split(str,"###")
		Pstr13=Pstr13&"var qtCms_key_main6=[["""",""""]"
		For ki=0 To Ubound(str_a)
			shref=GetContent(str_a(ki),"href=""","""",0)
			sAlt=GetContent(str_a(ki),"target=""_blank"">","</a>",0)
			sAlt=Rm(sAlt)
			Pstr13=Pstr13&",["""&Trim(shref)&""","""&Trim(sAlt)&"""]"				
		Next
		Pstr13=Pstr13&"];"
		
		str=str_t2		
		str=GetContent(str,"汽车新闻</a></div>","体育新闻</a></div>",0)
		str=body2s(str,"<div class=""p2"">","</div>","###",true)
		str_a=Split(str,"###")
		Pstr13=Pstr13&"var qtCms_key_main7=[["""",""""]"
		For ki=0 To Ubound(str_a)
			shref=GetContent(str_a(ki),"href=""","""",0)
			sAlt=GetContent(str_a(ki),"target=""_blank"">","</a>",0)
			sAlt=Rm(sAlt)
			Pstr13=Pstr13&",["""&Trim(shref)&""","""&Trim(sAlt)&"""]"				
		Next
		Pstr13=Pstr13&"];"
		
		
		str=str_t2		
		str=GetContent(str,"体育新闻</a></div>","娱乐新闻</a></div>",0)
		str=body2s(str,"<div class=""p2"">","</div>","###",true)
		str_a=Split(str,"###")
		Pstr13=Pstr13&"var qtCms_key_main8=[["""",""""]"
		For ki=0 To Ubound(str_a)
			shref=GetContent(str_a(ki),"href=""","""",0)
			sAlt=GetContent(str_a(ki),"target=""_blank"">","</a>",0)
			sAlt=Rm(sAlt)
			Pstr13=Pstr13&",["""&Trim(shref)&""","""&Trim(sAlt)&"""]"				
		Next
		Pstr13=Pstr13&"];"	
		
		str=str_t2		
		str=GetContent(str,"娱乐新闻</a></div>","游戏新闻</a></div>",0)
		str=body2s(str,"<div class=""p2"">","</div>","###",true)
		str_a=Split(str,"###")
		Pstr13=Pstr13&"var qtCms_key_main9=[["""",""""]"
		For ki=0 To Ubound(str_a)
			shref=GetContent(str_a(ki),"href=""","""",0)
			sAlt=GetContent(str_a(ki),"target=""_blank"">","</a>",0)
			sAlt=Rm(sAlt)
			Pstr13=Pstr13&",["""&Trim(shref)&""","""&Trim(sAlt)&"""]"				
		Next
		Pstr13=Pstr13&"];"	
		
		
		str=str_t2		
		str=GetContent(str,"游戏新闻</a></div>","教育新闻</a></div>",0)
		str=body2s(str,"<div class=""p2"">","</div>","###",true)
		str_a=Split(str,"###")
		Pstr13=Pstr13&"var qtCms_key_main10=[["""",""""]"
		For ki=0 To Ubound(str_a)
			shref=GetContent(str_a(ki),"href=""","""",0)
			sAlt=GetContent(str_a(ki),"target=""_blank"">","</a>",0)
			sAlt=Rm(sAlt)
			Pstr13=Pstr13&",["""&Trim(shref)&""","""&Trim(sAlt)&"""]"				
		Next
		Pstr13=Pstr13&"];"	
		
		str=str_t2		
		str=GetContent(str,"教育新闻</a></div>","女人新闻</a></div>",0)
		str=body2s(str,"<div class=""p2"">","</div>","###",true)
		str_a=Split(str,"###")
		Pstr13=Pstr13&"var qtCms_key_main11=[["""",""""]"
		For ki=0 To Ubound(str_a)
			shref=GetContent(str_a(ki),"href=""","""",0)
			sAlt=GetContent(str_a(ki),"target=""_blank"">","</a>",0)
			sAlt=Rm(sAlt)
			Pstr13=Pstr13&",["""&Trim(shref)&""","""&Trim(sAlt)&"""]"				
		Next
		Pstr13=Pstr13&"];"	
		
		str=str_t2		
		str=GetContent(str,"女人新闻</a></div>","科技新闻</a></div>",0)
		str=body2s(str,"<div class=""p2"">","</div>","###",true)
		str_a=Split(str,"###")
		Pstr13=Pstr13&"var qtCms_key_main12=[["""",""""]"
		For ki=0 To Ubound(str_a)
			shref=GetContent(str_a(ki),"href=""","""",0)
			sAlt=GetContent(str_a(ki),"target=""_blank"">","</a>",0)
			sAlt=Rm(sAlt)
			Pstr13=Pstr13&",["""&Trim(shref)&""","""&Trim(sAlt)&"""]"				
		Next
		Pstr13=Pstr13&"];"	
		
		str=str_t2		
		str=GetContent(str,"科技新闻</a></div>","社会新闻</a></div>",0)
		str=body2s(str,"<div class=""p2"">","</div>","###",true)
		str_a=Split(str,"###")
		Pstr13=Pstr13&"var qtCms_key_main13=[["""",""""]"
		For ki=0 To Ubound(str_a)
			shref=GetContent(str_a(ki),"href=""","""",0)
			sAlt=GetContent(str_a(ki),"target=""_blank"">","</a>",0)
			sAlt=Rm(sAlt)
			Pstr13=Pstr13&",["""&Trim(shref)&""","""&Trim(sAlt)&"""]"				
		Next
		Pstr13=Pstr13&"];"	
		
		str=str_t2		
		str=GetContent(str,"社会新闻</a></div>","更多社会新闻",0)
		str=body2s(str,"<div class=""p2"">","</div>","###",true)
		str_a=Split(str,"###")
		Pstr13=Pstr13&"var qtCms_key_main14=[["""",""""]"
		For ki=0 To Ubound(str_a)
			shref=GetContent(str_a(ki),"href=""","""",0)
			sAlt=GetContent(str_a(ki),"target=""_blank"">","</a>",0)
			sAlt=Rm(sAlt)
			Pstr13=Pstr13&",["""&Trim(shref)&""","""&Trim(sAlt)&"""]"				
		Next
		Pstr13=Pstr13&"];"	
		
		str_t2=Qingtiandy_getHTTPPage("http://news.baidu.com/n?bypass=lamp&m=other&v=headline&pn=1")
		str=str_t2		
		str=GetContent(str,"<div id=""listbox"">","</ul>",0)
		str=body2s(str,"<li>","</li>","###",true)
		str_a=Split(str,"###")
		Pstr13=Pstr13&"var qtCms_key_mainbig=[["""",""""]"
		For ki=0 To Ubound(str_a)
			shref=GetContent(str_a(ki),"href=""","""",0)
			sAlt=GetContent(str_a(ki),""">","</a>",0)
			sAlt=Rm(sAlt)
			Pstr13=Pstr13&",["""&Trim(shref)&""","""&Trim(sAlt)&"""]"				
		Next
		Pstr13=Pstr13&"];"			
															
					
		str_t2=Qingtiandy_getHTTPPage("http://news.baidu.com/n?cmd=1&class=civilnews&pn=1")
		str=str_t2		
		str=GetContent(str,"<table class=""imglist imglist_2"">","</table>",0)
		str=body2s(str,"<tr><td>","</td></tr>","###",true)
		str_a=Split(str,"###")
		Pstr13=Pstr13&"var qtCms_key_tu3=[["""",""""]"
		For ki=0 To Ubound(str_a)
			shref=GetContent(str_a(ki),"href=""","""",0)
			sSrc=GetContent(str_a(ki),"src=""","""",0)
			sAlt=GetContent(str_a(ki),"<div class=""imgtitle"">","</div>",0)
			sAlt=LoseeeHtml(sAlt)
			sAlt=Rm(sAlt)
			Pstr13=Pstr13&",["""&Trim(shref)&""","""&Trim(sSrc)&""","""&Trim(sAlt)&"""]"				
		Next
		Pstr13=Pstr13&"];"					

												
		Pstr=Pstr1&Pstr2&Pstr3&Pstr4&Pstr5&Pstr6&Pstr7&Pstr8&Pstr9&Pstr10&Pstr11&Pstr12&Pstr13
		N_Fso.sWriteToFile Add_Root_Dir(RefreshIndexPage_str),Pstr
		N_Fso.sWriteToFile Add_Root_Dir(RefreshIndexPage_str2),kkStr
	Else
		Pstr=N_Fso.ReadAllTextFile(Add_Root_Dir(RefreshIndexPage_str))
	End IF
	Response.Write Pstr
End IF
%>