<!--#include file="conn.asp" -->
<%if request.cookies("admin")("admin")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登陆！');window.location.href='login.asp';</script>"
response.End
else
if request.cookies("admin")("flag")>2 then
response.Write "<p align=center><font color=red>您没有此项目管理权限！</font></p>"
response.End
end if
end if
%>
<link href="../image/css.css" rel="stylesheet" type="text/css">
<body leftmargin="0" topmargin="0">

<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td height="2" colspan="3"></td>
</tr>
<tr>
<td class="menubar"><a href="?">一级分类管理</a></td>
<td class="menubar"><a href="?action=managetwo">二级分类管理</a></td>
<td class="menubar"><a href="?action=addmanagethree">三级分类管理</a></td>
</tr>
<tr>
<td height="2" colspan="3"></td>
</tr>
</table>
<%dim action
action=request.QueryString("action")
select case action
case ""%>
<img src="picR/10.jpg">

<%case "managetwo"%>
<img src="picR/11.jpg">

<%case "addmanagethree"%>
<!--选择一级分类 -->
<form name="myform" method="get" action="?action=managethree" onSubmit="checkkk">
<input type="hidden" value="managethree" name="action" id="action">
<table class="tableBorder" width="90%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#EFF7CE">
<tr> 
<td class="managetop" colspan="4">请按分类级别由高到低从下面的选框中选择商品分类，完成后请点“下一步”</td>
</tr>
<%dim count
set rs=server.createobject("adodb.recordset")
rs.open "select * from shop_nclass order by nclassidorder",conn,1,1%>
<script language = "JavaScript">
function checkkk()
{
}
var onecount;
onecount=0;
subcat = new Array();
<% count = 0
 do while not rs.eof %>
subcat[<%=count%>] = new Array("<%= trim(rs("nclass"))%>","<%= rs("anclassid")%>","<%= rs("nclassid")%>");
<%count = count + 1
rs.movenext
loop
rs.close%>
		
onecount=<%=count%>;

function changelocation(locationid)
{
document.myform.nclassid.length = 0; 

var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{ 
 document.myform.nclassid.options[document.myform.nclassid.length] = new Option(subcat[i][0], subcat[i][2]);
}
}

}
</script>
<tr>
<td align="center" class="tdcolor">
<%'//选择二级分类
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 class="wenbenkuang" name="anclassid" size=25 style='width:230px' id="anclassid" onChange="changelocation(document.myform.anclassid.options[document.myform.anclassid.selectedIndex].value)">
<option selected value="<%=rs("anclassid")%>"><%=trim(rs("anclass"))%> -></option>
<%dim selclass
selclass=rs("anclassid")
rs.movenext
do while not rs.eof%>
<option value="<%=rs("anclassid")%>"><%=trim(rs("anclass"))%> -></option>
<%rs.movenext
loop
end if
rs.close%>
</select>
&gt; 
<select class=wenbenkuang name=nclassid size=25 style='width:230px'>
<%rs.open "select * from shop_nclass where anclassid="&selclass&" order by nclassidorder " ,conn,1,1
if not(rs.eof and rs.bof) then%>
<option selected value="<%=rs("nclassid")%>"><%=rs("nclass")%> -></option>
<% rs.movenext
do while not rs.eof%>
<option value="<%=rs("nclassid")%>"><%=rs("nclass")%> -></option>
<%rs.movenext
loop
end if
rs.close
set rs = nothing%>
</select></td>
</tr>
<tr>
<td align="center" class="tdcolor">　
<input class="go-wenbenkuang" type="submit" name="Submit" value="OK,下一步->" onClick='return checkkk();'></td>
</tr>
</table>
</form>

<%case "managethree"%>
<img src="picR/12.jpg">

<%end select%>
</body>
</html>