<!--#include file="conn.asp"-->
<%if session("admin")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登陆！');history.go(-1);</script>"
response.End
else
if session("flag")>1 then
response.Write "<div align=center><font size=80 color=red><b>您没有此项目管理权限！</b></font></div>"
response.End
end if
end if
%>
<%dim anclassid,anclass,paixu
anclass=request.QueryString("nclass")
anclassid=request.QueryString("id")
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../images/css.css" rel="stylesheet" type="text/css">
<style>
td{font-size:9pt;line-height:120%;color:#353535} 
body{font-size:9pt;line-height:120%} 

a:link          { color: #000000; text-decoration: none }
a:visited       { color: #000000; text-decoration: none }
a:active        { color: #000000; text-decoration: none }
a:hover         { color: #336699; text-decoration: none; position: relative; right: 0px; top: 1px }
</style>
</head>

<body bgcolor="#799AE1">
<table width="80%" border="1" cellspacing="0" cellpadding="1" bordercolor="#6699FF" align="center">
  <tr> 
    <td> 
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td background="../images/back_3.gif" rowspan="2"> 
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="12v">
              <tr> 
                <td class="12v" > 
                  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" id="AutoNumber3" height="0" width="100%">
                    <tr> 
                      <td> 
                        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#006600">
                          <tr bgcolor="#FFFFFF"> 
                            <td height="16" colspan="2"> 
                              <div align="center"><font color="#000000">商品小类管理</font></div>
                            </td>
                          </tr>
                          <tr> 
                            <td width="24%" height="37" valign="top" bgcolor="#E8F1FF"> 
                              <div align="center"><br>
                                <select name="select" onChange="var jmpURL=this.options[this.selectedIndex].value ; if(jmpURL!='') {window.location=jmpURL;} else {this.selectedIndex=0 ;}" ><base target=Right> 
                                  <option selected>选择商品分类</option>
                                  <%set rs=server.createobject("adodb.recordset")
		rs.Open "select * from shop_anclass order by anclassidorder",conn,1,1
		do while not rs.eof %>
                                  <option value="nclass.asp?id=<%=rs("anclassid")%>&anclass=<%=rs("anclass")%>" ><%=trim(rs("anclass"))%></option>
                                  <%rs.movenext
		loop
		rs.close
		set rs=nothing
		%>
                                </select>
                                <br>
                                <%if request.QueryString("id")<>"" then
        response.Write "当前查讯："&request.QueryString("anclass")
        end if%>
                              </div>
                            </td>
                            <td width="76%" bgcolor="#E8F1FF"> 
                              <table width="86%" border="0" cellpadding="1" cellspacing="0">
                                <tr> 
                                  <td> 
                                    <div align="center">分类名称</div>
                                  </td>
                                  <td> 
                                    <div align="center">分类排序</div>
                                  </td>
                                  <td> 
                                    <div align="center">常用分类</div>
                                  </td>
                                  <td> 
                                    <div align="center">确定操作</div>
                                  </td>
                                </tr>
                                <%
        if anclassid="" then
        response.Write "<div align=center><font color=red>请选择左测的分类</font></div>"
        else
        set rs=server.CreateObject("adodb.recordset")
        rs.Open "select * from shop_nclass where anclassid="&anclassid&" order by nclassidorder",conn,1,1
         if rs.EOF and rs.BOF then
		  response.Write "<div align=center><font color=red>还没有分类</font></center>"
		  paixu=0
		  else
         do while not rs.EOF
         %>
                                <form name="form1" method="post" action="savenclass.asp?action=edit&id=<%=rs("nclassid")%>&anclass=<%=request.QueryString("anclass")%>">
                                  <tr> 
                                    <td> 
                                      <div align="center"> 
                                        <input name="nclass" type="text" id="nclass" size="16" value="<%=trim(rs("nclass"))%>">
                                        <input name="anclassid2" type="hidden" value="<%=request.QueryString("id")%>" id="Hidden1">
                                      </div>
                                    </td>
                                    <td> 
                                      <div align="center"> 
                                        <input name="nclassidorder" type="text" id="nclassidorder" size="4" value="<%=int(rs("nclassidorder"))%>">
                                      </div>
                                    </td>
                                    <td> 
                                      <div align="center"> 
                                        <input name="changyong2" type="checkbox" id="changyong" value="1">
                                        <%if rs("changyong")=1 then
                response.Write "<font color=red>常用</font>"
                else
                response.Write "增加"
                end if%>
                                      </div>
                                    </td>
                                    <td> 
                                      <div align="center"> 
                                        <input type="submit" name="Submit" value="修 改">
                                        &nbsp;<a href="savenclass.asp?id=<%=int(rs("nclassid"))%>&action=del&anclassid=<%=request.QueryString("id")%>&anclass=<%=request.QueryString("anclass")%>" onClick="return confirm('您确定进行删除操作吗？')"><font color=red>删除</font></a> 
                                      </div>
                                    </td>
                                  </tr>
                                </form>
                                <%rs.movenext
        loop
        paixu=rs.RecordCount
        rs.close
        set rs=nothing
        end if
        end if
				%>
                              </table>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<br>
<table width="80%" border="1" cellspacing="0" cellpadding="1" bordercolor="#6699FF" align="center">
  <tr> 
    <td> 
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td background="../images/back_3.gif" rowspan="2"> 
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="12v">
              <tr> 
                <td class="12v" > 
                  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" id="AutoNumber3" height="0" width="100%">
                    <tr> 
                      <td> 
                        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#006600">
                          <tr bgcolor="#FFFFFF"> 
                            <td height="16" colspan="2"> 
                              <div align="center"><font color="#000000">添加商品分类</font></div>
                            </td>
                          </tr>
                          <tr> 
                            <td width="24%" valign="top" bgcolor="#E8F1FF"> 
                              <div align="center"><br>
                                当前分类：<%=request.QueryString("anclass")%></div>
                            </td>
                            <td width="76%" bgcolor="#E8F1FF"> 
                              <table width="86%" border="0" cellpadding="1" cellspacing="0">
                                <tr> 
                                  <td> 
                                    <div align="center">分类名称</div>
                                  </td>
                                  <td> 
                                    <div align="center">分类排序</div>
                                  </td>
                                  <td> 
                                    <div align="center">常用分类</div>
                                  </td>
                                  <td> 
                                    <div align="center">确定操作</div>
                                  </td>
                                </tr>
                                <form name="form2" method="post" action="savenclass.asp?action=add&anclass=<%=request.QueryString("anclass")%>">
                                  <tr> 
                                    <td> 
                                      <div align="center"> 
                                        <input name="nclass2" type="text" id="nclass22" size="16">
                                      </div>
                                    </td>
                                    <td> 
                                      <div align="center"> 
                                        <input name="nclassidorder2" type="text" id="nclassidorder22" size="4" value="<%=paixu+1%>">
                                        <input name="anclassid" type="hidden" value="<%=request.QueryString("id")%>">
                                      </div>
                                    </td>
                                    <td> 
                                      <div align="center"> 
                                        <input name="changyong" type="checkbox" id="changyong" value="1">
                                        <font color="#FF0000">增加</font></div>
                                    </td>
                                    <td> 
                                      <div align="center"> 
                                        <input type="submit" name="Submit2" value="添 加">
                                      </div>
                                    </td>
                                  </tr>
                                </form>
                              </table>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<br>
<table width="80%" border="1" cellspacing="0" cellpadding="1" bordercolor="#6699FF" align="center">
  <tr> 
    <td> 
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td background="../images/back_3.gif" rowspan="2"> 
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="12v">
              <tr> 
                <td class="12v" > 
                  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" id="AutoNumber3" height="0" width="100%">
                    <tr> 
                      <td> 
                        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#006600">
                          <tr> 
                            <td bgcolor="#FFFFFF"> 
                              <div align="center"><font color="#000000">操作注意事项及说明</font></div>
                            </td>
                          </tr>
                          <tr> 
                            <td bgcolor="#E8F1FF"> 
                              <table width="80%" border="0" align="center" cellpadding="5" cellspacing="0">
                                <tr> 
                                  <td height="16"><font color="#FF0000">·请注意分类名称不要含有非法字符。<br>
                                    ·增加常用分类时，如果没有选择此小类所属大类为常用分类，则被列为&quot;其它&quot;分类。<br>
                                    ·进行删除操作的同时，会删除此分类下的所有商品。</font></td>
                                </tr>
                              </table>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<!--#include file="copyright.asp"-->
</body>
</html>
