<!--#include file="conn.asp"-->


<%


call head()
Call saycarda(""&dlname&"")
%>
<!--#INCLUDE file="../bbs/sy1.asp"-->


<%
dim dlid
dlid=request.QueryString("dlid")
xid=request.QueryString("xid")
set npp=Server.CreateObject("ADODB.Recordset")
rspl="select * from shop_lm where id="&dlid
npp.open rspl,connshop,1,2
dlname=npp("name")
dljj=npp("fljj")
pag=npp("pag")
npp.close
set npp=nothing
%>



--商品分类--<br/>
<%
set rsez1=server.createobject("ADODB.Recordset")
aqlz1="select * from shop_zlm where did="&dlid&" order by id desc"
rsez1.open aqlz1,connshop,1,2
if not rsez1.eof then

set rsez=server.createobject("ADODB.Recordset")
aqlz="select * from shop_zlm where did="&dlid&" order by id desc"

response.write "<select name='idp'>"
rsez.open aqlz,connshop,1,2
z=1
 dim nini,shopn,shopnn
do while not rsez.eof

response.write "<option value='0'>"&ubb(rsez("name"))&"</option>"
shopnn=("LCkaas.asp?saytk="&saytk&"&amp;xid="&rsez("id")&"&amp;dlid="&dlid&"&amp;sid="&sid&"")
z=z+1
rsez.movenext
loop
rsez.close
set rsez=Nothing

Response.write "</select>"

If saytk<>1 then
Response.write "<form name='form' method='post' action='"&shopnn&"'>"
response.write "<input type=""submit"" name=""Submit"" value=""查看""></form><br/>"
Else
Response.write "<anchor title='查看'>查看<go href='"&shopnn&"' method='post' accept-charset='utf-8'></go></anchor><br/>"
End if


end if
%><br/>

<%if dlpd=1 then%>
<%=ubb2(dljj)%><br/>
<%end if%>
<!--以下提取属于本大类的商品并分页-->
<%
set rsxl=Server.CreateObject("ADODB.Recordset")
rspl="select * from shop_xx where lid='"&dlid&"'"
rsxl.open rspl,connshop,1,2
if rsxl.eof then
   Response.write "<br/>"
Else
page=cint(request.QueryString("page"))
if page="" or page<1 then page=1
maxpage=int((rsxl.recordcount-1)/pag)+1
if page>maxpage then page=maxpage

rsxl.Move((page-1)*pag)
dim j
j=1
do while ((not rsxl.EOF) and j <=10000)
%>
<%=((page-1)*pag+j)%>.<a href='view.asp?saytk=<%=saytk%>&amp;id=<%=rsxl("id")%>&amp;pagegg=<%=page%>&amp;sid=<%=sid%>'><%=ubb(rsxl("name"))%></a>
<br/>
<%
rsxl.Movenext  
j=j+1
loop

if page*pag<rsxl.recordcount then response.write("<a href='list.asp?dlid=" & dlid & "&amp;page=" & page+1 & "&amp;sid="&sid&"'>下一页</a>")
if page>1 then response.write("<a href='list.asp?saytk="&saytk&"&amp;dlid=" & dlid & "&amp;page=" & page-1 & "&amp;sid="&sid&"'>上一页</a>")

if page*pag<rsxl.recordcount or page>1 then response.write("<br/>")
if page*pag<rsxl.recordcount then response.write("----------<br/>(第"& page & "页/共" & (int(rsxl.recordcount/pag+1)) &"页/总" & rsxl.recordcount & "条)<br/>")
end if
%>
<!--#include file="fanhui.asp"-->

<%
call headsay()
%>
