<!--#include file="conn.asp"-->
<!--#include file="denlu.asp"-->
<%
if request("Submit2")="ok" and request("delbox")<>"" then
	conn.execute "delete from productsort where id in ("&request("delbox")&")"
end if
%>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel=stylesheet type="text/css" href="js/media.css">
<link rel=stylesheet type="text/css" href="js/form_media.css">
<script language="JavaScript" src="js/whir.js"></script>
<style type="text/css">
<!--
.style1 {color: #FFFFFF}
.style2 {color: #4e6a82}
-->
</style>

<script language=javascript>
function CheckAll(form)
  {
  for (var i=0;i<form1.elements.length;i++)
    {
    var e = form1.elements[i];
    if (e.name != 'chkall')
       e.checked = form1.chkall.checked;
    }
  }
function a(){
	var del_length = 0;
    del_length = document.form1.all.delbox.length;
}
</script>	
</head>

<body text="#000000" leftmargin="0" topmargin="5">
<table width="98%" border="0" cellspacing="0" cellpadding="0" align="center" height="6">
  <tr> 
    <td height="25" width="701"><font color="#FF0000">当前位置：产品数据库 -> 产品类别</font></td>
  </tr>
</table>
<br>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>  
    <td height="1" width="100%">
 </td>
  </tr><tr> 
<td height="1" bgcolor="#2F4D6A" colspan="2"></td>
</tr>
 <tr> 
<td height="5" colspan="2"><br></td>
  </tr>
    <td height="400" align="center" valign="top" width="100%">
<form action="cbxn.asp" method="post" name="form1">
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><input type="hidden" name="Submit2">
<input type="hidden" name="topage" <%if request("topage")<>"" then%>value="<%=request("topage")%>"<%else%>value="1"<%end if%>>
        &nbsp;&nbsp;<input type="image" src="images/del.gif" width="72" height="21" onclick="javascript:if(window.confirm('您确实要删除吗？')) window.form1.Submit2.value='ok'">
<a href="addcbxn.asp"><img src="images/add.gif" width="72" height="21" border="0"></a> <a href="cbxn.asp"><img src="images/back.jpg" width="72" height="21" border="0"></a></td>
      </tr>
      <tr>
        <td><table width="100%" border="0" cellspacing="1" cellpadding="1" bordercolordark="#ffffff">
          <tr bgcolor="177B2F">
            <td width="4%" align="center">&nbsp;</td>
            <td width="27%" align="center"><span class="style1">类别名称（中文）</span></td>
            <td width="27%" height="23" align="center"><span class="style1">类别名称（英文）</span></td>
            <td width="22%" align="center" bgcolor="177B2F" class="style1">是否有下级类别</td>
            <td width="9%" align="center"><span class="style1">排序号</span></td>
            <td width="11%" height="23" align="center"><span class="style1">相关操作</span></td>
          </tr>
<%
set rs=server.createobject("adodb.recordset")
if trim(request("pid"))<>"" then
rs.open "select * from productsort where parentid="&request("pid")&" order by orderid",conn,3
else
rs.open "select * from productsort where levels=0 order by orderid",conn,3
end if
%>
          <% if rs.bof and rs.eof then %>
          <tr bgcolor="F6F6F6">
            <td height="22" colspan="6" align=center>数据库里还没有产品类别!</td>
          </tr>
          <% else %>
          <%
				for i=1 to rs.recordcount
				if rs.eof then
				exit for
				end if
				%>
          <tr bgcolor="#F6F6F6" onmouseover="this.bgColor='#e6e6e6';" onmouseout="this.bgColor='#F6F6F6';">
            <td><div align="center">
            <input type="checkbox" name="delbox" value="<%=rs("id")%>" onClick="a()">
          </div></td>
            <td><div align="center"><%=rs("SortName")%></div></td>
            <td height="22"><div align="center"></div>              
              <div align="center"><%=rs("SortName_eng")%></div></td>
            <td height="22"><div align="center">
              暂无下级
              </div></td>
            <td height="22"><div align="center"><%=rs("OrderId")%></div></td>
            <td height="22" align="center">
<a href="cbxn_modi.asp?id=<%=rs("id")%>">修改</a></td>
            </tr>
          <%
                  rs.movenext
				  next 
				  end if %>
        </table></td>
      </tr>
      <tr>
        <td height="25">　　　
          <input type="checkbox" name="chkall" value="on" onclick="CheckAll(form1)">
          <span class="style2">全部选中</span></td></tr>
    </table>

</form>
</td>
</tr> </table>

</body>
</html>
<%
rs.close
set Rs=nothing
%>
