<!--#include file="inc/Conn.asp"-->
<!--#include file="Inc/Cls.Common.asp"-->
<!--#include file="Inc/Cls.Templates.asp"-->
<%
  Dim ID
  ID = WRMPS.CheckStr(Request("ID"),1)
  If ID = "" Then Call WRMPS.ErrView("·操作错误，本窗口将在 <span id=time>5</span> 秒钟后自动关闭。<script language=javascript>"&vbCrLf&"function clock(){i=i-1"&vbCrLf&"time.innerHTML = i;"&vbCrLf&"if(i>0)"&vbCrLf&"setTimeout(""clock();"",1000);"&vbCrLf&"else"&vbCrLf&"self.close();}"&vbCrLf&"var i=5"&vbCrLf&"clock();"&vbCrLf&"</script>",0)
  SitePath = ",<a href="&WR_Setting(3)&"Announce.asp?ID="&ID&">阅读公告</a>"
  SitePath = WRMPS.GetSitePath(0,SitePath)
  Call DBConnBegin()
  
  Set Rs = Server.CreateObject("ADODB.RecordSet")
  Rs.Open "Select WM_ID,WM_Tit,WM_Content,WM_User,WM_Time,WM_TempID From WM_Announce Where WM_Key=1 and WM_ID="&ID ,Conn,1,1
  If Rs.Eof Then
    Call WRMPS.ErrView("·公告不存在，本窗口将在 <span id=time>5</span> 秒钟后自动关闭。<script language=javascript>"&vbCrLf&"function clock(){i=i-1"&vbCrLf&"time.innerHTML = i;"&vbCrLf&"if(i>0)"&vbCrLf&"setTimeout(""clock();"",1000);"&vbCrLf&"else"&vbCrLf&"self.close();}"&vbCrLf&"var i=5"&vbCrLf&"clock();"&vbCrLf&"</script>",0)
  Else
    Call WRMPS.FsoBegin()
    TempContent = WRTemp.SiteTemplates(1,Rs(5),12,0)
    Call WRMPS.FsoEnd()
    TempContent = WRMPS.GetReplace(TempContent,"{$AnnounceID}",Rs(0)) 
    TempContent = WRMPS.GetReplace(TempContent,"{$AnnounceTitle}",Rs(1)) 
    TempContent = WRMPS.GetReplace(TempContent,"{$AnnounceContent}",Rs(2)) 
    TempContent = WRMPS.GetReplace(TempContent,"{$AnnounceTime}",Rs(4)) 
    TempContent = WRMPS.GetReplace(TempContent,"{$AnnounceAnthor}",Rs(3)) 
  End If
  Rs.Close
  Set Rs = Nothing

  TempContent = WRTemp.SiteLabel(TempContent)
  Call ClassEnd()
  Response.write TempContent
  Call DBConnEnd()
%>