<!--#include file="../prohead.asp"-->
 <!--#include file="../checkrole.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%
call checkuser("cp")
if issession=0 then
gsid=Replace_Text(request.Cookies("Yxmemberid"))
else
gsid=session("id")
end if
set rs=server.createobject("adodb.recordset")
sql="select * from Websen_productclass_1 where gsid="&gsid&""
rs.open sql,conn,1,1
%>

<br>
<TABLE width=778 border=0 align="center" cellPadding=0 cellSpacing=0>
  <TBODY>
  <TR>
    <TD 
    style="BACKGROUND-POSITION: right 50%; BACKGROUND-IMAGE: url(../images/bg1.gif); BACKGROUND-REPEAT: repeat-y; BACKGROUND-COLOR: #ffffff" 
    vAlign=top align=middle>      <TABLE cellSpacing=0 cellPadding=0 width=100% border=0>
        <TBODY>
        <TR>
              <TD width="74%"><IMG height=32 src="../images/product_manage.gif" width=578 
            border=0></TD>
              <TD width="26%" background="../images/info_bg.gif">&nbsp;</TD>
        </TR>
		  </TBODY></TABLE>
  
	    <table border="1" cellspacing="0" cellpadding="0" Class="TableLine" bordercolor="#F9F9F9" width="100%">
          <tr> 
            <td height="31" colspan="7" align=center bgcolor="#F9F9F9"><b>小 类 管 理</b> </td>
          </tr>
          <tr align="center" height="22"> 
            <td height="31" bgcolor="#DCEDFC"><font color="#FF0000">所属大类</font></td>			
            <td bgcolor="#DCEDFC"><font color="#FF0000">小类名称</font></td>
            <td bgcolor="#DCEDFC"><font color="#FF0000">操&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;作</font></td>
          </tr>
<%	
if rs.eof or rs.bof then
response.write"<div align=center>您尚未创建产品分类</idv>"
else		
j=0
do while not rs.eof
j=j+1
%>

<form name=form2 method=post action=upproductclass_1.asp?cmd=up&SmallClassID=<%=rs("SmallClassID")%>&BigClassID=<%=rs("BigClassID")%>>
          <tr> 
            <td height="20" align="center" bgcolor="#FFFFFF">
			<%
			
			set rs4=server.CreateObject("adodb.recordset")
			sql4="select BigClassName from Websen_productclass where BigClassID="&rs("BigClassID")&" and gsid="&gsid&""
			rs4.open sql4,conn,1,1
			if not rs4.eof then
           response.write""&rs4("BigClassName")&""
		   set rs4=nothing
			end if
			 
			%>  
			</td>
            <td height="35" align="center" bgcolor="#FFFFFF"><input type=text name="SmallClassName" value="<%=rs("SmallClassName")%>" size=30 maxlength=20></td>
              <td width="150" height="20" align="center" bgcolor="#FFFFFF"> 
                <input type=submit name=Submit3 value=修改> 
              <INPUT onClick="if(confirm('将删除该分类下的所有产品,确定吗?')){window.location.href='upproductclass_1.asp?cmd=del&SmallClassID=<%=rs("SmallClassID")%>';}" type=button value=删除 name=button2> 
          </tr>
</form>
<%
rs.MoveNext
Loop
end if
%>
          <tr> 
            <td colspan="7" height="40" align="center" bgcolor="#F9F9F9"><font color="#FF0000">删除操作请谨慎使用！</font></td>
          </tr>
<%
sql="select * from Websen_productClass where gsid="&gsid&""
Set rs= Server.CreateObject("ADODB.Recordset") 
rs.open sql,conn,1,1				
if rs.EOF or rs.eof then
response.write"<tr><td align='center' colspan='7' height='25'><a href='addclass.asp'>请先添加产品大类</a></td></tr>"
else
%>
          <tr> 
          <form name="form1" method="post" action="upproductclass_1.asp?cmd=add">
              <td align="center" colspan="7" height="41"> 

在
<select size="1" name="BigClassid" style="font-size: 9pt">
<%
do while not rs.EOF
%>

<option value="<%=rs("BigClassID")%>"><%=trim(rs("BigClassName"))%></option>

<%
rs.MoveNext
loop
%>
</select>
中添加小类：			   
                <input name="SmallClassName" size="25" maxlength="20"> 
        &nbsp;<input type="submit" name="Submit" value="添加">
        &nbsp;<input type="reset" name="Submit2" value="重填">
              </td>
            </form>
          </tr>
<%end if%>
        </table>
<table border="0" cellpadding="0" cellspacing="0" align="center" width="100%"><tr><td height="10" bgcolor="#F7F7F7"></td></tr></table><br>
<br>
	  
	  
</tr>
</table>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>