📄 list.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="inc/const.asp"-->
<%tmp = "http://" & request.servervariables("SERVER_NAME") & _
left(request.servervariables("SCRIPT_NAME"),len(request.servervariables("SCRIPT_NAME"))-len("/list.asp"))
dim classname,classid,Nclassname,Nclassid
dim lasthits
dim title
if request("id")="" then
response.write "您没有选择相关软件,请返回"
response.end
end if
if not isnumeric(request("id")) then
response.redirect "index.asp"
response.end
end if
set rs=server.createobject("adodb.recordset")
sql="select class.class,Nclass.Nclass,download.showname,download.bb,download.classid,download.Nclassid,download.lasthits,download.kind from download,class,Nclass where download.classid=class.classid and download.Nclassid=Nclass.Nclassid and download.ID="&request("id")
rs.open sql,conn,1,1
if not (rs.bof and rs.eof) then
showname=rs("showname")
bb=rs("bb")
kind=rs("kind")
classid=rs("classid")
Nclassid=rs("Nclassid")
classname=rs("class")
Nclassname=rs("Nclass")
lasthits=rs("lasthits")
else
response.redirect "index.asp"
response.end
end if
rs.close
'更新每周每日数据
tdate=year(Now()) & "-" & month(Now()) & "-" & day(Now())
if trim(lasthits)=trim(tdate) then
sql="update download set dayhits=dayhits+1 where id="&request("id")
conn.Execute(sql)
' response.write "success"
else
sql="update download set dayhits=1 where id="&request("id")
conn.Execute(sql)
' response.write "error"
end if
sql="update download set hits=hits+1,lasthits='"&tdate&"' where ID="&request("id")
conn.Execute(sql)
p_year=CInt(year(Now()))-CInt(year(lasthits))
p_month=CInt(month(Now()))-CInt(month(lasthits))
p_day=CInt(day(Now()))-CInt(day(lasthits))
period_time=((p_year*12+p_month)*30+p_day)
if cint(period_time)=<cint(7) then
sql="update download set weekhits=weekhits+1 where id="&request("id")
conn.Execute(sql)
else
sql="update download set weekhits=1 where id="&request("id")
conn.Execute(sql)
end if
%>
<HTML><HEAD>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<TITLE>【<%=HostName%>】:<%=classname%>:<%=Nclassname%>:<%=showname%> <%=bb%> [ <%=HostUrl%>]</TITLE><link rel="stylesheet" href="images/style.css">
<script language="JavaScript">
<!--
function Showvote(id)
{
var filename="vote.asp?id="+id;
window.open(filename,"显示窗口","scrollbars=yes,width=350,height=300,status=yes,resizable=yes");
}
//--></SCRIPT></HEAD>
<body <%=ForumBody%>>
<!--#include file="topMain.asp"-->
<div align="center">
<center><table width="778" border="0" cellpadding="0" cellspacing="0" bgcolor="<%=TableTitleColor%>" style="border-collapse: collapse" background="image/bot_1.gif" style="border-top: 1px solid #FFFFFF; border-bottom: 1px solid #FFFFFF"><TR><TD height=25 width="400" class="BorderOn"><form method="post" name="myform" action="search.asp"> <b>搜索:</b><input type="text" name="keyword" style="BORDER: 1 solid; FONT-SIZE: 9pt; WIDTH: 100px" size="20"> <input onClick=myform.submit type=image src="images/go1.gif" border=0 name=I1 align="absmiddle" loop="0"> </TD></form><TD height=25 width="52"></TD><TD align=center valign=middle height=25 width="300" class="BorderOn"><SCRIPT language=JavaScript>
function initArray()
{
this.length = initArray.arguments.length
for (var i = 0; i < this.length; i++)
this[i+1] = initArray.arguments[i]
}
var WeekArray = new initArray("星期日","星期一","星期二","星期三","星期四","星期五","星期六");
var MonthArray = new initArray("1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月");
var LastModDate = new Date(document.lastModified);
document.write(LastModDate.getYear()+0000,"年");
document.write(MonthArray[(LastModDate.getMonth()+1)]);
document.write(LastModDate.getDate()+"日 ");
document.write(WeekArray[(LastModDate.getDay()+1)]);
</SCRIPT></FONT></TD></TR></TBODY></table></center></div><div align="center">
<center><table width="778" border="0" cellpadding="0" cellspacing="1" class="BorderOn" style="border-collapse: collapse" bgcolor=<%=tableTitlecolor%> background="image/dhback.gif" height="25"><tr><td height="24" class="BorderOn"> 您的位置:<a href="index.asp"><font color="<%=tableFontcolor%>"><%=HostName%>首页</font></a> -> <a href="sort.asp?classid=<%=classid%>"><font color=<%=tableFontcolor%>><%=classname%></font></a>
-> <A href=sort.asp?classid=<%=classid%>&Nclassid=<%=Nclassid%>><font color=<%=tableFontcolor%>><%=Nclassname%></font></A>
-> <%=showname%> <%=bb%></td></tr></table></center></div><div align="center"><center>
<table width="778" border="0" cellpadding="0" cellspacing="0" bgcolor="<%=tableBodycolor%>" style="border-collapse: collapse"><tr><td valign="top" bgcolor="<%=atablebodycolor%>"><div align="center"><center><table border=0 cellpadding=0 cellspacing=0 width="100%" style="border-collapse: collapse" bgcolor="<%=atablebackcolor%>"><tr><td valign="top"><div align="center"><center><table border=1 cellpadding=0 width="100%" bgcolor="<%=tableTitlecolor%>" cellspacing=0 style="border-collapse: collapse" bordercolor="<%=atableBackcolor%>"><tr><td height="20" bgcolor="#000000"><div align="center"><a href='sort.asp?classid=<%=classid%>'><font color="#FFFFFF"><b><%=classname%></b></font></a></div></td></tr><tr align=middle><td bgcolor="<%=tableTitlecolor%>" valign="top"><table border=0 cellpadding=0 cellspacing=0 width=100% height="100" align="center"><tr><td bgcolor=<%=tablecontentcolor%> valign=top><font style=line-height:150%><%
if classid="" then
sql="select Nclass,Nclassid from Nclass where classid=1"
else
sql="select Nclass,Nclassid from Nclass where classid="&classid
end if
rs.open sql,conn,1,1%></font><table width="100%" border="0" cellspacing="0"><%do while not rs.eof%><tr><td align="center"><%if not Rs.eof then%><a href="sort.asp?classid=<%=classid%>&Nclassid=<%=rs("Nclassid")%>"><font color=<%=contentTitle%>><%=Rs("Nclass")%></font></a></td>
<%rs.movenext
end if %>
</tr>
<%loop
Rs.Close
%></table></td></tr></table></td></tr></table></center></div></td></tr><tr><td height="20" bgcolor="<%=tableTitlecolor%>"><div align="center"><font color=<%=tablefcolor%>><b>今日下载Top</b></font></div></td></tr><tr align=middle><td bgcolor="<%=atabletitlecolor%>" valign="top"> <table border=0 cellpadding=0 cellspacing=0 width="100%" height="150" style="border-collapse: collapse"><tr><td height="20" bgcolor="<%=atabletitlecolor%>" width="4%"></td><td bgcolor="<%=atabletitlecolor%>" valign="top" width="100%"><font style=line-height:150%><%
dim tdate
tdate=year(Now()) & "-" & month(Now()) & "-" & day(Now())
sql="select top "&DayTop&" id,showname,bb from download where "
sql=sql&" lasthits=date() and dayhits>0"
sql=sql&" order by dayhits desc"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "本日没有下载"
else
do while not rs.eof
response.write "<LI><A href=list.asp?id="&rs("id")&">"&rs("showname")&" "&rs("bb")&"</A></LI>"
i=i+1
if i>=DayTop then exit do
rs.movenext
loop
i="0"
end if
rs.close
%></font></td></tr></table></td></tr></table></center></div><table border=1 cellpadding=0 width="100%" bgcolor="<%=tableTitlecolor%>" cellspacing=0 style="border-collapse: collapse" bordercolor="<%=atableBackcolor%>">
<tr><td height="20" bgcolor="<%=tabletitlecolor%>"><div align="center"><font color=<%=tablefcolor%>><b>本周下载Top</b></font></div></td></tr><tr align=middle><td bgcolor="<%=atabletitlecolor%>" colspan=4 valign="top"><table border=0 cellpadding=0 cellspacing=0 width="100%" height="150" style="border-collapse: collapse"><tr><td bgcolor=<%=atabletitlecolor%> valign=top width=4></td><td bgcolor=<%=atabletitlecolor%> valign=top width="96%"><font style=line-height:150%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -