⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 announce.asp

📁 一个功能很全面的设计网站,可以作为工作室、个人主页、技术网站等
💻 ASP
字号:
<!--#include file="Inc/conn.asp"-->
<%
dim ID
dim sqlAnnounce
dim rsAnnounce
dim AnnounceNum
ID=Trim(request("ID"))
if ID<>"" then
	sqlAnnounce="select * from Announce where ID=" & Clng(ID) & " order by ID desc"
else
	sqlAnnounce="select * from Announce where IsSelected=True order by ID desc"
end if
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>
BODY
{scrollbar-face-color:#cccccc; scrollbar-shadow-color:ffffff; 
scrollbar-highlight-color:ffffff; scrollbar-3dlight-color:ffffff; 
scrollbar-darkshadow-color:ffffff; scrollbar-track-color:ffffff; 
scrollbar-arrow-color:ffffff;}
</STYLE>
<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>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="4" topmargin="4" style="overflow-x:hidden;overflow-y:scroll">
<table width="317" height="300" border="0" align="center">
  <tr>
    <td><table width="288" height="276" border=0 align="center" cellpadding=0 cellspacing=0>
        <tbody>
          <tr bgcolor="#06233B"> 
            <td height="24" colspan=3> <div align="center"><font color="#CCCCCC"><strong>首 
                页 公 告</strong></font></div></td>
          </tr>
          <tr bgcolor="#EEEEEE"> 
            <td width="10" rowspan="3">&nbsp;</td>
            <td height="10" valign=top noWrap></td>
            <td width="9" rowspan="3">&nbsp;</td>
          </tr>
          <tr> 
            <td width=360 valign=top noWrap bgcolor="#EEEEEE"> 
              <div align="center"> 
                <%
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'>" & rsAnnounce("title") & "</p><p align='left'>&nbsp;&nbsp;&nbsp;&nbsp;" & rsAnnounce("Content") & "</p><p align='right'>" & rsAnnounce("Author") & "&nbsp;&nbsp;&nbsp;&nbsp;<br>" & FormatDateTime(rsAnnounce("DateAndTime"),1) & "&nbsp;&nbsp;&nbsp;&nbsp;</p>"
		rsAnnounce.movenext
		i=i+1
		if i<AnnounceNum then response.write "<hr>"
	loop	
end if  
%>
              </div></td>
          </tr>
          <tr> 
            <td  height="10" valign=top noWrap bgcolor="#EEEEEE"></td>
          </tr>
        </tbody>
      </table></td>
  </tr>
</table>
</body>
</html>
<%
rsAnnounce.close
set rsAnnounce=nothing
call CloseConn()
%>

⌨️ 快捷键说明

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