id=CInt(Request.QueryString("id"))
%>
软件列表 - 3鸟设社下载系统
BODY {
scrollbar-face-color : ;
scrollbar-shadow-color : ;
scrollbar-highlight-color : ;
scrollbar-3dlight-color : ;
scrollbar-darkshadow-color : ;
scrollbar-track-color : ;
scrollbar-arrow-color : ;
}
.mouseover {
background-color: ;
border: 1px solid ;
}
.mouseout {
background-color: ;
}
.mouseout2 {
background-color: ;
}
当前位置:首页
sql="select ClassName,ParentStr,ParentID from Class where ID="&id
set rs=conn.execute(sql)
ClassName=rs(0)
ParentStr=Split(rs(1),",")
ParentID=rs(2)
ParentNum=UBound(ParentStr)
if ParentStr(0)="0" then
response.write " \ "&ClassName&""
else
response.write " \ "
for i=0 to ParentNum
sql="select ID,ClassName from Class where ID="&CInt(ParentStr(i))
set rs=conn.execute(sql)
response.write ""&rs(1)&" \ "
next
response.write ""&ClassName&""
end if%>
set rs=conn.execute(sql)
dim ChildID,ChildNum
if not(rs.eof and rs.bof) then
response.write "-=同级分类=-"
do while not rs.eof
ChildID=rs(2)
if isnull(ChildID) or ChildID="" then
ChildNum=0
else
ChildNum=UBound(Split(ChildID,","))+1
end if
response.write""&rs(1)&"("&ChildNum&")"
rs.movenext
loop
end if
%>
set rs=conn.execute(sql)
if not(rs.eof and rs.bof) then
response.write "-=下级分类=-"
do while not rs.eof
ChildID=rs(2)
if isnull(ChildID) or ChildID="" then
ChildNum=0
else
ChildNum=UBound(Split(ChildID,","))+1
end if
response.write""&rs(1)&"("&ChildNum&")"
rs.movenext
loop
else
response.write "-=下级分类=-没有下级分类"
end if
%>
sql="select ChildID from Class where ID="&id
set rs=conn.execute(sql)
ChildID=rs(0)
if not(isnull(ChildID) or ChildID="") then
sql="select ID,FileName,Info,Grade,Chinese,Crack,Best,Member,AddDate,TotalHits,Brief from Software where (ClassID="&id&" or ClassID in ("&ChildID&")) and Hidden=false and PostType1 order by ID DESC"
else
sql="select ID,FileName,Info,Grade,Chinese,Crack,Best,Member,AddDate,TotalHits,Brief from Software where ClassID="&id&" and Hidden=false and PostType1 order by ID DESC"
end if
dim n,totalrec,currentpage,rowcount,Info
set rs=server.createobject("adodb.recordset")
rs.cursorlocation = 3
rs.pagesize = SiteSetting(12)
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "此分类还没有任何软件!"
else
if err.number0 then '错误处理
response.write "数据库操作失败:" & err.description
err.clear
else
if not (rs.eof and rs.bof) then '检测记录集是否为空
totalrec = RS.RecordCount 'totalrec:总记录条数
if rs.recordcount mod rs.pagesize = 0 then '计算总页数,recordcount:数据的总记录数
n = rs.recordcount\rs.pagesize 'n:总页数
else
n = rs.recordcount\rs.pagesize+1
end if
currentpage = request("page") 'currentpage:当前页
If currentpage "" then
currentpage = cint(currentpage)
if currentpage < 1 then
currentpage = 1
end if
if err.number 0 then
err.clear
currentpage = 1
end if
else
currentpage = 1
End if
if currentpage*rs.pagesize > totalrec and not((currentpage-1)*rs.pagesize < totalrec)then
currentPage=1
end if
rs.absolutepage = currentpage 'absolutepage:设置指针指向某页开头
rowcount = rs.pagesize%>
软
件 名 称
文件大小
下载次数
评分
加入时间
0
Info=Split(rs(2),"|")%>
if not(isnull(rs(5)) or rs(5)="") then response.write" "
if rs(7)=true then response.write" "
if rs(6)=true then response.write" "
%>
rs.movenext
loop
end if
end if
end if
rs.close
%>
本类今日下载
TOP 10
if not(isnull(ChildID) or ChildID="") then
sql="select top 10 ID,FileName from Software where (ClassID="&id&" or ClassID in ("&ChildID&")) and Hidden=false and PostType1 and LastHit=date() and Dayhits>0 order by DayHits DESC"
else
sql="select top 10 ID,FileName from Software where ClassID="&id&" and Hidden=false and PostType1 and LastHit=date() and Dayhits>0 order by DayHits DESC"
end if
set rs=conn.execute(sql)
if rs.eof and rs.bof then
response.write "今日没有下载!"
else
do while not rs.eof
response.write "·"&rs(1)&""
rs.movenext
i=i+1
if i>10 then exit do
loop
end if
%>
本类本周下载
TOP 10
dim OldWeek,NewWeek
OldWeek = WeekDay(Date())-1
If OldWeek = 0 Then OldWeek = 7
OldWeek = Date()-OldWeek
NewWeek = Date()+(9-WeekDay(Date()))
if not(isnull(ChildID) or ChildID="") then
sql="select top 10 ID,FileName from Software where (ClassID="&id&" or ClassID in ("&ChildID&")) and Hidden=false and PostType1 and "
sql=sql&" (LastHit < #" & NewWeek & "#) and (LastHit > #" & OldWeek & "#) and WeekHits>0 "
sql=sql&" order by WeekHits DESC"
else
sql="select top 10 ID,FileName from Software where ClassID="&id&" and Hidden=false and PostType1 and "
sql=sql&" (LastHit < #" & NewWeek & "#) and (LastHit > #" & OldWeek & "#) and WeekHits>0 "
sql=sql&" order by WeekHits DESC"
end if
set rs=conn.execute(sql)
if rs.eof and rs.bof then
response.write "本周没有下载!"
else
do while not rs.eof
response.write "·"&rs(1)&""
rs.movenext
i=i+1
if i>10 then exit do
loop
end if
%>
本类总下载
TOP 10
if not(isnull(ChildID) or ChildID="") then
sql="select top 10 ID,FileName from Software where (ClassID="&id&" or ClassID in ("&ChildID&")) and Hidden=false and PostType1 and TotalHits>0 order by TotalHits DESC"
else
sql="select top 10 ID,FileName from Software where ClassID="&id&" and Hidden=false and PostType1 and TotalHits>0 order by TotalHits DESC"
end if
set rs=conn.execute(sql)
if rs.eof and rs.bof then
response.write "没有下载!"
else
do while not rs.eof
response.write "·"&rs(1)&""
rs.movenext
i=i+1
if i>10 then exit do
loop
end if
set rs=nothing
conn.close
set conn=nothing
%>
if n response.write("")
response.write("共"&totalrec&"条记录┊")
if currentpage = 1 then
response.write("首页┊上一页")
else
response.write("首页")
response.write("┊上一页")
end if
if currentpage = n then
response.write("┊下一页┊尾页")
else
response.write("┊下一页")
response.write("┊尾页")
end if
response.write("┊第"¤tpage&"/"&n&"页┊"&SiteSetting(12)&"条记录/页┊转到")
response.write("")
dim i
for i = 1 to n
response.write(" if cint(currentpage)=cint(i) then
response.write(" selected")
end if
response.write(">第"&i&"页")
next
response.write("")
end sub
response.End()
%>