<!--#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 paixu
name=request.QueryString("name")
id=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="18%" 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 a order by px",conn,1,1
		do while not rs.eof %><option value="nclass0.asp?id=<%=rs("id")%>&name=<%=rs("name")%>" <%if int(request("id"))=int(rs("id")) then%>selected<%end if%>><%=trim(rs("name"))%></option>
                                  
                                  <%rs.movenext
		loop
		rs.close
		set rs=nothing
		%>
      </select>
    <br><br>
                                <%if request.QueryString("id")<>"" then
        response.Write "当前查询："&request.QueryString("name")
        end if%>
</span></td>
<td width="82%" bgcolor="#E8F1FF"> 
<table width="100%" align="center" border="0" cellpadding="1" cellspacing="2">
<tr> 
<td width="25%" align="center" class="style4">分类名称</td>
<td width="14%" align="center"><span class="style4">分类排序</span></td>

<td width="12%" align="center"><span class="style4">确定操作</span></td>
</tr>
        <%
        if id="" 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 aa where aid="&request("id")&" order by px",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
		  i=1
         do while not rs.EOF
         %>
		<%imgw="img"&i&""%>
<form name="<%=imgw%>" method="post" action="savenclass0.asp?action=edit&id=<%=rs("id")%>&name=<%=request("name")%>&aaid=<%=request("id")%>">
<tr> 
<td align="center">
  <span class="style3">
<input name="name3" type="text" id="name3" size="30" value="<%=trim(rs("name"))%>">
<input name="id" type="hidden" value="<%=request.QueryString("id")%>" id="Hidden1">
  </span></td>
  <td align="center">
<input name="px" type="text" id="px" value="<%=int(rs("px"))%>" 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:none"><a href="savenclass0.asp?id=<%=int(rs("id"))%>&action=del&anclassid=<%=request.QueryString("id")%>&anclass=<%=request.QueryString("name")%>" onClick="return confirm('您确定进行删除操作吗？')"><font color=red>删除</font></a>  </span></span></td>
</tr>
</form>
		<%rs.movenext
        i=i+1
		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="18%" valign="top" align="center" bgcolor="#E8F1FF"><span class="style3"><br>
分类：<%=request.QueryString("name")%>
</div>
</span></td>
<td width="82%" bgcolor="#E8F1FF"> 
<table width="100%" align="center" border="0" cellpadding="1" cellspacing="2">
<tr> 
<td width="25%" align="center" class="style4">分类名称</div></td>
<td width="14%" align="center"><span class="style4">分类排序
  </div>
</span></td>
<td width="12%" align="center"><span class="style4">确定操作
  </div>
</span></td>
</tr>
<form name="form2" method="post" action="savenclass0.asp?action=add&name=<%=request.QueryString("name")%>">
<tr> 
<td align="center"> 
<input name="name2" type="text" id="name2" size="30">
<input name="id" type="hidden" value="<%=request.QueryString("id")%>"></td>
<td align="center"> 
<input name="px" type="text" id="px" 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>