📄 view_announcements.asp
字号:
<%
'#############################################################
'# 中国在线--极酷论坛 ver.2001 3.0
'#
'# 版权所有: 中国在线 (ChinaXP.Net)
'#
'# 制作人 : 周周 (SeeYa!)
'#
'#
'# 主页地址: http://www.ChinaXP.net/ 中国在线
'# http://bbs.ChinaXP.Net 中国在线--极酷论坛
'#
'#############################################################
%>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_functions.asp" -->
<!--#INCLUDE FILE="inc_top_short.asp" -->
<%
'## Forum_SQL
strSql = "SELECT " & strTablePrefix & "ANNOUNCE.A_ID"
strSql = strSql & ", " & strTablePrefix & "ANNOUNCE.A_AUTHOR"
strSql = strSql & ", " & strTablePrefix & "ANNOUNCE.A_SUBJECT"
strSql = strSql & ", " & strTablePrefix & "ANNOUNCE.A_MESSAGE"
'strSql = strSql & ", " & strTablePrefix & "ANNOUNCE.A_FORUMLIST"
strSql = strSql & ", " & strTablePrefix & "ANNOUNCE.A_START_DATE"
strSql = strSql & ", " & strTablePrefix & "ANNOUNCE.A_END_DATE"
strSql = strSql & " FROM " & strTablePrefix & "ANNOUNCE "
if mLev < 4 then
strSql = strSql & " WHERE " & strTablePrefix & "ANNOUNCE.A_START_DATE <= " & "'" & DatetoStr(Now()) & "'"
strSql = strSql & " AND " & strTablePrefix & "ANNOUNCE.A_END_DATE > " & "'" & DatetoStr(Now()) & "'"
end if
set rs = my_Conn.Execute (StrSql)
if rs.EOF or rs.BOF then
Response.Redirect(strForumURL)
else
if (mLev = 4) or (lcase(strNoCookies) = "1") then
AdminAllowed = 1
else
AdminAllowed = 0
end if
%>
<DIV align="center"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">论坛公告栏</font></b></DIV>
<table border="0" width="100%" cellspacing="1" cellpadding="4" align="center" bgcolor="<% =strTableBorderColor %>">
<tr>
<td align="center" bgcolor="<% =strPageBGColor %>" width="100%"></td>
</tr>
<%
'## Forum_SQL
strSql = "SELECT " & strTablePrefix & "ANNOUNCE.A_ID"
strSql = strSql & ", " & strTablePrefix & "ANNOUNCE.A_AUTHOR"
strSql = strSql & ", " & strTablePrefix & "ANNOUNCE.A_SUBJECT"
strSql = strSql & ", " & strTablePrefix & "ANNOUNCE.A_MESSAGE"
strSql = strSql & ", " & strTablePrefix & "ANNOUNCE.A_START_DATE"
strSql = strSql & ", " & strTablePrefix & "ANNOUNCE.A_END_DATE"
strSql = strSql & " FROM " & strTablePrefix & "ANNOUNCE "
if mLev < 4 then
strSql = strSql & " WHERE " & strTablePrefix & "ANNOUNCE.A_START_DATE <= " & "'" & DatetoStr(Now()) & "'"
strSql = strSql & " AND " & strTablePrefix & "ANNOUNCE.A_END_DATE > " & "'" & DatetoStr(Now()) & "'"
end if
strSql = strSql & " ORDER BY " & strTablePrefix & "ANNOUNCE.A_START_DATE DESC"
strSql = strSql & ", " & strTablePrefix & "ANNOUNCE.A_ID DESC;"
set rs = Server.CreateObject("ADODB.Recordset")
rs.cachesize = 20
rs.open strSql, my_Conn, 3
if not(rs.EOF or rs.BOF) then '## Replies found in DB
rs.movefirst
rs.pagesize = strPageSize
maxpages = cint(rs.pagecount)
end if
if rs.EOF or rs.BOF then '## No replies found in DB
Response.Write ""
else
'rs.movefirst
intI = 0
howmanyrecs = 0
rec = 1
do until rs.EOF '**
if intI = 0 then
CColor = strForumFirstCellColor
else
CColor = strAltForumCellColor
end if
%>
<tr bgcolor="<% =strHeadCellColor %>" valign="top" nowrap>
<td ><font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b><% =ChkString(rs("A_SUBJECT"),"display") %></b></font></td></tr>
<tr bgcolor="<% =CColor %>" valign="top"><td ><img src="<%=strImageURL %>icon_posticon.gif" border="0" hspace="3"><font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>">发布人:<% =rs("A_AUTHOR") %> 发布时间:(<% =ChkDate(rs("A_START_DATE")) %> 至 <% =ChkDate(rs("A_END_DATE")) %>)
<% if AdminAllowed = 1 then %>
<a href="JavaScript:openWindow('pop_announce_delete.asp?mode=Announcement&A_ID=<% =rs("A_ID") %>')"><img src="<%=strImageURL %>icon_delete_reply.gif" alt="删除公告" border="0" align="absmiddle" hspace="6"></a>
<% end if %>
<% if rs("A_END_DATE") < DatetoStr(Now()) then %>
<font color="<% =strActiveLinkColor %>">(本则公告已过期)
<% end if %>
<% if rs("A_START_DATE") > DatetoStr(Now()) then %>
<font color="<% =strActiveLinkColor %>">(本则公告尚未启动)
<% end if %>
</font></font>
<hr noshade size="<% =strFooterFontSize %>">
<font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><% =formatStr(rs("A_MESSAGE")) %><a href="#top"><img src="<%=strImageURL %>icon_go_up.gif" border="0" align="right" alt="回到页首"></a></font></td></tr>
<%
rs.MoveNext
intI = intI + 1
if intI = 2 then
intI = 0
end if
rec = rec + 1
loop
end if
%>
</table>
<br>
<!--#INCLUDE FILE="inc_footer_short.asp" -->
<%
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -