📄 sub.asp
字号:
Insert = Insert & "WeatherArray(0,1)="""""&chr(13)
Insert = Insert & "WeatherArray(0,2)="""""&chr(13)
Insert = Insert & "WeatherArray(0,3)="""""&chr(13)
Insert = Insert & "WeatherArray(0,4)="""""&chr(13)
Else
Insert = Insert & "Dim WeatherArray("&ubound(sm)-1&",4)"&chr(13)
Insert = Insert & "Dim Today"&chr(13)
Insert = Insert & "Today="""&Today&""""&chr(13)
For i=1 to ubound(sm)
ssm=split(sm(i),"<TD>")
For j=1 to 5
Insert = Insert & "WeatherArray("&i-1&","&j-1&")="""&Trim(ssm(j))&""""&chr(13)
Next
Next
End if
Insert = Insert & "</script>"
call WriteToFile("WeatherRecord/"&TheDay&".txt",Insert)
call WriteToFile("Template/weather.htm",Insert)
End if
Response.Write ReadAllTextFile("Template/weather.htm")
End sub
Sub GetNewsList(theDate,theType)
If not IsDate(theDate) then theDate=Date()
pstr = GetPage(GetUrl(theDate,theType))
select case theType
case "china"
wstr = GetContent(pstr,"<!--开始新闻列表-->","<!--结束新闻列表-->",0)
wstr = Replace(wstr,"href=/","href=show.asp?url=NewsNews/")
s1 = s1 & "<b>"&FormatDateTime(theDate,vblongdate)&" 所有国内新闻</b>"&wstr
case "world"
wstr = GetContent(pstr,"<!--开始新闻列表-->","<!--结束新闻列表-->",0)
wstr = Replace(wstr,"href=/","href=show.asp?url=NewsNews/")
s1 = s1 & "<b>"&FormatDateTime(theDate,vblongdate)&" 所有国际新闻</b>"&wstr
case "sports"
wstr = GetContent(pstr,"<span class=title14>","</span>",0)
wstr = Replace(wstr,"href=/","href=show.asp?url=SportsNews/")
s1 = GetContent(wstr,"<!--国内足坛-->","</ul>",0)
s2 = GetContent(wstr,"<!--国际足坛-->","</ul>",0)
s3 = GetContent(wstr,"<!--评 论-->","</ul>",0)
s4 = GetContent(wstr,"<!--篮球-->","</ul>",0)
s5 = GetContent(wstr,"<!--综合体育-->","</ul>",0)
case "ent"
wstr = GetContent(pstr,"<ul>","</ul>",0)
wstr = Replace(wstr,"href=/","href=show.asp?url=EntNews/")
s1 = s1 & "<b>"&FormatDateTime(theDate,vblongdate)&" 所有娱乐新闻</b>"&wstr
case "society"
wstr = GetContent(pstr,"<!--开始新闻列表-->","<!--结束新闻列表-->",0)
wstr = Replace(wstr,"href=/","href=show.asp?url=NewsNews/")
s1 = s1 & "<b>"&FormatDateTime(theDate,vblongdate)&" 所有社会新闻</b>"&wstr
case "finance"
pstr = Replace(pstr,"href=/","href=show.asp?url=FinanceNews/")
wstr = GetContent(pstr,"国内财经</td>","<center>",0)
s1 = GetContent(wstr,"<li>","",3)
wstr = GetContent(pstr,"国际财经</td>","<center>",0)
s2 = GetContent(wstr,"<li>","",3)
wstr = GetContent(pstr,"产经动态</td>","<center>",0)
s3 = GetContent(wstr,"<li>","",3)
wstr = GetContent(pstr,"经营管理</td>","<center>",0)
s4 = GetContent(wstr,"<li>","",3)
wstr = GetContent(pstr,"原创互动</td>","<center>",0)
s5 = GetContent(wstr,"<li>","",3)
wstr = GetContent(pstr,"百姓生活</td>","<center>",0)
s6 = GetContent(wstr,"<li>","",3)
wstr = GetContent(pstr,"温馨家园</td>","<center>",0)
s7 = GetContent(wstr,"<li>","",3)
wstr = GetContent(pstr,"CBS</td>","<center>",0)
s8 = GetContent(wstr,"<li>","",3)
wstr = GetContent(pstr,"证券要闻</td>","<center>",0)
s9 = GetContent(wstr,"<li>","",3)
wstr = GetContent(pstr,"股市及时雨</td>","<center>",0)
s10 = GetContent(wstr,"<li>","",3)
wstr = GetContent(pstr,"B股市场</td>","<center>",0)
s11 = GetContent(wstr,"<li>","",3)
wstr = GetContent(pstr,"个股点评</td>","<center>",0)
s12 = GetContent(wstr,"<li>","",3)
wstr = GetContent(pstr,"上市公司</td>","<center>",0)
s13 = GetContent(wstr,"<li>","",3)
wstr = GetContent(pstr,"焦点透视</td>","<center>",0)
s14 = GetContent(wstr,"<li>","",3)
wstr = GetContent(pstr,"论坛精品</td>","<center>",0)
s15 = GetContent(wstr,"<li>","",3)
wstr = GetContent(pstr,"市场传闻</td>","<center>",0)
s16 = GetContent(wstr,"<li>","",3)
wstr = GetContent(pstr,"投资文化</td>","<center>",0)
wstr = GetContent(wstr,"<li>","",3)
s17 = GetContent(wstr,"</font>","",4)
case "tech"
pstr = Replace(pstr,"href=/","href=show.asp?url=TechNews/")
wstr = GetContent(pstr,"互联网国内</td>","</ul>",0)
wstr = GetContent(wstr,"<ul>","",2)
s1 = Replace(wstr,GetContent(wstr,"<div","/div>",1),"")
wstr = GetContent(pstr,"互联网国际</td>","</ul>",0)
wstr = GetContent(wstr,"<ul>","",2)
s2 = Replace(wstr,GetContent(wstr,"<div","/div>",1),"")
wstr = GetContent(pstr,"业界动态</td>","</ul>",0)
wstr = GetContent(wstr,"<ul>","",2)
s3 = Replace(wstr,GetContent(wstr,"<div","/div>",1),"")
wstr = GetContent(pstr,"电信广电</td>","</ul>",0)
wstr = GetContent(wstr,"<ul>","",2)
s4 = Replace(wstr,GetContent(wstr,"<div ","/div>",1),"")
wstr = GetContent(pstr,"软件新闻</td>","</ul>",0)
wstr = GetContent(wstr,"<ul>","",2)
s5 = Replace(wstr,GetContent(wstr,"<div ","/div>",1),"")
wstr = GetContent(pstr,"硬件新闻</td>","</ul>",0)
wstr = GetContent(wstr,"<ul>","",2)
s6 = Replace(wstr,GetContent(wstr,"<div ","/div>",1),"")
wstr = GetContent(pstr,"时尚手机</td>","</ul>",0)
wstr = GetContent(wstr,"<ul>","",2)
s7 = Replace(wstr,GetContent(wstr,"<div ","/div>",1),"")
wstr = GetContent(pstr,"厂商新闻</td>","</ul>",0)
wstr = GetContent(wstr,"<ul>","",2)
s8 = Replace(wstr,GetContent(wstr,"<div ","/div>",1),"")
wstr = GetContent(pstr,"网络及软硬件技术</td>","</ul>",0)
wstr = GetContent(wstr,"<ul>","",2)
s9 = Replace(wstr,GetContent(wstr,"<div ","/div>",1),"")
wstr = GetContent(pstr,"大众科技和科普趣闻</td>","</ul>",0)
wstr = GetContent(wstr,"<ul>","",2)
s10 = Replace(wstr,GetContent(wstr,"<div ","/div>",1),"")
case "jczs"
' pstr = VirtualURL(pstr,"show.asp?url=")
' pstr = Replace(pstr,"href=""/","href=""show.asp?url=JczsNews/")
' wstr = GetContent(pstr,"外军新闻</td>","<br></td></tr>",0)
' wstr = GetContent(wstr,"<li>","",3)
' s1 = GetContent(wstr,"</FONT>","",4)
' wstr = GetContent(pstr,"台海形势</td>","<br></td></tr>",0)
' wstr = GetContent(wstr,"<li>","",3)
' s2 = GetContent(wstr,"</FONT>","",4)
' wstr = GetContent(pstr,"军事新闻</td>","<br></td></tr>",0)
' wstr = GetContent(wstr,"<li>","",3)
' s3 = GetContent(wstr,"</FONT>","",4)
' wstr = GetContent(pstr,"综合新闻</td>","<br></td></tr>",0)
' wstr = GetContent(wstr,"<li>","",3)
' s4 = GetContent(wstr,"</FONT>","",4)
' wstr = GetContent(pstr,"新闻评述</td>","<br></td></tr>",0)
' wstr = GetContent(wstr,"<li>","",3)
' s5 = GetContent(wstr,"</FONT>","",4)
pstr = VirtualURL(pstr,"show.asp?url=")
pstr = Replace(pstr,"href=""/","href=""show.asp?url=JczsNews/")
wstr = GetContent(pstr,"<!-- 外军新闻 begin -->","<!-- 外军新闻 end -->",0)
wstr = GetContent(wstr,"<img","",3)
s1 = GetContent(wstr,"</font>","",4)
wstr = GetContent(pstr,"<!-- 台海形势 begin -->","<!-- 综合新闻 begin -->",0)
wstr = GetContent(wstr,"<img","",3)
s2 = GetContent(wstr,"</font>","",4)
wstr = GetContent(pstr,"<!-- 我军新闻 begin -->","<!-- 台海形势 begin -->",0)
wstr = GetContent(wstr,"<img","",3)
s3 = GetContent(wstr,"</font>","",4)
wstr = GetContent(pstr,"<!-- 综合新闻 begin -->","<!-- 综合新闻 end -->",0)
wstr = GetContent(wstr,"<img","",3)
s4 = GetContent(wstr,"</font>","",4)
wstr = GetContent(pstr,"<!-- 综合新闻 end -->","<!-- 每日图库 begin -->",0)'新闻评述
wstr = GetContent(wstr,"<img","",3)
s5 = GetContent(wstr,"</font>","",4)
case "jczswaijun"
pstr = VirtualURL(pstr,"show.asp?url=")
pstr = Replace(pstr,"href=""/","href=""show.asp?url=JczsNews/")
pstr = Replace(pstr,"href=/","href=show.asp?url=JczsNews/")
s1 = GetContent(pstr,"<ul>","</ul>",0)
case "jczsxingshi"
pstr = VirtualURL(pstr,"show.asp?url=")
pstr = Replace(pstr,"href=""/","href=""show.asp?url=JczsNews/")
pstr = Replace(pstr,"href=/","href=show.asp?url=JczsNews/")
s2 = GetContent(pstr,"<ul>","</ul>",0)
case "jczsxinwen"
pstr = VirtualURL(pstr,"show.asp?url=")
pstr = Replace(pstr,"href=""/","href=""show.asp?url=JczsNews/")
pstr = Replace(pstr,"href=/","href=show.asp?url=JczsNews/")
s3 = GetContent(pstr,"<ul>","</ul>",0)
case "jczszonghe"
pstr = VirtualURL(pstr,"show.asp?url=")
pstr = Replace(pstr,"href=""/","href=""show.asp?url=JczsNews/")
pstr = Replace(pstr,"href=/","href=show.asp?url=JczsNews/")
s4 = GetContent(pstr,"<ul>","</ul>",0)
case "jczspingshu"
pstr = VirtualURL(pstr,"show.asp?url=")
pstr = Replace(pstr,"href=""/","href=""show.asp?url=JczsNews/")
pstr = Replace(pstr,"href=/","href=show.asp?url=JczsNews/")
s5 = GetContent(pstr,"<ul>","</ul>",0)
case "jczsjiyu"
pstr = VirtualURL(pstr,"show.asp?url=")
pstr = Replace(pstr,"href=""/","href=""show.asp?url=JczsNews/")
pstr = Replace(pstr,"href=/","href=show.asp?url=JczsNews/")
s6 = GetContent(pstr,"<ul>","</ul>",0)
case "jczsjunshi"
pstr = VirtualURL(pstr,"show.asp?url=")
pstr = Replace(pstr,"href=""/","href=""show.asp?url=JczsNews/")
pstr = Replace(pstr,"href=/","href=show.asp?url=JczsNews/")
s7 = GetContent(pstr,"<ul>","</ul>",0)
case "jczszongheng"
pstr = VirtualURL(pstr,"show.asp?url=")
pstr = Replace(pstr,"href=""/","href=""show.asp?url=JczsNews/")
pstr = Replace(pstr,"href=/","href=show.asp?url=JczsNews/")
s8 = GetContent(pstr,"<ul>","</ul>",0)
case "jczsjunqing"
pstr = VirtualURL(pstr,"show.asp?url=")
pstr = Replace(pstr,"href=""/","href=""show.asp?url=JczsNews/")
pstr = Replace(pstr,"href=/","href=show.asp?url=JczsNews/")
s9 = GetContent(pstr,"<ul>","</ul>",0)
case "jczsshijiao"
pstr = VirtualURL(pstr,"show.asp?url=")
pstr = Replace(pstr,"href=""/","href=""show.asp?url=JczsNews/")
pstr = Replace(pstr,"href=/","href=show.asp?url=JczsNews/")
s10 = GetContent(pstr,"<ul>","</ul>",0)
case "jczsjunli"
pstr = VirtualURL(pstr,"show.asp?url=")
pstr = Replace(pstr,"href=""/","href=""show.asp?url=JczsNews/")
pstr = Replace(pstr,"href=/","href=show.asp?url=JczsNews/")
s11 = GetContent(pstr,"<ul>","</ul>",0)
case "eladies"
wstr = GetContent(pstr,"<table width=500","</table>",1)
wstr = Replace(wstr,GetContent(wstr,"<!--","-->",1),"")
wstr = Replace(wstr,"href=""/","href=""show.asp?url=EladiesNews/")
wstr = Replace(wstr,"href=/","href=show.asp?url=EladiesNews/")
s1 = VirtualURL(wstr,"show.asp?url=")
case "new","newall"
wstr = GetContent(pstr,"<!--新闻开始-->","<!--新闻结束-->",0)
wstr = Replace(wstr,"<ul>","")
s1 = VirtualURL(wstr,"show.asp?url=")
end select
End sub
Sub SearchNews(Keyword)
dim url,wstr,str,sstr
url="http://202.108.33.146/cgi-bin/sinanews.exe?"&Keyword
wstr = GetPage(url)
str = Right(wstr,Len(wstr)-Instr(wstr,"<ul class=list>")+1)
str = left(str,InstrRev(str,"</ul>")-1)
sstr= split(str,"<ul class=list>")
For i=1 to ubound(sstr)
If Instr(sstr(i),"sina.com.cn")>0 then
searchstr = searchstr & VirtualURL(sstr(i),"show.asp?url=")
End if
Next
If searchstr="" then searchstr="搜索结果为空"
pstr = Right(wstr,Len(wstr)-InstrRev(wstr,"</ul>")-5)
tmp = Instr(pstr,"</A>")-1
if tmp<0 then tmp=0
pstr = left(pstr,tmp)
pstr = Replace(pstr,"<center>","")
pstr = Replace(pstr,"sinanews.exe","search.asp")
NextPage = Replace(pstr,"tn=sina","tn=siteiecity")
End sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -