<!--#include file="conn.asp"-->
<!--#include file="adminset.asp"-->
<%if session("admin")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登陆！');window.location.href='login.asp';</script>"
response.End
end if
if session("flag")>2 then
response.Write "<div align=center><font size=80 color=red><b>您没有此项目管理权限！</b></font></div>"
response.End
end if
if qx3<>1 then
response.Write "<div align=center><font size=80 color=red><b>您没有此项目管理权限！</b></font></div>"
response.End
end if
%>
<%dim nclassid,nclass,paixu,aid,anclass
nclass=request.QueryString("nclass")
nclassid=request.QueryString("id")
anclass=request.QueryString("anclass")
aid=request.QueryString("aid")
%>
<html>
<head>
<title>网软志成在线购物系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="../css.css" rel="stylesheet" type="text/css">

<style type="text/css">
<!--
.STYLE1 {color: #FF0000}
-->
</style>
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="1%" height="28">&nbsp;</td>
    <td width="99%"><table width="100%" border="0" cellspacing="0" cellpadding="5">
      <tr>
        <td width="77%" height="27" style="font-size:14px;color:#ffffff">&nbsp;<strong><font color="#000000">网软志成购物后台管理系统 &gt;&gt; 分类管理 &gt;&gt; 三级子类管理 </font></strong></td>
        <td width="23%" style="font-size:14px;color:#ffffff"><span class="STYLE1">* 为必添项目</span></td>
      </tr>
    </table></td>
  </tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="1%" height="28">&nbsp;</td>
    <td width="99%"><table width="100%" border="0" cellspacing="0" cellpadding="5">
      <tr>
        <td height="27" style="font-size:12px;color:#ffffff">&nbsp;<font color="#000000">操作说明：先选择一个商品一级大类，然后在选择该大类下的一个二级小类，然后在当前小类下可进行增加或修改三级子类的操作。</font></td>
      </tr>
    </table></td>
  </tr>
</table>
<br>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="30">
        <form name="myform" method="post" action="" onSubmit="return checkkk()" >
          <span class="STYLE1">第一步：</span>
          <%set rs=server.createobject("adodb.recordset")
        rs.open "select * from shop_anclass order by anclassidorder",conn,1,1
	if rs.eof and rs.bof then
	response.write "请先到“大类管理”中添加一级分类。"
	response.end
	else
%>
<select name="anclassid" size="1" id="anclassid" onChange="var jmpURL=this.options[this.selectedIndex].value ; if(jmpURL!='') {window.location=jmpURL;} else {this.selectedIndex=0 ;}"  class="wenbenkuang">
          <option >先选择一级分类</option>
		  <option value="xclass_manage.asp?aid=<%=rs("anclassid")%>&anclass=<%=rs("anclass")%>" <%if rs("anclassid")=cint(request.QueryString("aid")) then %>selected<%end if%>><%=trim(rs("anclass"))%></option>
		     <%			         rs.movenext
        do while not rs.eof
%>
          <option value="xclass_manage.asp?aid=<%=rs("anclassid")%>&anclass=<%=rs("anclass")%>" <%if rs("anclassid")=cint(request.QueryString("aid")) then %>selected<%end if%>><%=trim(rs("anclass"))%></option>
    <%
        rs.movenext
        loop
	end if
        rs.close
%>
  </select>
  <font color="#FF0000">
  <select name="Nclassid" class="wenbenkuang" id="Nclassid" 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")
		  if aid="" then
		  aid=0
		  end if
		rs.Open "select * from shop_nclass where anclassid="&aid&" order by nclassidorder",conn,1,1
		do while not rs.eof %>
          <option value="xclass_manage.asp?id=<%=rs("nclassid")%>&nclass=<%=rs("nclass")%>&aid=<%=aid%>&anclass="<%=anclass%>"" <%if rs("nclassid")=cint(request.QueryString("id")) then %>selected<%end if%>><%=trim(rs("nclass"))%></option>
          <%rs.movenext
		loop
		rs.close
		set rs=nothing
		%>
      </select>
        </form></td>
  </tr>
</table>
<table width="95%" border="0" cellpadding="3" cellspacing="1" align="center" bgcolor="#999999">
  <tr bgcolor="#cccccc">
    <td>
    <div align="center">分类名称</div></td>
    <td>
    <div align="center">排序</div></td>
    <td>
    <div align="center">图片上传：</div></td>
    <td>
    <div align="center">连接地址：</div></td>
    <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 nclassid="" then
        response.Write ""
        else
        set rs=server.CreateObject("adodb.recordset")
        rs.Open "select * from shop_xclass where nclassid="&nclassid&" order by xpx",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="xclass_save.asp?action=edit&id=<%=rs("id")%>&nclass=<%=request.QueryString("nclass")%>">
    <tr bgcolor="#F3F3F3">
      <td>        <div align="center">
          <input name="xclass" class="wenbenkuang" type="text" id="xclass" size="12" value="<%=trim(rs("xclass"))%>">
          <input name="nclassid" class="wenbenkuang" type="hidden" value="<%=request.QueryString("id")%>" id="Hidden1">
          <input name="anclassid" class="wenbenkuang" type="hidden" value="<%=request.QueryString("aid")%>" id="anclassid">
      </div></td>
      <td>
        <div align="center">
          <input name="xpx" class="wenbenkuang" type="text" id="xpx" size="4" value="<%=int(rs("xpx"))%>" onKeyPress="return event.keyCode>=48&&event.keyCode<=57">
      </div></td>
      <td >
        <div align="center">
          <input name="xpic" class="wenbenkuang" type="text" id="pic2" size="22" value="<%=rs("xpic")%>">
          <input type="button" name="Submit222" class="go-wenbenkuang" value="传" onClick="window.open('../upload.asp?formname=form1&uppath=shoppic&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')">
      </div></td>
      <td >
        <div align="center">
          <input name="xurl" class="wenbenkuang" type="text" id="xurl" size="22" value="<%=rs("xurl")%>">
      </div></td>
      <td>
        <div align="center">
          <input name="xh" class="wenbenkuang" type="text" id="xh" size="4" value="<%=int(rs("xh"))%>" onKeyPress="return event.keyCode>=48&&event.keyCode<=57">
      </div></td>
      <td>
        <div align="center">
          <input name="xl" class="wenbenkuang" type="text" id="xl" size="4" value="<%=int(rs("xl"))%>" onKeyPress="return event.keyCode>=48&&event.keyCode<=57">
      </div></td>
      <td><div align="center">
          <input name="xxs" type="radio" value="2" <%if int(rs("xxs"))=2 then%>checked<%end if%>>
          是
          <input type="radio" name="xxs" value="1" <%if int(rs("xxs"))=1 then%>checked<%end if%>>
      否</div></td>
      <td>
        <div align="center">
          <input type="submit" name="Submit" class="go-wenbenkuang" value="修">
&nbsp;<a href="xclass_save.asp?id=<%=int(rs("id"))%>&action=del&nclassid=<%=request.QueryString("id")%>&nclass=<%=request.QueryString("nclass")%>&anclassid=<%=request.QueryString("aid")%>" 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>
<br>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="30"><span class="STYLE1"><IMG height=5 src="images/block.gif" width=1>第二步：</span><font color="#000000">在这里添加当前二级小类下的三级子类。</font><br>
    <%if request.QueryString("id")<>"" then
        response.Write "当前二级分类："&request.QueryString("nclass")
        end if%></td>
  </tr>
</table>
<table width="95%" border="0" cellpadding="3" cellspacing="1" bgcolor="#999999" align="center">
  <tr bgcolor="#cccccc">
    <td>
    <div align="center">分类名称</div></td>
    <td>
    <div align="center">排序</div></td>
    <td>
    <div align="center">图片上传：</div></td>
    <td>
    <div align="center">连接地址：</div></td>
    <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="xclass_save.asp?action=add&nclass=<%=request.QueryString("nclass")%>" onSubmit="return ck1()">
   <script language="javascript">
  function ck1()
  {
   if(myform.anclassid.selectedIndex==0)
  {
  alert("请选择大类")
  return false
  }
   if(myform.Nclassid.selectedIndex==0)
  {
  alert("请选择小类")
  return false
  }
  if(form2.xclass.value=="")
  {
  alert("请输入名称")
  form2.xclass.focus()
  return false
  }
  if(form2.xpx.value=="")
  {
  alert("请输入排序")
  form2.xpx.focus()
  return false
  }
  }
  </script>
    <tr bgcolor="#F3F3F3">
      <td>
        <div align="center">
          <input name="xclass" type="text" class="wenbenkuang" id="xclass" size="12">
          <input name="nclassid" class="wenbenkuang" type="hidden" value="<%=request.QueryString("id")%>">
      <input name="anclassid" class="wenbenkuang" type="hidden" value="<%=request.QueryString("aid")%>" id="anclassid"></div></td>
      <td>
        <div align="center">
          <input name="xpx" class="wenbenkuang" type="text" id="xpx" size="4" value="<%=paixu+1%>" onKeyPress="return event.keyCode>=48&&event.keyCode<=57">
      </div></td>
      <td >
        <div align="center">
          <input name="xpic" class="wenbenkuang" type="text" id="xpic" size="22" >          
          <input type="button" name="Submit22" class="go-wenbenkuang" value="传" onClick="window.open('../upload.asp?formname=form2&editname=xpic&uppath=shoppic&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')">
      </div></td>
      <td >
        <div align="center">
          <input name="xurl" class="wenbenkuang" type="text" id="xurl" size="22">
      </div></td>
      <td ><div align="center">
          <input name="xh" type="text" class="wenbenkuang" id="xh" value="10" size="4" onKeyPress="return event.keyCode>=48&&event.keyCode<=57">
      </div></td>
      <td ><div align="center">
          <input name="xl" type="text" class="wenbenkuang" id="xl" value="1" size="4" onKeyPress="return event.keyCode>=48&&event.keyCode<=57">
      </div></td>
      <td ><div align="center">
          <input name="xxs" type="radio" value="2" checked >
          是
          <input type="radio" name="xxs" value="1">
      否</div></td>
      <td>
        <div align="center">
          <input type="submit" name="Submit2" class="go-wenbenkuang" value="添加">
      </div></td>
    </tr>
  </form>
</table>
<br>
<!--#include file="copyright.asp"-->
</body>
</html>
