📄 allarray.asp
字号:
<!--#include file="../webconfig.asp"--><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=webname%></title>
<LINK
href="../style/style.css" rel=stylesheet type=text/css>
</head>
<table cellspacing=0 cellpadding=0 width="100%" height="100%" align=center border=0 oncontextmenu=self.event.returnValue=false onselectstart="return false">
<tbody>
<tr>
<td align=middle background="../images/yellow_10.gif" height=23>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="15%" height="15">
<div align="CENTER"><img src="../style/paihang.gif" width="14" height="14"></div>
</td>
<td width="85%" height="15"><font color="#000000">下 载 排
行 <%
on error resume next
dim conn2,connstr2,bentop,strSQLq,phpd,arraymethod
connstr2="DBQ="+server.mappath("../db/db.asp")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
set conn2=server.createobject("ADODB.CONNECTION")
conn2.open connstr2
arraymethod=request.QueryString("action")
select case arraymethod
case "mon"
strSQLq ="SELECT top 10 id,title,monthhits,typeid FROM film ORDER BY monthhits DESC"
response.Write("|<a href='allarray.asp?acrion=all' target='_self'>总</a>|月|<a href='allarray.asp?action=week' target='_self'>周</a>|")
case "week"
strSQLq ="SELECT top 10 id,title,weekhits,typeid FROM film ORDER BY weekhits DESC"
response.Write("|<a href='allarray.asp?action=all' target='_self'>总</a>|<a href='allarray.asp?action=mon' target='_self'>月</a>|周|")
case else
strSQLq ="SELECT top 10 id,title,hits,typeid FROM film ORDER BY hits DESC"
response.Write("|总|<a href='allarray.asp?action=mon' target='_self'>月</a>|<a href='allarray.asp?action=week' target='_self'>周</a>|")
end select%>
</font></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table cellspacing=5 cellpadding=0 width="100%" align=center border=0 height="100%" background="../images/yellow_11.gif">
<tbody>
<tr>
<td valign=top height="58">
<%
Set bentop = Server.CreateObject("ADODB.Recordset")
bentop.open strSQLq,Conn2,1,1
if bentop.eof then
response.write "<font color='#ffffff'>暂无影片排行</font>"
else
phpd=0
do while (not bentop.eof) and (phpd<10)
%>
<div align="left">
<table width="95%" align="center" cellspacing="0" height="20" cellpadding="1">
<tr>
<td width="86%"><a href="../showfilm.asp?id=<%=bentop("id")%>&typeid=<%=bentop("typeid")%>" title="<%=bentop("title")%>" target="_parent"><%
if len(bentop("title"))<9 then
response.Write(bentop("title"))
else
response.Write(left(bentop("title"),8)&"…")
end if
%></font></a><font color=#FFFFFF>
</font></td>
<td width="14%" align="center"><font color=#FF0000><%
select case arraymethod
case "mon"
response.Write(bentop("monthhits"))
case "week"
response.Write(bentop("weekhits"))
case else
response.Write(bentop("hits"))
end select
%></td>
</tr>
</table>
<%bentop.movenext
phpd=phpd+1
loop
end if
bentop.close
set bentop=nothing
%>
</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td><img height=1 src="../images/yellow_13.gif" width=160></td>
</tr>
</tbody>
</table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -