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

📄 admin_makehtmldo.asp

📁 本人仅业余学习一些基础的ASP知识以供系统设计之用,并非专业人员,相关服务器设置、MSSQL/MySQL数据库方面的专业问题请自行解决。 本人仅提供本系统相关的一些技术问题的解释、解答。
💻 ASP
📖 第 1 页 / 共 5 页
字号:
<!-- #include file="../conn.asp" --><%Response.buffer=False %><!-- #include file="session.asp" --><!--#include file="../inc/config.asp"-->
<link href="css.css" rel="stylesheet" type="text/css"><%
Server.ScriptTimeOut=48000 '设定操作超时的时间(因为程序运行速度慢啊)
if htmlphem=1 then
htmlphe="htm"
elseif htmlphem=2 then
htmlphe="html"
elseif htmlphem=3 then
htmlphe="shtml"
elseif htmlphem=4 then
htmlphe="asp"
else
htmlphe="html"
end if

Select Case request.querystring("info")
	Case "webindex"
		Call webindex()
	Case "booklist"
		Call booklist()
	Case "booklook"
		Call booklook()
	Case "bookindex"
		Call bookindex()
	Case "bookall"
		Call bookall()
	Case "bookzhang"
		Call bookzhang()
	Case "bookpage"
		Call bookpage()
	Case "typelook"
		Call typelook()
	Case "typeindex"
		Call typeindex()
	Case "typeall"
		Call typeall()
	Case "typezhang"
		Call typezhang()
	Case "typepage"
		Call typepage()
	Case "classlook"
		Call classlook()
	Case "classindex"
		Call classindex()
	Case "classall"
		Call classall()
	Case "classzhang"
		Call classzhang()
	Case "classpage"
		Call classpage()
end select 


Sub webindex()
MakewebindexHtml()
Response.Write ("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;完成:<font color=red>网站首页</font>HTML生成 <br>【<a href='javascript:onclick=history.go(-1)'>返 回</a>】")
Response.end
end sub

Sub booklist()

id=CheckSql(request("classid"))
CheckSqlnum(id)
id=int(id)
Const MaxPerPage=100
if id=0 then
pencat0="<html>"&chr(13)&chr(10)
pencat0=pencat0&"<head>"&chr(13)&chr(10)
pencat0=pencat0&"<meta http-equiv=""Content-Type"" content=""text/html; charset=gb2312"">"&chr(13)&chr(10)
pencat0=pencat0&"<meta name=""copyright"" content=""作品版权属于原作者·页面所有权  {$SiteName$}"" Powered By CnEndWeb/>"&chr(13)&chr(10)
pencat0=pencat0&"<meta name=""keywords"" content=""{$PageKeyword$} Powered By CnEndWeb cnend.net"">"&chr(13)&chr(10)
pencat0=pencat0&"<meta name=""description"" content=""{$PageDesc$} Powered By CnEndWeb cnend.net"">"&chr(13)&chr(10)
pencat0=pencat0&"<meta name=""generator"" content=""www.cnend.net"" />"&chr(13)&chr(10)
SiteCopyright="Powered By <a title='终点小说连载系统' href='http://www.cnend.net/'>CnEndWeb</a> &copy; 2006-2008 <a href='"&Siteurl&"'>"&replace(Siteurl,"http://","")&"</a> "
SiteCopyright=SiteCopyright&"<script language='javascript' src='{$SiteSystemPath$}js/gb.js'></script><br>"
title="<title>{$SiteName$} - {$Stats$}</title>"&chr(13)&chr(10)

pencats="<table cellspacing=0 width=100% align=center border=0><tr><td align=middle><table cellspacing=0 cellpadding=0 width=100% border=0 valign=top><form method=get action={$SiteSystemPath$}listupdate.asp><tr><td class=xt><span class=zt>&nbsp; □<font color=red>全部作品</font>&nbsp; "
pencats=pencats&"本类全部</span>&nbsp;&nbsp;&nbsp; 按更新时间排序 </td><td class=xt align=right>"
pencats=pencats&"<select name=booktype2><option value=0 selected>排行方式</option><option value=1>总点击</option><option value=2>总推荐</option><option value=3>总收藏</option><option value=4>总字数</option><option value=5>字首拼音</option><option value=6>更新时间</option></select> <input type=submit value=提交></td></tr></form></table></td></tr></table>"
pencats1="<table cellspacing=0 width=100% align=center border=0><tr><td><table cellspacing=0 bordercolordark=white width=99% align=center border=0 valign=top><tr align=middle height=24><td class=xt style='BORDER-LEFT-COLOR: rgb(204,204,204); BORDER-BOTTOM-COLOR: rgb(204,204,204); BORDER-TOP-COLOR: rgb(204,204,204)' valign=center align=middle width=12% ><b><font color=#003399>类别</font></b></td><td class=xt style='BORDER-BOTTOM-COLOR: rgb(204,204,204); BORDER-TOP-COLOR: rgb(204,204,204)' valign=center align=middle width=20% ><b><font color=#003399>书名</font></b></td><td class=xt style='BORDER-BOTTOM-COLOR: rgb(204,204,204); BORDER-TOP-COLOR: rgb(204,204,204)' valign=center align=middle width=35% ><b><font color=#003399>最新章节</font></b></td><td class=xt style='BORDER-BOTTOM-COLOR: rgb(204,204,204); BORDER-TOP-COLOR: rgb(204,204,204)' valign=center align=middle width=15% ><b><font color=#003399>更新时间</font></b></td><td class=xt style='BORDER-BOTTOM-COLOR: rgb(204,204,204); BORDER-TOP-COLOR: rgb(204,204,204)' valign=center align=middle width=10% ><b><font color=#003399>作者</font></b></td><td class=xt style='BORDER-BOTTOM-COLOR: rgb(204,204,204); BORDER-TOP-COLOR: rgb(204,204,204); BORDER-RIGHT-COLOR: rgb(204,204,204)' valign=center bordercolorlight=#666666 align=middle width=8% ><b><font color=#003399>状态</font></b></td></tr>"
pencats3="</table></td></tr></table>"

Stats=" 全部作品分类列表"

set rsbclass=server.createobject("adodb.recordset")
sqlbclass="select id,list_lei,list_name,list_user,list_tai,newviewid,newviewname,newview,list_gxdate from list_book where Lock_book = 0 order by list_gxdate desc"
'MySQL需要如下语句
conn.CursorLocation=3
rsbclass.open sqlbclass,conn,1,1
if rsbclass.eof and rsbclass.bof then
	pencats2="<tr bgColor=#ffffff height=24><td align=center>暂无任何作品</td></tr>"
else
	pencats2=""
	Rsbclass.PageSize=MaxPerPage
	Allpage=Rsbclass.PageCount
	For j=1 To Allpage

		sql1="select SystemPath,Page_bottom,page_listbook,Page_head,Page_Css,Page_1 from [Template] where ID="&Tempid&""
		set rs1=connTemp.execute(sql1)
			SystemPath=rs1("SystemPath")
			Page_Css=rs1("Page_Css")
			Top=rs1("Page_head")
			okfile0=rs1("page_listbook")
			showlook_book=rs1("Page_1")
			Foot=rs1("Page_bottom")
		rs1.close
		set rs1=nothing
		okpage=pencat0&Top&okfile0&Foot

		Num=Rsbclass.RecordCount
		Rsbclass.MoveFirst
		Rsbclass.AbsolutePage=j
		i=0
		Do While Not Rsbclass.Eof
			pencats2=pencats2&"<tr height=24><td class=xt valign=top align=middle>"
			set rs1=server.CreateObject("ADODB.recordset")
			sql="select list_classname from list_class where list_classid="&rsbclass("list_lei")
			rs1.open sql,conn,1,1
			if rs1.eof and rs1.bof then
				pencats2=pencats2&"被删除"
			else
				pencats2=pencats2&rs1("list_classname")
			end if
			rs1.close
			set rs1=nothing
			pencats2=pencats2&"</td><td class=xt valign=top align=left><a href="&rsbclass("id")&"."&htmlphe&">"&rsbclass("list_name")&"</a></td><td class=xt valign=top align=left><a href="
			if rsbclass("newviewid")=0 then
				pencats2=pencats2&"0.htm"
			else
				pencats2=pencats2&""&rsbclass("id")&"/"&rsbclass("newviewid")&"."&htmlphe&""
			end if
			pencats2=pencats2&"><font color=#5d5d5d>"
			if rsbclass("newviewname")<>"" then
				pencats2=pencats2&rsbclass("newviewname")
			else
				pencats2=pencats2&"暂无更新"
			end if
			pencats2=pencats2&"</font></a></td><td class=xt valign=top align=middle>"&formatdatetime(rsbclass("list_gxdate"),2)&"</td><td class=xt valign=top align=middle>"&rsbclass("list_user")&"</td>	<td class=xt valign=top align=middle>"
			if rsbclass("list_tai")="1" then
				pencats2=pencats2&"转载中..."
			elseif rsbclass("list_tai")="2" then
				pencats2=pencats2&"连载中..."
			elseif rsbclass("list_tai")="3" then
				pencats2=pencats2&"出版中..."
			elseif rsbclass("list_tai")="4" then
				pencats2=pencats2&"已暂停..."
			elseif rsbclass("list_tai")="5" then
				pencats2=pencats2&"已停止..."
			elseif rsbclass("list_tai")="6" then
				pencats2=pencats2&"已完成..."
			end if
			pencats2=pencats2&"</td></tr>"
		i=i+1
		If i>=MaxPerPage Then Exit Do
		Rsbclass.MoveNext
		Loop
		pencats2=pencats2&"<tr><td height=24 class=xt align=center colspan=6>共 <b>" & Num & "</b> 条纪录&nbsp;&nbsp;"
		if j<2 then
			pencats2=pencats2&"首页 上一页&nbsp;"
		else
			pencats2=pencats2& "<a href='listupdate_1."&htmlphe&"'>首页</a>&nbsp;"
			pencats2=pencats2& "<a href='listupdate_"&(j-1)&"."&htmlphe&"'>上一页</a>&nbsp;"
		end if
		if j>=Allpage then
			pencats2=pencats2& "下一页 尾页"
		else
			pencats2=pencats2& "<a href='listupdate_"&(j+1)&"."&htmlphe&"'>下一页</a>&nbsp;"
			pencats2=pencats2& "<a href='listupdate_"&Allpage&"."&htmlphe&"'>尾页</a>"
		end if
		pencats2=pencats2& "&nbsp;页次:<strong><font color=red>" & j & "</font>/" & Allpage & "</strong>页 "
		pencats2=pencats2& "&nbsp;<b>" & MaxPerPage & "</b>条纪录/页"
		pencats2=pencats2& "</td></tr></table></td></tr>"
		pencat=replace(pencat,"{$showlist_book$}",pencats&pencats1&pencats2&pencats3)
		pencat=replace(okpage,"{$PageCSS$}",Page_Css)
		pencat=replace(pencat,"{$showtitle$}",title)
		pencat=replace(pencat,"{$Stats$}",Stats)
		pencat=replace(pencat,"{$SiteName$}",SiteName)
		pencat=replace(pencat,"{$Siteurl$}",Siteurl)
		pencat=replace(pencat,"{$Sitelogo$}",Sitelogo)
		pencat=replace(pencat,"{$SiteSystemPath$}",SiteSystemPath)
		pencat=replace(pencat,"{$BannerUrl$}",htmllists(BannerUrl))
		pencat=replace(pencat,"{$Bannerads$}",htmllists(Bannerads))
		pencat=replace(pencat,"{$PageKeyword$}",keywords)
		pencat=replace(pencat,"{$PageDesc$}",Description)
		pencat=replace(pencat,"{$user_login$}","<script language=JavaScript src="""&SiteSystemPath&"js/userlogin.asp?type=1""></script>")
		pencat=replace(pencat,"{$Copyright$}",SiteCopyright&Copyright)
		pencat=replace(pencat,"{$showqltj$}",topsqltj)
		pencat=replace(pencat,"{$userlogin$}","<script language=JavaScript src="""&SiteSystemPath&"js/userlogin.asp?type=0""></script>")
		pencat=replace(pencat,"{$booksearch$}",topsbooksearch)
		pencat=replace(pencat,"{$book_search$}",topsbook_search)
		pencat=replace(pencat,"{$showclass$}",topsclass)
		pencat=replace(pencat,"{$showtopten$}",topstopten)
		pencat=replace(pencat,"{$showlztj$}",topslztj)
		pencat=replace(pencat,"{$showsc$}",topssc)
		pencat=replace(pencat,"{$showdj$}",topsdj)
		pencat=replace(pencat,"{$showmdj$}",topsmdj)
		pencat=replace(pencat,"{$showddj$}",topsddj)
		pencat=replace(pencat,"{$showzdj$}",topszdj)
		pencat=replace(pencat,"{$showtj$}",topstj)
		pencat=replace(pencat,"{$showadd$}",topsadd)
		pencat=replace(pencat,"{$showmtj$}",topsmtj)
		pencat=replace(pencat,"{$showztj$}",topsztj)
		pencat=replace(pencat,"{$showdtj$}",topsdtj)
		pencat=replace(pencat,"{$showlogolink$}",topslogolink)
		pencat=replace(pencat,"{$showtxtlink$}",topstxtlink)
		pencat=replace(pencat,"{$showlogo_link$}",topslogo_link)
		pencat=replace(pencat,"{$showtxt_link$}",topstxt_link)
		pencat=replace(pencat,"{$showuserbookadd$}",topsuserbookadd)
		pencat=replace(pencat,"{$showuserbookadds$}",topsuserbookadds)
		pencat=replace(pencat,"{$showuserbooktj$}",topsuserbooktj)
		pencat=replace(pencat,"{$showuserbookdj$}",topsuserbookdj)
		pencat=replace(pencat,"{$WebmasterName$}",WebmasterName)
		pencat=replace(pencat,"{$WebmasterQQ$}",webQQ)
		pencat=replace(pencat,"{$WebmasterEmail$}",WebmasterEmail)
		pencat=replace(pencat,"{$showclass$}",topsclass)
		pencat=replace(pencat,"{$showclass1$}",topsclass1)
		pencat=replace(pencat,"{$showclass2$}",topsclass2)
		pencat=replace(pencat,"{$htmlhz$}",htmlphe)
		viewFolder=""&SiteSystemPath&"HTML/" 'HTML存放目录
		
		bookfile=server.mappath( ""&viewFolder&"listupdate_"&j&"."&htmlphe&"" )

		Set fso = Server.CreateObject("Scripting.FileSystemObject")
		Set fout = fso.Createtextfile(bookfile,true)
				fout.writeline pencat
		fout.close
		set fso=nothing
		Response.Write ("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;完成:<font color=red>全部</font> 列表第"&j&"页HTML生成 <br>")
		pencats2=""
		pencat=""
	Next
	response.write "<p align='center'>全部完成!!【<a href='javascript:onclick=history.go(-1)'>返 回</a>】</p>"
	okpage=""
End If
Rsbclass.Close
Set Rsbclass=Nothing

elseif id=999 then

pencat0="<html>"&chr(13)&chr(10)
pencat0=pencat0&"<head>"&chr(13)&chr(10)
pencat0=pencat0&"<meta http-equiv=""Content-Type"" content=""text/html; charset=gb2312"">"&chr(13)&chr(10)
pencat0=pencat0&"<meta name=""copyright"" content=""作品版权属于原作者·页面所有权  {$SiteName$}"" Powered By CnEndWeb/>"&chr(13)&chr(10)
pencat0=pencat0&"<meta name=""keywords"" content=""{$PageKeyword$} Powered By CnEndWeb cnend.net"">"&chr(13)&chr(10)
pencat0=pencat0&"<meta name=""description"" content=""{$PageDesc$} Powered By CnEndWeb cnend.net"">"&chr(13)&chr(10)
pencat0=pencat0&"<meta name=""generator"" content=""www.cnend.net"" />"&chr(13)&chr(10)
title="<title>{$SiteName$} - {$Stats$}</title>"&chr(13)&chr(10)
SiteCopyright="Powered By <a title='终点小说连载系统' href='http://www.cnend.net/'>CnEndWeb</a> &copy; 2006-2008 <a href='"&Siteurl&"'>"&replace(Siteurl,"http://","")&"</a> "
SiteCopyright=SiteCopyright&"<script language='javascript' src='{$SiteSystemPath$}js/gb.js'></script><br>"

pencats="<table cellspacing=0 width=100% align=center border=0><tr><td align=middle><table cellspacing=0 cellpadding=0 width=100% border=0 valign=top><form method=get action={$SiteSystemPath$}Quanben.asp><tr><td class=xt><span class=zt>&nbsp; □<font color=red>全部作品</font>&nbsp; "
pencats=pencats&"本类全部</span>&nbsp;&nbsp;&nbsp; 按更新时间排序 </td><td class=xt align=right>"
pencats=pencats&"<select name=booktype2><option value=0 selected>排行方式</option><option value=1>总点击</option><option value=2>总推荐</option><option value=3>总收藏</option><option value=4>总字数</option><option value=5>字首拼音</option><option value=6>更新时间</option></select> <input type=submit value=提交></td></tr></form></table></td></tr></table>"
pencats1="<table cellspacing=0 width=100% align=center border=0><tr><td><table cellspacing=0 bordercolordark=white width=99% align=center border=0 valign=top><tr align=middle height=24><td class=xt style='BORDER-LEFT-COLOR: rgb(204,204,204); BORDER-BOTTOM-COLOR: rgb(204,204,204); BORDER-TOP-COLOR: rgb(204,204,204)' valign=center align=middle width=12% ><b><font color=#003399>类别</font></b></td><td class=xt style='BORDER-BOTTOM-COLOR: rgb(204,204,204); BORDER-TOP-COLOR: rgb(204,204,204)' valign=center align=middle width=20% ><b><font color=#003399>书名</font></b></td><td class=xt style='BORDER-BOTTOM-COLOR: rgb(204,204,204); BORDER-TOP-COLOR: rgb(204,204,204)' valign=center align=middle width=35% ><b><font color=#003399>最新章节</font></b></td><td class=xt style='BORDER-BOTTOM-COLOR: rgb(204,204,204); BORDER-TOP-COLOR: rgb(204,204,204)' valign=center align=middle width=15% ><b><font color=#003399>更新时间</font></b></td><td class=xt style='BORDER-BOTTOM-COLOR: rgb(204,204,204); BORDER-TOP-COLOR: rgb(204,204,204)' valign=center align=middle width=10% ><b><font color=#003399>作者</font></b></td><td class=xt style='BORDER-BOTTOM-COLOR: rgb(204,204,204); BORDER-TOP-COLOR: rgb(204,204,204); BORDER-RIGHT-COLOR: rgb(204,204,204)' valign=center bordercolorlight=#666666 align=middle width=8% ><b><font color=#003399>状态</font></b></td></tr>"
pencats3="</table></td></tr></table>"

Stats=" 全本作品列表 - Powered By CnEndWeb"

set rsbclass=server.createobject("adodb.recordset")
sqlbclass="select id,list_lei,list_name,list_user,list_tai,newviewid,newviewname,newview,list_gxdate from list_book where Lock_book = 0 and list_tai=6 order by list_gxdate desc"
'MySQL需要如下语句
conn.CursorLocation=3
rsbclass.open sqlbclass,conn,1,1
if rsbclass.eof and rsbclass.bof then
	pencats2="<tr bgColor=#ffffff height=24><td align=center>暂无任何作品</td></tr>"
else
	pencats2=""
	Rsbclass.PageSize=MaxPerPage
	Allpage=Rsbclass.PageCount
	For j=1 To Allpage

		sql1="select SystemPath,Page_bottom,page_listbook,Page_head,Page_Css,Page_1 from [Template] where ID="&Tempid&""
		set rs1=connTemp.execute(sql1)
			SystemPath=rs1("SystemPath")
			Page_Css=rs1("Page_Css")
			Top=rs1("Page_head")
			okfile0=rs1("page_listbook")
			showlook_book=rs1("Page_1")
			Foot=rs1("Page_bottom")
		rs1.close
		set rs1=nothing

⌨️ 快捷键说明

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