表一 |
style |
ID |
数字 |
Parent_ID |
数字 |
Name |
文本 |
head |
文本 |
content |
备注 |
language |
数字 |
orders |
数字 |
表二 |
products |
ProductID |
数字 |
Style |
数字 |
ProductName |
文本 |
Description |
备注 |
Small_pic |
文本 |
Big_pic |
文本 |
Createdate |
日期/时间 |
Hits |
数字 |
orders |
数字 |
<!--#include file="conn.asp"-->
<table width="200" border="1">
<tr>
<td>
<table width="90%" border="0" cellspacing="0" cellpadding="0">
<%
set rs=server.createobject("adodb.recordset")
set rs1=server.createobject("adodb.recordset")
if request("lbid")<>"" then
sql="select ID,Name from style where id="&cint(request("lbid"))&""
rs.open sql,conn,1,1
if not rs.eof then
%>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="left"> <img src="/images/ay_zt.jpg" width="9" height="12" /> <a href="111.asp"><span class="second_dh"><%=rs("name")%></span></a></td>
</tr>
<tr>
<td><img src="/images/xx.jpg" width="172" height="10" /></td>
</tr>
</table></td>
</tr>
<%
sql1="select * from products where style="&cint(request("lbid"))&""
rs1.open sql1,conn,1,1
if not rs1.eof then
for i=1 to rs1.recordcount
%>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="30" align="left"> </td>
<td width="141" align="left" class="san"><a href="product.asp?ID=<%=rs1("ProductId")%>&lbid=<%=request("lbid")%>"><font class="san"><%=rs1("ProductName")%></font></a></td>
</tr>
<tr>
<td colspan="2"><img src="/images/xx1.jpg" width="172" height="10" /></td>
</tr>
</table></td>
</tr>
<%
rs1.movenext
next
rs1.close
end if
end if
rs.close
else
sql="select ID,Name from style where Parent_id=0"
rs.open sql,conn,1,1
while not rs.eof
%>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="left"> <img src="/images/ay_zt.jpg" width="9" height="12" /> <a href="111.asp?lbid=<%=rs("id")%>&images=-1&style=<%=server.URLEncode(rs("name"))%>"><span class="second_dh"><%=rs("name")%></span></a></td>
</tr>
<tr>
<td><img src="/images/xx.jpg" width="172" height="10" /></td>
</tr>
</table></td>
</tr>
<%
rs.movenext
wend
rs.close
end if
%>
</table>
</td>
</tr>
</table>
|