📄 sousuo.asp
字号:
<!--#include file="conn.asp"-->
<%
dim rs,sql
dim totalPut
dim CurrentPage
dim TotalPages
set rs = server.createobject("adodb.recordset")
keyword=request("keyword")
area=request("area")
company=request("company")
if keyword="" then
errmsg=errmsg+"<br>"+"请输入关键字。"
founderr=true
else
keyword=replace(replace(replace(replace(keyword,"'","‘"),"<","<"),">",">")," "," ")
end if
%>
<html>
<head>
<meta NAME="GENERATOR" Content="Microsoft FrontPage 4.0">
<meta HTTP-EQUIV="Content-Type" content="text/html; charset=gb2312">
<title>查询结果</title>
</head>
<body leftmargin="4" topmargin="0" marginwidth="0" marginheight="0">
<table width="778" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="615" valign="top">
<div align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<div align="center">
<table cellspacing=1 cellpadding=0 width="98%"
bgcolor=#666666 border=0>
<tbody>
<% 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)
if request("action")="title" then
findword="hw_name like '%"&keyword&"%' "
if company="" then
sql="select * from hw where "&findword&" and area='"&area&"' order by hw_id DESC"
else
sql="select * from hw where "&findword&" and user_company='"&company&"' and area='"&area&"' order by hw_id DESC"
end if
showContent
else
findword="user_company like '%"&keyword&"%' "
sql="select * from member where "&findword&""
showCompany
end if
%>
<%sub showContent
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<p align='center'>没有或没有找到任何产品</p>"
else
rs.pagesize=10
totalrec=rs.recordcount
totalpage=rs.pagecount
if page>totalpage then page=totalpage
rs.absolutepage=page
'rs.absolutepage=page
do while not rs.eof
%>
<tr>
<td width="100%" bgcolor="#FFFFFF">
<p align="center"><img border="0" src="<%=rs("hw_pic")%>" width="284" height="282"></td>
</tr>
<tr>
<td width="100%" bgcolor="#FFFFFF">商品名称:<%=rs("hw_name")%><br>
上架时间:<%=rs("hw_date")%><br>
商品价格:<font color=red><%=rs("hw_cash")%></font>元
<%if session("user_type")="批发" then response.write "(批发价:" & rs("daili") & "元)"%>
<%if session("user_type")="代理" then response.write "(代理价:" & rs("daili") & "元)"%><br>
商品介绍:<%=rs("hw_content")%><p>
商品所属公司:<%=rs("user_company")%> <a target='_blank' href='listcom.asp?user_company=<%=rs("user_company")%>&ob=1'>查看<font color=red><%=rs("user_company")%></font>的信息
<p align="center"><a href='javascript:openbag(<%=rs("hw_id")%>)'><img border="0" src="images/shop.gif"></td>
</tr>
<%end if
end sub%>
<%
sub showCompany
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<p align='center'>没有或没有找到任何公司</p>"
else
rs.pagesize=10
totalrec=rs.recordcount
totalpage=rs.pagecount
if page>totalpage then page=totalpage
rs.absolutepage=page
'rs.absolutepage=page
do while not rs.eof%>
<tr>
<td width="100%" bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#FFFFFF"> 公司名称:<%=rs("user_company")%>
</td><Td>公司电话:<font color=red><%=rs("user_tel")%></font>
</td><td> 公司主要负责人:<%=rs("user_name")%><p>
</td><td>公司E-mail:<%=rs("user_mail")%></td>
</tr></table>
</td></tr>
<%
end if
end sub
rs.movenext
loop
%>
<tr>
<td width=478>
<p align="left">共<font color=red><%=totalpage%></font>页 第<%=page%>页
<font color=666666><%if page-1>0 then%><a href="delhw.asp?page=<%=page-1%>">上一页</a><%else%><font color=666666>上一页</font><%end if%> <%if page+1<=totalpage then%><a href="delhw.asp?page=<%=page+1%>">下一页</a><%else%><font color=666666>下一页</font><%end if%></font></p>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</div>
</td>
<td background="cuxiaoyuhuodong_r4_c25.jpg" width="1"></td>
<td valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<form name="search" method="post" action="index.asp" >
<tr>
<td bgcolor="#F5F8FD"><img src="image/28.jpg" width="162" height="68"></td>
</tr>
<tr>
<td bgcolor="FAFBF3" valign="top">
<table width="100%" border="0" cellspacing="5" cellpadding="0">
<tr>
<td>
<div class="font_1">关键字:</div>
</td>
<td>
<%=keyword%>
</td>
</tr>
<tr>
<td>
<div class="font_1">经销商:</div>
</td>
<td>
<%=company%>
</td>
</tr>
<tr>
<td>
<div class="font_1">地区:</div>
</td>
<td>
<%=area%>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<%end if
set rs=nothing
conn.close
set conn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -