announce.asp

来自「利用C++编写的网络跟踪代码」· ASP 代码 · 共 99 行

ASP
99
字号
<!--#include file="Inc/conn.asp"-->
<!--#include file="inc/ubbcode.asp"-->
<%
dim ID
dim sqlAnnounce
dim rsAnnounce
dim AnnounceNum
dim ChannelID
ID=Trim(request("ID"))
ChannelID=Clng(Trim(request("ChannelID")))
sqlAnnounce="select * from Announce where IsSelected=True and (ChannelID=0 or ChannelID=" & ChannelID & ")"
if ID<>"" then
	sqlAnnounce=sqlAnnounce & " and (ShowType=0 or ShowType=1) and ID=" & Clng(ID) 
else
	sqlAnnounce=sqlAnnounce & " and (ShowType=0 or ShowType=2)"
end if
sqlAnnounce=sqlAnnounce & " order by ID Desc"
Set rsAnnounce= Server.CreateObject("ADODB.Recordset")
rsAnnounce.open sqlAnnounce,conn,1,1
%>
<html>
<head>
<title>本站通告</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
a:active { text-decoration: none; color: #0000FF}
a:hover { text-decoration: none; color: #FF0000}
a:link { text-decoration: none; color: #0000FF}
a:visited { text-decoration: none; color: #990000}
BODY { text-decoration: none; font-size: 12px}
TABLE { text-decoration: none; font-size: 12px}
</style>
<link href="Admin_STYLE.CSS" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="5" topmargin="5" style="overflow-x:hidden;overflow-y:scroll">
<table width="370" border="0" align="center" cellpadding="1" cellspacing="0" bgcolor="#FFFFFF">
  <tr> 
    <td valign="top"> <table width="100%" height="30" border="0" cellpadding="0" cellspacing="0" bgcolor="#B6B6B6">
        <tr> 
          <td valign="top"> <table width="100%" height="26" border="0" cellpadding="0" cellspacing="0">
              <tr> 
                <td bgcolor="e1e1e1"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td width="10%"><div align="center"><img src="imge/top1.gif" width="20" height="20"></div></td>
                      <td width="90%" valign="bottom" class="14">网站公告</td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
        </tr>
      </table></td>
  </tr>
</table>
<table width="370" border="0" align="center"  cellpadding="0" cellspacing="0">
  <tr> 
    <td height="11"></td>
  </tr>
</table>
<table width="368" class="tde"border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="f9f9f9">
  <tr> 
    <td> <table width="100" height="15" border="0" align="center"  cellpadding="0" cellspacing="0">
        <tr> 
          <td height="11"></td>
        </tr>
      </table>
      <table width="100%" border="0" cellspacing="10" cellpadding="0">
        <tr>
          <td>
            <%
if rsAnnounce.bof and rsAnnounce.eof then 
	response.write "<p>&nbsp;&nbsp;没有通告或找不到指定的通告</p>" 
else 
	AnnounceNum=rsAnnounce.recordcount
	dim i
	do while not rsAnnounce.eof
		response.Write "<p align='center'><font color=666666><b>" & rsAnnounce("title") & "</b></font></p><p align='left'>" & ubbcode(dvHTMLEncode(rsAnnounce("Content"))) & "</p><p align='right'>" & rsAnnounce("Author") & "&nbsp;&nbsp;<br>" & FormatDateTime(rsAnnounce("DateAndTime"),1) & "</p>"
		rsAnnounce.movenext
		i=i+1
		if i<AnnounceNum then response.write "<hr>"
	loop	
end if  
%>
          </td>
        </tr>
      </table>
      <table width="100" height="5" border="0" align="center"  cellpadding="0" cellspacing="0">
        <tr> 
          <td height="5"></td>
        </tr>
      </table></td>
  </tr>
</table>
</body>
</html>
<%
rsAnnounce.close
set rsAnnounce=nothing
call CloseConn()
%>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?