<!-- #Include File="../Include/Skin.asp" -->
<!-- #Include File="../Include/Cls_PageCute.asp" -->
<!-- #Include File="../Include/Cls_UbbCode.asp" -->
<%
'=======================================================
' 欢迎使用《阿赛大型门户网站系统V3.0》，简称“AsaiMHV3”
' 技术支持、商业版咨询、官方唯一指定联系QQ“4941172”
' 官方网站：http://77ya.com      程序负责人：阿赛
'=======================================================

Dim iListStr, Lii,tmpnsort
Index_Url="Update"
tit_fir="公告"
pageurl="?Action="&Action&"&"
tit = ""
if action="" then action="0"
tmpnsort=lcase(Cls.Code_Query("Action"))
iListStr = Cls.Channel_Menu
For Lii =0 To Ubound(iListStr,2)
  If Action = cstr(iListStr(0,Lii)) Then
     tit=iListStr(13,Lii)&tit_fir
  	 ChannelIDs = Int(iListStr(0,Lii))
    exit for
	End If
Next
if tit = "" then tit = "网站公告"

Call DoWebHead(0,0)
call Main_Cast()	
Call DoWebEnd()

Sub Main_Cast()
Dim obj_page,sTmpl,stmpend
	Set obj_page=new Cls_PageCute
	obj_page.pageurl=pageurl			'链接
	obj_page.nummer=Format_Mid_Num(12)						'调用个数
	obj_page.page_t=1									'两种样式
	obj_page.page_p=5									'翻页显示的个数
	obj_page.page_unit="个"
	obj_page.page_tit=tit_fir
	obj_page.v_id="id"
	Call obj_page.p_init("*","AsaiMHCast","ChannelIDs="&ChannelIDs,"id desc")
	SQL = obj_page.sql_count
	Set rs=Cls.Exec(SQL,1)
	obj_page.rssum=rs(0)
	Rs.Close
if int(obj_page.rssum)<1 then
 sTmpl="<div class=""mainList""><div class=""Squareall""><div class=""title"">" & _
vbcrlf&"<span class=""c3"">公告提示</span></div>" & _
vbcrlf&"<div class=""Block""><div class=""BlockContent""><div class=""BlockList center"">" & _
vbcrlf&"<br /><br /><font class=red size=4><b>暂时没有公告</b></font><br /><br />" & _
vbcrlf&"<a href=""javascript:history.back(1)"">返回上一页</a><br /><br />" & _
vbcrlf&"</div></div></div>{$ukong}" & _
vbcrlf&"</div></div>"
  stmpend=""
else
	Call obj_page.p_main("*","AsaiMHCast","ChannelIDs="&ChannelIDs,"id desc")
	For i=1 To obj_page.page_num
 sTmpl="<a name="&rs("id")&"></a><div class=""mainList""><div class=""Squareall""><div class=""title"">" & _
vbcrlf&"<span class=""c3"">"&Cls.code_html(rs("topic"),1,0)&"</span></div>" & _
vbcrlf&"<div class=""Block""><div class=""BlockContent""><div class=""BlockList"">" & _
vbcrlf&""&Ubb.Ubbcode(rs("word"))&"" & _
vbcrlf&"</div></div>" & _
vbcrlf&"{$ukong}<div class=""right""><font class=Gys>"&Cls.web_name&"&nbsp;&nbsp;发布人："&format_user_name(rs("username"),1,"")&"&nbsp;&nbsp;发布时间："&left(Cls.time_type(rs("tim"),2),18)&"</font></div>"

     rs.movenext
  next
  rs.close
  stmpend="<div id='asaipage'>"&obj_page.page_var&" "&obj_page.page_cute&" "&obj_page.page_shortcut&"</div></div>{$ukong}</div></div>"
end if
  ChannelIDs=0
  Cls.ReadPage "Main_Cast"
  Cls.HtmlRcod "tit",tit
  Cls.HtmlRcod "body",sTmpl
  Cls.HtmlRcod "ends",stmpend
  Cls.HtmlRcod "cast",Cast()
  Cls.HtmlRcod "more",""
  Cls.OutPage
  set obj_page=nothing
End Sub

Function Cast()
dim sTmp
sTmp="" & _
vbcrlf&"<li "
If action="0" Then sTmp=sTmp&" class=""Castred"""
sTmp=sTmp&"><a href='?'>网站"&tit_fir&"</a></li>"&vbcrlf

	For Lii =0 To Ubound(iListStr,2)
	  If Not Cbool(iListStr(7,Lii)) And Cls.Get_ChannelSetup(iListStr(18,Lii),13) = 1 Then
      tit=iListStr(13,Lii)&tit_fir
			sTmp=sTmp&"<li"
			If Action = Cstr(iListStr(0,Lii)) Then
				sTmp=sTmp&" class=""Castred"""
			End If
			sTmp=sTmp&"><a href='?Action="&lcase(iListStr(0,Lii))&"'>"&tit&"</a></li>"&vbcrlf
		End If
	Next
Cast=sTmp
End Function
%>
