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

📄 sql_function.asp

📁 . 缓存处理技术
💻 ASP
📖 第 1 页 / 共 2 页
字号:
	.Write "<TR>" & Vbcrlf
	.Write "<td colspan=3 width=100% height=1 align=center class=menutdbg_1> </td>" & Vbcrlf
	.Write "</TR>" & Vbcrlf
	.Write "<TR>" & Vbcrlf
	.Write "<td colspan=3 width=100% height=26 align=Left background=""../Skins/"& SKINS_FOLDER &"/GrayBg.Gif"" border=""0"">"& Vbcrlf


	.Write DispAndOrder

	.Write "</td>" & Vbcrlf
	.Write "</TR>" & Vbcrlf
	.Write "<TR height=1>" & Vbcrlf
	.Write "<td width=1% align=center class=td></td><td width=98% align=center class=menutdbg_2> </td><td width=1% align=center class=td></td>" & Vbcrlf
	.Write "</TR>" & Vbcrlf
	.Write "</Table>" & Vbcrlf

	.Write"   </td>"& vbcrlf
	.Write"  </tr>"& vbcrlf
	.Write"</table>"& vbcrlf

End With











 Call Disp_PageAuc(Sql_SearchStr)

End Function




Function Disp_PageAuc(sql)



Set Rs=Server.CreateObject("Adodb.RecordSet")
Rs.Open sql,conn,1,1

if Rs.eof or Rs.Bof then
   HelpTitle="出错了!"
   HelpInfo="对不起,本店没有找到你搜索的商品!"
   HelpList="<Ul>" & Vbcrlf
   HelpList=HelpList & "<LI><a href=""Search_Auction.asp?ShopID="& SID &""">查看店铺内所有商品</a></LI>" & Vbcrlf
   HelpList=HelpList & "<LI><a href=""../Search_Auction.asp"">查看系统所有商品</a></LI>" & Vbcrlf
   HelpList=HelpList & "<LI><a href=""javascript: history.back(-1);"">返回上页</a></LI>" & Vbcrlf
   HelpList=HelpList & "</Ul>" & Vbcrlf
   Cnbbr_Helper HelpTitle,HelpInfo,HelpList,368
else

   Dim TotalCs : Totalcs=Rs.recordcount

   rs.pagesize=jsperpage
   Dim CurrentPage
   if trim(Page)<>"" then
      if Not IsNum(Page) then Page=1
      CurrentPage=clng(Page)
      if CurrentPage<1 then CurrentPage=1
      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
	 dim bookmark
	 bookmark=rs.bookmark
      end if
   end if

   Dim TotalPages
   if (totalcs mod jsperpage)=0 then
      totalpages=totalcs\jsperpage
   else
      totalpages=totalcs\jsperpage+1
   end if


   Dim ShopPerRow
   ShopPerRow=4
   i=0
   do while not Rs.eof
    if i mod ShopPerRow=0 then
       Response.Write"<table width=100% border=0 cellspacing=0 cellpadding=0 align=center>" & vbcrlf
       Response.Write"<tr bgcolor=""#FFFFFF"" onMouseOver=""this.bgColor='#FAFAFA';"" onMouseOut=""this.bgColor='#FFFFFF'"">" & vbcrlf
    end if
    Response.Write"<TD width=""25%"" align=center>"& Vbcrlf
    Response.Write"<table cellpadding=0 cellspacing=0 border=0 width=90% align=center style=""TABLE-LAYOUT: fixed;"">"& Vbcrlf
    Response.Write"<TR>"& Vbcrlf
    Response.Write"<TD width=""100%"" height=""88"" align=""center"">"& Vbcrlf
    Response.Write BBRAucSmallImage(Rs("AucID"),CurDispInfoType,1,"../Skins/"& SKins_Folder &"/nopic.gif")
    Response.Write"</TD>"
    Response.Write"</TR>"
    Response.Write"<TR>"
    Response.Write"<TD width=""100%"" height=""58"" align=""center"" style=""table-layout: fixed; word-break: break-all"">"& Vbcrlf
    k=interceptString(rs("aucItemtitle"),28)
    Response.Write"<a href=""../aucinfo.asp?aucid="& rs("aucid") &""" title="& rs("aucItemtitle") &">"& k &"</a><BR>"& Vbcrlf
    if Rs("Auctype")=2 then
       Response.Write"<img src=""../Skins/"& Skins_Folder &"/Ykj.gif"" border=""0"" alt=""一口价"">"& Vbcrlf
    else
       Response.Write"<img src=""../Skins/"& Skins_Folder &"/Pm.gif"" border=""0"" alt=""拍卖"">"& Vbcrlf
    end if
      if Rs("auctype")=>3 then
         response.write"<Span Style=""color: #CdCCCC; Font-weight: bold"">隐藏状态</Span>"
      else
         response.write"<Span Style=""color: #ff8800; Font-weight: bold"">¥"&FormatNumber(rs("auccurrentbid"),2,-1)&"</Span>"
      end if
    if Rs("BBR_AlipayStatus")=1 then Response.Write" &nbsp;<img border=""0"" src=""../Images/AlipayStatus.gif"" alt=""支持支付宝付款"" title=""使用支付宝付款,放心又省钱"" />"& Vbcrlf
    Response.Write"</TD>"& Vbcrlf
    Response.Write"</TR>"& Vbcrlf
    Response.Write"<TR>"& Vbcrlf
    Response.Write"<TD width=""100%"" align=""center"">剩余:"& Vbcrlf
    Call DisplayTime(rs("aucclosedate"))
    Response.Write"</TD>"& Vbcrlf
    Response.Write"</TR>"& Vbcrlf
    Response.Write"<TR>"& Vbcrlf
    Response.Write"<TD width=""100%"" height=""8"" background=""../SKins/"& SKins_Folder &"/Dot.gif""> </TD>"& Vbcrlf
    Response.Write"</TR>"& Vbcrlf
    Response.Write"</table>"& Vbcrlf
    Response.Write"</TD>"& Vbcrlf

   i=i+1

   if i>=JsPerPage then Exit Do
   if i mod ShopPerRow=0 then
      Response.Write"</TR>"& Vbcrlf
      Response.Write"</Table>"& Vbcrlf
      Response.Write"<table width=100% border=0 cellspacing=0 cellpadding=0 align=center>" & vbcrlf
      Response.Write"<tr bgcolor=""#FFFFFF"" onMouseOver=""this.bgColor='#FAFAFA';"" onMouseOut=""this.bgColor='#FFFFFF'"">" & vbcrlf
   End if
    Response.Flush
    Rs.MoveNext
    loop

    j=ShopPerRow-i mod ShopPerRow
    if j>0 and j<ShopPerRow then
      For k=1 to j
       Response.Write"<TD width=""25%"" align=center>&nbsp;</td>"& Vbcrlf
      Next
      Response.Write"</TR>"& Vbcrlf
      Response.Write"</Table>"& Vbcrlf
    end if

response.write"<table cellspacing=0 cellpadding=0 width=98% align=center border=0>" & vbcrlf
Response.Write"<form name=cnbbrpagefrom action="&Cnbbr_CurrentPath&" method=post onsubmit=""cnbbrpagefrom.B4.disabled=true;"">"
response.write"<tbody>" & vbcrlf
response.write"<tr class=td>" & vbcrlf
response.write"<td width=40% height=25>" & vbcrlf
response.write"&nbsp;<img height=14 src=""../Skins/"& Skins_Folder &"/go.gif"" width=14 align=center>" & vbcrlf
response.write" 共[<font class=fblack>"& totalcs &"</font>]件 分[<font class=fblack>"& totalpages &"</font>]页&nbsp;&nbsp;第[<font class=fblack>"& currentpage &"</font>]页</td>"
response.write"<td width=35% align=center><img height=11 src=""../Skins/"& Skins_Folder &"/lt.gif"" width=11 align=center>"

if currentpage<2 then
   response.write "首页 上一页 "
else
   Response.Write "<font class=fblack>"
   response.write "<a href="&Page_QueryStr &"page=1>首页</a> "
   response.write "<a href="&Page_QueryStr &"page="& (currentpage-1) &">上一页</a> "
   Response.Write "</font>"
end if
if totalpages-currentpage<1 then
   response.write "下一页 尾页"
else
   Response.Write "<font class=fblack>"
   response.write "<a href="&Page_QueryStr &"page="&(currentpage+1)&">下一页</a> "
   response.write "<a href="&Page_QueryStr &"page="& totalpages &">尾页</a>"
   Response.Write "</font>"
end if

response.write"<img height=11 src=""../Skins/"& Skins_Folder &"/gt.gif"" width=11 align=center></td>" & vbcrlf
response.write"<td width=25% align=right>" & vbcrlf
response.write"<select name=page>" & vbcrlf

i=1
for i=1 to totalpages
if i=currentpage then
   response.write"<option value="&i&" selected>第"&i&"页</option>"
else
   response.write"<option value="&i&">第"&i&"页</option>"
end if
next
response.write"</select>"& Vbcrlf
Response.Write"<input type=""submit"" name=""B4"" value=""转向"" class=""button"">"& Vbcrlf
Response.Write"<Input Name=BBR_AucName type=hidden value="&BBR_AucName&">"& Vbcrlf
Response.Write"<Input Name=BBR_AucPrice_Small type=hidden value="&BBR_AucPrice_Small&">"& Vbcrlf
Response.Write"<Input Name=BBR_AucPrice_Large type=hidden value="&BBR_AucPrice_Large&">"& Vbcrlf
Response.Write"<Input Name=S1 type=hidden value="&BBR_S1&">"& Vbcrlf
Response.Write"<Input Name=S2 type=hidden value="&BBR_S2&">"& Vbcrlf
Response.Write"<Input Name=TPL_Prov type=hidden value="&BBR_AucPlace_Prov&">"& Vbcrlf
Response.Write"<Input Name=TPL_City type=hidden value="&BBR_AucPlace_City&">"& Vbcrlf
Response.Write"<Input Name=Place type=hidden value="&BBR_AucPlace&">"& Vbcrlf
Response.Write"<Input Name=BBR_AucOldNew type=hidden value="&BBR_AucOldNew&">"& Vbcrlf
Response.Write"<Input Name=BBR_AucZhiFu type=hidden value="&BBR_AucZhiFu&">"& Vbcrlf
Response.Write"<Input Name=BBR_AucAvailDate type=hidden value="&BBR_AucAvailDate&">"& Vbcrlf
Response.Write"<Input Name=BBR_AucCloseDate type=hidden value="&BBR_AucCloseDate&">"& Vbcrlf
BBR_AucType=Replace(BBR_AucType,",","|")
Response.Write"<Input Name=BBR_AucType type=hidden value="&BBR_AucType&">"& Vbcrlf
Response.Write"<Input Name=ShopID type=hidden value="& SID &">"& Vbcrlf
Response.Write"</td>"
response.write"</tr>" & vbcrlf
response.write"</form>" & vbcrlf
response.write"</tbody>" & vbcrlf
response.write"</table>" & vbcrlf

End if
End Function

 Function GetPage_Url()
  Dim Re_Url
  Re_Url=Request.ServerVariables("URL")
  if Request.QueryString<>"" then
     Re_Url = Re_Url & "?" & Request.QueryString 
  end if

  Dim Re
  set re = new RegExp
  re.Pattern = "[&|?]page=\d+"
  re.IgnoreCase = true
  re.multiLine = true
  re.global = true
  Dim Matches,TmpMatch,Match
  Set Matches = re.Execute(Re_Url) 
  For Each Match in Matches  
     tmpMatch = Match.Value
     GetPage_Url = replace(Re_Url,tmpMatch,"")
  next
  GetPage_Url=GetPage_Url
 End function

%>

⌨️ 快捷键说明

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