📄 sql_shop_function.asp
字号:
Call Disp_PageShop(Sql_SearchStr)
End Function
Function Disp_PageShop(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_Shop.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
Response.Write"<form name=""searchform"" method=""post"" action="""">"& Vbcrlf
Response.Write"<table width=98% border=0 cellspacing=0 cellpadding=0 align=center>" & vbcrlf
Response.Write" <tr height=32 class=TDBg_2>" & vbcrlf
Response.Write" <td width=12 align=center><input type=""checkbox"" name=""chkAll"" value=""on"" onClick=""CheckAll(this.form)""></td>" & vbcrlf
Response.Write" <td width=72 align=center>店铺标志</td>" & vbcrlf
Response.Write" <td width=120 align=center>店铺名称 / 掌柜</td>" & vbcrlf
Response.Write" <td width=180 align=center>店铺简介</td>" & vbcrlf
Response.Write" <td width=80 align=center>所在地</td>" & vbcrlf
Response.Write" <td width=60 align=center>注册时间</td>" & vbcrlf
Response.Write" <td width=40 align=center>星级</td>" & vbcrlf
Response.Write" <td width=40 align=center>状态</td>" & vbcrlf
Response.Write" <td width=40 align=center>审核</td>" & vbcrlf
Response.Write" <td width=40 align=center>推荐</td>" & vbcrlf
Response.Write"</tr>" & vbcrlf
Response.Write"<TR><TD colspan=10 height=2 background=""../Skins/"& Skins_Folder &"/Dot.gif""></TD></TR>" & vbcrlf
Response.Write"</table>"& Vbcrlf
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
i=0
Do while not Rs.eof
Response.Write"<table width=98% border=0 cellspacing=0 cellpadding=0 align=center>" & vbcrlf
response.write"<tr bgcolor=""#FFFFFF"" onMouseOver=""this.bgColor='#FAFAFA';"" onMouseOut=""this.bgColor='#FFFFFF'"">" & vbcrlf
Response.Write"<td width=12 align=center><input name=id type=checkbox value="& rs("Shopid") &"></td>" & vbcrlf
response.write"<td width=72 align=center>" & vbcrlf
if IsNull(Rs("ShopImage")) then
Response.Write"<a href=""../shop/index.asp?shopid="& rs("shopid") &"""><img src=""../Skins/"& SKINS_FOLDER &"/ShopStar.gif"" width=""72"" height=""72"" border=""0"" alt="""& Rs("ShopName") &"""></a>"
else
Response.Write"<a href=""../shop/index.asp?shopid="& rs("shopid") &"""><img src=""../upfile/ReadDbFile.asp?SID="& Rs("ShopID") &""" width=""72"" height=""72"" border=""0"" alt="""& Rs("ShopName") &"""></a>"
End if
response.write"</td>" & vbcrlf
response.write"<td width=120 align=left style=""Line-height:23px;""><a href=Edit_Shop.asp?Sid="&rs("Shopid")&">"
Dim ShopTitle
Shoptitle=InterceptString(rs("ShopName"),20)
response.write "<Span Style=""color: #0044CC; Font-weight: bold"">"& Shoptitle &"</Span>"
response.write"</a>"
Response.Write"<br>"
Response.Write"卖家: <a href=""Search_Auction.asp?BBR_AucOwner="& Rs("ShopOwnerId") &""" title=""点击搜索此用户的所有商品"" class=link_on_td>"& Rs("RegUserName") &"</a><BR>" & Vbcrlf
response.write"</td>" & vbcrlf
response.write"<td width=180 align=Left>"& Vbcrlf
if Len(Rs("ShopIntroduce"))>1 then Response.Write Left(Rs("ShopIntroduce"),100)
response.write"</td>" & vbcrlf
response.write"<td width=80 align=center>" & vbcrlf
Response.Write Rs("RegState") & Rs("RegCity")
response.write"</td>" & vbcrlf
Response.Write"<td width=60 align=center>" & vbcrlf
Response.Write rs("ShopRegTime")
Response.Write"</td>" & vbcrlf
response.write"<td width=40 align=center>"
Response.Write Disp_ShopStar(Rs("ShopFlag"),1)
Response.write"</td>" & vbcrlf
response.write"<td width=40 align=center>"
if Rs("ShopStatus")=1 then
Response.Write"<Span Style=""Color: #EE0000"">Vip</Span>"
else
Response.Write"免费"
end if
Response.write"</td>" & vbcrlf
response.write"<td width=40 align=center>"
if Rs("ShopCheck")=1 then
Response.Write"<Span Style=""Color: #EE0000"">已</Span>"
else
Response.Write"未"
end if
Response.write"</td>" & vbcrlf
response.write"<td width=40 align=center>"
if Rs("BBR_ShopCommend")>=1 then
Response.Write"<Span Style=""Color: #EE0000"">已</Span>"
else
Response.Write"未"
end if
Response.write"</td>"& Vbcrlf
Response.Write"</tr>" & vbcrlf
Response.Write"<TR><TD colspan=10 height=2 background=""../Skins/"& Skins_Folder &"/Dot.gif""></TD></TR>" & vbcrlf
Response.Write"</table>" & vbcrlf
Response.Flush
i=i+1
if i>JsPerPage then Exit Do
Rs.movenext
loop
Response.Write"<input name=act type=hidden value=shop>"& Vbcrlf
Response.Write"</form>"
Response.Write"<table width=98% border=0 cellspacing=0 cellpadding=0 align=center>" & vbcrlf
response.write"<tr>" & vbcrlf
response.write"<td align=""right"" colspan=""6"">" & vbcrlf
response.write"<table cellspacing=0 cellpadding=0 width=100% 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=45% height=25>" & vbcrlf
response.write" <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>]页 当前第[<font class=fblack>"& currentpage &"</font>]页</td>"
response.write"<td width=30% ><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% >" & 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 Name=BBR_ShopName type=hidden value="&BBR_ShopName&">"& Vbcrlf
Response.Write"<Input Name=BBR_ShopFlag type=hidden value="&BBR_ShopFlag&">"& Vbcrlf
Response.Write"<Input Name=BBR_ShopStatus type=hidden value="&BBR_ShopStatus&">"& 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_ShopPlace_Prov&">"& Vbcrlf
Response.Write"<Input Name=TPL_City type=hidden value="&BBR_ShopPlace_City&">"& Vbcrlf
Response.Write"<Input Name=Place type=hidden value="&BBR_ShopPlace&">"& Vbcrlf
Response.Write"<Input Name=BBR_ShopRegTime type=hidden value="&BBR_ShopRegTime&">"& Vbcrlf
Response.Write"<Input Name=BBR_ShopCloseTime type=hidden value="&BBR_ShopCloseTime&">"& Vbcrlf
Response.Write"<input type=""submit"" name=""B4"" value=""转向"" class=""button"">"& Vbcrlf
Response.Write"</td>"
response.write"</tr>" & vbcrlf
response.write"</form>" & vbcrlf
response.write"</tbody>" & vbcrlf
response.write"</table>" & vbcrlf
response.write"</td></tr></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 + -