<%@ Language=VBScript%>
<!--#include file="conn.asp"-->
<!--#include file="config.asp"-->
<!--#include file="function.asp"-->
<%
PageShowSize = 10            '每页显示多少个页
MyPageSize   = 30           '每页显示多少条新闻
	
If Not IsNumeric(Request("page")) Or IsEmpty(Request("page")) Or Request("page") <=0 Then
MyPage=1
Else
MyPage=Int(Abs(Request("page")))
End if

set rs=server.CreateObject("ADODB.RecordSet")
rs.Source="select * from "& db_wygkcn_Type_Table &" order by E_typeorder"
rs.Open rs.Source,conn,1,1

%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="gb2312">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>全部公告__<%=eChSys_Com%></title>
<LINK href="CSS/Wygkcn_Home.css" rel="stylesheet">
<LINK href="CSS/Wygkcn_News.css" rel="stylesheet">
<noscript><iframe scr="*"></iframe></noscript>
</head>
<body>
<!--内容部分开始-->
<div id="EC_Content">
<!--#include file="Top.asp"-->
<!--中间内容部分开始-->
<div id="zl_center">
<!--左边部分开始-->
<div class="zl_left float_left">
<div class="new_art lianmu_bg">
<H3>当前弹出公告</H3>
<DIV >
<ul class="board">
<%
set rs=server.CreateObject("ADODB.RecordSet") 
rs.Source="select * from "& db_wygkcn_Board_Table &" where inuse=1"
rs.Open rs.Source,conn,1,1
if not rs.EOF then
%>
<li class=board_tit><A HREF="wygkcn_Board_News.asp?ID=<%=rs("ID")%>" target="_blank"><%=CutStr(rs("title"),30)%></a></li>
<li class=board_cnt><%=CutStr(rs("content"),600)%></li>
<li>发布人：<%=rs("upload")%></li>
<li>发布时间：<%=rs("dateandtime")%> </li>
<%
else
rs.close
set rs=nothing
end if
%>
</ul>
</div>
</div>


</div>
<!--左边部分结束-->

<!--右边部分开始-->
<div class="zl_right float_right">

<!--位置导航部分开始-->
<div class="position">
<img src="Images/lm_dot.gif" width="11" height="11">&nbsp;&nbsp;您的位置&nbsp;&nbsp;<a href="./" >首页</a> >> 全部公告 >> 列表
</div>
<!--位置导航部分结束-->

<!--列表部分开始-->
<div class=class_listcnt>

<div class="lm_class_bg">
<H4>公告列表</H4>
<ul class=list>
<%
set rs2=server.CreateObject("ADODB.RecordSet")
rs2.Source="select * from "& db_wygkcn_Board_Table &" order by ID DESC "
rs2.Open rs2.Source,conn,3,1

If Not rs2.eof then
rs2.PageSize     = MyPageSize
MaxPages         = rs2.PageCount
rs2.absolutepage = MyPage
total            = rs2.RecordCount
i = 0
do until rs2.Eof or i = rs2.PageSize
%>
<li><span><%=rs2("dateandtime")%></span>·<A HREF="wygkcn_Board_News.asp?ID=<%=rs2("ID")%>" target="_blank"><%=rs2("title")%></A></li>
<%
rs2.MoveNext
i = i + 1
loop
%>
<li class="pages_menu">
共 <%=total%> 条，当前第 <%=Mypage%>/<%=Maxpages%> 页，每页 <%=MyPageSize%> 条
<%
url="wygkcn_Board.asp?"				
PageNextSize=int((MyPage-1)/PageShowSize)+1
Pagetpage=int((total-1)/rs2.PageSize)+1

if PageNextSize >1 then
PagePrev=PageShowSize*(PageNextSize-1)
Response.write "<a href='" & Url & "page=" & PagePrev & "' title='上" & PageShowSize & "页'>上一翻页</a> "
Response.write "<a href='" & Url & "page=1' title='第1页'>页首</a> "
end if
if MyPage-1 > 0 then
Prev_Page = MyPage - 1
Response.write "<a href='" & Url & "page=" & Prev_Page & "' title='第" & Prev_Page & "页'>上一页</a> "
end if

if Maxpages>=PageNextSize*PageShowSize then
PageSizeShow = PageShowSize
Else
PageSizeShow = Maxpages-PageShowSize*(PageNextSize-1)
End if
If PageSizeShow < 1 Then PageSizeShow = 1
for PageCounterSize=1 to PageSizeShow
PageLink = (PageCounterSize+PageNextSize*PageShowSize)-PageShowSize
if PageLink <> MyPage Then
Response.write "<a href='" & Url & "page=" & PageLink & "'>[" & PageLink & "]</a> "
else
Response.Write "<B>["& PageLink &"]</B> "
end if
If PageLink = MaxPages Then Exit for
Next

if Mypage+1 <=Pagetpage  then
Next_Page = MyPage + 1
Response.write "<a href='" & Url & "page=" & Next_Page & "' title='第" & Next_Page & "页'>下一页</A>"
end if

if MaxPages > PageShowSize*PageNextSize then
PageNext = PageShowSize * PageNextSize + 1
Response.write " <A href='" & Url & "page=" & Pagetpage & "' title='第"& Pagetpage &"页'>页尾</A>"
Response.write " <a href='" & Url & "page=" & PageNext & "' title='下" & PageShowSize & "页'>下一翻页</a>"
End if

else
Response.write "·暂无信息"				
End If
rs2.close

%>
</li>
</ul>
</div>
</div>
<!--列表部分结束-->
</div>
<!--右边部分结束-->
<div class=clear_float></div><!--清除浮动属性-->
</div>
<!--中间内容部分结束-->
<!--#include file="bottom.asp"-->
</div>
<!--内容部分结束-->
</body>
</HTML>    
