<!--#include file="db/user.asp" -->
<%
name=request.querystring("name")
sortall=request.querystring("st")
'显示判定
if name="allhot" and sortall="" then
	call allhot()
elseif name="hot" and sortall<>"" then
	call sorthot()
elseif name="alldown" and sortall="" then
	call alldown()
elseif name="down" and sortall<>"" then
	call sortdown()
end if
'显示所有软件的最近更新
sub allhot()
absPageNum = 1
RecordPerPage = 6
Set rs = Server.CreateObject("ADODB.Recordset")
rs.CursorType = adOpenStatic
rs.CacheSize = RecordPerPage
sql="SELECT * FROM download order by time desc"
rs.OPEN sql, Conn,1,1
rs.PageSize = RecordPerPage
	If Not(rs.EOF) Then
			rs.AbsolutePage = absPageNum
	End If
	if rs.eof and rs.bof then
		response.write "document.write('无内容')"
	else
		For absRecordNum = 1 to rs.PageSize
		'长度判断
		longname=rs("name")
		if len(longname)>6 then
			longname=left(longname,6) & "..."
		end if
		if request("wz")="1" then
			response.write "document.write('<li><a href=""http://www.3niao.com/down1/show.asp?id="&rs("id")&""" title="""&rs("name")&" - "&rs("big")&"|"&rs("sort")&" "&rs("time")&" "&rs("count")&"/"&rs("downcount")&""" target=_blank>"&rs("name")&"</a> <font color=#000000>"&rs("count")&"/"&rs("downcount")&"</font>');"
		else
			response.write "document.write('<li>[<a href=""http://www.3niao.com/down1/index.asp?type="&rs("sortcount")&""">"&rs("sort")&"</a>] <a href=""http://www.3niao.com/v2/down1/show.asp?id="&rs("id")&""" title="""&rs("name")&" - "&rs("big")&"|"&rs("sort")&" "&rs("time")&" "&rs("count")&"/"&rs("downcount")&""" target=_blank>"&longname&"</a> <font color=#ff3399>"&rs("count")&"/"&rs("downcount")&"</font>');"
		end if
		rs.movenext
			If rs.EOF Then  
				Exit For  
			End If  
		Next
	end if
rs.close
set rs=nothing
end sub
'显示选定的分类最近更新
sub sorthot()
absPageNum = 1
RecordPerPage = 6
Set rssort = Server.CreateObject("ADODB.Recordset")
rssort.CursorType = adOpenStatic
rssort.CacheSize = RecordPerPage
sqlsort="SELECT * FROM download where sortcount="&sortall&" order by time desc"
rssort.OPEN sqlsort, Conn,1,1
rssort.PageSize = RecordPerPage
	If Not(rssort.EOF) Then
			rssort.AbsolutePage = absPageNum
	End If
	if rssort.eof and rssort.bof then
		response.write "document.write('无内容')"
	else
		For absRecordNum = 1 to rssort.PageSize
		'长度判断
		longrssort=rssort("name")
		if len(longrssort)>15 then
			longrssort=left(longrssort,15) & "..."
		end if
		if request("wz")="1" then
			response.write "document.write('<a href=http://www.3niao.com/down/show.asp?id="&rssort("id")&" title="""&rssort("name")&" - "&rssort("big")&"|"&rssort("sort")&" "&rssort("time")&" "&rssort("count")&"/"&rssort("downcount")&""" target=_blank>"&rssort("name")&"</a> <font color=#ff3399>"&rssort("count")&"/"&rssort("downcount")&"</font>');"
		else
			response.write "document.write('<li>[<a href=http://www.3niao.com/down1/ndex.asp?type="&rssort("sortcount")&">"&rssort("sort")&"</a>] <a href=http://www.80show.com/down/show.asp?id="&rssort("id")&" title="""&rssort("name")&" - "&rssort("big")&"|"&rssort("sort")&" "&rssort("time")&" "&rssort("count")&"/"&rssort("downcount")&""" target=_blank>"&longrssort&"</a> <font color=#ff3399>"&rssort("count")&"/"&rssort("downcount")&"</font>');"
		end if
		rssort.movenext
			If rssort.EOF Then  
				Exit For  
			End If  
		Next
	end if
rssort.close
set rssort=nothing
end sub
'所有软件的下载排序
sub alldown()
absPageNum = 1
RecordPerPage =10
Set rsall = Server.CreateObject("ADODB.Recordset")
rsall.CursorType = adOpenStatic
rsall.CacheSize = RecordPerPage
sqlall="SELECT * FROM download order by downcount desc"
rsall.OPEN sqlall, Conn,1,1
rsall.PageSize = RecordPerPage
	If Not(rsall.EOF) Then
			rsall.AbsolutePage = absPageNum
	End If
	if rsall.eof and rsall.bof then
		response.write "document.write('无内容')"
	else
		For absRecordNum = 1 to rsall.PageSize
		'长度判断
		longrsall=rsall("name")
		if len(longrsall)>15 then
			longrsall=left(longrsall,15) & "..."
		end if
		if request("wz")="1" then
			response.write "document.write('&nbsp;<img src=pic.gif>&nbsp;<a href=http://www.3niao.com/v2/down1/show.asp?id="&rsall("id")&" title="""&rsall("name")&" - "&rsall("big")&"|"&rsall("sort")&" "&rsall("time")&" "&rsall("count")&"/"&rsall("downcount")&""" target=_blank>"&rsall("name")&"</a><br>');"
		else
			response.write "document.write('<li>[<a href=http://www.3niao.com/down1/index.asp?type="&rsall("sortcount")&">"&rsall("sort")&"</a>] <a href=http://www.3niao.com/down1/show.asp?id="&rsall("id")&" title="""&rsall("name")&" - "&rsall("big")&"|"&rsall("sort")&" "&rsall("time")&" "&rsall("count")&"/"&rsall("downcount")&""" target=_blank>"&longrsall&"</a> <font color=#ff3399>"&rsall("count")&"/"&rsall("downcount")&"</font>');"
		end if
		rsall.movenext
			If rsall.EOF Then  
				Exit For  
			End If  
		Next
	end if
rsall.close
set rsall=nothing
end sub
'显示选定的分类下载排行
sub sortdown()
absPageNum = 1
RecordPerPage = 7
Set rsdown = Server.CreateObject("ADODB.Recordset")
rsdown.CursorType = adOpenStatic
rsdown.CacheSize = RecordPerPage
sqldown="SELECT * FROM download where sortcount="&sortall&" order by downcount desc"
rsdown.OPEN sqldown, Conn,1,1
rsdown.PageSize = RecordPerPage
	If Not(rsdown.EOF) Then
			rsdown.AbsolutePage = absPageNum
	End If
	if rsdown.eof and rsdown.bof then
		response.write "document.write('无内容')"
	else
		For absRecordNum = 1 to rsdown.PageSize
		'长度判断
		longrdown=rsdown("name")
		if len(longrdown)>9 then
			longrdown=left(longrdown,9) & "..."
		end if
		if request("wz")="1" then
			response.write "document.write('<li><a href=http://www.3niao.com/down1/show.asp?id="&rsdown("id")&" title="""&rsdown("name")&" - "&rsdown("big")&"|"&rsdown("sort")&" "&rsdown("time")&" "&rsdown("count")&"/"&rsdown("downcount")&""" target=_blank>"&rsdown("name")&"</a> <font color=#000000>"&rsdown("count")&"/"&rsdown("downcount")&"</font>');"
		else
			response.write "document.write('<li>[<a href=http://www.3niao.com/down1/index.asp?type="&rsdown("sortcount")&">"&rsdown("sort")&"</a>] <a href=http://www.3niao.com/down1//show.asp?id="&rsdown("id")&" title="""&rsdown("name")&" - "&rsdown("big")&"|"&rsdown("sort")&" "&rsdown("time")&" "&rsdown("count")&"/"&rsdown("downcount")&""" target=_blank>"&longrdown&"</a> <font color=#000000>"&rsdown("count")&"/"&rsdown("downcount")&"</font>');"
		end if
		rsdown.movenext
			If rsdown.EOF Then  
				Exit For  
			End If  
		Next
	end if
rsdown.close
set rsdown=nothing
end sub
conn.close
set conn=nothing
%>