求助 这个上一个产品 下一下产品只能显示所有的 帮忙调下 改成 只显示当前分类下的可以吗
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%><!--#include file="Inc/Inc.asp"-->
<!--#include file="Inc/Conn.asp"-->
<!--#include file="Inc/function.asp"-->
<!--#include file="Inc/Class.asp"-->
<!--#include file="Inc/MD5.asp"-->
<%
Dim ID
ID=request.QueryString("ID")
if ID="" or Not IsNumeric(ID) then ID=0
ID=Cint(ID)
Dim pRs
Dim pID,pclassid, pName, pImg, pContent, pExtend
Set pRs = Conn.Execute("Select ID,classid, Name, IMG, Content, Extend From [Product] Where ID = "& ID)
if Not (pRs.Bof And pRs.Eof) then
pID = pRs(0)
pclassid = pRs(1)
pName = pRs(2)
pImg = pRs(3)
pContent = pRs(4)
pExtend = pRs(5)
pImg = Split(pImg, "|||")(1)
pImg = Replace(pImg, "../", "")
end if
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>百马尊尼酒窖</title>
<link href="Page/Css/Css.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {background: #fdf1cd}
-->
</style>
</head>
<body>
<table width="700" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="354" rowspan="2" valign="top" style="padding:15px"><img src="<%=pImg%>" onload="if(this.offsetWidth>350){this.style.width='350px';}" /></td>
<td width="346" height="35" valign="top">
<div style="font-size: 14px; font-weight: bold; padding-top: 15px"><%=pName%></div>
<div style="padding-top: 15px<%if pExtend="" then response.Write(" ;display: none")%>">净含量:<%=pExtend%></div>
<div height="238" valign="top" style="padding-top:15px; word-break:break-all<%if pContent="" then response.Write(" ;display: none")%>">酒评:<%=pContent%></div>
</td>
</tr>
<tr>
<td style="padding-right:15px" align="right">
<%
sql2="select top 1 * from Product where id <" & ID & " order by id desc"
Set rs2= Server.CreateObject("ADODB.Recordset")
rs2.open sql2,conn,1,3
if rs2.eof then
response.Write("上一个产品:没有了")
else
pid3=rs2("id")%>
<a href=Products_View.asp?ID=<%=pid3%>><img src="Images/s.gif" width="57" height="22" border="0" /></a>
<%
end if
%>
<%
sql1="select top 1 * from Product where id > " & ID & " order by id"
Set rs1= Server.CreateObject("ADODB.Recordset")
rs1.open sql1,conn,1,3
if rs1.eof or rs1.bof then
response.Write("下一个产品:没有了")
else
pid2=rs1("id")%>
<a href=Products_View.asp?ID=<%=pid2%>><img src="Images/x.gif" width="57" height="22" border="0" /></a>
<%
end if%>
当前分类<%=pclassid%>
<a href="ShopCar.asp?Sort=Add&ID=<%=pID%>" target="Order"><img src="Images/order.gif" width="57" height="22" border="0" /></a></td>
</tr>
</table>
</body>
</html>
求助 这个上一个产品 下一下产品只能显示所有的 帮忙调下 改成 只显示当前分类下的可以吗