<!--#include file="conn.asp"-->
<!--#include file="inc/const.asp"-->
<!--#include file="inc/classmenu.asp"-->
<!--#include file="inc/ubbcode.asp"-->
<%
Dim HtmlContent
Newasp.LoadTemplates 9999, 8, 0

HtmlContent = Newasp.HtmlContent
HtmlContent = Replace(HtmlContent,"{$InstallDir}", Newasp.InstallDir)
HtmlContent = Replace(HtmlContent, "{$ChannelID}", 0)
HtmlContent = Replace(HtmlContent,"{$PageTitle}",Newasp.HtmlSetting(1))
HtmlContent = ReadClassMenu(HtmlContent)
HtmlContent = ReadClassMenubar(HtmlContent)

Call AnnounceContent

Response.Write HtmlContent
CloseConn
Sub AnnounceContent()
	Dim Rs,AnnounceID
	Newasp.PreventInfuse
	If Not IsNumeric(Request("AnnounceID")) Then
		HtmlContent = Replace(HtmlContent,"{$Topic}", Newasp.HtmlSetting(2))
		HtmlContent = Replace(HtmlContent,"{$PostTime}", vbNullString)
		HtmlContent = Replace(HtmlContent,"{$Hits}", vbNullString)
		HtmlContent = Replace(HtmlContent,"{$Writer}", vbNullString)
		HtmlContent = Replace(HtmlContent,"{$Content}", Newasp.HtmlSetting(2))
		Exit Sub
	Else
		AnnounceID = CLng(Request("AnnounceID"))
	End If
	On Error Resume Next
	Newasp.Execute ("UPDATE NC_Announce SET hits=hits+1 WHERE AnnounceID="&AnnounceID)
	Set Rs = Newasp.Execute("SELECT title,Content,PostTime,writer,hits FROM NC_Announce WHERE AnnounceID="&AnnounceID)
	If Rs.BOF And Rs.EOF Then
		HtmlContent = Replace(HtmlContent,"{$Topic}", Newasp.HtmlSetting(2))
		HtmlContent = Replace(HtmlContent,"{$PostTime}", vbNullString)
		HtmlContent = Replace(HtmlContent,"{$Hits}", vbNullString)
		HtmlContent = Replace(HtmlContent,"{$Writer}", vbNullString)
		HtmlContent = Replace(HtmlContent,"{$Content}", Newasp.HtmlSetting(2))
		Set Rs = Nothing
	Else
		HtmlContent = Replace(HtmlContent,"{$Topic}", Rs("title"))
		HtmlContent = Replace(HtmlContent,"{$PostTime}", Rs("PostTime"))
		HtmlContent = Replace(HtmlContent,"{$Hits}", Rs("hits"))
		HtmlContent = Replace(HtmlContent,"{$Writer}", Newasp.ChkNull(Rs("writer")))
		HtmlContent = Replace(HtmlContent,"{$Content}", Ubbcode(Rs("content")))
	End If
	Set Rs = Nothing
End Sub
%>