<!--#include file="ljconn.asp"-->
<%if session("admin")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登陆！');window.location.href='login.asp';</script>"
response.End
else
if session("flag")>1 then
response.Write "<p align=center><font color=red>您没有此项目管理权限！</font></p>"
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="img/css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {
	font-size: 12px;
	font-weight: bold;
}
.style3 {font-size: 12}
.style4 {font-size: 12px; }
-->
</style>
</head>
<body>
<table class="tableBorder" width="100%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
<tr > 
<td colspan="4" align="center" background="img/admin_bg_1.gif"><span class="style1"><font color="#ffffff"> 综合小类管理</font></span></td>
</tr>
<tr> 
<td width="30%" valign="top" align="center" bgcolor="#E8F1FF"><span class="style3"><br>
    <select name="select" onChange="var jmpURL=this.options[this.selectedIndex].value ; if(jmpURL!='') {window.location=jmpURL;} else {this.selectedIndex=0 ;}" >
      <option>选择综合大类</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")%>"><%=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%>
</span></td>
<td width="70%" bgcolor="#E8F1FF"> 
<table width="90%" align="center" border="0" cellpadding="1" cellspacing="2">
<tr> 
<td width="50%" align="center" class="style4">综合小类名称</td>
<td width="20%" align="center"><span class="style4">分类排序</span></td>
<td width="30%" align="center"><span class="style4">确定操作</span></td>
</tr>
                                <%
        if anclassid="" then
        response.Write "<div align=center><font color=red><span class='style4'>请选择左测的分类</span></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><span class='style4'>还没有分类</span></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 align="center">
  <span class="style3">
<input name="nclass" type="text" id="nclass" size="30" value="<%=trim(rs("nclass"))%>">
<input name="anclassid" type="hidden" value="<%=request.QueryString("id")%>" id="Hidden1">
  </span></td>
<td align="center">
<input name="nclassidorder" type="text" id="nclassidorder" value="<%=rs("nclassidorder")%>" size="4" onKeyUp="this.value=this.value.replace(/\D/g,'')" onpaste = "return false">
</td>
<td align="center">
  <span class="style3">
  <input type="submit" name="Submit" value="修 改">
  &nbsp;
  <span style="display:">
  <a href="savenclass.asp?id=<%=rs("nclassid")%>&action=del&anclassid=<%=request.QueryString("id")%>&anclass=<%=request.QueryString("anclass")%>" onClick="return confirm('您确定要删除该分类吗？同时删除产品中此类的产品!')"><font color=red>删除</font></a> 
  </span>
  </span></td>
</tr>
</form>
		<%rs.movenext
        loop
        paixu=rs.RecordCount
        rs.close
        set rs=nothing
        end if
        end if
		%>
</table>
</td>
</tr>
</table>
<br>
<table class="tableBorder" width="100%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
<tr> 
<td colspan="4" align="center" background="img/admin_bg_1.gif"><span class="style4"><b><font color="#ffffff">添加综合小类</font></b></span></td>
</tr>
<tr> 
<td width="30%" valign="top" align="center" bgcolor="#E8F1FF"><span class="style3"><br>
当前分类：<%=request.QueryString("anclass")%>
</div>
</span></td>
<td width="70%" bgcolor="#E8F1FF"> 
<table width="90%" align="center" border="0" cellpadding="1" cellspacing="2">
<tr> 
<td width="50%" align="center" class="style4">综合小类名称</div></td>
<td width="20%" align="center"><span class="style4">分类排序
  </div>
</span></td>
<td width="30%" align="center"><span class="style4">确定操作
  </div>
</span></td>
</tr>
<form name="form2" method="post" action="savenclass.asp?action=add&anclass=<%=request.QueryString("anclass")%>">
<tr> 
<td align="center"> 
<input name="nclass2" type="text" id="nclass22" size="30">
<input name="anclassid" type="hidden" value="<%=request.QueryString("id")%>">
</td>
<td align="center"> 
<input name="nclassidorder2" type="text" id="nclassidorder22" size="4" value="<%=paixu+1%>" onKeyUp="this.value=this.value.replace(/\D/g,'')" onpaste = "return false">
</td>
<td align="center"> 
<input type="submit" name="Submit2" value="添加分类">
</td>
</tr>
</form>
</table>
</td>
</tr>
</table>
<!--#include file="copyright.asp"-->
</body>
</html>
