📄 reacsh.asp
字号:
Exit Do
End If
UC_rs.MoveNext
Loop
End If
End If
UC_BindingTypes=Array("RS","LITERAL","RS","RS","NONE","RS","NONE")
UC_BindingValues=Array("productid","1","productname","xprice","","weight","")
UCCart1.AddItem UC_rs,UC_BindingTypes,UC_BindingValues,"increment"
' always redirect to remove the "UC_AddId" query param.
if (UC_redirectPage = "") Then UC_redirectPage = CStr(Request.ServerVariables("URL"))
If (InStr(1, UC_redirectPage, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
newQS = "?"
For Each Item In Request.QueryString
If (Item <> "UC_AddId") Then
If (Len(newQS) > 1) Then newQS = newQS & "&"
newQS = newQS & Item & "=" & Server.URLencode(Request.QueryString(Item))
End If
Next
if (Len(newQS) > 1) Then UC_redirectPage = UC_redirectPage & newQS
End If
Response.Redirect(UC_redirectPage)
End If
%>
<%
' *** Move To Record: if we dont know the record count, check the display range
If (MM_rsCount = -1) Then
' walk to the end of the display range for this page
i = MM_offset
While (Not MM_rs.EOF And (MM_size < 0 Or i < MM_offset + MM_size))
MM_rs.MoveNext
i = i + 1
Wend
' if we walked off the end of the recordset, set MM_rsCount and MM_size
If (MM_rs.EOF) Then
MM_rsCount = i
If (MM_size < 0 Or MM_size > MM_rsCount) Then MM_size = MM_rsCount
End If
' if we walked off the end, set the offset based on page size
If (MM_rs.EOF And Not MM_paramIsDefined) Then
If (MM_offset > MM_rsCount - MM_size Or MM_offset = -1) Then
If ((MM_rsCount Mod MM_size) > 0) Then
MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
Else
MM_offset = MM_rsCount - MM_size
End If
End If
End If
' reset the cursor to the beginning
If (MM_rs.CursorType > 0) Then
MM_rs.MoveFirst
Else
MM_rs.Requery
End If
' move the cursor to the selected record
i = 0
While (Not MM_rs.EOF And i < MM_offset)
MM_rs.MoveNext
i = i + 1
Wend
End If
%>
<%
' *** Move To Record: update recordset stats
' set the first and last displayed record
product_first = MM_offset + 1
product_last = MM_offset + MM_size
If (MM_rsCount <> -1) Then
If (product_first > MM_rsCount) Then product_first = MM_rsCount
If (product_last > MM_rsCount) Then product_last = MM_rsCount
End If
' set the boolean used by hide region to check if we are on the last record
MM_atTotal = (MM_rsCount <> -1 And MM_offset + MM_size >= MM_rsCount)
%>
<%
' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters
' create the list of parameters which should not be maintained
MM_removeList = "&index="
If (MM_paramName <> "") Then MM_removeList = MM_removeList & "&" & MM_paramName & "="
MM_keepURL="":MM_keepForm="":MM_keepBoth="":MM_keepNone=""
' add the URL parameters to the MM_keepURL string
For Each Item In Request.QueryString
NextItem = "&" & Item & "="
If (InStr(1,MM_removeList,NextItem,1) = 0) Then
MM_keepURL = MM_keepURL & NextItem & Server.URLencode(Request.QueryString(Item))
End If
Next
' add the Form variables to the MM_keepForm string
For Each Item In Request.Form
NextItem = "&" & Item & "="
If (InStr(1,MM_removeList,NextItem,1) = 0) Then
MM_keepForm = MM_keepForm & NextItem & Server.URLencode(Request.Form(Item))
End If
Next
' create the Form + URL string and remove the intial '&' from each of the strings
MM_keepBoth = MM_keepURL & MM_keepForm
if (MM_keepBoth <> "") Then MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
if (MM_keepURL <> "") Then MM_keepURL = Right(MM_keepURL, Len(MM_keepURL) - 1)
if (MM_keepForm <> "") Then MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
' a utility function used for adding additional parameters to these strings
Function MM_joinChar(firstItem)
If (firstItem <> "") Then
MM_joinChar = "&"
Else
MM_joinChar = ""
End If
End Function
%>
<%
' *** Move To Record: set the strings for the first, last, next, and previous links
MM_keepMove = MM_keepBoth
MM_moveParam = "index"
' if the page has a repeated region, remove 'offset' from the maintained parameters
If (MM_size > 0) Then
MM_moveParam = "offset"
If (MM_keepMove <> "") Then
params = Split(MM_keepMove, "&")
MM_keepMove = ""
For i = 0 To UBound(params)
nextItem = Left(params(i), InStr(params(i),"=") - 1)
If (StrComp(nextItem,MM_moveParam,1) <> 0) Then
MM_keepMove = MM_keepMove & "&" & params(i)
End If
Next
If (MM_keepMove <> "") Then
MM_keepMove = Right(MM_keepMove, Len(MM_keepMove) - 1)
End If
End If
End If
' set the strings for the move to links
If (MM_keepMove <> "") Then MM_keepMove = MM_keepMove & "&"
urlStr = Request.ServerVariables("URL") & "?" & MM_keepMove & MM_moveParam & "="
MM_moveFirst = urlStr & "0"
MM_moveLast = urlStr & "-1"
MM_moveNext = urlStr & Cstr(MM_offset + MM_size)
prev = MM_offset - MM_size
If (prev < 0) Then prev = 0
MM_movePrev = urlStr & Cstr(prev)
%>
<SCRIPT RUNAT=SERVER LANGUAGE=VBSCRIPT>
function DoTrimProperly(str, nNamedFormat, properly, pointed, points)
dim strRet
strRet = Server.HTMLEncode(str)
strRet = replace(strRet, vbcrlf,"")
strRet = replace(strRet, vbtab,"")
If (LEN(strRet) > nNamedFormat) Then
strRet = LEFT(strRet, nNamedFormat)
If (properly = 1) Then
Dim TempArray
TempArray = split(strRet, " ")
Dim n
strRet = ""
for n = 0 to Ubound(TempArray) - 1
strRet = strRet & " " & TempArray(n)
next
End If
If (pointed = 1) Then
strRet = strRet & points
End If
End If
DoTrimProperly = strRet
End Function
</SCRIPT>
<SCRIPT RUNAT=SERVER LANGUAGE=VBSCRIPT>
function DoDateTime(str, nNamedFormat, nLCID)
dim strRet
dim nOldLCID
strRet = str
If (nLCID > -1) Then
oldLCID = Session.LCID
End If
On Error Resume Next
If (nLCID > -1) Then
Session.LCID = nLCID
End If
If ((nLCID < 0) Or (Session.LCID = nLCID)) Then
strRet = FormatDateTime(str, nNamedFormat)
End If
If (nLCID > -1) Then
Session.LCID = oldLCID
End If
DoDateTime = strRet
End Function
</SCRIPT>
<html>
<head>
<title>搜索结果</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="ddd.css" type="text/css">
<script language="JavaScript">
<!--
function MM_popupMsg(msg) { //v1.0
alert(msg);
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="2" marginwidth="0" marginheight="0">
<p>
<SCRIPT language=javascript>
<!--
document.ns = navigator.appName == "Netscape"
window.screen.width>800 ? imgheight=110:imgheight=110
window.screen.width>800 ? imgleft=110:imgleft=110
function qingzuiload()
{
if (navigator.appName == "Netscape")
{document.qingzui.pageY=pageYOffset+window.innerHeight-imgheight;
document.qingzui.pageX=pageXOffset+window.innerWidth-imgleft;
qingzuimove();
}
else
{
qingzui.style.top=document.body.scrollTop+document.body.offsetHeight-imgheight;
qingzui.style.left=document.body.offsetWidth-imgleft;
qingzui2.style.top=document.body.scrollTop+document.body.offsetHeight-imgheight-80;
qingzui2.style.left=document.body.offsetWidth-imgleft;
qingzuimove();
}
}
function qingzuimove()
{
if(document.ns)
{
document.qingzui.top=pageYOffset+window.innerHeight-imgheight
document.qingzui.left=pageXOffset+window.innerWidth-imgleft;
setTimeout("qingzuimove();",80)
}
else
{
qingzui.style.top=document.body.scrollTop+document.body.offsetHeight-imgheight;
qingzui.style.left=document.body.offsetWidth-imgleft;
qingzui2.style.top=document.body.scrollTop+document.body.offsetHeight-imgheight-80;
qingzui2.style.left=document.body.offsetWidth-imgleft;
setTimeout("qingzuimove();",80)
}
}
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true)
if (navigator.appName == "Netscape")
{document.write("<layer id=qingzui top=300 width=64 height=80><a href=cart.asp><img src=images/lookcart.gif border=0></a></layer>")
qingzuiload()}
else
{
document.write("<div id=qingzui style='position: absolute;width:64;top:300;hidden: visible;z-index: 1'><a href=cart.asp><img src=images/lookcart.gif border=0></a></div>"
+"<div id=qingzui2 style='position: absolute;visibility: hidden;z-index: 10'><img src=images/lookcart.gif></div>");
qingzuiload()
}
//-->
</SCRIPT>
<!--#include file="top.asp" -->
<table width="771" border="0" cellspacing="0" cellpadding="0" align="center" height="258" class="bk1">
<tr>
<td valign="top" height="44"><br>
<br>
<table width="143" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td><img src="images/sousuo.gif" width="300" height="70"></td>
</tr>
</table>
<div align="center"><br>
<b>
<% If Not product.EOF Or Not product.BOF Then %>
一共搜索到<font color="#FF0000"><%=(product_total)%></font> 个符合条件的商品。
<% End If ' end Not product.EOF Or NOT product.BOF %>
</b><br>
<br>
<%
While ((Repeat1__numRows <> 0) AND (NOT product.EOF))
%>
<table width="476" border="0" cellspacing="2" cellpadding="0" align="center" class="dfont">
<tr>
<td height="125" rowspan="9" width="116"> <font color="#000000"><img src="images/product/<%=(product.Fields.Item("images").Value)%>" width="120" height="120"></font></td>
<td height="15" width="354">
<p><font color="#000000">商品名称:<b><%=(product.Fields.Item("productname").Value)%>
<% If (product.Fields.Item("dazhe").Value) = (-1) Then 'script %>
<img src="images/hotprice.gif" width="24" height="24">
<% End If ' end If (product.Fields.Item("dazhe").Value) = (-1) script %>
</b></font></p>
</td>
</tr>
<tr>
<td height="2" width="354"><font color="#000000">商品序号:<%=(product.Fields.Item("productid").Value)%></font></td>
</tr>
<tr>
<td height="13" width="354"><font color="#000000">生产厂商:<%=(product.Fields.Item("changshang").Value)%></font></td>
</tr>
<tr>
<td height="10"><font color="#000000">出厂日期:<%= DoDateTime((product.Fields.Item("cdate").Value), 1, -1) %></font></td>
</tr>
<tr>
<td height="10" width="354"><font color="#000000">
<% If (product.Fields.Item("dazhe").Value) <> (-1) Then 'script %>
原价:<font color="#FF0000"><%=(product.Fields.Item("yprice").Value)%></font>元
<% End If ' end If (product.Fields.Item("dazhe").Value) <> (-1) script %>
<% If (product.Fields.Item("dazhe").Value) = (-1) Then 'script %>
原价:<span class="hot"><%=(product.Fields.Item("yprice").Value)%></span>元 特价:<font color="#FF0000"><%=(product.Fields.Item("xprice").Value)%><font color="#000000">元</font></font>
<% End If ' end If (product.Fields.Item("dazhe").Value) = (-1) script %>
</font></td>
</tr>
<tr>
<td height="2" width="354"><font color="#000000">重量:<%=(product.Fields.Item("weight").Value)%>克</font></td>
</tr>
<tr>
<td height="0" width="354">库存:<%=(product.Fields.Item("Stock").Value)%></td>
</tr>
<tr>
<td height="0" width="354">查看次数:<%=(product.Fields.Item("hit").Value)%></td>
</tr>
<tr>
<td height="0" width="354"><A HREF="<%=(UC_AddLink + CStr(UC_rs.Fields.Item(UC_uniqueCol).Value)) %>"><img border=0 src="images/mai.gif" width="67" height="15" onClick="MM_popupMsg('此商品已经添加到您的购物车了,请继续购买。')"></A></td>
</tr>
<tr>
<td height="31" colspan="2"><font color="#000000"><%=(product.Fields.Item("productjs").Value)%></font></td>
</tr>
<tr>
<td height="2" colspan="2">
<div align="center"><img src="images/line204.gif" width="350" height="1"></div>
</td>
</tr>
</table>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
product.MoveNext()
Wend
%>
<p>
<% If product.EOF And product.BOF Then %>
<b>没有符合条件的商品,您可以使用<a href="g_reasch.asp"><font color="#FF0000">高级搜索</font></a></b>。
<% End If ' end product.EOF And product.BOF %>
</p>
<table border="0" width="50%" align="center" class="dfont">
<tr>
<td width="23%" align="center">
<% If MM_offset <> 0 Then %>
<a href="<%=MM_moveFirst%>">第一页</a>
<% End If ' end MM_offset <> 0 %>
</td>
<td width="31%" align="center">
<% If MM_offset <> 0 Then %>
<a href="<%=MM_movePrev%>">上一页</a>
<% End If ' end MM_offset <> 0 %>
</td>
<td width="23%" align="center">
<% If Not MM_atTotal Then %>
<a href="<%=MM_moveNext%>">下一页</a>
<% End If ' end Not MM_atTotal %>
</td>
<td width="23%" align="center">
<% If Not MM_atTotal Then %>
<a href="<%=MM_moveLast%>">末一页</a>
<% End If ' end Not MM_atTotal %>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
<br>
<!--#include file="bottom.asp" -->
</body>
</html>
<%
product.Close()
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -