有一个生成 html 的asp程序 里面有广告,请问让他生成的html文件里面不含广告(广告代码:<iframe src='http://pub.lele.com/lib/20.html?a=113951&b=0&c=39&d=855&e=0&f=lele' scrolling='no' frameborder='0' width=760 height=138></iframe>)
creat-html.asp代码如下
<!--#include file="mdb.asp"-->
<%
if session("adminlogin")<>sessionvar then
Response.Write("<script language=javascript>alert('你尚未登录,或者超时了!请重新登录');this.location.href='admin/index.asp';</script>")
Response.End
End if
set rs=server.createobject("adodb.recordset")
rs.open "select * from title",conn,1,3
site=rs("site")
siteurl=rs("siteurl")
email=rs("email")
Powered=rs("Powered")
Copyright=rs("Copyright")
rs.close
classid=request("classid")
rs.open "select * from feilei where classid="&classid,conn,1,3
classname=rs("classname")
topclass=rs("topclass")
rs.close
dim wstr,fso,fw
set fr=server.createobject("adodb.recordset")
fr.open "select * from template where id=1",conn,1,3
wstr=fr("template")
fr.close
set fr=nothing
dim rstr,xunxu
xunxu="><a class=a href='HOTwz0"&classid&".htm'>" & classname & "</a>"
while topclass<>0
rs.open "select * from feilei where classid="&topclass,conn,1,3
if not rs.eof then
xunxu="><a class=a href='HOTwz0" & rs("classid") & ".htm'>" & rs("classname") & "</a>" & xunxu
topclass=rs("topclass")
end if
rs.close
wend
wstr=replace(wstr,"<{{sc1}}>",xunxu)
rs.open "select * from feilei where topclass="&classid,conn,1,3
jishu=1
if rs.eof then
rstr=rstr&""
end if
while not rs.eof
if jishu=1 or jishu mod 7 = 1 then
rstr=rstr & "<tr><td width='150' height='20' align=center><a class=a href='HOTwz0"&rs("classid")&".htm'>["&rs("classname")&"]</a></td>"
else
rstr=rstr & "<td width='150' height='20' align=center><a class=a href='HOTwz0"&rs("classid")&".htm'>["&rs("classname")&"]</a></td>"
end if
if jishu mod 7 =0 then rstr=rstr & "</tr>"
jishu=jishu+1
rs.movenext
wend
jishu=jishu-1
if jishu mod 7 <> 0 then
for i= 1 to 7-(jishu mod 7)
rstr=rstr & "<td width='100'> </td>"
if i = 7-(jishu mod 7) then rstr=rstr & "</tr>"
next
end if
rs.close
wstr=replace(wstr,"<{{sc2}}>",rstr)
rstr=empay
Copyright=Powered&Copyright
rs.open "select * from detail where verity=1 and classid="&classid&" order by topid desc,id",conn,1,3
jishu=1
noooo=1
while not rs.eof
if jishu=1 or jishu mod 4 = 1 then
noooo=noooo+1
if noooo mod 2=1 then
bgcolor="#FFFFFF"
else
bgcolor="#F7F7F7"
end if
if rs("recommend")=1 then
rstr=rstr & "<tr bgColor="&bgcolor&"><td width='25%' height='25'> <a class=a href='"&rs("url")&"' target='_blank'>"&rs("title")&" <font color=#C60A00>荐</font></a></td>"
else
rstr=rstr & "<tr bgColor="&bgcolor&"><td width='25%' height='25'> <a class=a href='"&rs("url")&"' target='_blank'>"&rs("title")&"</a></td>"
end if
else
if rs("recommend")=1 then
rstr=rstr & "<td width='25%' height='20'> <a class=a href='"&rs("url")&"' target='_blank'>"&rs("title")&" <font color=#C60A00>荐</font></a></td>"
else
rstr=rstr & "<td width='25%' height='20'> <a class=a href='"&rs("url")&"' target='_blank'>"&rs("title")&"</a></td>"
end if
end if
if jishu mod 4 =0 then rstr=rstr & "</tr>"
jishu=jishu+1
rs.movenext
wend
jishu=jishu-1
if jishu mod 4 <> 0 then
for i= 1 to 4-(jishu mod 4)
rstr=rstr & "<td width='25%'> </td>"
if i = 4-(jishu mod 4) then rstr=rstr & "</tr>"
next
end if
rs.close
wstr=replace(wstr,"<{{sc3}}>",rstr)
wstr=replace(wstr,"<{{classname}}>",classname)
wstr=replace(wstr,"<{{site}}>",site)
wstr=replace(wstr,"<{{siteurl}}>",siteurl)
wstr=replace(wstr,"<{{email}}>",email)
wstr=replace(wstr,"<{{Copyright}}>",Copyright)
wstr=replace(wstr,"<{{creattime}}>",date())
Set fso=Server.CreateObject("Scripting.FileSystemObject")
set fw=fso.createtextfile(server.mappath("2006/HOTwz0"&classid&".htm"),true)
fw.writeline wstr
fw.close
set rs=nothing
set fso=nothing
response.write "ok"
%>
网页程序问题求助!