📄 syscode_flash.asp
字号:
<%
'****************************************************
dim cs_id,cscat_id
dim founderr,errmsg,RsHxcms
if request.querystring("cat_id")<>"" then
if not isInteger(request.querystring("cat_id")) then
Response.Redirect "show_error.asp?eid=传值参数非法!"
Response.End
end if
cat_id=CLng(request("cat_id"))
else
cat_id=0
end if
if request.querystring("id")<>"" then
if not isInteger(request.querystring("id")) then
Response.Redirect "show_error.asp?eid=传值参数非法!"
Response.End
end if
id=CLng(request("id"))
else
id=0
end if
if id>0 then
sql="select * from flash where id="&id
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
if rs.bof and rs.eof then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>你要找的动漫不存在,或者已经被管理员删除!</li>"
else
start="精彩动漫 - "&rs("Title")&""
cat_id=CLng(rs("cat_id"))
rs("hits")=rs("hits")+1
rs.update
sql="select cat_id,cat_name from f_cat where cat_id="&rs("cat_id")
set rscat=conn.execute(sql)
cat_name=rscat("cat_name")
rscat.close
set rscat=nothing
end if
end if
'=================================================
if FoundErr=True then
Call HxErrMsg()
response.end
end if
'=================================================
'过程名:main_flash
'作 用:显示动漫位置导航
'参 数:无
'Web: www.ynsky.com.cn
'=================================================
sub main_flash()
if cat_id>0 then
Response.Write " 您的位置: <a href='index.asp'>"&webname&"</a> >> <a href='flash.asp'>精彩动漫</a>" & vbCrLf
sql="select * from f_cat where cat_id="&cat_id
set rs3=conn.execute(sql)
if rs3.eof then
Response.Redirect "show_error.asp?eid=参数错误,找不到相关的记录!"
Response.End
End IF
Response.Write " >> <a href=""flash.asp?cat_id="&rs3("cat_id")&""">"&rs3("cat_name")&"</a>"
rs3.close
set rs3=nothing
else
Response.Write " 您的位置: <a href='index.asp'>"&webname&"</a> >> <a href='flash.asp'>精彩动漫</a>" & vbCrLf
end if
end sub
'=================================================
'过程名:top_flash
'作 用:热门动漫排行
'参 数:n-调用条数,nn-标题长度
' NewWindows-----是否新窗打开,True为是,False为否
'Web: www.ynsky.com.cn
'=================================================
sub top_flash(n,nn,NewWindows)
dim nnn,topswf
if NewWindows=True then
nnn="target='_blank'"
else
nnn=""
end if
topswf="320"
Response.Write "<TABLE width='100%' cellSpacing=0 cellPadding=0 border=0 align='center'>" & vbCrLf
set RsHxcms=server.createobject("adodb.recordset")
set RsHxcms=conn.execute("SELECT top "&n&" * FROM flash where Hits>="&topswf&" ORDER by id DESC")
do while not RsHxcms.eof
Response.Write "<tr><td height=22 class=table-xia><font color=#FF0000>·</font><a href='showflash.asp?id="&RsHxcms("id")&"' Title='动漫名称:"&RsHxcms("title")&"
查看次数:"&RsHxcms("hits")&"
上传时间:"&RsHxcms("time")&"' "& nnn &">"&gotTopic(RsHxcms("title"),nn)&"</a></td></tr>" & vbCrLf
RsHxcms.movenext
loop
if RsHxcms.bof and RsHxcms.eof then
Response.Write "<tr><td align='center' valign='middle'>当前没有动漫!</td></tr>"
end if
RsHxcms.close
set RsHxcms=nothing
Response.Write "</TABLE>" & vbCrLf
end sub
'=================================================
'过程名:best_flash
'作 用:推荐动漫
'参 数:n-调用条数,nn-标题长度
' NewWindows-----是否新窗打开,True为是,False为否
'Web: www.ynsky.com.cn
'=================================================
sub best_flash(n,nn,NewWindows)
dim nnn
if NewWindows=True then
nnn="target='_blank'"
else
nnn=""
end if
Response.Write "<TABLE width='100%' cellSpacing=0 cellPadding=0 border=0 align='center'>" & vbCrLf
set RsHxcms=server.createobject("adodb.recordset")
set RsHxcms=conn.execute("SELECT top "&n&" * FROM flash where isbest = 1 order by id desc")
do while not RsHxcms.eof
Response.Write "<tr><td height=22 class=table-xia><font color=#FF0000>·</font><a href='showflash.asp?id="&RsHxcms("id")&"' Title='动漫名称:"&RsHxcms("title")&"
查看次数:"&RsHxcms("hits")&"
上传时间:"&RsHxcms("time")&"' "& nnn &">"&gotTopic(RsHxcms("title"),nn)&"</a></td></tr>" & vbCrLf
RsHxcms.movenext
loop
if RsHxcms.bof and RsHxcms.eof then
Response.Write "<tr><td align='center' valign='middle'>没有推荐动漫!</td></tr>"
end if
RsHxcms.close
set RsHxcms=nothing
Response.Write "</TABLE>" & vbCrLf
end sub
'=================================================
'过程名:class_flash
'作 用:动漫分类——横排
'参 数:无
'Web: www.ynsky.com.cn
'=================================================
sub class_flash()
sql="select * from f_cat"
set RsHxcms=server.createobject("adodb.recordset")
RsHxcms.open sql,conn,1,1
do while not RsHxcms.eof
if request("cat_id")=cstr(RsHxcms("cat_id")) then
response.write "<font color=""#FF0000"">·"&RsHxcms("cat_name")&"</font> "
else
response.write "<a href='?cat_id="&RsHxcms("cat_id")&"'>·"&RsHxcms("cat_name")&"</a> "
end if
RsHxcms.movenext
loop
if RsHxcms.bof and RsHxcms.eof then
response.write "当前没有分类 "
end if
RsHxcms.close
set RsHxcms=nothing
end sub
'=================================================
'过程名:search_flash
'作 用:显示动漫搜索表单
'参 数:无
'Web: www.ynsky.com.cn
'=================================================
sub search_flash()
Response.Write "<form name='form2' method='post' action='flash.asp'><div align=center><input type='radio' name='select' value='title' checked class='inuptCG'>名称 <input type='radio' name='select' value='Content' class='inuptCG'>简介 <input type='radio' name='select' value='review' class='inuptCG'>评论<input type='text' name='keyword' size='15' value='搜索关键字' maxlength='50' onfocus=""this.value=''"" class='input'> <input type='submit' name='search' value='搜索' onmouseover=""this.className='boton'"" onmouseout=""this.className='botoff'""></form>" & vbCrLf
end sub
'=================================================
'过程名:displayList_flash
'作 用:带分页功能的动漫列表
'参 数:nn-标题长度,Hxperpage-每页显示条数
'Web: www.ynsky.com.cn
'=================================================
sub displayList_flash(nn,Hxperpage)
Dim CurPage,Url_Add
Url_Add="?"
If Request.QueryString("Page")<>"" Then
Curpage=Request.QueryString("Page")
If IsInteger(Curpage)=False Then Curpage=1
Else
Curpage=1
End If
if request("keyword")<>"" then
if instr(request("keyword"),"'")>0 then
Response.Write "<script language=javascript>alert('搜索参数非法');javascript:history.back();</script>"
Response.End
end if
end if
if request.querystring("cat_id")<>"" then
sql="select * from flash where cat_id="&request.querystring("cat_id")&" order by id DESC"
Url_Add=Url_Add&"cat_id="&cat_id&"&"
elseif request("keyword")<>"" and (request("select")="title" or request("select")="Content" or request("select")="review") then
sql="select * from flash where "&request("select")&" like '%"&Jencode(checkspace(request("keyword")))&"%' order by id DESC"
Url_Add=Url_Add&"select="&request("select")&"&keyword="&Server.URLEncode(request("keyword"))&"&"
else
sql="select * from flash order by id DESC"
end if
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
Response.Write "<table width='100%' border='1' align='center' cellspacing='0' cellpadding='0' bgcolor='#FFFFFF' bordercolor='#f0f0f0' style='border-collapse: collapse'>" & vbCrLf
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -