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

📄 download_body.asp

📁 一个很好的下载系统原码
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%sub download_body()
dim keyword,class_id,colname,totalsoft,Currentpage,totalpages,i
opendown
keyword=request.form("keyword")
cat_id=request("cat_id")
class_id=request("class_id")
colname=request("colname")

sql="SELECT * FROM soft order by soft_joindate desc"
if cat_id<>"" and class_id="" then
    sql="SELECT * FROM soft where soft_catid="&cat_id&" order by soft_joindate desc"
elseif class_id<>"" and keyword="" then
	sql="SELECT * FROM soft where soft_classid="&class_id&" order by soft_joindate desc"
elseif keyword<>"" and colname<>"0" then
	sql="select * from soft where "&colname&" like '%"&keyword&"%' order by soft_joindate desc"
else
	sql="SELECT * FROM soft order by soft_joindate desc"
end if

set rssoft=server.createobject("adodb.recordset")
rssoft.open sql,conn,1,1
%>
<table width="<%=tablewidth%>" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#FFFFFF">
  <tr> 
    <td height="2" colspan="3"></td>
  </tr>
  <tr> 
    <td width="74%" align="center" valign="top"><table width="96%" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td align="center">&nbsp;</td>
        </tr>
      </table> 
      <table width="75%" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td height="5"></td>
        </tr>
      </table>
      <table width="96%" border="0" cellspacing="0" cellpadding="0" align="center">
        <form name="form1" method="post" action="">
          <tr> 
            <td class="chinese" align="right"> 跳转到 
              <select name="go" onChange='window.location=form.go.options[form.go.selectedIndex].value'>
                <option value="download.asp" selected>---===选择分类===---</option>
                <option value="download.asp">---===下载首页===---</option>
                <%
Set rscat = Server.CreateObject("ADODB.Recordset")
sqlcat="SELECT * FROM d_cat"
rscat.OPEN sqlcat,Conn,1,1
do while not rscat.eof
colparam1=rscat("cat_id")
%>
                <option value="download.asp?cat_id=<%=rscat("cat_id")%>">----<%=rscat("cat_name")%>----</option>
                <%
Set rsclass = Server.CreateObject("ADODB.Recordset")
sqlclass="SELECT * FROM d_class where cat_id=" &colparam1& ""
rsclass.OPEN sqlclass,Conn,1,1
	do while not rsclass.eof
%>
                <option value='download.asp?cat_id=<%=rsclass("cat_id")%>&class_id=<%=rsclass("class_id")%>'><%=rsclass("class_name")%></option>
                <%
		rsclass.movenext
	loop
	rsclass.close
set rsclass=nothing
rscat.movenext
loop
rscat.close
set rscat=nothing
set rstotal=nothing
%>
              </select> 
              <select name="colname">
                <option value="0" selected>--搜索范围--</option>
                <option value="soft_name">软件名称</option>
                <option value="soft_desc">软件描述</option>
              </select>
              <input name="keyword" type="text" class="textarea" size="15">
              &nbsp;&nbsp; 
              <input type="submit" name="Submit" value="搜索" class="button">
            </td>
          </tr>
        </form>
      </table>
      <table width="96%" border="0" cellspacing="0" cellpadding="0" align="center">
        <tr> 
          <td bgcolor="#FFFFFF" class="chinese">&nbsp; </td>
          <td align="right" bgcolor="#FFFFFF" class="chinese"> <font color="#666666">
            <%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%>
            <%=flname%>分类共有<%=rssoft.recordcount%>个程序</font> </td>
        </tr>
      </table>
      <table width="96%" border="0" cellspacing="0" cellpadding="0" align="center" class="chinese">
        <%
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
%>
        <form name="form2" method="post" action="download.asp?cat_id=<%=request("cat_id")%>&keyword=<%=request("keyword")%>&colname=<%=request("colname")%>">
          <tr> <%
		  if request.querystring("class_id")="" then 
		  %> 
            <td class="chinese" align="right"><font color="#666666"><%=currentpage%> 
              /<%=totalpages%>页,<%=totalsoft%>条记录/<%=softperpage%>个每页.</font> 
              <%
i=1
showye=totalpages
if showye>10 then
showye=10
end if
for i=1 to showye
if i=currentpage then
%>
              <%=i%> 
              <%else%>
              <a href="download.asp?page=<%=i%>&cat_id=<%=request("cat_id")%>&keyword=<%=request("keyword")%>&colname=<%=request("colname")%>"><%=i%></a> 
              <%end if
next
if totalpages>currentpage then
if request("page")="" then
page=1
else
page=request("page")+1
end if%>
              <a href="download.asp?page=<%=page%>&cat_id=<%=request("cat_id")%>&keyword=<%=request("keyword")%>&colname=<%=request("colname")%>" title="下一页">>></a> 
              <%end if%>
              &nbsp;&nbsp;&nbsp;&nbsp; 
              <input type="text" name="page" class="textarea" size="4">
              <input type="submit" name="Submit" value="Go" class="button">
            </td>
			<%
			else
			%>
			<td class="chinese" align="right"><font color="#666666"><%=currentpage%> 
              /<%=totalpages%>页,<%=totalsoft%>条记录/<%=softperpage%>个每页.</font> 
              <%
i=1
showye=totalpages
if showye>10 then
showye=10
end if
for i=1 to showye
if i=currentpage then
%>
              <%=i%> 
              <%else%>
              <a href="download.asp?page=<%=i%>&cat_id=<%=request("cat_id")%>&class_id=<%=request("class_id")%>&keyword=<%=request("keyword")%>&colname=<%=request("colname")%>"><%=i%></a> 
              <%end if
next
if totalpages>currentpage then
if request("page")="" then
page=1
else
page=request("page")+1
end if%>
              <a href="download.asp?page=<%=page%>&cat_id=<%=request("cat_id")%>&class_id=<%=request("class_id")%>&keyword=<%=request("keyword")%>&colname=<%=request("colname")%>" title="下一页">>></a> 
              <%end if%>
              &nbsp;&nbsp;&nbsp;&nbsp; 
              <input type="text" name="page" class="textarea" size="4">
              <input type="submit" name="Submit" value="Go" class="button">
            </td>
			<%end if%>
          </tr>
        </form>
      </table>
      <%
i=0
do while not rssoft.eof and i<softperpage
%>
      <table width="96%" height="97" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#C8CBCE" class="chinese">
        <tr bgcolor="#F5F5F5"> 
          <td height="25" colspan="2" align="center" bgcolor="#00CCFF"><font color="#999999"><a href="showsoft.asp?soft_id=<%=rssoft("soft_id")%>" target="_blank"><b><%=rssoft("soft_name")%></b></a></font></td>
          <td colspan="2" align="right" bgcolor="#00CCFF"><font color="#666666"><%=rssoft("soft_catname")%> 
            | <%=rssoft("soft_classname")%>&nbsp;&nbsp; 
            <%if rssoft("soft_demo")<>"" then%>
            <a href="<%=rssoft("soft_demo")%>" target=_blank>演示</a> 
            <%else%>
            没有演示 
            <%end if%>
            </font></td>
        </tr>
        <tr> 
          <td bgcolor="#CCCCCC" width="15%" height="22" align="center"><font color="#666666">加入时间</font></td>
          <td bgcolor="#FFFFFF" width="35%"><%=rssoft("soft_joindate")%></td>
          <td bgcolor="#CCCCCC" width="15%" align="center"><font color="#666666">推荐程度</font></td>
          <td bgcolor="#FFFFFF" width="35%" align="center"><img src="images/<%=rssoft("soft_commend")%>stars.gif" width=55 height=12 align="absmiddle"> 
            &nbsp;&nbsp;&nbsp;<%=rssoft("soft_dcount")%>/<%=rssoft("soft_rcount")%> 
          </td>
        </tr>
        <tr> 
          <td height="44" colspan="4" bgcolor="#FFFFFF"><font color="#666666">&nbsp;&nbsp;&nbsp; 
            <%=cutstr(rssoft("soft_desc"),100,false,none)%></font></td>
        </tr>

⌨️ 快捷键说明

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