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

📄 trsearch.asp

📁 if you want it,call me.
💻 ASP
字号:
<!--#include file="top.asp"-->
<br>
 <table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
        <td width="180" valign="top"><iframe src="login.asp" frameborder="0" scrolling="no" width="170" height="130"></iframe><br>
          <script src="class.js"></script>
          <br>
          <!--#include file="search.htm"-->
        </td>
    <td width="580" valign="top"><table width="580" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr  class="tabbgcolorli"> 
              <td> ☆ 商品列表</td>
        </tr>
      </table>
          <table width="580" height="42" border="0" cellpadding="0" cellspacing="0">
            <tr> 
              <td valign="top" class="border1"> 
                <%

   page=request.querystring("page")
  if page="" then page=1
  if not(isnumeric(page)) then page=1
  if page<1 then page=1
  page=int(page)
			word=request("keyword")
			if word="" then
			response.write"<script language=javascript>alert('关键字不能为空');this.location.href='javascript:history.go(-1)';</script>"					
			response.end
			end if
			set rs=server.createobject("adodb.recordset")
			sql="select * from goods where sp_name like '%"&word&"%' order by id desc"
			rs.open sql,conn,1,1
			if rs.eof then
			response.write"<br><br><div align=center>暂时没有此商品</div><br><br>"
			else
			rs.pagesize=8
      totalrec=rs.recordcount
      totalpage=rs.pagecount
      if page>totalpage then page=totalpage
      rs.absolutepage=page
      i=0
	   dim id(),sp_name(),marprice(),memprice(),vipprice(),sp_pic(),filename()
      do while not rs.eof and (i<rs.pagesize)
      i=i+1
      redim preserve id(i),sp_name(i),marprice(i),memprice(i),vipprice(i),sp_pic(i),filename(i)
	  id(i)=rs("id")
      sp_name(i)=rs("sp_name")
      marprice(i)=rs("marprice")
      memprice(i)=rs("memprice")
	  vipprice(i)=rs("vipprice")
	  sp_pic(i)=rs("spic")
	  filename(i)=rs("filename")
      rs.movenext
      loop

			%>
			
                <br> 
                <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
                  <tr> 
				  <% 
				  for i=1 to ubound(id)%>
                  <td>
				        <table width="246" height="80" border="0"  cellpadding="0" cellspacing="0">
                        <tr> 
                          <td width="80" height="80" rowspan="4"><a href="products/<%=filename(i)%>.htm" target="_blank"><img class="border3" border="0" src="<%=sp_pic(i)%>" width="80" height="80"></a></td>
                          <td><div align="center"><a href="products/<%=filename(i)%>.htm" target="_blank"><font class="word1"><%=sp_name(i)%></font></a></div></td>
                        </tr>
                        <tr> 
                          <td><div align="center">市场价:<s><%=marprice(i)%></s>元</div></td>
                        </tr>
                        <tr> 
                          <td><div align="center">会员价:<%=memprice(i)%>元</div></td>
                        </tr>
                        <tr> 
                          <td><div align="center">VIP价:<%=vipprice(i)%>元</a></div></td>
                        </tr>
                      </table>
					  </td>
                      <% if i mod 2=0 then%>
					  </tr>
			<tr><td height="50"></td>
              </tr>                      
                        <%
		end if
			next
			%>
                </table>
                <br>
                <table border="0" width="507" cellspacing="0" height="10" align="center">
                  <tr> 
                    <td> <p align="center">共<font color=red><%=totalpage%></font>页  
                        第<%=page%>页 <font color=666666>   
                        <%if page-1>0 then%>
                        <a href="trsearch.asp?page=<%=page-1%>&condition=<%=c1%>&keyword=<%=word%>">上一页</a> 
                        <%else%>
                        <font color=666666>上一页</font> 
                        <%end if%>
                          
                        <%if page+1<=totalpage then%>
                        <a href="trsearch.asp?page=<%=page+1%>&condition=<%=c1%>&keyword=<%=word%>">下一页</a> 
                        <%else%>
                        <font color=666666>下一页</font> 
                        <%end if%>
                         共<font color=red><%=totalrec%></font>条记录 </font></p></td>
                  </tr>
                  <tr> 
                    <td></td>
                  </tr>
                </table>
                <br>
                <%
				end if
set rs=nothing
conn.close
set conn=nothing
%>
              </td>
            </tr>
          </table> </td>
  </tr>
</table>
    <br>
<!--#include file="bottom.htm"-->



⌨️ 快捷键说明

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