22flashchannel.asp
来自「小游戏网站演示www.4399.io 拥有4万条游戏数据」· ASP 代码 · 共 1,494 行 · 第 1/5 页
ASP
1,494 行
<!--#include file="ubbcode.asp"-->
<%
dim newcloud
set newcloud = new flashchannel_cls
class flashchannel_cls
private channelid, createhtml, isshowflush
private rs,sql,channelrootdir,htmlcontent,strindexname,htmlfilepath
private flashid,classid,skinid,strinstalldir
private strfiledir, parentid, strparent, strclassname, childstr, child
private maxperpage, totalnumber, totalpagenum, currentpage, i,j
private forbidessay,listcontent,htmltemplate,templistcontent
private founderr,pagetype,keyword,strlen,m_strcurrpagename
private specialid, specialname, specialdir,m_strfiledir
public makehtmlmode,makepagedone,makelistnum,strbasicpath
public property let channel(chanid)
channelid = chanid
end property
public property let showflush(para)
isshowflush = para
end property
private sub class_initialize()
on error resume next
channelid = 5
pagetype = 0
founderr = false
strlen = 0
makehtmlmode = 0
makepagedone = 0
'--每页生成数
makelistnum = 50
end sub
private sub class_terminate()
set html = nothing
end sub
public sub mainchannel()
newasp.readchannel(channelid)
createhtml = cint(newasp.iscreatehtml)
if newasp.binddomain = "0" then
channelrootdir = newasp.installdir & newasp.channeldir
strbasicpath = ""
strinstalldir = newasp.installdir
else
channelrootdir = "/"
strinstalldir = newasp.siteurl & "/"
if len(newasp.namedpath) > 2 then
strbasicpath = newasp.namedpath
else
strbasicpath = server.mappath(newasp.installdir & newasp.channeldir)
end if
end if
strindexname = "<a href=""" & channelrootdir & """>" & newasp.channelname & "</a>"
ubb.basepath = channelrootdir
ubb.setubbcode = join(newasp.setusereditor,"|")
ubb.keyword = newasp.contentkeyword
end sub
'=================================================
'过程名:buildflashindex
'作 用:显示flash首页
'=================================================
public sub buildflashindex()
loadflashindex
if createhtml <> 0 then
response.write "<meta http-equiv=""refresh"" content=""0;url=index" & newasp.htmlextname & """ />"
else
response.write htmlcontent
end if
end sub
'=================================================
'过程名:createflashindex
'作 用:生成动画首页的html
'=================================================
public sub createflashindex()
loadflashindex
dim filepath
if newasp.binddomain = "0" then
filepath = channelrootdir & "index" & newasp.htmlextname
else
filepath = "\index" & newasp.htmlextname
end if
newasp.createdtextfile strbasicpath & filepath, htmlcontent
if isshowflush = 1 then response.write "<li style=""font-size: 12px;"">生成" & newasp.modulename & "首页html完成... " & filepath & "</li>" & vbnewline
response.flush
end sub
private sub loadflashindex()
newasp.loadtemplates channelid, 1, newasp.chknumeric(newasp.channelskin)
htmlcontent = newasp.htmlcontent
htmlcontent = replace(htmlcontent,"{$channelrootdir}", channelrootdir)
htmlcontent = replace(htmlcontent,"{$installdir}", strinstalldir)
htmlcontent = replace(htmlcontent,"{$channelid}", channelid)
htmlcontent = replace(htmlcontent,"{$articleid}", rs("flashid"))
htmlcontent = replace(htmlcontent, "{$channelname}", newasp.channelname)
htmlcontent = replace(htmlcontent,"{$pagetitle}", newasp.channelname)
htmlcontent = replace(htmlcontent,"{$modulename}", newasp.modulename)
htmlcontent = replace(htmlcontent,"{$flashindex}", strindexname)
htmlcontent = replace(htmlcontent, "{$indextitle}", strindexname)
htmlcontent = html.readannouncecontent(htmlcontent,channelid)
htmlcontent = readclassmenu(htmlcontent)
htmlcontent = readclassmenubar(htmlcontent)
htmlcontent = html.readarticlepic(htmlcontent)
htmlcontent = html.readsoftpic(htmlcontent)
htmlcontent = html.readsoftlist(htmlcontent)
htmlcontent = html.readarticlelist(htmlcontent)
htmlcontent = html.readflashlist(htmlcontent)
htmlcontent = html.readflashpic(htmlcontent)
htmlcontent = html.readfriendlink(htmlcontent)
htmlcontent = html.readguestlist(htmlcontent)
htmlcontent = html.readannouncelist(htmlcontent)
htmlcontent = html.readpopulararticle(htmlcontent)
htmlcontent = html.readpopularsoft(htmlcontent)
htmlcontent = html.readpopularflash(htmlcontent)
htmlcontent = html.readstatistic(htmlcontent)
htmlcontent = html.readuserrank(htmlcontent)
htmlcontent = replace(htmlcontent, "{$skinpath}", newasp.skinpath)
htmlcontent = replace(htmlcontent,"{$installdir}", newasp.installdir)
htmlcontent = htmlcontent
end sub
'#############################\\动画信息开始//#############################
'=================================================
'过程名:buildflashinfo
'作 用:显示动画详细页面
'=================================================
public sub buildflashinfo()
if createhtml <> 0 then
response.redirect (channelrootdir & "index" & newasp.htmlextname)
exit sub
else
newasp.preventinfuse
flashid = newasp.chknumeric(request("id"))
response.write loadflashinfo(flashid)
end if
end sub
public function loadflashinfo(flashid)
dim introduce, subtitle, headertitle,headertitles,headertopic
dim previewimg,previewurl
sql = "select a.*,c.classname,c.parentid,c.parentstr,c.skinid,c.htmlfiledir,c.childstr,c.usehtml,c.adscode,c.stopad from [nc_flashlist] a inner join [nc_classify] c on a.classid=c.classid where a.channelid=" & channelid & " and a.isaccept > 0 and a.flashid=" & flashid
set rs = newasp.execute(sql)
if rs.bof and rs.eof then
loadflashinfo = ""
if createhtml = 0 then
response.write "<meta http-equiv=""refresh"" content=""2;url=/"" />" & vbnewline
response.write "<p align=""center"" style=""font-size: 16px;color: red;"">对不起,该页面发生了错误,无法访问! 系统两秒后自动转到网站首页......</p>" & vbnewline
end if
set rs = nothing
exit function
end if
if rs("skinid") <> 0 then
skinid = rs("skinid")
else
skinid = newasp.chknumeric(newasp.channelskin)
end if
dim thisurl
newasp.loadtemplates channelid, 3, skinid
htmlcontent = newasp.htmlcontent
if newasp.checknull(rs("miniature")) then
previewurl = newasp.getimageurl(rs("miniature"), channelrootdir)
previewimg = newasp.getflashandpic(previewurl, newasp.chknumeric(newasp.htmlsetting(9)), newasp.chknumeric(newasp.htmlsetting(10)))
else
previewurl = ""
previewimg = newasp.htmlsetting(8)
end if
'--当前页url
if createhtml <> 0 then
thisurl = newasp.readdestination(newasp.infodestination, newasp.channeldir, rs("htmlfiledate"),rs("htmlfiledir"),rs("classid"),rs("flashid"),1,"")
else
if isurlrewrite then
thisurl = channelrootdir & rs("flashid") & newasp.htmlextname
else
thisurl = channelrootdir & "show.asp?id=" & rs("flashid")
end if
end if
introduce = ubb.ubbcode(rs("introduce"))
'--副标题
subtitle = rs("subtitle") & ""
'-- 新增分类广告代码
htmlcontent = adsreplace(htmlcontent,rs("adscode"),rs("stopad"))
htmlcontent = replace(htmlcontent, "{$installdir}", strinstalldir)
htmlcontent = replace(htmlcontent, "{$channelrootdir}", channelrootdir)
htmlcontent = replace(htmlcontent, "{$channelid}", channelid)
htmlcontent = replace(htmlcontent,"{$articleid}", rs("flashid"))
htmlcontent = replace(htmlcontent,"{$flashindex}", strindexname)
htmlcontent = replace(htmlcontent, "{$indextitle}", strindexname)
htmlcontent = replace(htmlcontent, "{$thisurl}", thisurl)
htmlcontent = replace(htmlcontent, "{$best}", rs("isbest"))
htmlcontent = replace(htmlcontent, "{$star}", newasp.chknumeric(rs("star")))
htmlcontent = replace(htmlcontent, "{$dateandtime}", rs("addtime")&"")
htmlcontent = replace(htmlcontent, "{$classname}", rs("classname"))
htmlcontent = replace(htmlcontent, "{$author}", newasp.chknull(rs("author")))
htmlcontent = replace(htmlcontent, "{$describe}", newasp.chknull(rs("describe")))
htmlcontent = replace(htmlcontent, "{$username}", rs("username")&"")
htmlcontent = replace(htmlcontent, "{$grade}", rs("grade"))
htmlcontent = replace(htmlcontent, "{$istop}", rs("istop"))
htmlcontent = replace(htmlcontent, "{$previewurl}", previewurl)
htmlcontent = replace(htmlcontent, "{$previewimg}", previewimg)
htmlcontent = replace(htmlcontent, "{$filesize}", readfilesize(rs("filesize")))
htmlcontent = replace(htmlcontent, "{$comefrom}", readcomefrom(rs("comefrom")&""))
htmlcontent = replace(htmlcontent, "{$introduce}", introduce)
htmlcontent = replace(htmlcontent, "{$display}", previewmode(rs("showurl")&"",rs("showmode")))
htmlcontent = replace(htmlcontent, "{$showthisurl}", newasp.chknull(rs("showurl")))
htmlcontent = replace(htmlcontent, "{$showfullurl}", formatshowurl(rs("showurl")&""))
htmlcontent = getdescription(htmlcontent, introduce)
if instr(htmlcontent, "{$description}") > 0 then
htmlcontent = replace(htmlcontent, "{$description}", newasp.cutstring(introduce,190))
end if
if instr(htmlcontent, "{$backflash}") > 0 then
htmlcontent = replace(htmlcontent, "{$backflash}", backflash(flashid))
end if
if instr(htmlcontent, "{$nextflash}") > 0 then
htmlcontent = replace(htmlcontent, "{$nextflash}", nextflash(flashid))
end if
if instr(htmlcontent, "{$flashcomment}") > 0 then
htmlcontent = replace(htmlcontent, "{$flashcomment}", flashcomment(rs("flashid")))
end if
if instr(htmlcontent, "{$relatedflash}") > 0 then
htmlcontent = replace(htmlcontent, "{$relatedflash}", relatedflash(newasp.chknull(rs("related")), rs("title"), rs("flashid")))
end if
htmlcontent = replace(htmlcontent, "{$showurl}", newasp.chknull(rs("showurl")))
htmlcontent = replace(htmlcontent, "{$modulename}", newasp.modulename)
htmlcontent = replace(htmlcontent, "{$pagetitle}", rs("title"))
htmlcontent = replace(htmlcontent, "{$classid}", rs("classid"))
htmlcontent = replace(htmlcontent, "{$flashtitle}", rs("title"))
htmlcontent = replace(htmlcontent, "{$flashid}", rs("flashid"))
htmlcontent = html.readcurrentstation(htmlcontent, channelid, rs("classid"), rs("classname"), rs("parentid"), rs("parentstr"), rs("htmlfiledir"))
htmlcontent = html.readannouncecontent(htmlcontent, channelid)
htmlcontent = readclassmenubar(htmlcontent)
htmlcontent = readclassmenu(htmlcontent)
htmlcontent = html.readflashpic(htmlcontent)
htmlcontent = html.readflashlist(htmlcontent)
htmlcontent = html.readpopularflash(htmlcontent)
htmlcontent = html.readarticlepic(htmlcontent)
htmlcontent = html.readsoftpic(htmlcontent)
htmlcontent = html.readarticlelist(htmlcontent)
htmlcontent = html.readsoftlist(htmlcontent)
htmlcontent = html.loadcommentgrade(htmlcontent, channelid, rs("flashid"))
htmlcontent = replace(htmlcontent, "{$classify}", trim(html.currentclass))
htmlcontent = replace(htmlcontent, "{$currentclass}", html.currentclass)
if len(subtitle) = 0 then
headertitle = trim(html.currentclass)
headertitles = ""
headertopic = ""
else
headertitle = subtitle
headertitles = " - " & subtitle
headertopic = subtitle
end if
htmlcontent = replace(htmlcontent, "{$headertitle}", headertitle)
htmlcontent = replace(htmlcontent, "{$headertitles}", headertitles)
htmlcontent = replace(htmlcontent, "{$headertopic}", headertopic)
htmlcontent = replace(htmlcontent, "{$parentclass}", html.parentclass)
htmlcontent = replace(htmlcontent, "{$channelrootdir}", channelrootdir)
htmlcontent = replace(htmlcontent, "{$skinpath}", newasp.skinpath)
htmlcontent = replace(htmlcontent, "{$installdir}", strinstalldir)
htmlcontent = replace(htmlcontent, "{$channelid}", channelid)
htmlcontent = replace(htmlcontent,"{$articleid}", rs("flashid"))
if createhtml <> 0 then
call createflashinfo
else
loadflashinfo = htmlcontent
end if
rs.close: set rs = nothing
end function
'=================================================
'过程名:createflashinfo
'作 用:生成flash信息html
'=================================================
private sub createflashinfo()
dim htmlfilename
htmlfilename = newasp.readdestination(newasp.infodestination, newasp.channeldir, rs("htmlfiledate"),rs("htmlfiledir"),rs("classid"),rs("flashid"),1,"")
htmlfilepath = newasp.htmlfilespath
newasp.creatpathex (strbasicpath & htmlfilepath)
newasp.createdtextfile strbasicpath & htmlfilename, htmlcontent
if isshowflush = 1 then
response.write "<li style=""font-size: 12px;"">生成" & newasp.modulename & "信息html完成... <a href=" & htmlfilename & " target=_blank>" & htmlfilename & "</a></li>" & vbnewline
response.flush
end if
end sub
private function getdescription(byval str,byval strintro)
dim strtemp, i
dim stempcontent, ntempcontent
dim arrtempcontent, arrtempcontents, strlen
if len(strintro) = 0 then
getdescription = str
exit function
end if
strtemp = str
if instr(strtemp, "{$description(") > 0 then
stempcontent = newasp.cutmatchcontent(strtemp, "{$description(", ")}", 1)
ntempcontent = newasp.cutmatchcontent(strtemp, "{$description(", ")}", 0)
arrtempcontents = split(stempcontent, "|||")
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?