<!--#include file="include/nowshop.asp" -->
<%
call aspsql()
id=request("id")
If not isNumeric(id) then
response.redirect "main.asp"
response.end
end if

title="title"&cstr(id)
body="body"&cstr(id)
Set rsp = conn.Execute("select * from page")
body=rsp(body)
title=rsp(title) 
set rsp=nothing
if body="" then response.redirect "main.asp"
%>
<html><head>
<title><%=title%>-<%=sitename%>-<%=siteurl%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="description" content="<%=sitedescription%>">
<meta name="keywords" content="<%=sitekeywords%>">
<LINK href="list/newhead.css" type=text/css rel=stylesheet>
</head>

<center>
<!--#include file="top.asp"-->

  <table width="768" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td width="180" align="left" valign="top" background=images/left_bg.gif>
	        <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
          <TR> 
            <TD><IMG height=22 src="list/zbhz_shopping_car.gif" 
            width=180></TD>
          </TR>
          <TR> 
            <TD bgColor=#fcd8e7><IFRAME border=0 name=new_date11 marginWidth=0 
            marginHeight=0 src="gouwuche.asp" frameBorder=0 
            noResize width=178 scrolling=no height=83 spacing="0" 
            vspale="0"></IFRAME></TD></tr>
						<TR> 
               <TD height=5 bgcolor="#FFFFFF"></TD>
			  </tr>

			<TR> 
               <TD background="images/left_bg.gif"><IMG height=20 src="list/pic_fl.gif" 
              width=180></TD>
			  </tr>
			  <tr>
			  <td>
<TABLE align=center cellSpacing=0 cellPadding=0 width=175 border=0>
	<tr><td width=175 colspan=3 height=10 ></td></tr>
<%
color1="77CC00"     '分类列表中大类的颜色
color2="0066ff"     '分类列表中中类的颜色
viewmidclass=1      '是否显示中类，1表示显示，0表示不显示
dim larcode(100)    '最多支持100个大类
dim midcode(20)     '最多支持20个中类

	'以下是分类列表，首先读取全部大类，然后根据每个大类读取各自的中类
	response.write "<table width='175' border='0' align='center' cellpadding=1 cellspacing=1>"
	Dim a,b,c
	sqllar="select Distinct LarCode,LarSeq from bclass order by LarSeq"
	Set rsprodtree=Server.CreateObject("ADODB.RecordSet") 
	rsprodtree.Open sqllar,conn,1,1 

	if rsprodtree.bof and rsprodtree.eof then
		response.write "<tr><td width=175 colspan=3 height=100 align=center>对不起，本商城暂未开业</td></tr>"
	else
		
		i=0
		Do While Not rsprodtree.eof	
		i=i+1
		larcode(i)=rsprodtree("LarCode")
		rsprodtree.movenext	
		if rsprodtree.eof then exit do
		Loop
	end if
	set rsprodtree=nothing
	set sqllar=nothing


	
	FOR t=1 to i
	response.write "<tr><td width='175'  class='dfont' height=25 colspan=3 valign=middle><B>&nbsp;&nbsp;&nbsp;&nbsp;<img src=images/dot.gif  border=0>&nbsp;&nbsp;<a href='class.asp?LarCode="&LarCode(t)&"'>"&LarCode(t)&"</B></a></td></tr>"
	response.write "<tr>"

if viewmidclass<>0 then           '是否显示中类
	'以下是根据前面读取的大类名称，读取各个大类下的中类
	sqllar="select MIDCode,MIDSeq from bclass where larcode='"&larcode(t)&"' order by MIDSeq"
	Set rsprodtree=Server.CreateObject("ADODB.RecordSet") 
	rsprodtree.Open sqllar,conn,1,1 
		m=0
		Do While Not rsprodtree.eof	
		m=m+1
		midcode(m)=rsprodtree("midCode")
		rsprodtree.movenext	
		if rsprodtree.eof then exit do
		Loop

	set rsprodtree=nothing
	set sqllar=nothing

		for n=1 to m
		if n mod 2<>0 then
		response.write "<td width=85 align=right  class='dfont'><a href='class.asp?LarCode="&LarCode(t)&"&MidCode="&MidCode(n)&"'>"&MidCode(n)&"</a></TD>"
		else
		response.write "<td align=center width=5>|</td><td  width=85 class='dfont'><a href='class.asp?LarCode="&LarCode(t)&"&MidCode="&MidCode(n)&"'>"&MidCode(n)&"</a></TD></tr><tr>"
	    end if
		next
			response.write "<tr><td width=175 colspan=3 height=10 ></td></tr>"

end if

	next

%>
                                  </table>
			  </td>
			  </tr>
                    <TR> 
                      <TD bgcolor="#FFFFFF" height=30 valign="middle"><IMG height=25 src="list/pic_tj.gif" 
              width=180></TD>
                    </TR>
<tr><td>
                                <%
set cqrsprod=conn.execute("select  * from bproduc where online=true order by ClickTimes desc,AddDate desc")
Do While Not cqrsprod.eof
prodname=lleft(cqrsprod("ProdName"),22)
response.write "<tr><td class=td1 height=22>&nbsp;&nbsp;&nbsp;&nbsp;·<a href='list.asp?ProdId="&cqrsprod("ProdId")&"'><font alt='热门商品TOP"&K+1&"'>"&prodname&"</font></a></td></tr>"
k=k+1
if k>renmen_num-1 then exit do
if cqrsprod.eof then exit do
cqrsprod.movenext
loop
set cqrsprod=nothing
%>

</td></tr>
        </TBODY>
      </TABLE></TD>
      <TD rowSpan=2 align="center" vAlign=top>
	  <TABLE width=100% border=0 cellPadding=0 cellSpacing=0 bordercolor="#587ad9">
        <TBODY>
          <TR> 
            <TD height=12><table width="100%">
                  <tr> 
                    <td align="center" valign="middle"><TABLE cellSpacing=0 cellPadding=0 width=100% border=0 style="BORDER-RIGHT: #b1bfee 1px solid; BORDER-TOP: #b1bfee 1px solid; BORDER-LEFT: #b1bfee 1px solid; BORDER-BOTTOM: #b1bfee 1px solid" 
>
                        <TBODY>
                          <TR> 
                            <TD bgColor=#f4f5fd height=25><font color="#ff0000">　<b><%=title%></b></font></TD>
                          </TR>
                        </TBODY>
                      </TABLE></td>
                  </tr>
                  <tr> 
                    <td align="center" valign="middle">
                        <table width="100%" border="0" cellpadding="0" cellspacing="0" style="BORDER-RIGHT: #b1bfee 1px solid; BORDER-TOP: #b1bfee 1px solid; BORDER-LEFT: #b1bfee 1px solid; BORDER-BOTTOM: #b1bfee 1px solid">
                          <TR id=ps1 vAlign=center align=left> 
                            <TD height=35><%=body%></TD>
                          </TR>
                        </table>
</td>
                  </tr>
                </table></TD>
          </TR>
        </TBODY>
      </TABLE>
	  </TD>
    </TR>
  </TBODY>
</TABLE>
  <!--#include file="down.asp"-->
</body></center>

</html>
<%
conn.close
set conn=nothing
%>

