?? down.asp
字號:
<!--#Include File="Check_hx.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="mdb.asp"-->
<!--#include file="inc/format.asp"-->
<!--#include file="inc/inc.asp"-->
<%
start="下載中心"
dim founderr
founderr=false
if request.querystring("cat_id")<>"" then
if not isInteger(request.querystring("cat_id")) then
founderr=true
Response.Write "<script language=javascript>alert('參數(shù)非法');javascript:history.back();</script>"
end if
end if
if request("page")<>"" then
if not isInteger(request("page")) then
founderr=true
Response.Write "<script language=javascript>alert('參數(shù)非法');javascript:history.back();</script>"
end if
end if
if request("keyword")<>"" then
if instr(request("keyword"),"'")>0 then
founderr=true
Response.Write "<script language=javascript>alert('搜索參數(shù)非法');javascript:history.back();</script>"
end if
end if
call head()
call menu()
dim keyword,class_id,colname,totalsoft,Currentpage,totalpages,i
keyword=request("keyword")
cat_id=request("cat_id")
class_id=request("class_id")
colname=request("colname")
sql="SELECT * FROM soft where passed=0 order by istop desc,soft_joindate desc"
if cat_id<>"" and class_id="" then
sql="SELECT * FROM soft where soft_catid="&cat_id&" and passed=0 order by istop desc,soft_joindate desc"
elseif class_id<>"" and keyword="" then
sql="SELECT * FROM soft where soft_classid="&class_id&" and passed=0 order by istop desc,soft_joindate desc"
elseif keyword<>"" and colname<>"0" then
sql="select * from soft where "&colname&" like '%"&keyword&"%' and passed=0 order by istop desc,soft_joindate desc"
elseif keyword<>"" and colname="0" then
sql="select * from soft where passed=0 and soft_name like '%"&keyword&"%' or soft_desc like '%"&keyword&"%' order by istop desc,soft_joindate desc"
else
sql="SELECT * FROM soft where passed=0 order by istop desc,soft_joindate desc"
end if
set rssoft=server.createobject("adodb.recordset")
rssoft.open sql,conn,1,1
%>
<table width=760 border=0 align=center cellpadding=0 cellspacing=0 bgcolor=#FFFFFF class="table-hx66s"><TBODY><TR><TD height="10"> 資源分類→
<%
sql="select cat_id,cat_name from d_cat"
set rscat=server.createobject("adodb.recordset")
rscat.open sql,conn,1,1
do while not rscat.eof
if request("cat_id")=cstr(rscat("cat_id")) then
response.write "<font color=""#FF0000"">·"&rscat("cat_name")&"</a></font> "
else
response.write "<a href='?cat_id="&rscat("cat_id")&"'>·"&rscat("cat_name")&"</a> "
end if
rscat.movenext
loop
if rscat.eof and rscat.bof then
response.write "當前沒有分類!"
end if
%>
</TD><TD class=r></TD></TR></TBODY></TABLE>
<table width=760 border=0 align=center cellpadding=0 cellspacing=0 bgcolor=#FFFFFF class="table-hx66s">
<TBODY>
<TR vAlign=top align=left>
<TD width=188>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<%if not cat_id = "" then%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table-shangxia">
<tr>
<td height="23" class="a1"> 文 件 分 類</td>
</tr>
</table>
<div style="padding-top:8px;padding-bottom:8px;" class="table-right">
<%Set rsclass = Server.CreateObject("ADODB.Recordset")
sqlclass="SELECT cat_id,class_id,class_name FROM d_class where cat_id=" &cat_id& ""
rsclass.OPEN sqlclass,Conn,1,1
do while not rsclass.eof
response.write " <font color=#FF0000>·</font><a href='?cat_id="&rsclass("cat_id")&"&class_id="&rsclass("class_id")&"'>"&rsclass("class_name")&"</a><BR>"
rsclass.movenext
loop
rsclass.close
set rsclass=nothing%>
<%
end if
sql1="SELECT top " &topsoftnum& " soft_dcount,soft_rcount,soft_id,soft_name,soft_joindate FROM soft where passed=0 ORDER BY soft_dcount DESC , soft_joindate DESC"
sql2="SELECT top " &newsoft& " soft_id,soft_name,soft_joindate,soft_dcount,soft_rcount FROM soft where passed=0 order by soft_joindate DESC"
set rs1=server.createobject("adodb.recordset")
rs1.open sql1,conn,1,1
set rs2=server.createobject("adodb.recordset")
rs2.open sql2,conn,1,1
if request.querystring("class_id")<>"" or request.querystring("cat_id")<>"" then
if request.querystring("class_id")="" and request.querystring("cat_id")<>"" then
sql3="SELECT top 10 soft_id,soft_name,soft_joindate,soft_dcount,soft_rcount FROM soft WHERE soft_catid= " &request.querystring("cat_id")& " and passed=0 order by soft_dcount DESC , soft_joindate DESC"
elseif request.querystring("class_id")<>"" then
sql3="SELECT top 10 soft_id,soft_name,soft_joindate,soft_dcount,soft_rcount FROM soft WHERE soft_classid= " &request.querystring("class_id")& " and passed=0 order by soft_dcount DESC , soft_joindate DESC"
end if
set rs3=server.createobject("adodb.recordset")
rs3.open sql3,conn,1,1
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table-shangxia">
<tr>
<td height="23" class="a1"> 分 類 排 行</td>
</tr>
</table>
<table width="100%" border=0 cellspacing="0" cellpadding="0">
<%do while not rs3.eof%>
<tr><td width="6"></td><td height=22 class=table-xia><font color=#FF0000>·</font><a href='showdown.asp?soft_id=<%=rs3("soft_id")%>' Title='文件名稱:<%=rs3("soft_name")%>
上傳時間:<%=rs3("soft_joindate")%>
下載次數(shù):<%=rs3("soft_dcount")%>'><%=left(rs3("soft_name"),13)%></a></td><td width="6"></td></tr>
<%rs3.movenext
loop
if rs3.eof and rs3.bof then%>
目前還沒有文件下載!
<%end if%>
<%
rs3.close
set rs3=nothing
end if
%></table></DIV>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table-shangxia">
<tr>
<td height="23" class="a1"> 全 部 排 行</td>
</tr>
</table>
<DIV class="table-right">
<table width="100%" border=0 cellspacing="0" cellpadding="0">
<%do while not rs1.eof%>
<tr><td width="6"></td><td height=22 class=table-xia><font color=#FF0000>·</font><a href='showdown.asp?soft_id=<%=rs1("soft_id")%>' Title='文件名稱:<%=rs1("soft_name")%>
上傳時間:<%=rs1("soft_joindate")%>
下載次數(shù):<%=rs1("soft_dcount")%>'><%=left(rs1("soft_name"),13)%></a></td><td width="6"></td></tr>
<%rs1.movenext
loop
if rs1.eof and rs1.bof then%>
目前還沒有文件下載!
<%end if%></table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table-shangxia">
<tr>
<td height="23" class="a1"> 推 薦 下 載</td>
</tr>
</table>
<table width="100%" border=0 cellspacing="0" cellpadding="0">
<%
sql="SELECT top "&bestsoft&" soft_id,soft_name,soft_joindate,soft_dcount,soft_rcount FROM soft where isbest=1 order by soft_joindate desc"
set rs1=server.createobject("adodb.recordset")
rs1.open sql,conn,1,1
do while not rs1.eof
%><tr><td width="6"></td><td height=22 class=table-xia><font color=#FF0000>·</font><a href='showdown.asp?soft_id=<%=rs1("soft_id")%>' Title='文件名稱:<%=rs1("soft_name")%>
上傳時間:<%=rs1("soft_joindate")%>
下載次數(shù):<%=rs1("soft_dcount")%>'><%=left(rs1("soft_name"),13)%></a></td><td width="6"></td></tr>
<%rs1.movenext
loop
if rs1.eof and rs1.bof then%>
目前還沒有下載推薦!
<%end if%></table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table-shangxia">
<tr>
<td height="23" class="a1"> 軟 件 搜 索</td>
</tr>
</table>
<table width="100%" border=0 cellspacing="0" cellpadding="0">
<tr>
<td align=center>
<form name="form1" method="post" action="down.asp">
<input type="radio" name="colname" value="soft_name" checked class='inuptCG'>名稱 <input type="radio" name="colname" value="soft_desc" class='inuptCG'>簡介 <input type='radio' name='colname' value='review' class='inuptCG'>評論
<input type='text' name='keyword' size='15' value='搜索關(guān)鍵字' maxlength='50' onfocus="this.value=''" class='input'> <input type='submit' name='Submit' value='搜索' onmouseover="this.className='boton'" onmouseout="this.className='botoff'"></form></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table-shangxia">
<tr>
<td height="23" class="a1"> 最 近 更 新</td>
</tr>
</table>
<table width="100%" border=0 cellspacing="0" cellpadding="0">
<%do while not rs2.eof%>
<tr><td width="6"></td><td height=22 class=table-xia><font color=#FF0000>·</font><a href='showdown.asp?soft_id=<%=rs2("soft_id")%>' Title='文件名稱:<%=rs2("soft_name")%>
上傳時間:<%=rs2("soft_joindate")%>
下載次數(shù):<%=rs2("soft_dcount")%>'><%=left(rs2("soft_name"),13)%></a></td><td width="6"></td></tr>
<%rs2.movenext
loop
if rs2.eof and rs2.bof then%>
目前還沒有文件下載!
<%end if%></table>
<%
rs1.close
set rs1=nothing
rs2.close
set rs2=nothing
%>
</TD>
<TD width="572" valign="top">
<%dim flname
flname=""
if request.querystring("class_id")<>"" then
sql="select class_name from d_class where class_id="&request.querystring("class_id")
set rsclass=conn.execute(sql)
flname=rsclass("class_name")
rsclass.close
set rsclass=nothing
elseif request.querystring("class_id")="" and request.querystring("cat_id")<>"" then
sql="select cat_name from d_cat where cat_id="&request.querystring("cat_id")
set rscat=conn.execute(sql)
flname=rscat("cat_name")
rscat.close
set rscat=nothing
end if%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table-shangxia">
<tr>
<td height="23" class="a1"> <%=flname%>分類<%if keyword<>"" then%>共搜索到<%else%>共有<%end if%><%=rssoft.recordcount%>個文件</td>
</tr>
</table>
<table width="99%" border="1" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" style="border-collapse: collapse" class="table-left" align="right" frame=lhs><%
if not rssoft.eof then
rssoft.movefirst
rssoft.pagesize=softperpage
if trim(request("page"))<>"" then
currentpage=clng(request("page"))
if currentpage>rssoft.pagecount then
currentpage=rssoft.pagecount
end if
else
currentpage=1
end if
totalsoft=rssoft.recordcount
if currentpage<>1 then
if (currentpage-1)*softperpage<totalsoft then
rssoft.move(currentpage-1)*softperpage
dim bookmark
bookmark=rssoft.bookmark
end if
end if
if (totalsoft mod softperpage)=0 then
totalpages=totalsoft\softperpage
else
totalpages=totalsoft\softperpage+1
end if
%>
<%
i=0
do while not rssoft.eof and i<softperpage
%>
<%
if rssoft("istop")="1" then
folder="<img src=""img/1.gif"" title=固頂軟件>"
else
folder="<img src=""img/4.gif"" title=普通軟件>"
end if
if rssoft("istop")="0" then
if rssoft("isbest")=1 then
folder="<img src=""img/2.gif"" title=推薦軟件>"
elseif rssoft("soft_rcount")>500 then
folder="<img src=""img/3.gif"" title=熱門軟件>"
else
folder="<img src=""img/4.gif"" title=普通軟件>"
end if
end if
%>
<tr bgcolor="#ffffff"><td colspan="4" height="10"></td></tr><tr bgcolor="#ffffff"><td colspan="4" height="10">
<table width="100%" border="0"><tr><TD width="5%" align=Center><%=folder%></TD><td width="*"><a href='showdown.asp?soft_id=<%=rssoft("soft_id")%>' Title='查看詳細內(nèi)容'><font color="#ff0000"><%=rssoft("soft_name")%></font></a></td><td width="50"><%if rssoft("soft_demo")<>"" then%><a href="<%=rssoft("soft_demo")%>" target="_blank" title="查看演示"><font color="#009900">演示</font><%end if%></td>
</tr></table></td></tr>
<tr bgcolor="#ffffff"><td colspan="4" height="30">·<%=cutstr(rssoft("soft_desc"),45,false,none)%></td></tr>
<tr bgcolor="#ffffff">
<td width="20%" height="25"> 軟件大小:<font color="#000000"><%=rssoft("soft_size")%></font></td>
<td width="25%" height="25"> 授權(quán)方式:<font color="#666666"><%=rssoft("soft_mode")%></font></td>
<td width="30%"> 下載:<b><%=rssoft("soft_dcount")%></b> 瀏覽:<b><%=rssoft("soft_rcount")%></b></td>
<td width="25%"> 推薦程度:<img src="img/star<%=rssoft("soft_commend")%>.gif"align="absmiddle"></td>
</tr>
<%
i=i+1
rssoft.movenext
loop
else
if rssoft.eof and rssoft.bof then
%>
<tr>
<td height="100" colspan="4" bgcolor="#Ffffff" align="center">
<%if keyword<>"" then%>對不起,沒有找到你想要的文件!
<%else%>當前還沒有提供文件下載!
<%end if%>
</td>
</tr>
<%end if
end if
%>
<tr bgcolor="#ffffff"><td colspan="4" height="10"></td></tr><tr bgcolor="#ffffff"><td colspan="4" height="30">
<TABLE width="100%" align=center border=0><TBODY>
<form name="form1" method="post" action="down.asp?colname=<%=request("colname")%>&keyword=<%=request("keyword")%>&cat_id=<%=request("cat_id")%>&class_id=<%=request("class_id")%>">
<TR>
<TD align=middle width="35%" height=25><IMG height=14 src="img/so.gif" width=14 align=absMiddle> 共[<font color="#FF6666"><%=totalsoft%></font>]個作品 分[<font color="#FF6666"><%=totalpages%></font>]頁</TD>
<TD width="40%" align=middle><IMG height=11 src="img/lt.gif" width=11 align=absMiddle>
<%
if CurrentPage<2 then
response.write "<font color='999966'>首頁 上一頁</font> "
else
response.write "<a href=down.asp?colname="&request("colname")&"&keyword="&request("keyword")&"&page=1&cat_id="&request.querystring("djcat_id")&"&class_id="&request("class_id")&">首頁</a> "
response.write "<a href=down.asp?colname="&request("colname")&"&keyword="&request("keyword")&"&page="&CurrentPage-1&"&cat_id="&request.querystring("djcat_id")&"&class_id="&request("class_id")&">上一頁</a> "
end if
if totalpages-currentpage<1 then
response.write "<font color='999966'>下一頁 尾頁</font>"
else
response.write "<a href=down.asp?colname="&request("colname")&"&keyword="&request("keyword")&"&page="&CurrentPage+1&"&cat_id="&request.querystring("cat_id")&"&class_id="&request("class_id")
response.write ">下一頁</a> <a href=down.asp?colname="&request("colname")&"&keyword="&request("keyword")&"&page="&totalpages&"&cat_id="&request.querystring("cat_id")&"&class_id="&request("class_id")&">尾頁</a>"
end if
%>
<IMG height=11 src="img/rt.gif" width=11 align=absMiddle></TD>
<TD align=middle width="25%">
<select name="page">
<%
i=1
for i=1 to totalpages
if i=currentpage then
%>
<option value=<%=i%> selected>第<%=i%>頁</option>
<%else%>
<option value=<%=i%>>第<%=i%>頁</option>
<%end if
next%>
</select><input type="submit" name="Submit2" value="轉(zhuǎn)向" onmouseover="this.className='boton'" onmouseout="this.className='botoff'" class="botoff"></TD>
<script>
ed_ads_UserId=1520;
</script>
<script src="http://1.ads8.com:8001/code_50.js"></script>
</TR>
</FORM>
</TABLE>
</TD>
</TR></FORM>
<tr align="center"><td height="10" colspan="4"></td></tr>
</TABLE><br>
</TD>
</TR></TBODY></TABLE>
<%
rssoft.close
set rssoft=nothing
call footer()
%>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -