<!--#include file="Conn.asp"-->
<!--#include file ="Check_Manager.asp"-->
<%
dim sql,rsBigClass,rsSmallClass,ErrMsg
set rsBigClass=server.CreateObject("adodb.recordset")
rsBigClass.open "Select * From [BigClassProduct]",conn,1,3
%>
<script language="JavaScript" type="text/JavaScript">
function checkBig()
{
  if (document.form1.BigClassName.value=="")
  {
    alert("大类名称不能为空！");
    document.form1.BigClassName.focus();
    return false;
  }
}
function checkSmall()
{
  if (document.form2.BigClassName.value=="")
  {
    alert("请先添加大类名称！");
	document.form1.BigClassName.focus();
	return false;
  }

  if (document.form2.SmallClassName.value=="")
  {
    alert("小类名称不能为空！");
	document.form2.SmallClassName.focus();
	return false;
  }
}
function ConfirmDelBig()
{
   if(confirm("确定要删除此大类？删除此大类同时将删除所包含的小类和该类下的所有产品！"))
     return true;
   else
     return false;
	 
}

function ConfirmDelSmall()
{
   if(confirm("确定要删除此小类吗？删除此小类同时将删除该类下的所有产品！"))
     return true;
   else
     return false;
	 
}
</script>
<html>
<head>
<titel></titel>
<LINK href="admin/admin.css" type=text/css rel=stylesheet>
<style type="text/css">
<!--
.style5 {color: #000000}
.style6 {color: #FF0000}
-->
</style>
</head>
<body>
<table width="100%" height="37%" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td align="center" valign="top"> <table width="90" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr> 
          <td align="center" valign="top"><br> 
          <a href="Product_EditClass.asp?add=bigclass"><strong><span class="style5">添加<span class="style6">项目案例</span>一级分类</span></strong></a><br> 
            <br> 
            <table class=tableBorder width="500" border="0" cellpadding="0" cellspacing="1" bgcolor="#0099FF">
              <tr> 
                <td width="50%" height="25" align="center" background="admin/admin_bg_1.gif"><strong>栏目名称</strong></td>
                <td align="center" background="admin/admin_bg_1.gif"><strong>操作选项</strong></td>
              </tr>
              <%
	do while not rsBigClass.eof
%>
              <tr> 
                <td width="233" height="22" bgcolor="#FFFFFF"><img src="images/plus.gif"> <%=rsBigClass("Product_BigClass")%></td>
                <td align="right" bgcolor="#FFFFFF" style="padding-right:10">
               <a href="Product_EditClass.asp?add=smallclass">
<font color="#FF0000">添加二级分类</font></a> 
                  | <a href="Product_EditClass.asp?action=upbig&bigid=<%=rsBigClass("Product_ID")%>">修改</a> | <a href="Product_EditClass.asp?action=delbig&bigid=<%=rsBigClass("Product_ID")%>" onClick="return ConfirmDelBig();">删除</a></td>
              </tr>
<%
set rsSmallClass=server.CreateObject("adodb.recordset")
rsSmallClass.open "Select * From [SmallClassProduct] Where Product_BigClassName='" & rsBigClass("Product_BigClass") & "'",conn,1,1
if not(rsSmallClass.bof and rsSmallClass.eof) then
do while not rsSmallClass.eof%>
              <tr> 
                <td width="233" height="22" bgcolor="#FFFFFF">&nbsp;&nbsp; <%=rsSmallClass("Product_SmallClassName")%></td>
                <td align="right" bgcolor="#FFFFFF" style="padding-right:10">
             <a href="Product_EditClass.asp?action=upsmall&smallid=<%=rsSmallClass("Product_SmallID")%>">修改</a> 
                  | <a href="Product_EditClass.asp?action=delsmall&smallid=<%=rsSmallClass("Product_SmallID")%>" onClick="return ConfirmDelSmall();">删除</a></td>
              </tr>
              <%
			rsSmallClass.movenext
		loop
	  end if
	  rsSmallClass.close
	  set rsSmallClass=nothing	
rsBigClass.movenext
loop
%>
            </table>
            <br> </td>
        </tr>
      </table>
      <%
rsBigClass.close
set rsBigClass=nothing
call CloseConn()
%>
    </td>
  </tr>
</table>
</body>
</html>
