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

📄 searchprice.asp

📁 实用的拍卖源码。适合个人建站学习使用。仅供学习参考
💻 ASP
字号:
<%
id=rst("pid")
call chk(rst("pid"),"id")
if id>=1000 then
	pricefrom=1000
	priceto=100000
elseif id>=100 then
	pricefrom=100
	priceto=1000
elseif id>=10 then
	pricefrom=10
	priceto=100
else
	pricefrom=1
	priceto=10
end if
%>
<!-- #include file="inc/char.asp" -->
<!-- #include file="conn.asp" -->
<!-- #include file="inc/adovbs.inc" -->
<!-- #include file="head.asp" -->
<html>
<head>
<TITLE><%=webname%>--商品列表---联系QQ:6439358,联系邮箱vqqq59r@163.com,网站www.vqqq.com,谢谢大家对我们系统的支持</title>
<META http-equiv=Content-Type content="text/html; charset="<%=charset%>">
<META name="keywords" content="<%=keywords%>">
<META name="description" content="<%=description%>">
<link href="images/main_style.css" rel="stylesheet" type="text/css">
</HEAD>
<BODY leftMargin=0 onmouseover=exitpop=false text=#000000 topMargin=0 marginheight="0" marginwidth="0">
<%
if rst("page")<>"" then
  if not isnumeric(rst("page")) then
      response.write "<br>"+"<li>非法的分页参数。"
	  response.end
  end if
end if
dim strsql,aucid
dim bookmark,totalcs,Currentpage,totalpages,i
%>
<table cellpadding=0 cellspacing=2 width=760 align=center>
  <tr> 
    <td class=titletd width=100% colspan="2"><a href="index.asp">首页</a>&gt;&gt;&gt; <a href="search.asp">商品搜索</a>&gt;&gt;&gt; &nbsp;价格低于 <%=rst("pid")%> 元的vqqq拍卖物品  </td>
  </tr>
    <tr>
      <td><a href=sellauc.asp>我有类似商品出售</a></td>
      <td>
        <div align="right"><a href=cat.asp?action=all>所有商品</a>|<a href=cat.asp?action=closing>即将结束</a>|<a href=cat.asp?action=new>新登商品</a>|<a href=cat.asp?action=hot>热点商品</a></div>
      </td>
    </tr>
  </table>
<%
set rs=server.createobject("adodb.recordset")
strsql = "select * FROM Auctions WHERE aucCloseDate > #"&now&"#  and aucEnded='N' and auccurrentbid>="&pricefrom&" and auccurrentbid<="&priceto&" order by aucmoli desc,aucCloseDate"
rs.open strsql,conn,1,1
if rs.eof then
		response.write"<script language=javascript>alert('没有找到现价在"&pricefrom&"和"&priceto&"之间的商品,重新尝试一下吧');history.back(-1);</script>"
		response.end
end if
totalcs=rs.recordcount
%>
<table width="760" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr> 
    <td> 
      <table width="100%" border="0" cellspacing="0" cellpadding="0" class=tablebg>
              <TR class=yellow_bg>
                <TD colSpan=3 height=3></TD></TR>
        <tr class=yellow_bg> 
          <td width="212" class=yellow_bg>&nbsp;&nbsp;价格低于 <%=rst("pid")%> 元的vqqq拍卖物品 </td>
          <TD class=yellow_bg width=20><IMG height=20 src="<%=webpath%>images/conner.gif" width=20></TD>
	  <td class=huise_bg><marquee scrolldelay=200 width=500 align="middle">公告:<%=jytx%> </marquee></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table width="760" border="0" cellspacing="1" cellpadding="0" align="center" class=tablebg>
  <tr class=titletd> 
    <td width="106"> 
      <div align="center">商品图片</div>
    </td>
    <td width="358"> 
      <div align="center">商品名称</div>
    </td>
    <td width="45"> 
      <div align="center">现价</div>
    </td>
    <td width="45"> 
      <div align="center">竞标数</div>
    </td>
    <td> 
      <div align="center">剩余时间</div>
    </td>
  </tr>
  <%
if not rs.eof then
rs.movefirst
jsperpage=rs.pagesize
if trim(rst("page"))<>"" then
   currentpage=clng(rst("page"))
   if currentpage>rs.pagecount then
      currentpage=rs.pagecount
   end if
else
   currentpage=1
end if
   if currentpage<>1 then
       if (currentpage-1)*jsperpage<totalcs then
	       rs.move(currentpage-1)*jsperpage
		   
		   bookmark=rs.bookmark
	   end if
   end if
   if (totalcs mod jsperpage)=0 then
      totalpages=totalcs\jsperpage
   else
      totalpages=totalcs\jsperpage+1
   end if
i=0
do while not rs.eof and i<jsperpage
%>
  <tr id=b2 class=td> 
    <td width="106" id=bg02>
	<div id="Layer1" style="position:relative; left:0px; top:0px; z-index:2; width: 0; height: 0;"> 
<% if rs("aucmoli")=aucml*5 then %> <img src="images/5star.gif"> 
<% elseif rs("aucmoli")>=aucml*4 then %> <img src="images/4star.gif">
<% elseif rs("aucmoli")=aucml*3 then %> <img src="images/3star.gif">
<% elseif rs("aucmoli")=aucml*2 then %> <img src="images/2star.gif">
<% elseif rs("aucmoli")=aucml*1 then %> <img src="images/1star.gif">
<% elseif rs("aucclick")>10 then %> <img src="images/hotauc.gif">
<% else %> <img src="images/0star.gif">
<% end if%>
	</div>
      <div align="center">
	  <%
	  if rs("aucImageURL")="NULL" then
	  response.write "没有图片"
	  else%><a href="aucinfo.asp?aucid=<%=rs("aucID")%>" target=_blank>
	 <img src="<%=rs("aucImageURL")%>" width="85" height="85"  border=0></a>
	  <%end if%></div>
    </td>
    <td width="358" id=bg02> 
      <div align="left"><a href="aucinfo.asp?aucid=<%=rs("aucID")%>" target=_blank>
<%
auctitle=rs("aucItemTitle")
if len(auctitle)>28 then
auctitle=left(auctitle,25)&"..."
response.write auctitle
else
response.write auctitle
end if
%>
</a></div>
    </td>
    <td width="45" id=bg02> 
      <div align="center"><%=rs("aucCurrentBid")%></div>
    </td>
    <td width="45" id=bg02> 
      <div align="center"><%
	  sql3="select count(*) as Bnum from bids where bidItemID="&rs("aucid")
	  set rs3=conn.execute(sql3)
	response.write rs3("Bnum")%></div>
    </td>
    <td id=bg02> 
      <div align="center"> 
		<%
		date2 = rs("aucCloseDate")
		date1 = now()
		sDate = DateDiff("s", date1, date2) '总秒数
		sDay = fix(sDate/60/60/24) '天数
		sDate1 = sDate mod 60*60*24 '余数
		sHour = fix(sDate1/60/60) '小时
		sDate2 = sDate1 mod 60*60 '余数
		sMinute = fix(sDate2/60) '分钟
		sDate3 = sDate2 mod 60 '余数
		if sDay>0 then
		response.write sDay & "天"
		end if
		if sDay=0 and shour>=0 then 
		'and sHour=0 and sMinute=0 and sDate3=0
		'response.write sDay & "天" & sHour & "小时" & sMinute & "分钟" & sDate3 & "秒"
		response.write sHour & "小时"
		end if
		if sDay=0 and shour=0 and sMinute>=0 then
		response.write sMinute & "分钟" 
		end if
		if sDay=0 and shour=0 and sMinute=0 and sDate3>=0 then
		response.write sDate3 & "秒"
		end if
		if sDate3<0 then
		sqlend="update auctions set aucEnded='Y' where aucid="&rs("aucid")
		conn.execute(sqlend)
		end if
		%>
     </div>
    </td>
  </tr>
<%
  i=i+1
  rs.movenext
loop
else
if rs.eof and rs.bof then%>
<tr><td nowrap height="30" colSpan=5 class=td>当前没有商品!</td></tr>
<%end if
end if
'if not rst("catid")=1 then
sub FPage()%>
<form name="form1" method="post" action="cat.asp?catid=<%=request.querystring("catid")%>">
<tr> 
<td align="right" colspan="5" class=titletd>
<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
<TBODY>
<TR> 
<TD align=middle width="35%" height=25><IMG height=14 src="img/cha.gif" width=14 align=absMiddle> 共[<font class=fred><%=totalcs%></font>]个商品 共分[<font class=fred><%=totalpages%></font>]页 &nbsp;当前为第[<font class=fred><%=CurrentPage%></font>]页</TD>
<TD width="40%" align=middle class=fblack><IMG height=11 src="img/lt.gif" width=11 align=absMiddle>
<%
if CurrentPage<2 then
response.write "<font class=fblack>首页 上一页</font> "
else
response.write "<a href=cat.asp?action="&rst("action")&"&page=1&catid="&request.querystring("catid")&">首页</a> "
response.write "<a href=cat.asp?action="&rst("action")&"&page="&CurrentPage-1&"&jscat_id="&request.querystring("catid")&">上一页</a> "
end if
if totalpages-currentpage<1 then
response.write "<font class=fblack>下一页 尾页</font>"
else
response.write "<a href=cat.asp?action="&rst("action")&"&page="&CurrentPage+1&"&catid="&request.querystring("catid")
response.write ">下一页</a> <a href=cat.asp?action="&rst("action")&"&page="&totalpages&"&catid="&request.querystring("catid")&">尾页</a>"
end if
%>
 <IMG height=11 src="img/gt.gif" width=11 align=absMiddle></TD>
<TD align=middle width="25%">
<select name="page">
<%
i=1
for i=1 to totalpages
if i=currentpage then
%>
<option value=<%=i%> selected>第<%=i%>页</option> 
<%else%>
<option value=<%=i%>>第<%=i%>页</option> 
<%end if
next%>
</select><input type="submit" name="Submit2" value="转向" class="button"> </TD>
</TR>

</TABLE>     
</td>
</tr>
</form>   
<%
end sub 
call FPage()
%>
</table>
<!-- #include file="bottom.asp" -->
</BODY></HTML>

⌨️ 快捷键说明

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