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

📄 search.asp

📁 仿百度搜索程序修正版
💻 ASP
字号:
<%if trim(request("search"))="" then response.redirect "javascript:histroy.go(-1)"
%>
<!--#include file="top.htm"-->



<div align="center">
  <center>
    <table width="764" border="0" cellspacing="2" cellpadding="2">
      <tr> 
        <td width="540" valign="top" bgcolor="#F4FBF8"> <table width="520" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr> 
              <td>&nbsp;</td>
            </tr>
            <tr> 
              <td class=f14><strong><font color="#FF6600">·搜索结果</font></strong></td>
            </tr>
            <tr> 
              <td>&nbsp;</td>
            </tr>
            <tr>
              <td class=f14><table width="520" height="23" border="0" cellpadding="2" cellspacing="1" bgcolor="#FFFFFF">
                  <tr bgcolor="#CDE7D1"> 
                    <td width="335" height="18"  class=f14><strong><font color="#477C43">信息主题</font></strong></td>
                    <td width="131" class=f14><strong><font color="#477C43">发布时间</font></strong></td>
                    <td width="38" class=f14> <div align="center"><strong><font color="#477C43">浏览</font></strong></div></td>
                  </tr>
                </table>
                <table width="520" height="24" border="0" cellpadding="0" cellspacing="0">
                      <%dim w(25)      
w(1)="招商投资"      
w(2)="生活服务"      
w(3)="家电产品"      
w(4)="旅游出行"      
w(5)="招聘求职"      
w(6)="房产家居"      
w(7)="电脑网络"      
w(8)="美容美发"      
w(9)="美食天地"      
w(10)="医疗保健"      
w(11)="招生培训"      
w(12)="出国留学"      
w(13)="交友征婚"      
w(14)="农业信息"      
w(15)="商务服务"          
w(16)="其他分类"%>
 <%set com=server.createobject("adodb.connection")          
com.open "DBQ="& server.mappath("data.mdb")  &";Driver={Microsoft Access Driver (*.mdb)};"          
if request("lx")="不限" then    
set rs=com.execute("select*from msg where tit like '%"& request("search") &"%' and edt>=#" & date & "# ORDER BY id DESC")    
else    
set rs=com.execute("select*from msg where tit like '%"& request("search") &"%' and gq='" & request("lx") &"' and edt>=#" & date & "# ORDER BY id DESC")    
end if   
page=request("page")       
newpage=0   
if page="" then page=1       
do while newpage<page*21-21   
newpage=newpage+1       
rs.movenext       
loop         
do while not rs.eof       
i=i+1%><tr> 
                    <td height="23" bgcolor="#C0E0C6"> <table width="520" height="28" border="0" cellpadding="4" cellspacing="1" bgcolor="#F4FBF8">
                        <tr> 
                          <td width="5" height="26" valign="middle"> <div align="center"><img src="DOT.gif" width="5" height="5"></div></td>
                          <td width="319" class=f14> <font color="#478B47"> 
                            <%response.write  "[" & (rs(10)) & "]"%>
                            </font><a href="show.asp?n=<%response.write rs(0)%>" target="_blank"> 
                            <%response.write rs(1)%>
                            </a> </td>
                          <td width="124" > 
                            <%response.write rs(4)%>
                          </td>
                          <td width="35"> <div align="center"> 
                              <%response.write rs(9)%>
                            </div></td>
                        </tr>
                      </table>
                      <table border="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="520" id="AutoNumber3" cellpadding="0" height="1" bgcolor="#C0E0C6">
    <tr>
      <td width="100%"></td>
    </tr>
  </table></td>
                  </tr><%if i=20 then exit do         
rs.movenext         
loop%>
                </table>
                <p align="right">
                  <%if page=1 then %>
                  上一页
                  <%else%>
                  <a href="search.asp?search=<%=request("search")%>&page=<%=page-1%>&n=<%=n%>"><font color="#0000FF">上一页</font></a> 
                  <%end if%>
                  &nbsp;
                  <%if i=20 and not rs.eof then %>
                  <a href="search.asp?search=<%=request("search")%>&page=<%=page+1%>&n=<%=n%>"><font color="#0000FF">下一页</font></a>
                  <%else%>
                  下一页
                  <%end if%>
                  &nbsp;&nbsp;&nbsp;&nbsp; </td>
            </tr>
          </table>
        </td>
        <td width="209" valign="top" bgcolor="#DCEBE1"> <!--#include file="lift.htm"--></td>
      </tr>
    </table>
  </center> 
</div> 
 
<div align="center"> 
  <center> 
  <table border="0" width="760" cellspacing="0" cellpadding="0"> 
    <tr> 
      <td width="157" valign="top"> 
        <div align="center"> 
          <center>
            </center>     
        </div>     
      </td>    
      <td width="599" valign="top"> 
        <div align="center">
          <center>
              &nbsp;&nbsp; 
              <p>           
          </center>           
        </div>           
      </td>           
    </tr>           
    <tr>           
      <td width="758" colspan="2"></td>           
    </tr>           
  </table>           
  </center>           
</div>           
           
<div align="center">           
  <center>
    <!--#include file="bottom.htm"-->
  </center>              
</div>              
              
</body>              
              
</html>              
          
          

⌨️ 快捷键说明

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