?? board.asp
字號:
<%@ Language=VBScript%>
<!--#include file=include/conn.asp -->
<!--#include file=include/config.asp -->
<%
PageShowSize = 10 '每頁顯示多少個頁
MyPageSize = 5 '每頁顯示多少條新聞
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 type order by typeorder"
rs.Open rs.Source,conn,1,1
dim ArraytypeID(10000),ArraytypeName(10000),Arraytypecontent(10000)
typeCount=rs.RecordCount
for i=1 to typeCount
ArraytypeID(i)=rs("typeID")
ArraytypeName(i)=rs("typeName")
Arraytypecontent(i)=rs("typecontent")
rs.MoveNext
next
rs.Close
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>全部公告__<%=jjgn%></title>
<LINK href=news.css rel=stylesheet>
</head>
<body topmargin="0">
<!--#include file=include/top.asp -->
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr valign="top">
<td width="180" height="234" background="IMAGES/menu-d.gif">
<table width="100%" border="0" cellpadding="0" cellspacing="0" id="AutoNumber2" style="border-collapse: collapse">
<%
set rs=server.CreateObject("ADODB.RecordSet")
rs.Source="select * from board where inuse=1"
rs.Open rs.Source,conn,1,1
if not rs.EOF then
%>
<tr>
<td height=3 valign="middle" bgcolor="#FFFFFF"><img src="IMAGES/kb.gif" width="9" height="3"></td>
</tr>
<tr>
<td width="175" height=25 valign="middle" background="IMAGES/menu-d-gg.gif">
<p align="center">當前公告<strong><br>
</strong></td>
</tr>
<tr>
<td width="175" height="2" align=center background="IMAGES/menu-d.gif" style="WORD-WRAP: break-word"><table width="90%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><div align="center"><br>
<%=rs("title")%><br>
<%=rs("content")%> <br>
發布人:<%=rs("upload")%><br>
發布時間:<%=rs("dateandtime")%> </div></td>
</tr>
</table></td>
</tr>
<%else
rs.close
set rs=nothing
end if%>
</table>
</td>
<td width="6"> </td>
<td width="574" background="IMAGES/menu-l.gif" class="daohang">
<table width="100%" height="234" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="3" bgcolor="#FFFFFF"><img src="IMAGES/kb.gif" width="9" height="3"></td>
</tr>
<tr>
<td height="25" background="IMAGES/menu-l-m.gif"> <font class=m_tittle> </font>欄目導航<b>
當前位置:<a class="daohang" href="./" >網站首頁</a>>>全部公告<font color=red></font></b></td>
</tr>
<tr>
<td height="25" background="IMAGES/menu-l.gif"><div align="center">
<font color=red><a class=daohang href="./" >
<script language=javascript src=./admin/banner/ads.asp?place=0></script></script>
</a> </font></div></td>
</tr>
<tr>
<td height="25" background="IMAGES/menu-l-zj.gif" class="daohang"> </td>
</tr>
<tr>
<td height="156" background="IMAGES/menu-l.gif">
<div align="center">
<table width="95%" height="154" border="0" align="center" cellpadding="0" cellspacing="0" id="AutoNumber3" style="border-collapse: collapse">
<tr>
<td height="10" valign=top> </td>
</tr>
<tr>
<td height="52" valign=top><table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" id="AutoNumber3" height="45">
<tr>
<td width="100%" height="45">
<%
set rs2=server.CreateObject("ADODB.RecordSet")
rs2.Source="select * from board 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
%>
<table border="0" cellpadding="0" cellspacing="0" width="99%" style="border-collapse: collapse">
<tr>
<td width="100%" height="20" colspan="2" align=center><%=rs2("title")%></td>
</tr>
<tr>
<td width="100%" height="20" colspan="2"><%=rs2("content")%></td>
</tr>
<tr>
<td width="50%" height="20" align=center>發布人:<%=rs2("upload")%></td>
<td width="50%" height="20" align=center>發布時間:<%=rs2("dateandtime")%></td>
</tr>
</table>
<%
rs2.MoveNext
i = i + 1
loop
%>
</td>
</tr>
<tr>
<td width="100%" align=center colspan="2">共 <%=total%>
條,當前第 <%=Mypage%>/<%=Maxpages%> 頁,每頁 <%=MyPageSize%>
條
<%
url="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 class=black href='" & Url & "page=" & PagePrev & "' title='上" & PageShowSize & "頁'>上一翻頁</a> "
Response.write "<a class=black href='" & Url & "page=1' title='第1頁'>頁首</a> "
end if
if MyPage-1 > 0 then
Prev_Page = MyPage - 1
Response.write "<a class=black 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 class=black 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 class=black href='" & Url & "page=" & Next_Page & "' title='第" & Next_Page & "頁'>下一頁</A>"
end if
if MaxPages > PageShowSize*PageNextSize then
PageNext = PageShowSize * PageNextSize + 1
Response.write " <A class=black href='" & Url & "page=" & Pagetpage & "' title='第"& Pagetpage &"頁'>頁尾</A>"
Response.write " <a class=black href='" & Url & "page=" & PageNext & "' title='下" & PageShowSize & "頁'>下一翻頁</a>"
End if
else
Response.write "<tr><td valign=top height=80> 暫無信息</td></tr>"
End If
rs2.close
%>
</td>
</tr>
</table></td>
</tr>
<tr>
<td height="16" valign=top> </td>
</tr>
</table>
</div></td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td height="20" background="IMAGES/menu-d-t.gif"> </td>
<td bgcolor="#FFFFFF"> </td>
<td height="20" background="IMAGES/menu-l-t.gif" class="daohang"> </td>
</tr>
</table>
<!--#include file=include/bottom.asp -->
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -