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

📄 makehtml.asp

📁 很好的企业网站管理系统!可以适应各种不同的小型企业!
💻 ASP
字号:
<!--#include file="check.asp"-->
<!--#include file="mdb_path_info.asp"-->
<!--#include file="config.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta copy="程序制作:xoyu(QQ:5964887)www.xoyu.com">
<title>批量生成HTML</title>
<style>
body{font-size:9pt;line-height:140%} 
</style>
</head>
<body>
<%
'#################################################################
'#  晓宇听幽网站内容管理系统(xoYu CMS)
'# 
'#  版权所有: 晓宇听幽工作室
'#
'#  制作人  :  xoyu(晓宇)            
'#           
'#  主页地址: http://www.xoYu.com	    晓宇听幽工作室
'#  论坛地址: http://www.xoYu.com/bbs/	晓宇听幽讨论区
'#
'#【版权声明】
'#################################################################
'# 本软体为共享软体(shareware)提供个人网站免费使用,请勿非法修改,
'# 转载,散播,或用于其他图利行为,并请勿删除版权声明。
'# 如果您的网站正式起用了这个脚本,请您通知我们,以便我们能够知晓!
'# 如果可能,请在您的网站做上我们的链接,希望能给予合作。谢谢!
'#################################################################
'# 程序名称:晓宇听幽网站内容管理系统·新闻文章管理系统
'# 英文名称:xoYu News 2004 Professional For xoYu CMS
'# 程序创建时间:2003-7-10
'# 程序完成时间:2003-9-11
'# 最后修改时间:2003-11-15
'#################################################################
'# 请您尊重我们的劳动和版权,不要删除以上的版权声明部分,谢谢合作
'# 如有任何问题请到我们的论坛(http://www.xoyu.com/bbs/)告诉我们。 
'#################################################################
function xoYuTitle(content)
    if content<>"" then
    xoYuTitle=content
  	xoYuTitle=replace(xoYuTitle,"[加粗]","<b>")
  	xoYuTitle=replace(xoYuTitle,"[倾斜]","<i>")
  	xoYuTitle=replace(xoYuTitle,"[下划线]","<u>")
  	xoYuTitle=replace(xoYuTitle,"[删除线]","<s>")
	if instr(1,xoYuTitle,"<b>",1)<>0 then xoYuTitle=xoYuTitle+"</b>"
	if instr(1,xoYuTitle,"<i>",1)<>0 then xoYuTitle=xoYuTitle+"</i>"
	if instr(1,xoYuTitle,"<u>",1)<>0 then xoYuTitle=xoYuTitle+"</u>"
	if instr(1,xoYuTitle,"<s>",1)<>0 then xoYuTitle=xoYuTitle+"</s>"
	xoYuTitle=replace(xoYuTitle,"[红色]","<font color=ff0000>")
	xoYuTitle=replace(xoYuTitle,"[蓝色]","<font color=blue>")
	xoYuTitle=replace(xoYuTitle,"[绿色]","<font color=green>")
	xoYuTitle=replace(xoYuTitle,"[紫色]","<font color=990099>")
	xoYuTitle=replace(xoYuTitle,"[酱色]","<font color=790000>")
	xoYuTitle=replace(xoYuTitle,"[橙色]","<font color=FF6600>")
	if instr(1,xoYuTitle,"<font",1)<>0 then xoYuTitle=xoYuTitle+"</font>"
	xoYuTitle=replace(xoYuTitle,"[建议]","<font color=red>[建议]</font>")
	xoYuTitle=replace(xoYuTitle,"[注意]","<font color=red>[注意]</font>")
	xoYuTitle=replace(xoYuTitle,"[下载]","<font color=red>[下载]</font>")
	xoYuTitle=replace(xoYuTitle,"[公告]","<font color=red>[公告]</font>")
	xoYuTitle=replace(xoYuTitle,"[转载]","<font color=red>[转载]</font>")
	xoYuTitle=replace(xoYuTitle,"[焦点]","<font color=red>[焦点]</font>")
	xoYuTitle=replace(xoYuTitle,"[社会]","<font color=red>[社会]</font>")
	xoYuTitle=replace(xoYuTitle,"[推荐]","<font color=red>[推荐]</font>")
	xoYuTitle=replace(xoYuTitle,"[原创]","<font color=red>[原创]</font>")
	  end if
End function



set rs=server.createobject("adodb.recordset")
set rsm=server.createobject("adodb.recordset")
id=request("id")
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=xoyuTitle(rs("title"))
    WEBTitle=rs("title")
    WEBTitle=replace(WEBTitle,"[加粗]","")
    WEBTitle=replace(WEBTitle,"[倾斜]","")
    WEBTitle=replace(WEBTitle,"[下划线]","")
    WEBTitle=replace(WEBTitle,"[删除线]","")
    WEBTitle=replace(WEBTitle,"[红色]","")
    WEBTitle=replace(WEBTitle,"[蓝色]","")
    WEBTitle=replace(WEBTitle,"[绿色]","")
    WEBTitle=replace(WEBTitle,"[紫色]","")
    WEBTitle=replace(WEBTitle,"[酱色]","")
    WEBTitle=replace(WEBTitle,"[橙色]","")
       user=rs("user")
	   form_user=rs("form_user")
	   form_url=rs("form_url")
	   info=rs("info")
	       info=urlname(info)
	   hits=rs("hits")
	   datetime=year(rs("date"))&"-"&month(rs("date"))&"-"&day(rs("date"))
	   fileming=year(rs("date"))&month(rs("date"))&day(rs("date"))&hour(rs("date"))&minute(rs("date"))&second(rs("date"))
	 end if
     rs.close    
rs.open "select * from info where id="&request("id"),conn,1,1
    MbName=rs("MbName")
      rs.close
rsm.open "select * from mb where id="&mbname,conn,1,1
pencat=rsm("MbContent")
rsm.close

if link="1" then
f=0
rs.open "select * from specialx where tj=1 order by id desc",conn,1,1
smax=rs.recordcount
do while not rs.eof
spname=rs("specialGJ")
nbid=rs("id")
spename="<a target=""_blank"" href=""../Special/List_"&nbid&"_1.Html""><font color=""#6699FF"">"&spname&"</font></a>"
info=replace(info,""&spname&"",""&spename&"")
if f>=smax then exit do
rs.movenext
loop
rs.close
end if
           
     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
  topshu=rs("topshu")
  toplen=rs("toplen")
    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=""../list/list_"&TI(i)&"_1.Html"">"&TN(i)&"</a>"
             thistitle=thistitle & " - "&TN(i)&""
          ttype=TN(i)
          next
  rs.close
  thistype="<xoYu_CMS_CODE:NEWS:NEWS_TYPE>"&thistype & "</xoYu_CMS_CODE:NEWS:NEWS_TYPE>"
''########读取同级分类
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=""../list/list_"&rs("id")&"_1.Html""><font color=""#000000"">"&TTNN&"</font></a><br>"
rs.MoveNext
loop
end if
txlist="<xoYu_CMS_CODE:NEWS:NEWS_LIST>"&txlist&"</xoYu_CMS_CODE:NEWS:NEWS_LIST>"
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=""../list/list_"&rs("id")&"_1.Html""><font color=""#000000"">|"&TTNN&"|</font></a><br>"
rs.MoveNext
loop
end if
rs.close
end if
txlist="<xoYu_CMS_CODE:NEWS:NEWS_LIST>"&txlist&"</xoYu_CMS_CODE:NEWS:NEWS_LIST>"

''########读取本类top10
rs.open "select * from info where tid="&ttid&" order by hits desc",conn,1,1
if rs.eof then
Txtop="<xoYu_CMS_CODE:NEWS:NEWS_TOP>·还没有文章</xoYu_CMS_CODE:NEWS:NEWS_TOP>"
else
do while not rs.eof
if len(rs("Title"))>toplen then
titley=left(rs("Title"),toplen)&"..."
else
titley=rs("Title")
end if


h=h+1
filetop=year(rs("date"))&month(rs("date"))&day(rs("date"))&hour(rs("date"))&minute(rs("date"))&second(rs("date"))
if rs("dj")=6 then
Txtop=Txtop&"·<a title="""&rs("Title")&""" href=""../Html/"&filetop&"-1.Html"">"&xoyuTitle(titley)&"</a><br>"
else
Txtop=Txtop&"·<a title="""&rs("Title")&""" href=""../Html/shownews.asp?id="&rs("id")&""">"&xoyuTitle(titley)&"</a><br>"
end if
if h>=topshu then exit do
rs.movenext
loop
h=0
end if
Txtop="<xoYu_CMS_CODE:NEWS:NEWS_TOP>"&Txtop&"</xoYu_CMS_CODE:NEWS:NEWS_TOP>"
rs.close


search=search&"<xoYu_CMS_CODE:NEWS:SEARCH_FORM><form method=""post"" action=""../search.asp"">"          
search=search&"<input name=""k"" size=""15"" style=""border: 1px dotted #42A5F7; "">"
search=search&"<br>"
search=search&"<select name=""kt"">"
search=search&"<option value=""../search.asp?type=title&k="""">按照标题搜索</option>"
search=search&"<option value=""../search.asp?type=info&k="""">按照内容搜索</option>"
search=search&"</select><br>"
search=search&"<input name=""Submit"" src=""../images/d_search.gif"" type=""image"" value=""Submit"" align=""absmiddle"" border=""0""></xoYu_CMS_CODE:NEWS:SEARCH_FORM>"

reply=reply&"<xoYu_CMS_CODE:NEWS:REPLY_FORM><FORM name=""myform"" action=""../replydo.asp"" method=""post""><INPUT type=""hidden"" value="""&id&""" name=""infoid"">"
reply=reply&"您的大名:<INPUT size=""16"" name=""username""> <a target=""_blank"" href=""../reg.asp"">(点击这里注册)</a><BR></TD></TR>"
reply=reply&"<TR><TD align=""left""><TEXTAREA name=""content"" onfocus=""this.value=''"" rows=""6"" cols=""70"">这里填写您的评论:)</TEXTAREA></TD></FORM></TR>"
reply=reply&"<TR><TD align=""left"">友情提醒:评论请限制在100字以内,有长篇大论欢迎到论坛发表:)<INPUT onclick=""this.disabled=true; document.myform.submit();"" type=""submit"" value=""发表评论"" name=""submit""></xoYu_CMS_CODE:NEWS:REPLY_FORM>"

''########读取相关评论
rs.open "select * from Reply where InfoId="&id&" and check='1' order by date desc",conn,1,1
rmax=rs.recordcount
if rs.eof then
rcontent="·还没有相关的评论!"
else
do while not rs.eof
x=x+1
rcontent=rcontent&"<p>"&rs("username")&":<br>&nbsp;&nbsp;&nbsp;"&rs("content")&"</p>"
if x>=rmax then exit do
rs.movenext
loop
x=0
end if
rcontent="<xoYu_CMS_CODE:NEWS:REPLY_NEWS>"&rcontent&"</xoYu_CMS_CODE:NEWS:REPLY_NEWS>"
rs.close

if se<>"" then
'#######读取相关文章
rs.open "select id,title,date,dj 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
g=g+1
titlez=rs("Title")
filexg=year(rs("date"))&month(rs("date"))&day(rs("date"))&hour(rs("date"))&minute(rs("date"))&second(rs("date"))
if rs("dj")=6 then
xlist=xlist&"<li type=""circle""><a href="""&filexg&"-1.Html"">"&xoyuTitle(titlez)&"</a></li>"
else
xlist=xlist&"<li type=""circle""><a href=""shownews.asp?id="&rs("id")&""">"&xoyuTitle(titlez)&"</a></li>"
end if
if g>=lelationshu then exit do
rs.movenext
loop
g=0
end if
xlist="<xoYu_CMS_CODE:NEWS:ABOUT_NEWS>"&xlist&"</xoYu_CMS_CODE:NEWS:ABOUT_NEWS>"
else
xlist="·还没有相关文章"
end if
set rs=nothing
set rsm=nothing
conn.close  
set conn=nothing
  '-------新闻内部连接开始
  Function UrlName(Content)
    UrlContent=Content
    if UrlContent<>"" then
      set rsUrl=conn.execute("select website,Url from link order by ID Desc")
	  while not rsUrl.eof
	    UrlContent=replace(UrlContent,rsUrl("website"),"<xoYu_CMS_CODE:NEWS:IN_LINK><a href="&rsUrl("url")&" target=_blank>"&rsUrl("website")&"</a></xoYu_CMS_CODE:NEWS_IN_LINK>")
	    rsUrl.movenext
	  wend
	rsUrl.close
    set rsUrl=nothing
    end if
    UrlName=UrlContent
  End Function
  '-------新闻内部连接结束




     infos=split(info,"[Page]")
     ip=ubound(infos)
     for k=0 to ip
     pl=pl&"<a href=""../Html/"&fileming&"-"&k+1&".Html"">第["&k+1&"]页</a>&nbsp;" 
     next    
     infos=split(info,"[Page]")
     ip=ubound(infos)
     for k=0 to ip
    infop=infos(k)&"<xoYu_CMS_CODE:NEWS:REPLY_HITS><img border=""0"" src=""../count_news.asp?id="&id&""" width=""1"" height=""1""></xoYu_CMS_CODE:NEWS:REPLY_HITS><div align=right><a title=""Powered By:xoYu CMS"" href=http://www.xoyu.com/><span style=""background-color: #FFFFFF""><font color=#C0C0C0>xoYu CMS</font></span></a></div>"
    infop="<xoYu_CMS_CODE:NEWS:NEWS_INFO>"&infop&"</xoYu_CMS_CODE:NEWS:NEWS_INFO>"


    
pencat=replace(pencat,"[xoYu_TYPE]",thistype)
pencat=replace(pencat,"[xoYu_NAME]",ttype)
pencat=replace(pencat,"[xoYu_TITLE]",thistitle)
pencat=replace(pencat,"[xoYu_BJlist]",txlist)
pencat=replace(pencat,"[xoYu_BJtop]",Txtop)
pencat=replace(pencat,"[xoYu_ALIST]",xlist)
pencat=replace(pencat,"[xoYu_SEARCH]",search)
pencat=replace(pencat,"[xoYu_ID]",id)
pencat=replace(pencat,"[TITLE]",title)
pencat=replace(pencat,"[WEBTITLE]",WEBtitle)
pencat=replace(pencat,"[xoYu_USER]",user)
pencat=replace(pencat,"[xoYu_WRITER]",form_user)
pencat=replace(pencat,"[xoYu_FORM]",form_url)
pencat=replace(pencat,"[xoYu_HITS]",hits)
pencat=replace(pencat,"[xoYu_DATE]",datetime)
pencat=replace(pencat,"[xoYu_PAGE]",pl)
pencat=replace(pencat,"[xoYu_content]",infop)
pencat=replace(pencat,"[xoYu_RCONTENT]",rcontent)
pencat=replace(pencat,"[xoYu_REPLY]",reply)
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set fout = fso.CreateTextFile(server.mappath("../Html/"&fileming&"-"&k+1&".Html"))
fout.Write pencat
fout.Writeline("")
fout.Writeline("<!--Published Date:"&Now&"   Power by www.xoyu.com-->")
fout.Writeline("<!--2002~2003 Copyright by www.xoyu.com All Rights Reserved-->")
fout.Writeline("<center><div align=center><a title=""Powered By:xoYu CMS"" href=http://www.xoyu.com/><span style=""background-color: #FFFFFF"">xoYu CMS 2.0</span></a></div></center>") 
fout.close
pencat=replace(pencat,""&infop&"","[xoYu_content]")
next
'************** 生成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 + -