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

📄 search.asp

📁 欢迎使用《雨点下载系统 2.0》! 本系统仅提供给个人网站免费使用
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="admin/config.asp"-->
<!--#include file="admin/inc/char.asp"-->
<%dim keyword,stype
keyword=chStr(Trim(Request("keyword")))
stype=Trim(Request("type"))%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>软件搜索 - <%=SiteSetting(0)%></title>
<STYLE>
BODY {
	    scrollbar-face-color : <%=SkinSetting(10)%>;
	    scrollbar-shadow-color : <%=SkinSetting(11)%>;
	    scrollbar-highlight-color : <%=SkinSetting(12)%>;
	    scrollbar-3dlight-color : <%=SkinSetting(13)%>;
	    scrollbar-darkshadow-color : <%=SkinSetting(14)%>;
	    scrollbar-track-color : <%=SkinSetting(15)%>;
	    scrollbar-arrow-color : <%=SkinSetting(16)%>;
}
.mouseover {
	background-color: <%=SkinSetting(8)%>;
	border: 1px solid <%=SkinSetting(9)%>;
}
.mouseout {
	background-color: <%=SkinSetting(3)%>;
}
.mouseout2 {
	background-color: <%=SkinSetting(4)%>;
}
</STYLE>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="<%=SkinSetting(0)%>" background="<%=SkinSetting(1)%>" leftmargin="0" topmargin="0">
<!--#include file="header.asp"-->
<table width="760" border="0" cellspacing="0" cellpadding="0" align="<%=SiteSetting(9)%>">
  <tr>
    <td bgcolor="<%=SkinSetting(3)%>">
<table width="760" border="0" cellpadding="0" cellspacing="0" class="xuxian">
        <tr> 
          <td height="300" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td height="18" valign="bottom" class="xuxian3">&nbsp;<img src="images/point1.gif" width="17" height="16" align="absmiddle"> 
                  当前位置:<a href="default.asp">首页</a> \ 软件搜索 \ 搜索结果</td>
              </tr>
            </table>
 <br>
<%dim n,totalrec,currentpage,rowcount,rs,sql,Info
set rs=server.CreateObject("ADODB.RecordSet")
if stype="all" then
	sql="select s.ID,s.FileName,s.Info,s.Grade,s.Chinese,s.Crack,s.Best,s.Member,s.AddDate,s.TotalHits,s.Brief,c.ID,c.ClassName from Software s inner join Class c on s.ClassID=c.ID where s.Hidden=false and s.PostType<>1 and (s.FileName like '%"&keyword&"%' or s.Brief like '%"&keyword&"%') order by s.ID DESC" 
else
	sql="select s.ID,s.FileName,s.Info,s.Grade,s.Chinese,s.Crack,s.Best,s.Member,s.AddDate,s.TotalHits,s.Brief,c.ID,c.ClassName from Software s inner join Class c on s.ClassID=c.ID where s.Hidden=false and s.PostType<>1 and s."&stype&" like '%"&keyword&"%' order by s.ID DESC" 
end if
rs.cursorlocation = 3 '使用客户端游标,可以使效率提高
rs.pagesize = SiteSetting(12)
rs.open sql,conn,1
if rs.eof and rs.bof then
response.write "<br><br><center>对不起,此软件还没有被本站收录!</center><br><br><br><br>"
else
if err.number<>0 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%>
            <table width="85%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td>查询关键字[<font color=#FF0000><%=keyword%></font>]┊共找到[<font color=#FF0000><%=totalrec%></font>]条记录</td>
              </tr>
            </table> 
            <table width="85%" border="0" align="center" cellpadding="2" cellspacing="0" bgcolor="<%=SkinSetting(7)%>">
              <tr> 
                <td class="TdBorderRB"><font color="<%=SkinSetting(6)%>">软 
                  件 名 称</font></td>
                <td width="11%" align="center" class="TdBorderRB"><font color="<%=SkinSetting(6)%>">所属分类</font></td>
                <td width="11%" align="center" class="TdBorderRB"><font color="<%=SkinSetting(6)%>">文件大小</font></td>
                <td width="11%" align="center" class="TdBorderRB"><font color="<%=SkinSetting(6)%>">下载次数</font></td>
                <td width="6%" align="center" class="TdBorderRB"><font color="<%=SkinSetting(6)%>">评分</font></td>
                <td width="14%" align="center" class="TdBorderB"><font color="<%=SkinSetting(6)%>">加入时间</font></td>
              </tr>
            </table>
            <br> 
<%do while not rs.eof and rowcount > 0
Info=Split(rs(2),"|")%>
            <table width="85%" border="0" align="center" cellpadding="2" cellspacing="0">
              <tr> 
                <td class="TdBorderRB" bgcolor="<%=SkinSetting(4)%>"><img src="images/greendot.gif" width="8" height="8"> 
                  <a href="view.asp?id=<%=rs(0)%>" target="_blank"><%=rs(1)%></a> <%if not(isnull(rs(4)) or rs(4)="") then response.write"&nbsp;<img src='images/cn.gif'>"
					if not(isnull(rs(5)) or rs(5)="") then response.write"&nbsp;<img src='images/cr.gif'>"
					if rs(7)=true then response.write"&nbsp;<img src='images/mb.gif'>"
					if rs(6)=true then response.write"&nbsp;<img src='images/cm.gif'>"
				  %> </td>
                <td class="TdBorderRB" width="11%" align="center" bgcolor="<%=SkinSetting(4)%>"><a href="list.asp?id=<%=rs(11)%>"><%=rs(12)%></a></td>
                <td class="TdBorderRB" width="11%" align="center" bgcolor="<%=SkinSetting(4)%>"><%=Info(0)%></td>
                <td class="TdBorderRB" width="11%" align="center" bgcolor="<%=SkinSetting(4)%>"><%=rs(9)%></td>
                <td class="TdBorderRB" width="6%" align="center" bgcolor="<%=SkinSetting(4)%>"><%=rs(3)%></td>
                <td class="TdBorderB" width="14%" align="center" bgcolor="<%=SkinSetting(4)%>"><%=formatDT(rs(8),2)%></td>
              </tr>
              <tr> 
                <td colspan="6"><font color="#999999"><%=strvalue(rs(10),200)%></font></td>
              </tr>
            </table>
            <br> 
            <%rowcount=rowcount-1
			  rs.movenext
			  loop
			  end if
			  end if
			  end if
			  rs.close
			  set rs=nothing
			  conn.close
			  set conn=nothing
              %>
            <%call listPages()%>
          <br> </td>
        </tr>
      </table></td>
  </tr>
</table>
<!--#include file="footer.asp"-->
</body>
</html>
<%sub listPages() 
if n <= 1 then exit sub
response.write("<table width=85% border=0 align=center cellpadding=2 cellspacing=1 bgcolor="&SkinSetting(2)&">")
response.write("<tr><td align=center bgcolor="&SkinSetting(3)&">共"&totalrec&"条记录┊")
if currentpage = 1 then
response.write("<font color=darkgray>首页</font>┊<font color=darkgray>上一页</font>")
else
response.write("<a href="&request.ServerVariables("script_name")&"?type="&stype&"&keyword="&keyword&"&Page=1>首页</a>")
response.write("┊<a href="&request.ServerVariables("script_name")&"?type="&stype&"&keyword="&keyword&"&Page="&currentpage-1&">上一页</a>") 
end if
if currentpage = n then
response.write("┊<font color=darkgray>下一页</font>┊<font color=darkgray>尾页</font>") 
else
response.write("┊<a href="&request.ServerVariables("script_name")&"?type="&stype&"&keyword="&keyword&"&Page="&currentpage+1&">下一页</a>")
response.write("┊<a href="&request.ServerVariables("script_name")&"?type="&stype&"&keyword="&keyword&"&Page="&n&">尾页</a>")
end if
response.write("┊第"&currentpage&"/"&n&"页┊"&SiteSetting(12)&"条记录/页┊转到")
response.write("<select name=currentpage size=1 style=background-color:#eeeeee;color:#000000;font-size:12px onChange=javascript:window.location.href=this.options[this.selectedIndex].value>")
dim i
for i = 1 to n
response.write("<option value="&request.ServerVariables("script_name")&"?type="&stype&"&keyword="&keyword&"&Page="&i)
if cint(currentpage)=cint(i) then
response.write(" selected")
end if
response.write(">第"&i&"页</option>")
next
response.write("</select></td></tr></table>")
end sub
response.End()
%>

⌨️ 快捷键说明

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