<!--#include file="../conn.asp"-->
<!-- #include file="../admin/check_master.asp" -->
<%
Layer=request("Layer")
if Layer="0" then
	Layer_name="一级类别"
	BBS_Cate_PID=0'父ID
elseif Layer="1" then
	Layer_name="二级类别"
	BBS_Cate_PID=request("BBS_Cate_PID")'父ID
	BBS_Cate_Name=request("BBS_Cate_Name")'类别名称
end if
%>
<html>
<head>
<title><%=Layer_name%>分类管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../css/xmwuye.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<table align=center>
<TR>
	<TD><B>论坛分类管理</B></TD>
</TR>
</TABLE>
<table width="99%" border="0" align="center" cellspacing="1" cellpadding="2" bgcolor="#999999">
  <form name="form1" method="post" action="Category_add.asp" onsubmit="return CheckForm(this)">
    <tr bgcolor="#f8f8f8"> 
      <td height="25" colspan="2"> 
        <div align="center"><b>[<%=BBS_Cate_Name%>-]&nbsp;<%=Layer_name%></b></div>
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width=19% height="23">
<div align="right"><%=Layer_name%>名称：</div></td>
      <td width="81%"> 
        <input type="text" name="BBS_Cate_Name" size="40">
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="23">
<div align="right"><%=Layer_name%>版主：</div></td>
      <td> 
        <input type="text" name="BBS_Cate_Manager_Name" size="40">
        多个版主用&quot;|&quot;分开 </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="23"> 
        <div align="right">
          <%'=Layer_name%>
          论坛版主email：</div></td>
      <td> 
        <input name="BBS_Cate_Manager_Email" type="text" size="40">
      </td>
    </tr>
	<%'if layer=1 then%>
    <tr bgcolor="#FFFFFF"> 
      <td>
        <div align="right"><%'=Layer_name%>论坛版块说明：</div></td>
      <td> 
        <textarea name="BBS_Cate_Note" cols="60" rows="8"></textarea>
      </td>
    </tr>
	<%'end if%>
    <tr bgcolor="#FFFFFF"> 
      <td><div align="right">论坛权限：</div></td>
      <td><input name="fangwenqs" type="radio" value="0" checked>
        所有用户都可以访问
        <input type="radio" name="fangwenqs" value="1">
        只有注册用户才能访问<br>
        <input type="radio" name="fangwenqs" value="2">
        认证用户才可以访问 
        <input type="radio" name="fangwenqs" value="3">
        版主管理员才可以访问<br>
        <input type="radio" name="fangwenqs" value="4">
        版主管理员可发贴回贴其他用户只可回贴<br> <input type="radio" name="fangwenqs" value="5">
        版主管理员可发贴回贴其他用户只可看贴 </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="23">
<div align="right">树型状态：</div></td>
      <td> <input type="radio" name="tree" value="1" checked>
        默认展开 
        <input type="radio" name="tree" value="0">
        默认收缩</td>
    </tr>
	<%if layer=1 then%>
    <tr bgcolor="#FFFFFF"> 
      <td>
        <div align="right">版块版规：</div></td>
      <td height=180> 
        <TEXTAREA type="hidden" rows=1 cols=1 name="menu" style="position:absolute;left:0;visibility:hidden;"></textarea> 
        <SCRIPT src="../htmledit/adminhtml.js"></SCRIPT>
      </td>
    </tr>
	<%end if%>
	<tr bgcolor="#FFFFFF"> 
      <td height="26" colspan="2"> 
        <div align="center"> 
          <INPUT TYPE="hidden" name="BBS_Cate_PID" value="<%=BBS_Cate_PID%>">
		<INPUT TYPE="hidden" name="Layer" value="<%=Layer%>">
          <input type="submit" name="B1" value="添加" <%if instr(session("admin_qs"),1)<=0 then%>disabled<%end if%>>
          <input type="reset" name="Submit2" value="取消">
        </div>
      </td>
    </tr>
	</form>
  </table>
<table width="90%" border="0" align="center" cellspacing="3" cellpadding="3">
  <FORM METHOD=POST ACTION="index.asp">
<TR >
	<TD align="right"><B>[<%=BBS_Cate_Name%>-]</B>论坛名称：</TD>
	<TD align="left">
	<INPUT TYPE="text" NAME="searchcontent">
	<INPUT TYPE="hidden" name="BBS_Cate_PID" value="<%=BBS_Cate_PID%>">
	<INPUT TYPE="hidden" name="Layer" value="<%=Layer%>">
	<INPUT TYPE="hidden" name="BBS_Cate_Name" value="<%=BBS_Cate_Name%>">
	<INPUT TYPE="submit" value="搜索">
	</TD>
</TR>
</FORM>
</TABLE>

<table width="99%" border="0" align="center" cellspacing="3" cellpadding="3">
  <tr>
    <td> 
      <%if Layer=0 then%>
      <a href="../admin/main.asp">管理首页</a>>>一级类别 
      <%end if%>
      <%if Layer=1 then%>
      <a href="../admin/main.asp">管理首页</a>>><A HREF="index.asp?Layer=0">一级类别</A> >><%=BBS_Cate_Name%> 
      <%end if%>
    </td>
  </tr>
</table>
<table width="99%" border="0" align="center" cellspacing="1" cellpadding="2" bgcolor="#999999">
  <tr bgcolor="#CCCCCC"> 
    <td width="10%" height="25"> 
      <div align="center"><b>编号</b></div></td>
    <td> <div align="center"><b><%=Layer_name%></b></div></td>
    <td> <div align="center"><b>主题数量</b></div></td>
    <td> <div align="center"><b>回复数量</b></div></td>
    <td> <div align="center"><b>版主</b></div></td>
    <td> <div align="center"><b>版主Email</b></div></td>
    <!--<td><div align="center"><b>认证版</b></div></td>-->
    <td width="8%"> <div align="center"><b>状态</b></div></td>
    <td width="8%"> <div align="center"><b>修改</b></div></td>
    <td width="8%"> <div align="center"><b>删除</b></div></td>
  </tr>
  <%
searchcontent=trim(request("searchcontent"))'搜索内容
if searchcontent="" then
	sql="select * from BBS_Cate where BBS_Cate_PID='"&BBS_Cate_PID&"' order by BBS_ID asc"
else'搜索内容
	sql="select * from BBS_Cate where BBS_Cate_PID='"&BBS_Cate_PID&"' and BBS_Cate_Name like '%"&searchcontent&"%' order by BBS_ID asc"
end if

set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,1
do while not rs.eof

%>
  <tr bgcolor="#FFFFFF" align=center> 
    <td> 
      <%if Layer=0 then%>
      <A HREF="index.asp?Layer=<%=Layer+1%>&BBS_Cate_PID=<%=rs("BBS_Cate_ID")%>&BBS_Cate_Name=<%=rs("BBS_Cate_Name")%>"><FONT  COLOR="blue"><%=rs("BBS_Cate_ID")%></FONT></A> 
      <%else%>
      <%=rs("BBS_Cate_ID")%> 
      <%end if%>
    </td>
    <td><%=rs("BBS_Cate_Name")%></td>
    <td><%=rs("BBS_Cate_Topic")%></td>
    <td><%=rs("BBS_Cate_Reply")%></td>
    <td><%=rs("BBS_Cate_Manager_Name")%></td>
    <td><%=rs("BBS_Cate_Manager_Email")%></td>
    <!--<td>
      <%if rs("display")=0 then%>
      <A HREF="lzstatus.asp?BBS_ID=<%=rs("BBS_ID")%>&display=1"><FONT COLOR="red">否</FONT></A> 
      <%else%>
      <A HREF="lzstatus.asp?BBS_ID=<%=rs("BBS_ID")%>&display=0"><FONT COLOR="green">是</FONT></A> 
      <%end if%>
    </td>-->
    <td > 
      <%if rs("Deleted")=0 then%>
      <A HREF="status.asp?BBS_ID=<%=rs("BBS_ID")%>&Deleted=1"><FONT COLOR="red">已转正</FONT></A> 
      <%else%>
      <A HREF="status.asp?BBS_ID=<%=rs("BBS_ID")%>&Deleted=0"><FONT COLOR="green">未转正</FONT></A> 
      <%end if%>
    </td>
    <FORM METHOD=POST ACTION="Category_mod.asp">
      <td> <INPUT TYPE="hidden" name="BBS_Cate_ID" value="<%=rs("BBS_Cate_ID")%>"> 
        <INPUT TYPE="hidden" name="Layer" value="<%=Layer%>"> <INPUT TYPE="submit" name="修改" value="修改" <%if instr(session("admin_qs"),2)<=0 then%>disabled<%end if%>> 
      </td>
    </FORM>
    <FORM METHOD=POST ACTION="Category_del.asp" >
      <td> <INPUT TYPE="hidden" name="BBS_Cate_ID" value="<%=rs("BBS_Cate_ID")%>"> 
        <INPUT TYPE="submit" name="删除" value="删除" onclick="return confirm('确实要删除吗？');" <%if instr(session("admin_qs"),3)<=0 then%>disabled<%end if%>> 
      </td>
    </FORM>
  </tr>
  <%
rs.movenext
loop
%>
</table>
<br>
</body>
</html>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>