<!-- #include file="../admin/check_master.asp" -->
<!-- #include file="../inc/conn.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/xmwy.css" rel="stylesheet" type="text/css">
<script language="javascript">
<!--
	function check(form)
		{

		if (form.BBS_Cate_Name.value=="")
			{
			alert("请输入类别名称！");
			form.BBS_Cate_Name.focus();
			return false;
			}
		if (form.BBS_Cate_Manager_Name.value=="")
			{
			alert("请输入版主姓名！");
			form.BBS_Cate_Manager_Name.focus();
			return false;
			}

			return true;
		}
//-->
</script>

</head>

<body bgcolor="#FFFFFF" text="#000000">
<br>
<TABLE align=center>
<TR>
	<TD><B>论坛分类管理</B></TD>
</TR>
</TABLE>
<form name="myform" method="post" action="Category_add.asp" onsubmit="return check(this)">
  <table width="500" border="0" align="center" cellspacing="1" cellpadding="2" bgcolor="#333333">
    <tr bgcolor="#CCCCCC"> 
      <td colspan="2"> 
        <div align="center"><b>[<%=BBS_Cate_Name%>-]&nbsp;<%=Layer_name%></b></div>
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width=24%><%=Layer_name%>名称：</td>
      <td width="76%"> 
        <input type="text" name="BBS_Cate_Name" size="40">
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td><%=Layer_name%>版主：</td>
      <td> 
        <input type="text" name="BBS_Cate_Manager_Name" size="40">
        多个版主用&quot;|&quot;分开 </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td><%=Layer_name%>版主Email：</td>
      <td> 
        <input name="BBS_Cate_Manager_Email" type="text" size="40">
      </td>
    </tr>
<!--<%if BBS_Cate_PID="A_3" then%>
    <tr bgcolor="#FFFFFF"> 
      <td width=30%>楼盘区域：</td>
      <td> 
        <select name="Loupan_Area" onChange="changelocation(document.myform.Loupan_Area.options[document.myform.Loupan_Area.selectedIndex].value)">
                  <option value="">==区域==</option>
                   <option value="开元区">开元区</option>
                   <option value="思明区">思明区</option>
                   <option value="湖里区">湖里区</option>
                   <option value="鼓浪屿区">鼓浪屿区</option>
                   <option value="集美区">集美区</option>
                   <option value="海沧区">海沧区</option>
                   <option value="杏林区">杏林区</option>
                   <option value="同安区">同安区</option>
		</select>
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width=30%>楼盘名称：</td>
      <td> 
          <select name="Loupan_ID" >
             <option value="" selected>==楼盘项目==</option>
          </select>
      </td>
    </tr>
<%else%>
    <tr bgcolor="#FFFFFF"> 
      <td width=30%>&nbsp;</td>
      <td> 
	  <INPUT TYPE="hidden" name="Loupan_Area" value="">
	  <INPUT TYPE="hidden" name="Loupan_ID" value="0">
      </td>
    </tr>
<%end if%>-->
	<tr bgcolor="#FFFFFF"> 
      <td 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="Submit" value="添加">
          <input type="reset" name="Submit2" value="取消">
        </div>
      </td>
    </tr>
  </table>
</form>
<FORM METHOD=POST ACTION="index.asp">

<table width="80%" border="0" align="center" cellspacing="3" cellpadding="3">
<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>
</TABLE>
</FORM>

<table width="90%" border="0" align="center" cellspacing="3" cellpadding="3">
  <tr>
    <td> 
      <%if Layer=0 then%>
      管理首页>>一级类别 
      <%end if%>
      <%if Layer=1 then%>
      管理首页>><A HREF="index.asp?Layer=0">一级类别</A> >><%=BBS_Cate_Name%> 
      <%end if%>
    </td>
  </tr>
</table>
<table width="95%" border="0" align="center" cellspacing="1" cellpadding="2" bgcolor="#333333">
  <tr bgcolor="#CCCCCC"> 
    <td width="10%"> <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="修改"> 
      </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('确实要删除吗？');"> 
      </td>
    </FORM>
  </tr>
  <%
rs.movenext
loop
%>
</table>
<br>
</body>
</html>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>