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

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script language="javascript">
function hideAll() {
for(i=0;i<odiv.length;i++) {
odiv[i].style.display="none";
}
}
function showObj(num)
{

if (odiv[num].style.display=="none")
{
hideAll();
odiv[num].style.display="inline";
}
else {
odiv[num].style.display="none";
}
}
</script>
<style type="text/css">
<!--
.divctrl01{
cursor:hand;height:25px; /*控制一级类别高度*/
}
.divctrl02{
cursor:hand;height:25px; /*控制二级类别高度*/
}
body,td,th {
font-size: 12px;
}
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style>
</head>

<body>
<%
Set rs=Server.CreateObject("ADODB.RecordSet")
sql="SELECT * from GoodsType where mintypeid=0 order by id asc"
rs.Open sql,conn,1,1
if Rs.eof and rs.bof then
Response.Write("没有分类")
Response.end
else
i=0
do while not rs.eof
%>

<div onClick="showObj(<%= i %>)" class="divctrl01"> + <b><%= rs("type") %></b></div>
<div id="odiv" style="display:none" >
<%
Set rs2=Server.CreateObject("ADODB.RecordSet")
sql2="SELECT * from GoodsType where mintypeid="&rs("id")&" order by id desc"
rs2.Open sql2,conn,1,1
if Rs2.eof and rs2.bof then
Response.Write("")
else

j=0
do while not rs2.eof
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="25"> </td>
<td height="25"><a href="products.asp?id=<%= rs2("id") %>&typen=<%= rs("type") %>"><%= rs2("mintype") %></a></td>
</tr>
</table>

<%
rs2.movenext
loop
j=j+1
end if
rs2.close
set rs2=nothing
%>
</div>
<%
i=i+1
rs.movenext
loop
end if
rs.close
set rs=nothing
%>
</body>
</html>