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

📄 info_makeinfo.asp

📁 一个网上flash网站源码
💻 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 - MyFlash</title>
</head>
<body>
<%
set rs=server.createobject("adodb.recordset")
rs.open ("select info_show from mb"),conn,1,1
pencat=rs("info_show")
rs.close
     rs.open "select * from info where id="&request("id"),conn,1,1
     if not rs.eof then
       ttid=rs("tid")
       id=rs("id")
       se=rs("se")
	   title=rs("title")
	   form_user=rs("form_user")
	   form_url=rs("form_url")
	   info=rs("info")&"<img border=""0"" src=""../down_info.asp?id="&id&""" width=""0"" height=""0"">"
	   hits=rs("hits")
	   user=rs("user")
	   datetime=year(rs("date"))&"-"&month(rs("date"))&"-"&day(rs("date"))
	 end if
     rs.close
     rs.open "select * from info where id="&request("id")-1,conn,1,1
     if not rs.eof then
xg="<li><font class=""text"">上一篇:<a href=""../joke/"&rs("id")&".htm""><font color=""#FF5B02"">"&rs("title")&"</font></a></font>"
	 end if
     rs.close
     rs.open "select * from info where id="&request("id")+1,conn,1,1
     if not rs.eof then
xht="<li><font class=""text"">下一篇:<a href=""../joke/"&rs("id")&".htm""><font color=""#FF5B02"">"&rs("title")&"</font></a></font>"
	 end if
     rs.close
user="<a href='javascript:' onclick='window.open(""../admin/user.asp?user="&user&""","""",""width=400,height=150,resizable=yes,scrollbars=yes,status=yes,toolbar=no,menubar=no,location=no"")'>"&user&"</a>"
     if form_user<>"" then
	   else
	   form_user="未知"
	  end if
	
	  if form_url<>"" then
	  else
	  form_url="未知"
	  end if
'################ 读取标题 等.. 开始 ################
  rs.open "select * from infotype 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 & " <img src=""../images/j1.gif"" border=""0"" width=""8"" height=""11""><a href=""../joke/"&TI(i)&"_1.htm"">"&TN(i)&"</a>"
             thistitle=thistitle & " - "&TN(i)&""
          ttype=TN(i)
          next
  rs.close
  
''########读取同级分类
rs.open "select * from infotype where tn="&ttid&" order by id",conn,1,1
if NOT rs.EOF then
TTY="NO"
Tname=all_type_name
do while NOT rs.EOF
TTNN=split(rs("tname"),"|")(rs("tj")-1)
txlist=txlist&"<a href=""../joke/"&rs("id")&"_1.htm""><font color=""#4D9CC8"">"&TTNN&"</font></a><br>"
rs.MoveNext
loop
end if
rs.close
if TTY_id<>"" and TTY<>"NO" then
rs.open "select * from infotype where tn="&TTY_id&" order by id",conn,1,1
if NOT rs.EOF then
Tname=TTY_name
do while NOT rs.EOF
TTNN=split(rs("tname"),"|")(rs("tj")-1)
txlist=txlist&"<a href=""../joke/"&rs("id")&"_1.htm""><font color=""#4D9CC8"">"&TTNN&"</font></a><br>"
rs.MoveNext
loop
end if
rs.close
end if

''########读取本类top10
rs.open "select * from info where tid="&ttid&" order by hits desc",conn,1,1
Txtop=Txtop&"<table cellSpacing=""0"" cellPadding=""0"" width=""100%"" border=""0""><tr>"
if rs.eof then
Txtop="·暂无相关笑话 :("
else
do while not rs.eof
h=h+1
Txtop=Txtop&"<td style=""LINE-HEIGHT: 18px"" vAlign=""top"">·</td><td style=""LINE-HEIGHT: 18px""><a href=""../joke/"&rs("id")&".htm"">"&rs("title")&"</a></td></tr>"
if h>=10 then exit do
rs.movenext
loop
h=0
end if
rs.close
Txtop=Txtop&"</table>"

if se<>"" then
'#######读取相关笑话
rs.open "select top 4 id,title,form_user from info where se='"&se&"' and se<>'' and id<>"&id&" order by date desc",conn,1,1
if rs.eof then
xlist="暂无相关笑话:("
else
do while not rs.eof
xlist=xlist&"<font color=""#33CCFF"">·</font><a title="&rs("title")&" href="""&rs("id")&".htm"">"&left(rs("title"),7)&"("&rs("form_user")&")</a><br>"
h=h+1
if h>=4 then exit do
rs.movenext
loop
h=0
xlist=xlist&"<font color=""#33CCFF"">·</font>更多相关 <a href=""../search.asp?type=info&k="&se&""">GO!-></a>"
end if
rs.close
conn.close
set conn=nothing
%><!--#include file="mdb_path_down.asp"--><%
'#######读取相关作 品
sql="select top 4 id,cxn,cxv,ln from down where cxn like '%"&se&"%' order by date desc"
  rs.open sql,conn,1,1
  if rs.eof then
xdown="暂无相关作 品:("
else
  do while not rs.eof
xdown=xdown&"<font color=""#33CCFF"">·</font><a title="&rs("cxn")&" href=""../flash/"&rs("id")&".htm"">"&left(rs("cxn"),7)&"("&rs("ln")&")</a><br>"
h=h+1
if h>=4 then exit do
rs.movenext
loop
h=0
xdown=xdown&"<font color=""#33CCFF"">·</font>更多相关 <a href=""../search.asp?k="&se&""">GO!-></a>"
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_INFO",info)
pencat=replace(pencat,"S_XG",xg)
pencat=replace(pencat,"S_XHT",xht)
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)
pencat=replace(pencat,"T_USER",user)

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

⌨️ 快捷键说明

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