⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sort.asp

📁 下载管理系统,重新修改,无错.放心使用. 用户名和密码都是admin:admin
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="inc/const.asp"-->
<!--#include file="inc/char.asp"-->
<%
dim totalPut
dim CurrentPage
dim TotalPages
dim i,j
dim keyword
dim rs
dim updown
dim order_name
order_name=Request("Order")
if not isempty(request("page")) then
 currentPage=cint(request("page"))
else
 currentPage=1
end if
if request("updown")<>"" then
updown="desc"
else
updown=""
end if
select case order_name
case "showname"
order_name="showname"
case "hot"
order_name="hot"
case "dateandtime"
order_name="dateandtime"
case "hits"
order_name="hits"
case "orders"
order_name="orders"
case "size"
order_name="size"
case else
order_name="dateandtime"
updown="desc"
end select
 set rs=server.createobject("adodb.recordset")
dim classid,Nclassid
dim classname,Nclassname

if request("classid")="" then
'classid=""
'classname="所有软件"
classid="classid=1 and  "
sql="select class from class where classid=1"
rs.open sql,conn,1,1
if rs.bof and rs.eof then
response.redirect "sort.asp?classid=1"
response.end
else
classname=rs("class")
end if
rs.close
else 
classid="classid="&cstr(request("classid"))&" and  "
sql="select class from class where classid="&cstr(request("classid"))
rs.open sql,conn,1,1
if rs.bof and rs.eof then
response.redirect "sort.asp?classid=1"
response.end
else
classname=rs("class")
end if
rs.close
rs.close
end if
if request("Nclassid")="" then
Nclassid=""
Nclassname="所有软件"
else
Nclassid=" Nclassid="&cstr(request("Nclassid"))&" and  "
sql="select Nclass.Nclass,class.class from Nclass,class where Nclass.classid=class.classid and Nclass.Nclassid="&cstr(request("Nclassid"))
rs.open sql,conn,1,1
classname=rs("class")
Nclassname=rs("Nclass")
rs.close
end if

%>
<HTML><HEAD><TITLE>【<%=HostName%>】:<%=classname%><%if Nclassid<>"" then%>:<%=Nclassname%><%end if%> &nbsp;[<%=HostUrl%>]</TITLE>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<link rel="stylesheet" href="images/style.css">

<SCRIPT language=javascript>
function popwin2(id,path)
{window.open("openarticle.asp?id="+id+"&ppath="+path,"");
}
</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">
<form method="post" name="myform" action="search.asp">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>搜索:</b><input type="text" name="keyword" style="BORDER: 1 solid; FONT-SIZE: 9pt; WIDTH: 100px" size="20">&nbsp;<input onClick=myform.submit type=image src="images/go1.gif" border=0 name=I1 align="absmiddle" loop="0">&nbsp;</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" background="image/dhback.gif" height="25">
<tr> 
<td height="24" class="BorderOn">&nbsp; 您的位置:<a href="index.asp"><font color="<%=tableFontcolor%>"><%=HostName%>首页</font></a> -> <a href="sort.asp?classid=<%=request("classid")%>"><font color="<%=tablefontcolor%>"><%=classname%></font></a> 
-> <%=Nclassname%></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"> 
 <div align="center">
<center> 
 <table border=1 cellpadding=0 width="100%" cellspacing=0 style="border-collapse: collapse" bordercolor="<%=atablebackcolor%>">
<tr> 
<td height="20" bgcolor="<%=tabletitlecolor%>"> 
<div align="center"><a href='sort.asp?classid=<%=request("classid")%>'><font color="<%=tablefcolor%>"><b><%=classname%></b></font></a></div>
</td>
</tr>
<tr> 
<td align=middle valign=top> 
<table border=0 cellpadding=0 cellspacing=0 width=100% height="100" align="center">
<tr> 
<td bgcolor=<%=bodyfontcolor%> valign=top><font style=line-height:150%> 
<%
if request("classid")="" then
sql="select Nclass,Nclassid from Nclass where classid=1"
else
sql="select Nclass,Nclassid from Nclass where classid="&request("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=<%=request("classid")%>&Nclassid=<%=rs("Nclassid")%>"><font color="<%=contentTitle%>"><%=Rs("Nclass")%></a></a> 
  </td>
  <%rs.movenext  
end if %>
</tr>
<%loop
  Rs.Close
%>
</table>
</td>
</tr>
</table>
</td>
</tr>
 </table>
</center>
 </div>
 <table border="1" width="100%" cellspacing="0" cellpadding="0" bordercolor="<%=atablebackcolor%>" style="border-collapse: collapse">
<tr> 
<td height="20" bgcolor="<%=tabletitlecolor%>"> 
<p align="center"><font color=<%=tablefcolor%>><b>本类热门下载</b></font> 
</td>
</tr>
<tr> 
<td width="100%"> 
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr> 
<td height="20"  bgcolor="<%=atabletitlecolor%>" width="4%"></td>
<td width="100%"  bgcolor="<%=atabletitlecolor%>" height="100" valign="top"> <font style=line-height:150%> 

<%if request("Nclassid")="" then
sql="select top "&AllTop&" id,showname,bb from download where download.classid="&request("classid") 
sql=sql&" order by download.id desc"
else
sql="select top "&AllTop&" id,showname,bb from download where download.Nclassid="&request("Nclassid")
sql=sql&" order by download.id desc" 
end if
rs.open sql,conn,1,1 
if rs.eof and rs.bof then
response.write ("<center>暂无</center>")
else
do while not rs.eof
response.write ("<li><A href=list.asp?id="&rs("id")&">"&rs("showname")&" "&rs("bb")&"</A></li>")
rs.movenext
loop
end if
rs.close
%></font><br><br></td></tr></table></td></tr></table></td>
<td width="556" valign="top" bgcolor="<%=tablebodycolor%>" align="right" background="image/t3_b.gif"> 
 <table border=0 cellpadding=0 cellspacing=0 width=540 align=right bordercolor="<%=atablebackcolor%>" style="border-collapse: collapse">
<tbody> 
<tr>
<td valign=top bgcolor="<%=atablebodycolor%>"><%
if request("Nclassid")="" then  
sql="select id,showname,bb,note,dayhits,weekhits,lasthits,hits,dateandtime,hot,system,size,orders from download where download.classid="&request("classid")
sql=sql&" order by "&order_name&" "&updown  
else  
sql="select id,showname,bb,note,dayhits,weekhits,lasthits,hits,dateandtime,hot,system,size,orders from download where download.Nclassid="&request("Nclassid")  
sql=sql&" order by "&order_name&" "&updown  
end if  
rs.open sql,conn,1,1
  
  if rs.eof and rs.bof then
  response.write "<table width=100% height=25 cellpadding=0><tr><td width='100%'><p align=center><font size=3>没有或没有找到任何程序</font></td></tr></table>"
else
  totalPut=rs.recordcount
 if currentpage<1 then
currentpage=1
 end if
  
 if (currentpage-1)*index_perpage>totalput then
if (totalPut mod index_perpage)=0 then
currentpage= totalPut \ index_perpage
else
 currentpage= totalPut \ index_perpage + 1
end if
 end if
  if currentPage=1 then
showContent
showpage totalput,index_perpage,"sort.asp"
  else
if (currentPage-1)*index_perpage<totalPut then
rs.move  (currentPage-1)*index_perpage
dim bookmark
bookmark=rs.bookmark
showContent
 showpage totalput,index_perpage,"sort.asp"
else
currentPage=1
 showContent
 showpage totalput,index_perpage,"sort.asp"
 end if
end if
rs.close
end if

sub showContent
  dim i
i=0
%>
<table width=100% border=1 cellpadding=0 cellspacing=0 bordercolor="<%=atablebackcolor%>" style="border-collapse: collapse">
<tr>
<td  width="100%" height="25" bgColor="<%=tabletitlecolor%>" background="image/dhback.gif"><center><font size=3><b><%=classname%></b> - <b><%=Nclassname%></b></font></center></td></tr>
<tr>
<td  width="100%" > 
<table border="0" cellspacing="0" cellpadding="0" width="100%" align="center" valign="top" height="120">
<%if request("updown")="" then%>
<tr bgcolor="<%=tabletitlecolor%>"> 
  <td width="54%" align="right" height="22"> 
<div align="center"><a href="sort.asp?classid=<%=request("classid")%>&Nclassid=<%=request("Nclassid")%>&order=showname&updown=desc" title="点击按升序排列"><b>按软件名称排序</b></a></div>
  </td>
  <td width="12%" align=center height="22"><a href="sort.asp?classid=<%=request("classid")%>&Nclassid=<%=request("Nclassid")%>&order=dateandtime&updown=desc" title="点击按升序排列">整理日期</a></td>
  <td width="6%" align=center height="22"><a href="sort.asp?classid=<%=request("classid")%>&Nclassid=<%=request("Nclassid")%>&order=hits&updown=desc"  title="点击按升序排列">人气</a></td>
  <td width="10%" align=center height="22"><a href="sort.asp?classid=<%=request("classid")%>&Nclassid=<%=request("Nclassid")%>&order=size&updown=desc"  title="点击按升序排列">文件大小</a></td>
  <td width="18%" align=center height="22"><a href="sort.asp?classid=<%=request("classid")%>&Nclassid=<%=request("Nclassid")%>&order=hot&updown=desc"  title="点击按升序排列">评分</a></td>
</tr>
<%else%>
<tr bgcolor="<%=tabletitlecolor%>"> 
  <td width="54%" align="right" height="22"> 
<div align="center"><a href="sort.asp?classid=<%=request("classid")%>&Nclassid=<%=request("Nclassid")%>&order=showname" title="点击按降序排列"><b>按软件名称排序</b></a></div>
  </td>
  <td width="12%" align=center height="22"><a href="sort.asp?classid=<%=request("classid")%>&Nclassid=<%=request("Nclassid")%>&order=dateandtime" title="点击按降序排列">整理日期</a></td>
  <td width="6%" align=center height="22"><a href="sort.asp?classid=<%=request("classid")%>&Nclassid=<%=request("Nclassid")%>&order=hits"  title="点击按降序排列">人气</a></td>
  <td width="10%" align=center height="22"><a href="sort.asp?classid=<%=request("classid")%>&Nclassid=<%=request("Nclassid")%>&order=size"  title="点击按降序排列">文件大小</a></td>
  <td width="18%" align=center height="22"><a href="sort.asp?classid=<%=request("classid")%>&Nclassid=<%=request("Nclassid")%>&order=hot"  title="点击按降序排列">评分</a></td>
</tr>
<%end if%>
<%do while not rs.eof%>
<tr bgcolor="<%=atablebodycolor%>"><td colspan=5 height="24"><a class="date" href="list.asp?id=<%=rs("id")%>" title="点击查看详细介绍"><b><%=rs("showname")%>&nbsp;<%=rs("bb")%></b></a></td></tr>
<tr bgcolor="<%=atablebodycolor%>"> 
  <td width="48%" height="19" >&nbsp;&nbsp;<%response.write leftb(htmlEncode2(trim(rs("note"))),40)%>……<br>
  </td>
  </td>
  <td width="12%" align=center height="19"><%=year(rs("dateandtime"))%>-<%if mid(month(rs("dateandtime")),2,1)="" then response.write "0"&month(rs("dateandtime")) else response.write month(rs("dateandtime"))%>-<%if mid(day(rs("dateandtime")),2,1)="" then response.write "0"&day(rs("dateandtime")) else response.write day(rs("dateandtime"))%>
</td>
  <td width="11%" align=center height="19"><%=rs("hits")%></td>
  <td width="11%" align=center height="19"><%=rs("size")%></td>
  <td width="18%" align=center height="19"> 
<%for imghot=1 to rs("hot")%><img src="images/grade1.gif"><%next%>
  </td>
</tr>
<tr bgcolor="<%=atablebodycolor%>">
  <td colSpan=5 height="20">&nbsp;&nbsp;<b>操作系统:</b><%=rs("system")%>&nbsp;&nbsp;<b>授权方式:</b><%=rs("orders")%></td></tr>
<TR>
  <TD colSpan=5 height="1">
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 
width=530>
  <TBODY>
  <TR>
 <TD bgColor=<%=tablefontcolor%>height=1></TD></TR></TBODY></TABLE></TD></TR>
<%
 i=i+1
 if i>=index_perpage then exit do
 rs.movenext
 loop
%>
<tr> 
  <td colspan="6" height="5" bgcolor=<%=tabletitlecolor%>><space height="5"></td>
</tr>
<tr bgcolor=<%=tabletitlecolor%>> 
  <td colspan="6" height=17> 
<p align="center"> 
  <% end sub 

function showpage(totalnumber,index_perpage,filename)
  dim n

  if totalnumber mod index_perpage=0 then
n= totalnumber \ index_perpage
  else
n= totalnumber \ index_perpage+1
  end if
  response.write "<form method=Post action="&filename&"?classid="&request("classid")&"&Nclassid="&request("Nclassid")&"&order="&request("order")&"&updown="&request("updown")&">"
  response.write "<font color='red'>["&Nclassname&"]</font> "

  if CurrentPage<2 then
response.write "| 合计"&totalnumber&"个软件&nbsp;| 首页 上一页&nbsp;"
  else
response.write ""&totalnumber&"个&nbsp;<a href="&filename&"?page=1&classid="&request("classid")&"&Nclassid="&request("Nclassid")&"&order="&request("order")&"&updown="&request("updown")&">首页</a>&nbsp;"
response.write "<a href="&filename&"?page="&CurrentPage-1&"&classid="&request("classid")&"&Nclassid="&request("Nclassid")&"&order="&request("order")&"&updown="&request("updown")&">上一页</a>&nbsp;"
  end if

  if n-currentpage<1 then
response.write "下一页 尾页"
  else
response.write "<a href="&filename&"?page="&(CurrentPage+1)&"&classid="&request("classid")&"&Nclassid="&request("Nclassid")&"&order="&request("order")&"&updown="&request("updown")&">"
response.write "下一页</a> <a href="&filename&"?page="&n&"&classid="&request("classid")&"&Nclassid="&request("Nclassid")&"&order="&request("order")&"&updown="&request("updown")&">尾页</a>"
  end if
response.write "&nbsp;页次:<strong><font color=red>"&CurrentPage&"</font>/"&n&"</strong>页 "
response.write "&nbsp;<b>"&index_perpage&"</b>个软件/页"
%>
<%
end function  
%>
</p><td><tr><td colspan="6">
<br><center>
<table width="100%" border="0" height="68" bgcolor="<%=atablebodycolor%>" cellspacing="0" cellpadding="0" style="border-collapse: collapse"><tr><td align="center"><a href="http://www.yese.net/"><img src="ad/topc.gif" width="468" height="60" border="0"></a></td></tr></table></center>
  </td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</tbody> 
 </table>
</td>
  </tr>
</table>
</center>
 </div>
<!--#include file="CopyRight.asp"-->
</BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -