<!--#include file="../conn/conn1.asp"-->
<!--#include file="inc.asp"-->
<!--#include file="../config.asp"-->
<script language="JavaScript">
<!--
function  validate()
    {
       
        if  (document.myform.type.value=="")
        {
            alert("新加类型不能为空");
            document.myform.type.focus();
            return false ;
        }
		}

function cform(){
 if(!confirm("你是否确认删除该类型？"))
 return false;

}
 -->
</script>

<link rel="stylesheet" type="text/css" href="../css/style.css">
<title>管理公告</title>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<center>
  <table width="95%" border="0" align=center cellpadding="0" cellspacing="0">
    <tr>
      <td width="50%" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0" bordercolor="#CCCCCC" height="20">
                                  <td align=center bgcolor="#660066"><a href="addgg.asp"><font color="#FFFFFF">添加公告</font></a></td>
          </tr>
      </table></td>
    </tr>
    <tr>
      <td><%
dim page
page=request("page")
PageSize = 18
dim rs,strSQL,news
Set rs = Server.CreateObject("ADODB.Recordset")
strSQL ="select * from gg order by id DESC"
rs.open strSQL,Conn,3,3
    rs.PageSize = PageSize
	totalfilm=rs.recordcount
    pgnum=rs.Pagecount
    if page="" or clng(page)<1 then page=1
    if clng(page) > pgnum then page=pgnum
    if pgnum>0 then rs.AbsolutePage=page
if rs.eof then
response.write "<font class='3dfont'>没有任何公告</font>"
else
%>
          <table border="0" cellspacing="0" cellpadding="0" width="100%">
          </table>
        <table cellspacing=0 cellpadding=0 width=100% >
             <tr>
              <td width="35%" align=center bgcolor="#99CC00">公告标题</td>
              <td width="20%" align=center bgcolor="#99CC00">修改公告</td>
              <td width="24%" align=center bgcolor="#99CC00">删除公告</td>
              <td width="21%" align=center bgcolor="#99CC00">添加日期</td>
            </tr>         
        </table>
        <table width=100% >

          <%
count=0 
do while not (rs.eof or rs.bof) and count<rs.PageSize 
%>
          <tr onMouseOut="this.style.backgroundColor='#f3f3f3'" onMouseOver="this.style.backgroundColor='#BFDFFF'">
            <td width="35%" style="padding-left:5pt"><%=rs("title")%></td>
            <td width="20%" align=center><a
    href="editgg.asp?id=<%=rs("id")%>">修改</a></td>
            <td width="24%" align=center><a
    href="deletegg.asp?id=<%=rs("id")%>">删除</a></td>
            <td width="21%" align=center><%=rs("dateandtime")%></td>
          </tr>
          <%rs.movenext 
count=count+1
loop 
end if%>
        </table>
        <table border="0" cellspacing="0" cellpadding="0" width="100%">
            <tr >
              <td><form method=Post action="gg.asp">
                [共<b><%=rs.pagecount%></b>页] [第<%=page%>页]  [<%=pagesize%>个/页]  [共<%=totalfilm%>个]
                <%if page=1 then%>
                [首 页] [上一页]
                <% else %>
                [<a href="gg.asp?page=1">首 页</a>] 
                [<a href="gg.asp?page=<%=page-1%>">上一页</a>]
                <%end if%>
                                <%if rs.pagecount-page<1 then%>
                [下一页] [尾 页]
                <%else%>
                [<a href="gg.asp?page=<%=page+1%>">下一页</a>]  [<a href="gg.asp?page=<%=rs.pagecount%>">尾 页</a>]
                <%end if%>
                <input type='text' name='page' size=2 maxlength=10 style="font-size:9pt;border-left: 1px solid #660066; border-right: 1px solid #660066; border-top: 1px solid #660066; border-bottom: 1px solid #660066" value="<%=page%>" align=center>
                <input name="submit" type='submit' style="border:1 solid black;FONT-SIZE: 9pt; FONT-STYLE: normal; FONT-VARIANT: normal; FONT-WEIGHT: normal; HEIGHT: 18px; LINE-HEIGHT: normal"  value=' Goto '   size=2>
                <input name="hidden" type="hidden" value="<%=typeid%>">
              </form></td>
            </tr>
        </table>
        <%rs.close
set rs=nothing
%>
      </td>
    </tr>
  </table>
</center>
