
<%
on error resume next
oabusyname=request.cookies("oabusyname")
oabusyuserid=request.cookies("oabusyuserid")
oabusyusername=request.cookies("oabusyusername")
oabusyuserdept=request.cookies("oabusyuserdept")
oabusyuserlevel=request.cookies("oabusyuserlevel")
if oabusyusername="" then 
	response.write("<script language=""javascript"">")
	response.write("window.top.location.href='../default.asp';")
	response.write("</script>")
	response.end
end if
%> 

<%
If oabusyuserlevel <> "最高管理员" Then
%>
<br><center><img src="../images/note.gif" align="absmiddle">&nbsp;<font color="#FF0000">你不具备此权限，请与管理员联系！</font></center>
<%  
  response.end
end if
%>



<!--#include file="conn.asp"-->
<%dim action
action=request.QueryString("action")
action=replace(action,"'","")
%>

<HTML>
<HEAD>
<TITLE>论坛管理中心</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<style type="text/css">
<!--
body {
	margin: 0;
	overflow: hidden;
	scrollbar-face-color: D9E5F6;
	scrollbar-highlight-color: #FFFFFF;
	scrollbar-shadow-color: darkseablue;
	scrollbar-3dlight-color: D9E5F6;
	scrollbar-arrow-color: darkseablue;
	scrollbar-track-color: #f3faf4;
	scrollbar-darkshadow-color: #f3faf4;
}
td {
	font-size: 12px;
	line-height: 140%;
}
.copyright {
	padding-bottom: 10px;
}
.sysname {
	padding-bottom: 5px;
}
a:link {
	color: #000000;
	text-decoration: none;
}
a:visited {
	color: #000000;
	text-decoration: none;
}
a:hover {
	color: red;
	text-decoration: underline;
}
-->
</style>
</HEAD>
<body  text="#000000" leftmargin="0" topmargin="0" oncontextmenu=""return false;"">




<table width="95%" border=0 cellspacing=1 cellpadding=0 align=center>
<tr><td height=50>
<a href="index.asp">返回首页</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="admin_index.asp?action=tz">帖子管理</a>&nbsp;&nbsp;<a href="admin_index.asp?action=xzb">公告管理</a>&nbsp;&nbsp;</td></tr></table>


      <%

select case action
case ""	%>


    	  <%case "tz"%><br>
      <table width="96%" border="0" cellspacing="1" cellpadding="3" align="center" bgcolor="#205E7B">
        <tr align="center"> 
        <td width="10%" height="25"><font color="#FFFFFF">ID</font></td>
	<td width="40%" height="25"><font color="#FFFFFF">帖子标题</font></td>
	<td width="15%"><font color="#FFFFFF">发帖时间</font></td>
	<td width="10%"><font color="#FFFFFF">帖子属性</font></td>
	<td width="25%"><font color="#FFFFFF">操作</font></td>
        </tr>
        <tr> 
          <td colspan="4" height="1" bgcolor="#000000"></td>
        </tr>
        <%
sql="select * from ly where rt=0 order by gd desc,id desc"	
set rs=server.createobject("ADODB.Recordset")
rs.open sql,conn,1,1
if rs.eof then
response.write"<tr><td height=25  colspan='4' bgcolor=#f0f0f0 align=center>没有帖子</td></tr>"
else
if not isempty(request("page")) then   
		pagecount=cint(request("page"))  
else
		pagecount=1
end if

		rs.pagesize=12
		rs.AbsolutePage=pagecount	  
        do while not rs.eof
%>
        <tr> 
            <td bgcolor="#f0f0f0"  height="25" align="center"><%=rs("id")%></td>
            
          <td bgcolor="#f0f0f0"  height="25"><a href="show.asp?id=<%=rs("id")%>" target="_blank"><%=rs("title")%></a>(<font color="#0000FF">回帖数：<%=rs("hf")%></font>)</td>
          <td bgcolor="#f0f0f0" align=center><%=rs("t")%></td>
          <td bgcolor="#f0f0f0" align="center"><font color=blue>
<%
if rs("jh")=0 then response.write"[普通]"
if rs("jh")=1 then response.write"[精华]"
if rs("jh")=2 then response.write"[锁定]"
if rs("gd")=1 then response.write"[固定]"
%></font>
<td bgcolor="#f0f0f0" align="center">
<a href="guanli.asp?action1=gd&id=<%=rs("id")%>">固顶</a>&nbsp;
<a href="guanli.asp?action1=jg&id=<%=rs("id")%>">解固</a>&nbsp;
<a href="guanli.asp?action1=jh&id=<%=rs("id")%>">精华</a>&nbsp;
<a href="guanli.asp?action1=sd&id=<%=rs("id")%>">锁定</a>&nbsp;
<a href="guanli.asp?action1=js&id=<%=rs("id")%>">普通</a>&nbsp;
<a href="guanli.asp?action1=deltz&id=<%=rs("id")%>">删除</a>
</td>
        </tr>
        <%
rs.movenext
i=i+1                                                                     
if i>=rs.pagesize then exit do                                                           
loop
%>
		  <tr bgcolor="#92C8E2"> 
          <form action="admin_index.asp?action=tz" method="post">
            <td height="35" colspan="11"> 
              <div align="center"> 共 <b><%=rs.recordcount%></b> 帖子, 页次: <b><font color=red><%=pagecount%></font>/<%=rs.pagecount%></b>, 
                当前从第 
                <%
if pagecount<=1 then
response.write "<font color=red>1</font>"
else
response.write "<font color=red>" & pagecount*rs.pagesize-rs.pagesize+1 & "</font>"
end if
%>
                位开始。 
                <% if pagecount=1 and rs.pagecount<>pagecount and rs.pagecount<>0 then%>
                <a href="admin_index.asp?action=tz&page=<%=cstr(pagecount+1)%>">下一页</a> 
                <% end if %>
                <% if rs.pagecount>1 and rs.pagecount=pagecount then %>
                <a href="admin_index.asp?action=tz&page=<%=cstr(pagecount-1)%>"> 
                上一页</a> 
                <%end if%>
                <% if pagecount<>1 and rs.pagecount<>pagecount then%>
                <a href="admin_index.asp?action=tz&page=<%=cstr(pagecount-1)%>"> 
                上一页</a> <a href="admin_index.asp?action=tz&page=<%=cstr(pagecount+1)%>"> 
                下一页</a> 
                <% end if%>
                &nbsp; 直接到第 
                <select name="page">
                  <%for i=1 to rs.pagecount%>
                  <option value="<%=i%>"><%=i%></option>
                  <%next%>
                </select>
                页 
                <input type="submit" name="go" value="Go">
                <input type="hidden" name="id" value=<%=id%>>
              </div>
            </td>
          </form>
        </tr>
        <%
end if
rs.close
set rs=nothing
%>
      </table>
      <%case "xzb"%><br>
      <table width="96%" border="0"" cellspacing="1" cellpadding="3" align="center" bgcolor="#205E7B">
        <tr>
           <td width=""%" height="25" align="center"><font color="#FFFFFF">ID</font></td>
            <td width="64%" height="25" align="center"><font color="#FFFFFF">标题</font></td>
           <td width=""9%" align="center"><font color="#FFFFFF">时间</font></td>
            <td width="9%" align="center"><font color="#FFFFFF">操作</font></td></tr>
       <tr><td colspan="4" height="1" bgcolor="#000000" align="center"></td></tr>
       
<%sql="select * from smallpager order by id desc"	
set rs=server.createobject("ADODB.Recordset")
rs.open sql,conn,1,1
if rs.eof then
response.write"<tr><td height=25  colspan='4' bgcolor=#f0f0f0 align=center>没有公告</td></tr>"
else
if not isempty(request("page")) then   
		pagecount=cint(request("page"))  
else
		pagecount=1
end if

		rs.pagesize=12
		rs.AbsolutePage=pagecount	  
        do while not rs.eof%>
        <tr>
			<td bgcolor="#f0f0f0" width="8%" height="25" align="center"><%=rs("id")%></td>
            <td bgcolor="#f0f0f0" width="64%" height="25"><%=rs("s_title")%></td>
            <td bgcolor="#f0f0f0" width="19%" align="center"><%=rs("adate")%></td>
            <td bgcolor="#f0f0f0" width="9%" align="center"><a href="guanli.asp?action=xzb&action1=delxzb&id=<%=rs("id")%>&page=<%=cstr(pagecount)%>"><font color="#FF0000">删除</font></a> 
            </td>
        </tr>
        <%
rs.movenext
i=i+1                                                                     
if i>=rs.pagesize then exit do                                                           
loop
%>
		  <tr bgcolor="#92C8E2" align="right">
          <form action="admin_index.asp?action=xzb" method="post">
            <td height="35" colspan="11" bgcolor="#D6DFF7" align="center"> 
              <div align="center"> 共 <b><%=rs.recordcount%></b> 帖子, 页次: <b><font color=red><%=pagecount%></font>/<%=rs.pagecount%></b>, 
                当前从第 
                <%
if pagecount<=1 then
response.write "<font color=red>1</font>"
else
response.write "<font color=red>" & pagecount*rs.pagesize-rs.pagesize+1 & "</font>"
end if
%>
                位开始。 
                <% if pagecount=1 and rs.pagecount<>pagecount and rs.pagecount<>0 then%>
                <a href="admin_index.asp?id=<%=id%>&action=myuser&page=<%=cstr(pagecount+1)%>">下一页</a> 
                <% end if %>
                <% if rs.pagecount>1 and rs.pagecount=pagecount then %>
                <a href="admin_index.asp?id=<%=id%>&action=myuser&page=<%=cstr(pagecount-1)%>"> 
                上一页</a> 
                <%end if%>
                <% if pagecount<>1 and rs.pagecount<>pagecount then%>
                <a href="admin_index.asp?id=<%=id%>&action=myuser&page=<%=cstr(pagecount-1)%>"> 
                上一页</a> <a href="admin_index.asp?id=<%=id%>&action=myuser&page=<%=cstr(pagecount+1)%>"> 
                下一页</a> 
                <% end if%>
                &nbsp; 直接到第 
                <select name="page">
                  <%for i=1 to rs.pagecount%>
                  <option value="<%=i%>"><%=i%></option>
                  <%next%>
                </select>
                页 
                <input type="submit" name="go" value="Go">
                <input type="hidden" name="id" value=<%=id%>>
              </div>
            </td>
          </form>
        </tr>
        <%
end if

rs.close
set rs=nothing
%>
      </table>







      <%end select%>





</TABLE>
</BODY>
</HTML>