📄 复件 makehtmfile.asp
字号:
<!-- #include file=../change.asp -->
<!-- #include file=makedirect.asp -->
<%
function getfenleidirecttrue(tempid)
on error resume next
dim tempN,tempDir,tempFs
dim fenleidirect
Set tempRs = Server.CreateObject("ADODB.Recordset")
Set tempRs1 = Server.CreateObject("ADODB.Recordset")
sql="select * from fenlei where id="&tempid
tempRs.open sql,conn,1,1
if tempRs.eof or tempRs.bof then
Response.Write "错误: 分类"&temp&"不存在!"
getfenleidirecttrue="NULL"
tempRs.close
set tempRs=nothing
set tempRs1=nothing
exit function
end if
expediency=tempRs("expediency")
tempDir=server.mapPath("/asphouse/search/navigate/")
for tempN=1 to expediency
sql="select * from fenlei where id="&tempRs(10+tempN)
tempRs1.open sql,conn,1,1
if tempRs1.eof or tempRs1.bof then
Response.Write "错误: 分类"&temp&"不存在!"
getfenleidirecttrue="NULL"
tempRs.close
set tempRs=nothing
tempRs1.close
set tempRs1=nothing
Set tempFs=nothing
exit function
end if
fenleidirect=trim(tempRs1("fenleidirect"))
if fenleidirect="" or isNull(fenleidirect) then fenleidirect=Cstr(tempRs(10+tempN))
tempDir=tempDir&"\"&fenleidirect
'response.write "<br>"&tempDir
tempRs1.close
next
tempRs.close
set tempRs=nothing
set tempRs1=nothing
set tempFs=nothing
rem 得到分类所在目录
getfenleidirecttrue=tempDir
end function
function getfenleidirectrel(tempid)
on error resume next
dim tempN,tempDir,tempFs
dim fenleidirect
Set tempRs = Server.CreateObject("ADODB.Recordset")
Set tempRs1 = Server.CreateObject("ADODB.Recordset")
sql="select * from fenlei where id="&tempid
tempRs.open sql,conn,1,1
if tempRs.eof or tempRs.bof then
Response.Write "错误: 分类"&temp&"不存在!"
getfenleidirectrel="NULL"
tempRs.close
set tempRs=nothing
set tempRs1=nothing
exit function
end if
expediency=tempRs("expediency")
tempDir=""
for tempN=1 to expediency
sql="select * from fenlei where id="&tempRs(10+tempN)
tempRs1.open sql,conn,1,1
if tempRs1.eof or tempRs1.bof then
Response.Write "错误: 分类"&temp&"不存在!"
getfenleidirectrel="NULL"
tempRs.close
set tempRs=nothing
tempRs1.close
set tempRs1=nothing
Set tempFs=nothing
exit function
end if
fenleidirect=trim(tempRs1("fenleidirect"))
if fenleidirect="" or isNull(fenleidirect) then fenleidirect=Cstr(tempRs(10+tempN))
tempDir=tempDir&"\"&fenleidirect
'response.write "<br>"&tempDir
tempRs1.close
next
tempRs.close
set tempRs=nothing
set tempRs1=nothing
set tempFs=nothing
rem 得到分类所在目录
getfenleidirectrel=tempDir
end function
function writeHead(outfile)
rem -------------head.inc的翻版开始------------------
outfile.Write chr(10)&"<center>"
outfile.Write chr(10)&"<table width="&chr(34)&"700"&chr(34)&" border="&chr(34)&"0"&chr(34)&" cellspacing="&chr(34)&"0"&chr(34)&" cellpadding="&chr(34)&"0"&chr(34)&" align=center>"
outfile.Write chr(10)&"<tr>"
outfile.Write chr(10)&"<td><img src="&baseurl&"images/flag60.gif width=244 height=60></td>"
outfile.Write chr(10)&"<td rowspan="&chr(34)&"2"&chr(34)&" valign=bottom align=right>"
outfile.Write chr(10)&"<table cellspacing=0 cellpadding=0><tr><td align=center bgcolor=009900>"
randomize()
n = int(rnd*adsnum)
if rndshu>29 then
outfile.Write chr(13)&adsstring1
else
outfile.Write chr(13)&adsstring2
end if
outfile.Write chr(10)&"</td></tr></table></td></tr>"
outfile.Write chr(10)&"<tr>"
outfile.Write chr(10)&"<td><img src="&baseurl&"images/url.gif width=241 height=19><script>document.write("&chr(34)&"<img src=http://top2.263.net/count/top.dll?Type=Img2&add=1&id=B9860&refer="&chr(34)&"+escape(top.document.referrer)+"&chr(34)&" border=0 width=1 height=1>"&chr(34)&");document.write("&chr(34)&"<img src=http://ad.t2t2.com/stat.asp?user=aspage&refer="&chr(34)&"+escape(document.referrer)+"&chr(34)&"&cur="&chr(34)&"+escape(document.URL)+"&chr(34)&" border=0 width=1 height=1>"&chr(34)&");</script><img src="&chr(34)&"http://grwy.online.ha.cn/count/count.exe?ft=0&df=explorer.dat&dd=001&md=7"&chr(34)&" width=1 height=1></td>"
outfile.Write chr(10)&"</tr>"
outfile.Write chr(10)&"</table>"
outfile.Write chr(10)&"</center>"
rem -------------head.inc的翻版结束------------------
end function
function writeEnd(outfile)
rem --------------end.inc的翻版开始------------------
outfile.Write chr(10)&"<p align=center class=p9>Copy right(C) ASPAGE.YEAH.NET</p>"
rem --------------end.inc的翻版结束------------------
end function
function writeSearch(outfile)
outfile.Write "<TABLE border=0 cellPadding=0 cellSpacing=0 width=700 align=center>"
outfile.Write "<TBODY>"
outfile.Write "<TR>"
outfile.Write "<TD>"
outfile.Write "<FORM action="&baseurl&"search.asp method=post name=form><INPUT name=T1 size=10>"
outfile.Write "<INPUT name=B1 type=submit value=' 搜索 ' style='height:22px'></TD>"
outfile.Write "</TR>"
outfile.Write "</TBODY></FORM>"
outfile.Write "</TABLE>"
end function
function writeFenleiFiles(tempDir,fid)
rem 就是navigate.asp的翻版
Set fs = CreateObject("Scripting.FileSystemObject")
if fs.FolderExists(tempDir) then
else
response.write "<br>要更新的文件所在的目录"&tempDir&"还未建立!<br>"
if makeonefenlei(fid)=1 then
response.write "<br>目录建立成功 <br>"
else
response.write "<br>目录建立失败 <br>"
end if
end if
Set outfile=fs.CreateTextFile(tempDir&"\index.htm",true)
outfile.Write chr(10)&"<!-- Design and Edit By QianFengyun 2000-5-20 -->"
outfile.Write chr(10)&"<!DOCTYPE HTML PUBLIC "&chr(34)&"-//W3C//DTD HTML 4.0 Transitional//EN"&chr(34)&">"
outfile.Write chr(10)&"<!-- saved from url=(0041)http://findlink.yeah.net -->"
outfile.Write chr(10)&"<html>"
outfile.Write chr(10)&"<head>"
outfile.Write chr(10)&"<title>"&titlename&"</title>"
outfile.Write chr(10)&"<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>"
outfile.Write chr(10)&"<link rel="&chr(34)&"stylesheet"&chr(34)&" type="&chr(34)&"text/css"&chr(34)&" href="&chr(34)&baseurl&"html/style.css"&chr(34)&">"
outfile.Write chr(10)&"</head>"
if isNumeric(fid)=0 or fid="" then fid=0
if fid<0 then fid=0
Set makeRs = Server.CreateObject("ADODB.Recordset")
sql="select * from fenlei where id="&fid
makeRs.open sql,conn,1,1
if makeRs.eof or makeRs.bof then
rem 没有这个分类!"
makeRs.close
fid=0
else
expediency=makeRs("expediency")
tempNum=expediency+1
outfile.Write chr(10)&"<BODY vlink=0000ff leftmargin="&chr(34)&"0"&chr(34)&" topmargin="&chr(34)&"10"&chr(34)&" marginwidth="&chr(34)&"0"&chr(34)&" marginheight="&chr(34)&"0"&chr(34)&" bgcolor="&chr(34)&"#FFFFFF"&chr(34)&">"
writeHead(outfile)
outfile.Write chr(10)&"<table width=700 border=0 cellspacing=0 cellpadding=0 align=center bgcolor="&tablebgcolor1&" height=20>"
outfile.Write chr(10)&"<TR align=center>"
outfile.Write chr(10)&"<TD bgColor="&tablebgcolorbian&"><img src="&baseurl&"images/blank.gif height=1 width=1></TD>"
outfile.Write chr(10)&"</TR>"
outfile.Write chr(10)&"<TR align=center>"
outfile.Write chr(10)&"<TD height=3><img src="&baseurl&"images/blank.gif height=1 width=1></TD>"
outfile.Write chr(10)&"</TR>"
outfile.Write chr(10)&"<tr>"
outfile.Write chr(10)&"<td>"
outfile.Write chr(10)&"<a href="&baseurl&"index.htm class=com>首页</a> > <a href="&baseurl&"navigate/index.htm class=com>分类导航</a>"
for i=1 to expediency-1
outfile.Write chr(10)&" > <a href="&baseurl&"navigate"&getfenleidirectrel(makeRs(10+i))&"/index.htm class=com>"&trim(makeRs(i))&"</a>"
next
outfile.Write chr(10)&" > "&trim(makeRs(i))
makeRs.close
outfile.Write chr(10)&"</td>"
outfile.Write chr(10)&"</tr>"
outfile.Write chr(10)&"<TR align=center>"
outfile.Write chr(10)&"<TD bgColor="&tablebgcolorbian&"><img src="&baseurl&"images/blank.gif height=1 width=1></TD>"
outfile.Write chr(10)&"</table>"
writeSearch(outfile)
sql="select id,num,fenlei"&Cstr(tempNum)&" from fenlei where father="&fid
makeRs.open sql,conn,1,1
if not makeRs.eof then
outfile.Write chr(10)&"<table width=700 border=0 cellspacing=0 cellpadding=0 align=center><tr>"
outfile.Write chr(10)&"<br>"
tnum=makeRs.recordcount
num=int(tnum/3)
if (tnum mod 3)<>0 then
num=num+1
end if
do while not makeRs.eof
outfile.Write chr(10)&"<td valign=top>"
if num<1 then
outfile.Write chr(10)&"<li><a href="&baseurl&"navigate"&replace(getfenleidirectrel(makeRs("id")),"\","/")&"/index.htm>"&trim(makeRs(2))&"</a><i>("&makeRs("num")&")</i></li>"
makeRs.movenext
else
for nn=1 to num
if not makeRs.eof then
outfile.Write chr(10)&"<li><a href="&baseurl&"navigate"&replace(getfenleidirectrel(makeRs("id")),"\","/")&"/index.htm>"&trim(makeRs(2))&"</a><i>("&makeRs("num")&")</i></li>"
makeRs.movenext
else
exit for
end if
next
end if
outfile.Write "<br><br></td>"
loop
outfile.Write chr(10)&"</tr></table>"
end if
makeRs.close
end if
if fid=0 then
writeHead(outfile)
outfile.Write chr(10)&"<table width=700 border=0 cellspacing=0 cellpadding=0 align=center bgcolor="&tablebgcolor1&" height=20>"
outfile.Write chr(10)&"<TR align=center>"
outfile.Write chr(10)&"<TD bgColor="&tablebgcolorbian&"><img src="&baseurl&"images/blank.gif height=1 width=1></TD>"
outfile.Write chr(10)&"</TR>"
outfile.Write chr(10)&"<TR align=center>"
outfile.Write chr(10)&"<TD height=3><img src="&baseurl&"images/blank.gif height=1 width=1></TD>"
outfile.Write chr(10)&"</TR>"
outfile.Write chr(10)&"<tr>"
outfile.Write chr(10)&"<td>"
outfile.Write chr(10)&"<a href="&baseurl&"index.htm class=com>首页</a> > 分类导航"
outfile.Write chr(10)&"</td>"
outfile.Write chr(10)&"</tr>"
outfile.Write chr(10)&"<TR align=center>"
outfile.Write chr(10)&"<TD bgColor="&tablebgcolorbian&"><img src="&baseurl&"images/blank.gif height=1 width=1></TD>"
outfile.Write chr(10)&"</TR>"
outfile.Write chr(10)&"</table>"
writeSearch(outfile)
outfile.Write chr(10)&"<table width=700 border=0 cellspacing=0 cellpadding=0 align=center>"
outfile.Write chr(10)&"<tr>"
sql="select id,num,fenlei1 from fenlei where father=0 order by id"
makeRs.open sql,conn,1,1
if not makeRs.eof then
outfile.Write chr(10)&"<br>"
tnum=makeRs.recordcount
num=int(tnum/3)
if (tnum mod 3)<>0 then
num=num+1
end if
end if
do while not makeRs.eof
outfile.Write chr(10)&"<td valign=top>"
if num<1 then
outfile.Write chr(10)&"<li><a href="&baseurl&"navigate"&replace(getfenleidirectrel(makeRs("id")),"\","/")&"/index.htm>"&trim(makeRs(2))&"</a></li>"
makeRs.movenext
else
for nn=1 to num
if not makeRs.eof then
outfile.Write chr(10)&"<li><a href="&baseurl&"navigate"&replace(getfenleidirectrel(makeRs("id")),"\","/")&"/index.htm>"&trim(makeRs(2))&"</a></li>"
makeRs.movenext
else
exit for
end if
next
end if
outfile.Write chr(10)&"<br><br></td>"
loop
outfile.Write chr(10)&"<tr></table><hr width=700 align=center size=1 color="&tablebgcolorbian&">"
makeRs.close
end if
if fid>0 then
sql="select id,sitename,jiji from linking where fenleiid="&fid
'response.write "<br>makehtmsql:"&sql
makeRs.open sql,conn,1,1
if not makeRs.eof then
outfile.Write chr(10)&"<table width=700 border=0 cellspacing=0 cellpadding=0 align=center bgcolor="&tablebgcolor1&" height=20>"
outfile.Write chr(10)&"<TR align=center>"
outfile.Write chr(10)&"<TD bgColor="&tablebgcolorbian&"><img src="&baseurl&"images/blank.gif height=1 width=1></TD>"
outfile.Write chr(10)&"</TR>"
outfile.Write chr(10)&"<TR align=center>"
outfile.Write chr(10)&"<TD height=3><img src="&baseurl&"images/blank.gif height=1 width=1></TD>"
outfile.Write chr(10)&"</TR>"
outfile.Write chr(10)&"<tr>"
outfile.Write chr(10)&"<td>"
outfile.Write chr(10)&"共有网站"&makeRs.recordcount&"个"
outfile.Write chr(10)&"</td>"
outfile.Write chr(10)&"</tr>"
outfile.Write chr(10)&"<TR align=center>"
outfile.Write chr(10)&"<TD bgColor="&tablebgcolorbian&"><img src="&baseurl&"images/blank.gif height=1 width=1></TD>"
outfile.Write chr(10)&"</TR>"
outfile.Write chr(10)&"</table>"
outfile.Write chr(10)&"<table width=700 align=center>"
outfile.Write chr(10)&"<tr><td>"
outfile.Write chr(10)&"<br>"
do while not makeRs.eof
outfile.Write chr(10)&"<li><a href="&baseurl&"r.asp?id="&makeRs("id")&" target=_blank>"&server.htmlencode(trim(makeRs("sitename")))&"</a>"
if trim(makeRs("jiji"))<>"" then
outfile.Write chr(10)&" -- "&server.htmlencode(makeRs("jiji"))&"</li>"
end if
makeRs.movenext
loop
outfile.Write chr(10)&"</td></tr></table>"
else
'outfile.Write chr(10)&"还没有单位加入这个类别下!"
end if
makeRs.close
outfile.Write CHR(10)&"<hr width=700 align=center size=1 color="&tablebgcolorbian&">"
end if
writeEnd(outfile)
outfile.Write chr(10)&"</BODY>"
outfile.Write chr(10)&"</HTML>"
outfile.close
set makeRs=nothing
writeFenleiFiles=1
set outfile=nothing
set fs=nothing
end function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -