📄 makehtmlfunction.asp
字号:
set rsbclass=server.createobject("adodb.recordset")
sqlbclass="select top "&newgxNum&" id,list_class,list_lei,list_name,list_user,list_tai,list_date,newviewid,newviewname,newview,list_gxdate from [list_book] where Lock_book = 0 order by list_gxdate desc"
rsbclass.open sqlbclass,conn,1,1
if rsbclass.eof and rsbclass.bof then
pencat="document.write('暂无任何作品列表');"
else
For i=1 To newgxNum
If rsbclass.eof Then Exit For
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
pencat=pencat&"putlist('"&i&"','被删除',"
else
pencat=pencat&"putlist('"&i&"','"&rs1("list_classname")&"',"
end if
rs1.close
set rs1=nothing
pencat=pencat&"'"&rsbclass("id")&"','"&rsbclass("list_name")&"',"
pencat=pencat&"'"&rsbclass("newviewid")&"',"
if rsbclass("newviewname")<>"" then
pencat=pencat&"'"&unhtmllist(rsbclass("newviewname"))&"',"
else
pencat=pencat&"'暂无更新',"
end if
pencat=pencat&"'"&formatdatetime(rsbclass("list_gxdate"),2)&"','"&unhtmllist(rsbclass("list_user"))&"',"
if rsbclass("list_tai")="1" then
pencat=pencat&"'转载中...',"
elseif rsbclass("list_tai")="2" then
pencat=pencat&"'连载中...',"
elseif rsbclass("list_tai")="3" then
pencat=pencat&"'出版中...',"
elseif rsbclass("list_tai")="4" then
pencat=pencat&"'已暂停...',"
elseif rsbclass("list_tai")="5" then
pencat=pencat&"'已停止...',"
elseif rsbclass("list_tai")="6" then
pencat=pencat&"'已完成...',"
end if
pencat=pencat&"'"&formatdatetime(rsbclass("list_date"),2)&"');"
rsbclass.movenext
Next
end if
rsbclass.close
set rsbclass=nothing
file=server.mappath( ""&SiteSystemPath&"indexjs/list_top10.js" )
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set fout = fso.Createtextfile(file,1)
fout.writeline pencat
fout.close
set fout=nothing
set fso=nothing
pencat=""
End Function
'-------------------------------------------------------------------------------------
Function maketoptentj(tjNum)
set rsbclass=server.createobject("adodb.recordset")
sqlbclass="select top "&tjNum&" id,list_class,list_lei,list_name,list_user,list_tai,list_jian,newviewid,newviewname,newview,list_gxdate from [list_book] where Lock_book = 0 order by list_jian desc"
rsbclass.open sqlbclass,conn,1,1
if rsbclass.eof and rsbclass.bof then
pencat="document.write('暂无任何作品列表');"
else
For i=1 To tjNum
If rsbclass.eof Then Exit For
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
pencat=pencat&"putlist('"&i&"','被删除',"
else
pencat=pencat&"putlist('"&i&"','"&rs1("list_classname")&"',"
end if
rs1.close
set rs1=nothing
pencat=pencat&"'"&rsbclass("id")&"','"&rsbclass("list_name")&"',"
pencat=pencat&"'"&rsbclass("newviewid")&"',"
if rsbclass("newviewname")<>"" then
pencat=pencat&"'"&unhtmllist(rsbclass("newviewname"))&"',"
else
pencat=pencat&"'暂无更新',"
end if
pencat=pencat&"'"&formatdatetime(rsbclass("list_gxdate"),2)&"','"&unhtmllist(rsbclass("list_user"))&"',"
if rsbclass("list_tai")="1" then
pencat=pencat&"'转载中...',"
elseif rsbclass("list_tai")="2" then
pencat=pencat&"'连载中...',"
elseif rsbclass("list_tai")="3" then
pencat=pencat&"'出版中...',"
elseif rsbclass("list_tai")="4" then
pencat=pencat&"'已暂停...',"
elseif rsbclass("list_tai")="5" then
pencat=pencat&"'已停止...',"
elseif rsbclass("list_tai")="6" then
pencat=pencat&"'已完成...',"
end if
pencat=pencat&"'"&rsbclass("list_jian")&"');"
rsbclass.movenext
Next
end if
rsbclass.close
set rsbclass=nothing
file=server.mappath( ""&SiteSystemPath&"indexjs/list_top4.js" )
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set fout = fso.Createtextfile(file,1)
fout.writeline pencat
fout.close
set fout=nothing
set fso=nothing
pencat=""
End Function
'-------------------------------------------------------------------------------------
Function maketoptenmtj(mtjNum)
set rsbclass=server.createobject("adodb.recordset")
sqlbclass="select top "&mtjNum&" id,list_class,list_lei,list_name,list_user,list_tai,list_mjian,newviewid,newviewname,newview,list_gxdate from [list_book] where Lock_book = 0 order by list_mjian desc"
rsbclass.open sqlbclass,conn,1,1
if rsbclass.eof and rsbclass.bof then
pencat="document.write('暂无任何作品列表');"
else
For i=1 To mtjNum
If rsbclass.eof Then Exit For
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
pencat=pencat&"putlist('"&i&"','被删除',"
else
pencat=pencat&"putlist('"&i&"','"&rs1("list_classname")&"',"
end if
rs1.close
set rs1=nothing
pencat=pencat&"'"&rsbclass("id")&"','"&rsbclass("list_name")&"',"
pencat=pencat&"'"&rsbclass("newviewid")&"',"
if rsbclass("newviewname")<>"" then
pencat=pencat&"'"&unhtmllist(rsbclass("newviewname"))&"',"
else
pencat=pencat&"'暂无更新',"
end if
pencat=pencat&"'"&formatdatetime(rsbclass("list_gxdate"),2)&"','"&unhtmllist(rsbclass("list_user"))&"',"
if rsbclass("list_tai")="1" then
pencat=pencat&"'转载中...',"
elseif rsbclass("list_tai")="2" then
pencat=pencat&"'连载中...',"
elseif rsbclass("list_tai")="3" then
pencat=pencat&"'出版中...',"
elseif rsbclass("list_tai")="4" then
pencat=pencat&"'已暂停...',"
elseif rsbclass("list_tai")="5" then
pencat=pencat&"'已停止...',"
elseif rsbclass("list_tai")="6" then
pencat=pencat&"'已完成...',"
end if
pencat=pencat&"'"&rsbclass("list_mjian")&"');"
rsbclass.movenext
Next
end if
rsbclass.close
set rsbclass=nothing
file=server.mappath( ""&SiteSystemPath&"indexjs/list_top5.js" )
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set fout = fso.Createtextfile(file,1)
fout.writeline pencat
fout.close
set fout=nothing
set fso=nothing
pencat=""
End Function
'-------------------------------------------------------------------------------------
Function maketoptenztj(ztjNum)
set rsbclass=server.createobject("adodb.recordset")
sqlbclass="select top "&ztjNum&" id,list_class,list_lei,list_name,list_user,list_tai,list_zjian,newviewid,newviewname,newview,list_gxdate from [list_book] where Lock_book = 0 order by list_zjian desc"
rsbclass.open sqlbclass,conn,1,1
if rsbclass.eof and rsbclass.bof then
pencat="document.write('暂无任何作品列表');"
else
For i=1 To ztjNum
If rsbclass.eof Then Exit For
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
pencat=pencat&"putlist('"&i&"','被删除',"
else
pencat=pencat&"putlist('"&i&"','"&rs1("list_classname")&"',"
end if
rs1.close
set rs1=nothing
pencat=pencat&"'"&rsbclass("id")&"','"&rsbclass("list_name")&"',"
pencat=pencat&"'"&rsbclass("newviewid")&"',"
if rsbclass("newviewname")<>"" then
pencat=pencat&"'"&unhtmllist(rsbclass("newviewname"))&"',"
else
pencat=pencat&"'暂无更新',"
end if
pencat=pencat&"'"&formatdatetime(rsbclass("list_gxdate"),2)&"','"&unhtmllist(rsbclass("list_user"))&"',"
if rsbclass("list_tai")="1" then
pencat=pencat&"'转载中...',"
elseif rsbclass("list_tai")="2" then
pencat=pencat&"'连载中...',"
elseif rsbclass("list_tai")="3" then
pencat=pencat&"'出版中...',"
elseif rsbclass("list_tai")="4" then
pencat=pencat&"'已暂停...',"
elseif rsbclass("list_tai")="5" then
pencat=pencat&"'已停止...',"
elseif rsbclass("list_tai")="6" then
pencat=pencat&"'已完成...',"
end if
pencat=pencat&"'"&rsbclass("list_zjian")&"');"
rsbclass.movenext
Next
end if
rsbclass.close
set rsbclass=nothing
file=server.mappath( ""&SiteSystemPath&"indexjs/list_top6.js" )
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set fout = fso.Createtextfile(file,1)
fout.writeline pencat
fout.close
set fout=nothing
set fso=nothing
pencat=""
End Function
'----------------------------------------------------------------------------------------
Function makesyft(syftNum)
set rs4=server.CreateObject("adodb.recordset")
sql4="select top 1 id,list_class,list_user,list_name,list_date,pic,list_all from [list_book] where Isweb_good = 1 and Lock_book = 0 order by id desc"
rs4.open sql4,conn,1,3
if not(rs4.bof and rs4.eof) then
dim classid
classid=rs4("list_class")
set rs5=server.createobject("adodb.recordset")
sql5="select * from list_type where typeid="&classid
rs5.open sql5,conn,1,1
pencat="document.write(""<table width=100% border=0 cellspacing=0 cellpadding=0><tr><td height=25 class=xt valign=middle style=padding-right:10><a target=_blank title='文章标题:"&unhtmllist(rs4("list_name"))&" "
pencat=pencat&" "
pencat=pencat&" 作 者:"&unhtmllist(rs4("list_user"))&""
pencat=pencat&" "
pencat=pencat&" 添加时间:"&rs4("list_date")&"' href="&SiteSystemPath&"look_book.asp?id="&rs4("id")&"><img class=pic1 height=125 src="&rs4("pic")&" width=96 border=0 align=left hspace=15 vspace=15></a> "
pencat=pencat&""&left(htmlencode(rs4("list_all")),300)&"......<br></td></tr><tr><td height=25><table width=90% border=0 align=right cellpadding=0 cellspacing=0><tr><td align=right valign=bottom>"
pencat=pencat&"[ <a target=_blank href="&SiteSystemPath&"look_book.asp?id="&rs4("id")&"><font color=red>点击阅读《"&unhtmllist(rs4("list_name"))&"》 作者:"&unhtmllist(rs4("list_user"))&"</font></a> ]</td></tr></table></td></tr></table>"");"
rs5.close
set rs5=nothing
else
pencat="document.write(""对不起,暂时没有作品!"");"
end if
rs4.close
set rs4=nothing
file=server.mappath( ""&SiteSystemPath&"indexjs/jrtj.js" )
'file=server.mappath( ""&SiteSystemPath&"indexjs/syft.js" )
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set fout = fso.Createtextfile(file,1)
fout.writeline pencat
fout.close
set fout=nothing
set fso=nothing
pencat=""
End Function
'-----------------------------------------------------------------------------------
Function makevipsyft(vipsyftNum)
set rs4=server.CreateObject("adodb.recordset")
sql4="select list_id,list_class,list_user,list_name,list_date,pic,list_all from [vip_book] where Isweb_good=1 and Lock_book=0 order by id desc"
rs4.open sql4,conn,1,3
pencat="document.write('<table border=0 cellpadding=0 cellspacing=0 valign=top width=100% ><tr>"
if not(rs4.bof and rs4.eof) then
dim classid
classid=rs4("list_class")
set rs5=server.createobject("adodb.recordset")
sql5="select list_tpye from [list_type] where typeid="&classid
rs5.open sql5,conn,1,1
pencat=pencat&"<td width=25% align=center valign=top><img src='"&rs4("pic")&"' width=100 height=142 border=0 align=left hspace=15 vspace=15><br></td>"
pencat=pencat&"<td width=75% align=left valign=top style=paddint-top:10;padding-bottom:10;line-height:180% ><table width=100% ><tr><td width=50% >作品名称:"&unhtmllist(rs4("list_name"))&"<br></td>"
pencat=pencat&"<td width=50% >作者:"&unhtmllist(rs4("list_user"))&"<br></td></tr><tr><td width=50% >作品类型:"&rs5("list_tpye")&"<br></td>"
pencat=pencat&"<td width=50% ><a href="&SiteSystemPath&"look_book.asp?id="&rs4("list_id")&" target=_blank>点击本书阅读公众版</a><br></td></tr><tr>"
pencat=pencat&"<td colspan=2 width=100% >内容简介:<br> "&left(htmlencode(rs4("list_all")),300)&"<br><br></td></tr></table>"
pencat=pencat&"<table width=90% border=0 align=right cellpadding=0 cellspacing=0><tr><td align=right valign=bottom>"
pencat=pencat&"[ <a target=_blank href="&SiteSystemPath&"look_vipbook.asp?id="&rs4("list_id")&"><font color=red>点击阅读《"&unhtmllist(rs4("list_name"))&"》 作者:"&unhtmllist(rs4("list_user"))&" VIP章节</font></a> ]</td></tr></table></td>"
rs5.close
set rs5=nothing
else
pencat=pencat&"<td width=70% valign=top>对不起,暂时没有作品!</td>"
end if
rs4.close
set rs4=nothing
pencat=pencat&"</tr></table>');"
file=server.mappath( ""&SiteSystemPath&"indexjs/vipjrtj.js" )
'file=server.mappath( ""&SiteSystemPath&"indexjs/vipsyft.js" )
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set fout = fso.Createtextfile(file,1)
fout.writeline pencat
fout.close
set fout=nothing
set fso=nothing
pencat=""
End Function
'-----------------------------------------------------------------------------------
Function makejptj(jptjNum)
pencat1="document.write('<table width=100% border=1 cellspacing=0 cellpadding=0 bordercolordark=white bordercolorlight=cccccc bordercolor=white><tr height=26>"
set rsmake=server.CreateObject("ADODB.Recordset")
sql = "select top " & jptjNum & " id,list_class,list_user,list_name,list_all,pic from [list_book] where Isgood=1 and Lock_book=0 order by id desc"
rsmake.open sql,conn,1,1
i=1
do while not rsmake.eof
pencat2=pencat2&"<td height=26 align=left width=33% ><table width=100% border=0 align=center cellpadding=0 cellspacing=2>"
pencat2=pencat2&"<tr><td width=11% valign=top align=left><a href="""&SiteSystemPath&"look_book.asp?id="&rsmake("id")&""" target=_blank ><img src="""&rsmake("pic")&""" width=70 height=100 border=0 style=""border: 1 solid #000000""></a></td>"
pencat2=pencat2&"<td width=22% valign=top align=left><table border=0 cellspacing=0 cellpadding=1><tr valign=top><td height=20>名称:</td>"
pencat2=pencat2&"<td><a href="&SiteSystemPath&"look_book.asp?id="&rsmake("id")&" target=_blank><u><font color=#FF6600>"&unhtmllist(rsmake("list_name"))&"</font></a></u></td>"
pencat2=pencat2&"</tr><tr valign=top><td width=35>作者:</td><td height=20><font color=#000000>"&unhtmllist(rsmake("list_user"))&"</a></font></td></tr>"
set rs5=server.createobject("adodb.recordset")
sql5="select list_tpye from [list_type] where typeid="&rsmake("list_class")&""
rs5.open sql5,conn,1,1
pencat2=pencat2&"<tr valign=top><td height=20>类型:</td><td>"&rs5("list_tpye")&"</td></tr>"
rs5.close
set rs5=nothing
pencat2=pencat2&"<tr valign=top><td height=20>简介:</td><td>"&left(htmlencode(rsmake("list_all")),30)&"</td></tr></table></td></tr></table></td>"
if i mod 3=0 then
pencat2=pencat2&"</tr><tr height=26>"
else
end if
i=i+1
rsmake.movenext
loop
rsmake.close
set rsmake=nothing
pencat=pencat1&pencat2&"</tr></table>');"
file=server.mappath( ""&SiteSystemPath&"indexjs/jptj.js" )
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set fout = fso.Createtextfile(file,1)
fout.writeline pencat
fout.close
set fout=nothing
set fso=nothing
pencat=""
End Function
'-------------------------------------------------------------------------------------
Function makevipjptj(vipjptjNum)
pencat1="document.write('<table width=100% border=1 cellspacing=0 cellpadding=0 bordercolordark=white bordercolorlight=cccccc bordercolor=white><tr height=26>"
set rsmake=server.CreateObject("ADODB.Recordset")
sql = "select top " & vipjptjNum & " list_id,list_class,list_user,list_name,list_all,pic from [vip_book] where Isgood=1 and Lock_book=0 order by id desc"
rsmake.open sql,conn,1,1
i=1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -