📄 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-Language" content="zh-cn">
<meta name="keywords" content="一切为了学生,为了学生的一切!">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>全部公告__※社区天地※</title>
<style type="text/css">
<!--
body {
background-color: #0065CA;
margin-left: 0px;
margin-top: 0px;
}
-->
</style>
<meta name="description" content="一切为了学生,为了学生的一切!">
<link href="imgs/send.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {color: #024589}
.style2 {color: #0066FF}
.style5 {color: #FF0000}
.style6 {color: #0000FF}
.style7 {color: #FF3300}
.style8 {color: #000000}
-->
</style>
</head>
<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false">
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 height=236 width=773>
<TBODY>
<TR>
<TD background="imgs/logo.jpg"
width=223 align="right" valign="bottom">
<p align="center">
<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="obj2" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" width="184" height="139">
<param name="movie" value="imgs/other06.swf">
<param name="quality" value="High">
<param name="salign" value="T">
<param name="wmode" value="transparent">
<embed src="imgs/other06.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="obj2" width="184" height="139" quality="High" salign="T" wmode="transparent"></object>
<FONT size=2 style="FONT-SIZE: 10pt">
<br><br><br></FONT></TD>
<TD background="imgs/bannr01.jpg"
width=333 valign="bottom">
<p align="center">
<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="obj1" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" width="100%" height="102">
<param name="movie" value="imgs/feiniao1.swf">
<param name="quality" value="High">
<param name="scale" value="ExactFit">
<param name="wmode" value="transparent">
<param name="salign" value="R">
<embed src="imgs/feiniao1.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="obj1" width="100%" height="102" quality="High" scale="ExactFit" wmode="transparent" salign="R"></object>
<br><br></TD>
<TD background="imgs/bannr02.jpg"
vAlign=top width=217><map name="FPMap2">
<area coords="166,127,44" shape="circle" href="2smarket.asp">
<area coords="51,52,44" shape="circle" href="qgzx.asp">
</map>
<IMG border=0 height=230
src="imgs/tm.gif" useMap=#FPMap2
width=217></TD>
</TR></TBODY></TABLE>
<table width="773" border="0" align="center" cellpadding="0" cellspacing="0" height="211">
<tr>
<td width="194" height="211" valign="top" background="imgs/left_bg.jpg"><table width="194" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="24" height="58" background="imgs/left_01-1.jpg"> </td>
<td width="15" background="imgs/left_01-2.jpg"> </td>
<td width="148" background="imgs/left_01-3.jpg"> </td>
<td rowspan="2" valign="top" bgcolor="#82CEFD">
<img src="imgs/left_01-4.jpg" width="7" height="3"></td>
</tr>
<tr>
<td height="105" valign="top" background="imgs/left_02-1bg.jpg">
<img src="imgs/left_02-1.jpg" width="24" height="53"></td>
<td valign="top" background="imgs/left_02-2bg.jpg">
<img src="imgs/left_02-2.jpg" width="15" height="17"></td>
<td valign="top" bgcolor="#C4E8FF"><table width="92%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="5"></td>
</tr> <%
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><div align="center"><br>
<%=rs("title")%><br>
<%=rs("content")%> <br>
发布人:<%=rs("upload")%><br>
发布时间:<%=rs("dateandtime")%> </div></td>
</tr>
</table></td> <%else
rs.close
set rs=nothing
end if%>
</tr>
</table>
</td>
<td width="564" valign="top" bgcolor="#64C2FD">
<table width="564" border="0" cellspacing="0" cellpadding="0" height="211">
<tr>
<td height="33" background="imgs/daohang_bg.jpg"><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<TD class=yy> <a href="index.asp">网站首页</a><a href="#·"> </a><SPAN
class=style1>| </SPAN><a href="type.asp?typeID=16">团学天地</a> <SPAN
class=style1>| <a href="type.asp?typeID=17">规章制度</a> | </SPAN>
<a href="type.asp?typeID=18">社区生活</a> <SPAN
class=style1>| <a href="type.asp?typeID=19">最新下载 </a>| </SPAN>
<a href="nwjl.asp">内务纪律</a> <SPAN
class=style1>| </SPAN><a href="special.asp">社区专题</a></TD>
</tr>
</table></td>
</tr>
<tr>
<td height="164" valign="top">
<table width="559" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="559" height=42 background="imgs/photo_title.jpg" > <img border="0" src="IMAGES/menu-l-m.gif" width="11" height="11"><font class=m_tittle> </font>栏目导航
<a class="daohang" href="./" >网站首页</a>>>全部公告</td>
</tr>
<tr>
<td valign="top" background="imgs/news_bg.jpg" height="106">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" height="106">
<tr>
<td width="4"> </td>
<td bgcolor="#C4E8FF" 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>
</table></td>
</tr>
<tr>
<td height="16" bgcolor="#82CEFD">
<img src="imgs/new_bg01.jpg" width="9" height="4"></td>
</tr>
</table>
</td>
</tr>
</table></td>
<td width="15" valign="top" background="imgs/right_bg.jpg"> </td>
</tr>
</table>
<table width="773" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="118" valign="top" background="imgs/under.jpg"> <!--#include file=bot.asp -->
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -