⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xxdown_makeinfo.asp

📁 本系统为ASP版 1
💻 ASP
字号:
<!--#include file="check.asp"-->
<!--#include file="mdb_path_info.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>批量生成HTML</title>
<style>
body{font-size:9pt;line-height:140%} 
</style>
</head>
<body>
<%
set rs=server.createobject("adodb.recordset")
rs.open ("select info_show from mbdown"),conn,1,1
pencat=rs("info_show")
rs.close
     rs.open "select * from infodown where id="&request("id"),conn,1,1
     if not rs.eof then
       ttid=rs("tid")
       id=rs("id")
       se=rs("se")
       dj=rs("dj")
	   title=rs("title")
	   form_user=rs("form_user")
	   form_url=rs("form_url")
	   info=rs("info")
	   hits=rs("hits")
	   datetime=year(rs("date"))&"-"&month(rs("date"))&"-"&day(rs("date"))
	 end if
     rs.close
     
     if form_user<>"" then
	   else
	   form_user="suyannan"
	  end if
	
	  if form_url<>"" then
	  else
	  form_url="suyannan"
	  end if
'################ 读取标题 等.. 开始 ################
  rs.open "select * from infotypedown where id="&ttid,conn,1,1
    ts=rs("ts")
        TN=split(rs("tname"),"|")
        TI=split(rs("ts"), ",")
          for i = 0 to ubound(TN)-1
               if i=ubound(TN)-2 and ubound(TN)>1 then
                 TTY_id=TI(i)
                 TTY_name=TN(i)
               end if
                 all_type_top_id=TI(i)
                 all_type_name=TN(i)
             thistype=thistype & "→ <a href="""&TI(i)&"_1.asp"">"&TN(i)&"</a>"
             thistitle=thistitle & " - "&TN(i)&""
          ttype=TN(i)
          next
  rs.close
  
''########读取同级分类
rs.open "select * from infodown where tid="&ttid&" order by id desc",conn,1,1
if rs.eof then
Txlist="·还没有文章"
else
do while not rs.eof
h=h+1
Txlist=Txlist&"<tr height=""22""><td>·<a href="""&rs("id")&".asp"">"&left(rs("title"),12)&"</a></td></tr>"
if h>=10 then exit do
rs.movenext
loop
h=0
end if
rs.close

''########读取本类top10
rs.open "select * from infodown where tid="&ttid&" order by hits desc",conn,1,1
if rs.eof then
Txtop="·还没有文章"
else
do while not rs.eof
h=h+1
Txtop=Txtop&"<tr height=""22""><td>·<a href="""&rs("id")&".asp"">"&left(rs("title"),12)&"</a></td></tr>"
if h>=10 then exit do
rs.movenext
loop
h=0
end if
rs.close

if se<>"" then
'#######读取相关文章
rs.open "select top 10 id,title from infodown where se='"&se&"' and se<>'' and id<>"&id&" order by date desc",conn,1,1
if not rs.eof then
do while not rs.eof
xlist=xlist&"<li type=""circle""><a href="""&rs("id")&".asp"">"&rs("title")&"</a></li>"
h=h+1
if h>=10 then exit do
rs.movenext
loop
h=0
end if
rs.close
conn.close
set conn=nothing
%><!--#include file="mdb_path_down.asp"--><%
'#######读取相关软件
sql="select top 10 id,cxn,cxv from down where cxn like '%"&se&"%' order by date desc"
  rs.open sql,conn,1,1
  if not rs.eof then
  do while not rs.eof
xdown=xdown&"<li type=""circle""><a target=""_blank"" href="""&rs("id")&".asp"">"&rs("cxn")&" "&rs("cxv")&"</a></li>"
h=h+1
if h>=10 then exit do
rs.movenext
loop
h=0
end if
rs.close
end if
set rs=nothing
conn.close
set conn=nothing

pencat=replace(pencat,"T_TYPE",thistype)
pencat=replace(pencat,"T_NAME",ttype)
pencat=replace(pencat,"T_TITLE",thistitle)
pencat=replace(pencat,"TXlist",txlist)
pencat=replace(pencat,"TXtop",Txtop)
pencat=replace(pencat,"XG_LIST",xlist)
pencat=replace(pencat,"XG_DOWN",xdown)


pencat=replace(pencat,"S_ID",id)
pencat=replace(pencat,"S_TITLE",title)
pencat=replace(pencat,"S_SE",se)
pencat=replace(pencat,"S_DJ",dj)
pencat=replace(pencat,"S_INFO",info)
pencat=replace(pencat,"S_FORM_USER",form_user)
pencat=replace(pencat,"S_FORM_URL",form_url)
pencat=replace(pencat,"S_HITS",hits)
pencat=replace(pencat,"S_DATE",datetime)

Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set fout = fso.CreateTextFile(server.mappath("../down/"&id&".asp"))
fout.Write pencat
fout.close
'************** 生成HTML页 结束 ***************
if request("type")="page" then%><font color="#FF0000">生成文章内容页完成</font><script LANGUAGE="JavaScript">
<!--
setTimeout('window.close();', 500);
// -->
</script>
<%end if%>
</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -