<!-- #include file="Setup.asp" -->
<script language="JavaScript" src="inc/PLts.js"></script><%
id=cint(Request("id"))
if id<>empty then ResponseCookies"ForumID",id,"0"
if ""&SiteSettings("AdminPassword")&""=empty then response.redirect "Install.asp"
top
%>
<table width="100%" border="0" cellpadding="1" cellspacing="1" class="a2">
  <tr class="a1" id="TableTitleLink">
    <td height="24"><a href="Affiche.asp">　社区公告</a></td>
  </tr>
  <tr class="a3">
    <td height="25">
      <marquee onmouseover="this.stop();" onmouseout="this.start();" scrollamount="3">
      <%
Set Rs=Conn.ExeCute("Select * From [BBSXP_Affiche] Order By ID Desc")
Do While Not Rs.Eof
title=Rs("title")
p_time=Rs("posttime")
if len(title)>17 then title=Left(""&title&"",30)&"..."
%>
      <font face='Old English Text MT'>　</font> <a href="Affiche.asp?ID=<%=Rs("ID")%>"><%=title%>(<%=p_time%>)&nbsp;&nbsp;</a>
      <%
Rs.MoveNext
Loop
Rs.Close
%>
      </marquee>
    </td>
  </tr>
  <tr class="a3">
    <td height="15" align="center">    ∵ <a href="ShowBBS.asp">最新帖子 </a>∵ <a href="ShowBBS.asp?menu=1">本周人气帖 </a>∵ <a href="ShowBBS.asp?menu=2">本周热门帖 </a>∵ <a href="ShowBBS.asp?menu=3">论坛精华区</a> ∵<a href="ShowBBS.asp?menu=4"> 投票贴子</a> ∵ <a href="#">雨易官方网</a> ∵</td>
  </tr>
</table>
<br />
<table border="0" width="100%" align="center">
<%
if CookieUserName<>"" then
sql="select * from [BBSXP_Users] where ID="&CookieUserID&""
Set Rs=Conn.Execute(sql)
%>
<%
Rs.Close
else
%>

<br>
<%
end if
%>
</table>

<table cellspacing=1 cellpadding=0 border=0 width=100% class=a2>
	<%
if Request.Cookies("forumid")<>empty then
sql="select * from [BBSXP_Forums] where id="&int(Request.Cookies("forumid"))&""
Set Rs1=Conn.Execute(sql)
if Rs1.eof then
ResponseCookies"ForumID","","0"
response.write "<SCRIPT>top.location='"&SiteSettings("SiteURL")&"';</SCRIPT>"
Response.End
end if
ShowForum()
Set Rs1 = Nothing
else

sql="Select * From [BBSXP_Forums] where followid=0 and ForumHide=0 order by SortNum"
Set Rs=Conn.Execute(sql)
do while not Rs.eof
ForumIntro=replace(Rs("ForumIntro"),"<br>",CHR(10))
%>
<tr class="a1" id="TableTitleLink">
<td align="left" colspan="7" title="<%=ForumIntro%>" height="25">　<a href="ShowForum.asp?ForumID=<%=Rs("id")%>"><%=Rs("ForumName")%></a></td></tr>
<%if SiteSettings("DisplayForumFloor")<>1 and rs("ForumStyle")<>1 then%>
<tr height="22" class="a5">
<td width="5%"></td>
<td width="45%" align="center"><img src="Images/forum_forum.gif" width="25" height="10" /></td>
<td width="5%" align="center"><img src="Images/forum_post.gif" width="20" height="10" /></td>
<td width="5%" align="center"><img src="Images/forum_topic.gif" width="24" height="10" /></td>
<td width="5%" align="center"><img src="Images/Forum_today.gif" width="25" height="10" /></td>
<td width="18%" align="center"><img src="Images/forum_Published.gif" width="52" height="10" /></td>
<td width="17%" align="center"><img src="Images/forum_how.gif" width="25" height="10" /></td>
</tr>
<%
end if
i=0
sql="Select * From [BBSXP_Forums] where followid="&Rs("id")&" and ForumHide=0 order by SortNum"
Set Rs1=Conn.Execute(sql)

do while not Rs1.eof
if SiteSettings("DisplayForumFloor")=1 then
ShowForumFloor
else
 if Rs1("ForumStyle")=1 then
  ShowForumFloor
 else
  ShowForum
 end if
end if

Rs1.Movenext
loop
Set Rs1 = Nothing

if SiteSettings("DisplayForumFloor")=1 and i>0 then
for i = i to 2
response.write "<td class=a3></td>"
next
end if
%>
</table><br>
<table cellspacing=1 cellpadding=0 border=0 width=100% class=a2>
<%
Rs.Movenext
loop
Rs.close



end if

ForumName=SiteSettings("SiteName")
ForumID=0
%>
</table>
<!-- #include file="mingxing.asp" -->
<div id="TableWidth">

<!---------浮动广告开始------->
<% if SiteSettings("fdimg")<>"" then %>
<DIV id=img style="LEFT: 100px; WIDTH: 177px; POSITION: absolute; TOP: 124px; HEIGHT: 56px"> 
<TABLE cellSpacing=0 cellPadding=0 border=0> 
<TBODY> 
<TR> 
<TD vAlign=center> 
<SCRIPT language=JavaScript> 
<!-- Begin 
var xPos=20; 
var yPos=document.body.clientHeight; 
var step=1;var delay=40;var height=0; 
var Hoffset=0; 
var Woffset=0; 
var yon=0; 
var xon=0; 
var pause=true; 
var interval; 
img.style.top=yPos; 
function changePos(){width=document.body.clientWidth;height=document.body.clientHeight;Hoffset=img.offsetHeight;Woffset=img.offsetWidth;img.style.left=xPos+document.body.scrollLeft;img.style.top=yPos+document.body.scrollTop;if(yon){yPos=yPos+step;}else{yPos=yPos-step;}if(yPos<0){yon=1;yPos=0;}if(yPos>=(height-Hoffset)){yon=0;yPos=(height-Hoffset);}if(xon){xPos=xPos+step;}else{xPos=xPos-step;}if(xPos<0){xon=1;xPos=0;}if(xPos>=(width-Woffset)){xon=0;xPos=(width-Woffset);}}function start(){img.visibility="visible";interval=setInterval('changePos()',delay);}start();//--> 
</SCRIPT> 
<a target=_blank href=<%=SiteSettings("fdurl")%>><img border="0" src="<%=SiteSettings("fdimg")%>"></a> 
<DIV align=center></DIV></TD></TR></TBODY></TABLE></DIV>
<%end if%>

<!---------浮动广告结束------->

<!-- #include file="inc/line.asp" -->

<%
regOnline=Conn.execute("Select count(sessionid)from [BBSXP_UsersOnline] where UserName<>''")(0)

if SiteSettings("BestOnline") < Onlinemany then
Conn.execute("update [BBSXP_SiteSettings] set BestOnline="&Onlinemany&",BestOnlineTime="&SqlNowString&"")
end if


if SiteSettings("DisplayBirthdays")=1 then
%>
<table cellspacing=1 cellpadding=6 border=0 width=100% class=a2>
	<tr class="a1">
		<td colspan="2" align="left"><font color="#FFFFFF">　今天过生日的会员</font></td>
	</tr>
		<tr class="a3"><td width="5%" align="center"><img src="images/birthday.gif" width="30" height="30"></td>
<td>
<%
Set Rs=conn.Execute("Select UserName,Birthday From [BBSXP_Users] where Month(Birthday)="&Month(now())&" and day(Birthday)="&day(now())&"")
if Rs.eof then Response.Write "今天没有过生日的会员."
do while not Rs.eof
%><a href="Profile.asp?UserName=<%=RS("UserName")%>"><%=RS("UserName")%></a>　<%
Rs.Movenext
loop
Rs.close
%>
</td>
     </tr>
</table><br>
<%
end if


if SiteSettings("DisplayLink")=1 then
%>

<table cellspacing=1 cellpadding=6 border=0 width=100% class=a2>
      <tr class="a1">
            <td colspan="3" align="left"><font color="#FFFFFF">　友情链接</font>　<a onclick="javascript:open('link.asp','','width=400,height=260')" href="#"><font color="#FFFFFF">【申请链接】</font></a></td>
      </tr>
<%
sql="select * from [BBSXP_Link] where Review=1"
rs.Open sql,Conn
do while not rs.eof

if rs("logo")="" or rs("logo")="http://" then
link1=link1+"<a title='"&rs("intro")&"' href="&rs("url")&" target=_blank>"&rs("name")&"</a>   "
else
link2=link2+"<a title='"&rs("name")&""&chr(10)&""&rs("intro")&"' href="&rs("url")&" target=_blank><img src="&rs("logo")&" border=0 width=88 height=31></a> "
end if
rs.movenext
loop
rs.close
%>
      <tr class="a4"><td width="5%" rowspan="2" valign=center><img src=images/shareforum.gif></td>
            <td height="95%" colspan="2" valign=top>  <%=link1%></td>
      </tr>
      <tr class="a4">
            <td width="95%" colspan="2" valign=top><%=link2%></td>
      </tr>
</table><br>

<%
end if

if SiteSettings("DisplayWhoIsOnline")=1 then%>
<table cellspacing=1 cellpadding=6 border=0 width=100% class=a2>
	<tr class="a1">
		<td colspan="2" align="left"><font color="#FFFFFF">　会员在线信息</font></td>
	</tr>
	<tr class="a3"><td align="center" width="5%"><img src="images/totel.gif"></td>
		<td class="a4" valign="top" align="left">
		<img src="images/plus.gif" id="followImg" style="cursor:hand;" onclick="loadThreadFollow(<%=ForumID%>)"> 
				目前论坛总共 有 <b><%=Onlinemany%></b> 人在线。其中注册用户 <b><%=regOnline%></b> 
				人，访客 <b><%=Onlinemany-regOnline%></b> 人。最高在线 <font color="red">
				<b><%=SiteSettings("BestOnline")%></b></font> 人，发生在 <b><%=SiteSettings("BestOnlineTime")%></b>	
		<div style="display:none" id="follow">
			<hr width="90%" SIZE="1" align="left"><span id=followTd><img src=images/loading.gif>正在加载...</span></div>
		</td>
	</tr>
</table></div>
<br><a name="bottom">
<center>
<img src="images/Style/<%=Request.Cookies("skins")%>/Board1.gif" alt="有新帖的论坛"> 有新帖的论坛  
<img src="images/Style/<%=Request.Cookies("skins")%>/Board2.gif" alt="无新帖的论坛"> 无新帖的论坛 
</center>
<br>
<%
end if

htmlend

sub ShowForumFloor()
ForumIntro=replace(Rs1("ForumIntro"),"<br>",CHR(10))
if rs1("Moderated")<>empty then
ModeratedList="&nbsp;版主："
filtrate=split(rs1("Moderated"),"|")
ModeratedList=ModeratedList&"<a href=Profile.asp?UserName="&filtrate(0)&">"&filtrate(0)&"</a> "
if ubound(filtrate)>0 then ModeratedList=ModeratedList&" <font color=gray>...</font>"
else
ModeratedList=" <a href=bzsq-sq.asp>申请版主</a>"
end if
i=i+1
if i=1 then response.write "<tr>"
%>
<td><table border=0 width=100% cellspacing=0 cellpadding=4><tr class=a5><td colspan=3 title='<%=ForumIntro%>'>&nbsp;<a href="ShowForum.asp?ForumID=<%=Rs1("id")%>"><%=Rs1("ForumName")%></a></td></tr><tr class=a4><td>&nbsp;今日帖数： <font color=red><%=Rs1("ForumToday")%></font></td><td>主题帖数： <%=Rs1("ForumThreads")%></td><td>回复帖数：<%=Rs1("ForumPosts")%></td></tr><tr class=a3><td colspan=3><%=ModeratedList%></td></tr></table></td>
<%
if i=3 then i=0:response.write "</tr>"

end sub
%>