<%@language=vbscript codepage=936 %>
<%
option explicit
response.buffer= True
Dim ChannelID
ChannelID=Trim(request("ChannelID"))
if Not isnumeric(ChannelID) then ChannelID=0
ChannelID=Clng(ChannelID)
%>
<!--#include file="Conn.asp"-->
<!--#include file="inc/Cl_Const.asp"-->
<!--#include file="Inc/Cl_Function_Public.asp"-->
<!--#include file="inc/Cl_ClsUbb.asp"-->
<%
Cl.LoadTemplates("other")
Cl.Path = Cl.lanstr(1) & "<a href='" & Cl.Web_info(4) & "'>" & Cl.Web_info(0) & "</a>&nbsp;&gt;&gt;&nbsp;" & Cl.ChannelName
CurrentPath=Replace(Template.Strings(0),"´´Á¦Íø",CurrentPath)
dim ID,sqlAnnounce,rsAnnounce
dim AnnounceNum
ID=Cl.ChkClng(request("ID"))
sqlAnnounce="select * from Cl_Announce where IsSelected=True and (ChannelID=-1 or ChannelID=" & ChannelID & ")"
if ID<=0 then
	sqlAnnounce=sqlAnnounce & "and IsLink=False and (ShowType=0 or ShowType=2)"
else
	sqlAnnounce=sqlAnnounce & " and (ShowType=0 or ShowType=1) and ID=" & ID 
end if
sqlAnnounce=sqlAnnounce & " order by ID Desc"
Set rsAnnounce= Server.CreateObject("ADODB.Recordset")
OpenConn : rsAnnounce.open sqlAnnounce,Conn,1,1
TempStr = Template.html(0)',"{%width%}",cl.mainsetting(0))
if rsAnnounce.bof and rsAnnounce.eof then
	TempStr = Replace(TempStr,"{%announcebody%}",Split(Template.html(1),"||")(1))
else
	if ID>0 then
		If rsAnnounce("IsLink")=True then
			Dim sUrl
			sUrl=rsAnnounce("LinkUrl")
			rsAnnounce.close:set rsAnnounce=Nothing
			Response.Redirect sUrl
			Response.end
		end if
	end if
	AnnounceNum=rsAnnounce.recordcount
	dim Ttempstr
	i=0
	Ttempstr=""
	Set ClUbb= New Cls_UbbCode
	do while not rsAnnounce.eof
		Ttempstr = Ttempstr & Replace(Split(Template.html(1),"||")(0),"{%announcetitle%}",rsAnnounce("title"))
		Ttempstr = Replace(Ttempstr,"{%announcecontent%}",ClUbb.UbbCode(rsAnnounce("Content")))
		Ttempstr = Replace(Ttempstr,"{%announceauthor%}",rsAnnounce("Author"))
		Ttempstr = Replace(Ttempstr,"{%announcetime%}",FormatDateTime(rsAnnounce("AddTime"),1))
		rsAnnounce.movenext
		i=i+1
		if i<AnnounceNum then Ttempstr = Ttempstr & Split(Template.html(1),"||")(2)
	loop
	Set ClUbb=Nothing
	TempStr = Replace(TempStr,"{%announcebody%}",Ttempstr)
end if
rsAnnounce.close:set rsAnnounce=Nothing
Response.write Cl.ReplaceAllFlag(TempStr)
CloseAllObj
%>
<%
'==================================================
'CreateLive CMS Version 3.1
'							Powered by Aspoo.Net
'
'ÓÊÏä: aspoo@126.com		Info@aspoo.cn
'£Ñ£Ñ: 3315263				596197794
'ÍøÕ¾: www.aspoo.cn			www.aspoo.com
'ÂÛÌ³: bbs.aspoo.cn			bbs.aspoo.com
'
'Copyright (C) 2005 Aspoo.Net All Rights Reserved.
'==================================================
%>