<!-- #include file="conn.asp" -->
<!-- #include file="cls_main.asp" -->
<% dim obj
set obj = New ViewNews
	obj.AspInit()
set obj = nothing


class ViewNews
	Private ID, i, Mesky,isType
	Private Sub Class_Initialize()
		Set Mesky = New Cls_Main
	End Sub
	Private Sub Class_Terminate()
		Set Mesky = Nothing
	End Sub
	Public Sub AspInit()
		If Request.QueryString("ID") = "" Then
			Response.Write "非法操作！指定的参数不正确。"
			Response.End
		ElseIf IsNumeric(Request.QueryString("ID")) = False Then
			Response.Write "非法操作！指定的参数不正确。"
			Response.End
		Else
			ID = CLng(Request.QueryString("ID"))
		End If
		If Request.QueryString("isType") = "" Then
			isType = 1
		Else
			isType = Request.QueryString("isType")
		End IF
		Call Mesky.LoadSetting()
		Dim arrPage, arrMainPage
		If isType = 1 then
			arrMainPage = Split(Mesky.ReadStylePage("Style_Down_Main"), "<!--|||-->")
			Response.Write Replace(arrMainPage(0), "{$page_title}", "站点公告")
			Response.Flush()
			Response.Write arrMainPage(1)
			Response.Flush()
			Response.Write arrMainPage(2)
			Response.Flush()
			Call showNews(ID)
			Response.Write arrMainPage(5)
			arrMainPage = Null
		Else
			arrMainPage = Split(Mesky.ReadStylePage("Style_News_Main"), "<!--|||-->")
			Response.Write Replace(arrMainPage(0), "{$page_title}", "站点公告")
			Response.Flush()
			Response.Write arrMainPage(1)
			Response.Flush()
			Response.Write arrMainPage(2)
			Response.Flush()
			showNews(ID)
			Response.Write arrMainPage(4)
			arrMainPage = Null
		End If
	End sub
	Private Sub showNews(ID)
		Dim tRs
		Response.Write "<table width=""770"" border=""0"" align=""center"" cellpadding=""3"" bgcolor=""#FFFFFF"">" & vbCrlf
		Set tRs = Mesky.Execute("select * from Mesky_News where ID = " & ID)
		If tRs.eof and tRs.bof then
			Response.Write "  <tr>" & vbCrlf
			Response.Write "    <td align=""center"">Sorry！没有找到相关内容。</td>" & vbCrlf
			Response.Write "  </tr>" & vbCrlf
		Else
			Response.Write "  <tr>" & vbCrlf
			Response.Write "    <td align=""center"" style=""FILTER: progid:DXImageTransform.Microsoft.Gradient(startColorStr='#E4E4E4', endColorStr='#f9f9f9', gradientType='0');font-size:16px;"" height=""30""><b>"&tRs("Title")&"</b></td>" & vbCrlf
			Response.Write "  </tr>" & vbCrlf
			Response.Write "  <tr>" & vbCrlf
			Response.Write "    <td align=""center"">"&tRs("DateAndTime")&"</td>" & vbCrlf
			Response.Write "  </tr>" & vbCrlf
			Response.Write "  <tr>" & vbCrlf
			Response.Write "    <td align=""center""><table width=""97%""  border=""0""><tr><td height=""1"" background=""images/bg_dot.gif""></td></tr></table></td>" & vbCrlf
			Response.Write "  </tr>" & vbCrlf
			Response.Write "  <tr>" & vbCrlf
			Response.Write "    <td>"&tRs("Content")&"</td>" & vbCrlf
			Response.Write "  </tr>" & vbCrlf
		End If
		set tRs = Nothing
		Response.Write "</table>" & vbCrlf
	End Sub	
End Class
%>