<!--#include file="conn.asp" -->
<!--#include file="checkout.asp" -->
<%if (session("userkey")=1) then%>
  <script language=javascript>  
    alert( "错误：您无权进行用户管理！"  );
    location.href = "javascript:history.back()"  
  </script>
<%end if%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>产品分类列表</title>
<LINK href="css.css" rel=stylesheet type=text/css>
</head>
<body>
<table width="95%" cellspacing="1" cellpadding="5" bgcolor=#999999 align=center>
<tr bgcolor=#cccccc><td align="center" bgcolor="#FFFFFF"><b><font color="#666666">新闻分类列表</font></b></td></tr>
  <tr bgcolor=#FDE6FF><td height=25 bgcolor="#DFE1E4">【<a href="news_class_add.asp">增加分类</a>】<center>
      </center>
  </td></tr>
  <tr bgcolor=#ffffff><td height=30>
<form method="POST" name="jhform">
<%
sql="select * from newclass order by code"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
%>
<div align="center">
  <center>
  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="90%" id="AutoNumber4">
    <tr>
      <td width="100%"><font color="#FF0000">根目录</font></td>
    </tr>
  </table>
  </center>
</div>
<%
	do while not rs.eof
		if len(rs("code"))=1 then
%>
<div align="center">
  <center>
  <table border="0" width="90%" cellspacing="0" cellpadding="0">
    <tr style="cursor:hand" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#FDE6FF'">
      <td width="75%"><img border="0" src="images/plus.gif" width="35" height="17"><%=trim(rs("name"))%>(<%      =htmlencode1(rs("code"))%>)</td>
<td width="25%" align="right">[<a href="#" onclick="submitform('update','<%=htmlencode1(rs("id"))%>')">修改</a>]
[<a href="#" onclick="submitform('del','<%=htmlencode1(rs("id"))%>')">删除</a>]</td>
    </tr>
  </table>
  </center>
</div>
<%
		else
		leftjl=len(rs("code"))*10
%>
<div align="center">
  <center>
<table border="0" width="90%" cellspacing="0" cellpadding="0">
  <tr style="cursor:hand" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#FDE6FF'">
    <td width="75%">
      <p style="margin-left: <%=leftjl%>"><img border="0" src="images/blank.gif" width="32" height="18"><a href="#" onclick="submitform('update','<%=rs("id")%>')"><%=trim(rs("name"))%>(<%=htmlencode1(rs("code"))%>)</a></td>
      <td width="25%" align="right">[<a href="#" onclick="submitform('update','<%=htmlencode1(rs("id"))%>')">修改
</a>][<a href="#" onclick="submitform('del','<%=htmlencode1(rs("id"))%>')">删除</a>]</td>
  </tr>
</table>
  </center>
</div>
<%
		end if
		rs.movenext
	loop
%>
<input type="hidden" name="select">
<div align="center">
  <center>
  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber2">
    <tr>
      <td width="100%">
      <p style="line-height: 150%"></td>
    </tr>
  </table>
  </center>
</div>
<input type=hidden name=op>  
<input type=hidden name=id>
</form>
<script language="vbscript">
sub submitform(x,y) 
	window.event.returnvalue=false 
	jhform.op.value=x 
	jhform.id.value=y 
	if x="del" then 
		msg=msgbox("是否确定删除？",36,"警告") 
		if msg<>6 then 
			exit sub 
		end if 
		jhform.action="news_class_manage.asp" 
	else 
		jhform.action="news_class_add.asp" 
	end if 
	jhform.submit() 
end sub 
</script>
  </td></tr>
</table>
</body>

</html>

