<!-- #include file="Conn.asp" -->
<script language="JavaScript" src="inc/PLts.js"></script><%
ForumsVersion="7.00 Beta 2 "&IsSqlVer&""
SiteSettings=Conn.Execute("[BBSXP_SiteSettings]")

if IsNumeric(Request.Cookies("UserID")) then
sql="select * from [BBSXP_Users] where ID="&Request.Cookies("UserID")&""
Set Rs=Conn.Execute(SQL)

if Rs.eof then
CleanCookies()
Response.Write "<script>window.setTimeout('window.location.reload();',2000)</script>"
Response.End
end if
if Request.Cookies("Userpass") <> Rs("Userpass") then
CleanCookies()
Response.Write "<script>window.setTimeout('window.location.reload();',2000)</script>"
Response.End
end if
CookieUserID=Rs("ID")
CookieUserName=Rs("UserName")
NewMessage=Rs("NewMessage")
UserRoleID=Rs("UserRoleID")
Rs.Close
if UserRoleID=1 or UserRoleID=2 then BestRole=1
''''''''''''''''''第一次来'''''''''''''''''''''''''''''
if Request.Cookies("Onlinetime")=empty then
Conn.execute("update [BBSXP_Users] set UserDegree=UserDegree+1,UserLandTime="&SqlNowString&",UserLastIP='"&Request.ServerVariables("REMOTE_ADDR")&"' where ID="&CookieUserID&"")
ResponseCookies"Onlinetime",now(),"0"
'---YEBBS用户在线时长统计
ResponseCookies"Onlinetimes",now(),"0"
else
tmp=DateDiff("s",Request.Cookies("Onlinetimes"),Now())
if tmp >600 then   '10分钟统计一次
Onlinetimes=Conn.Execute("Select Onlinetimes from [BBSXP_Users] where UserName='"&CookieUserName&"'")(0)
if IsNumeric(Onlinetimes)=False then Onlinetimes=0
Onlinetimes=Round(tmp/60+1*onlinetimes)
Conn.execute("update [BBSXP_Users] set UserMoney=UserMoney+1,Onlinetimes='"&Onlinetimes&"' where UserName='"&CookieUserName&"'")
ResponseCookies"Onlinetimes",now(),"0"
end if
'---YEBBS用户在线时长统计结束
end if
''''''''''''''''''''''''''''
end if



if SiteSettings("BannedIP")<>"" then
filtrate=split(SiteSettings("BannedIP"),"|")
for i = 0 to ubound(filtrate)
if instr("|"&Request.ServerVariables("REMOTE_ADDR")&"","|"&filtrate(i)&"") > 0 then error("<li>"&Request.ServerVariables("REMOTE_ADDR")&"被禁止进入论坛！")
next
end if

if Request.Cookies("skins")=empty then ResponseCookies"skins",SiteSettings("DefaultSiteStyle"),"0"
if ""&SiteSettings("nowdate")&""<>""&date()&"" then
Conn.Execute("insert into [BBSXP_Statistics] (DaysUsers,DaysPosts,DaysTopics,TotalUsers,TotalPosts,TotalTopics,DaysDate) values ('"&SiteSettings("DaysUsers")&"','"&SiteSettings("DaysPosts")&"','"&SiteSettings("DaysTopics")&"','"&SiteSettings("TotalUsers")&"','"&SiteSettings("TotalPosts")&"','"&SiteSettings("TotalTopics")&"','"&SiteSettings("nowdate")&"')")
Conn.execute("update [BBSXP_SiteSettings] set Nowdate='"&date()&"',DaysUsers=0,DaysPosts=0,DaysTopics=0")
Conn.execute("update [BBSXP_Forums] set ForumToday=0")
end if

Server.ScriptTimeout=SiteSettings("Timeout")'设置脚本超时时间 单位:秒
dim toptrue,ForumsList,ForumTreeList,TotalPage,PageCount,RankName,RankIconUrl,UserRoleID
ii=0
startime=timer()
%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="keywords" content="<%=SiteSettings("MetaKeywords")%>">
<meta name="description" content="<%=SiteSettings("MetaDescription")%>">
<Link href="images/Style/<%=Request.Cookies("skins")%>/Style.css" rel=stylesheet>
<style type="text/css">
<!--
.style2 {font-size: 8px}
-->
</style>
</head>
<script src="inc/global.js"></script>
<link rel=stylesheet type=text/css href=inc/css.css />
<script src="images/Style/<%=Request.Cookies("skins")%>/Style.js"></script>
<%
script_name=LCase(Request.ServerVariables("script_name"))

if Request.ServerVariables("request_method") = "POST" then
http_referer=LCase(Request.ServerVariables("http_referer"))
if instr(""&http_referer&"","http://"&Request.ServerVariables("server_name")&"") = 0 and instr(script_name,"login.asp")=0 then error("<li>来源错误！"&http_referer&"<li>系统无法识别您的来源！<li>建议您关闭防火墙后再提交此信息！")
end if

if SiteSettings("SiteDisabled")=1 then
if instr(script_name,"admin_") = 0 and instr(script_name,"login.asp")=0 and instr(script_name,"install.asp")=0 then error("<li>维护中，系统暂时关闭，请稍后访问！")
end if


'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
function ContentEncode(fString)
fString=Replace(fString,vbCrlf, "")
fString=Replace(fString,"\","&#92;")
fString=Replace(fString,"'","&#39;")
fString=Replace(fString,"<A href=","<A target=_blank href=") '点链接打开新窗口
if SiteSettings("BannedHtmlLabel")<>"" then fString=ReplaceText(fString,"<(\/|)("&SiteSettings("BannedHtmlLabel")&")", "<$1$2")
if SiteSettings("BannedHtmlEvent")<>"" then fString=ReplaceText(fString,"<(.[^>]*)("&SiteSettings("BannedHtmlEvent")&")", "<$1$2")
if SiteSettings("BannedText")<>"" then
filtrate=split(SiteSettings("BannedText"),"|")
for i = 0 to ubound(filtrate)
fString=ReplaceText(fString,""&filtrate(i)&"",string(len(filtrate(i)),"*"))
next
end if
contentEncode=fString
end function
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Function YbbEncode(str)
str=ReplaceText(str,"\[(\/|)(b|i|u|strike|center|marquee)\]","<$1$2>")
str=ReplaceText(str,"\[COLOR=([^[]*)\]","<FONT COLOR=$1>")
str=ReplaceText(str,"\[FONT=([^[]*)\]","<FONT face=$1>")
str=ReplaceText(str,"\[SIZE=([0-9]*)\]","<FONT size=$1>")
str=ReplaceText(str,"\[\/(SIZE|FONT|COLOR)\]","</FONT>")
str=ReplaceText(str,"\[URL\]([^[]*)","<A TARGET=_blank HREF=$1>$1")
str=ReplaceText(str,"\[URL=([^[]*)\]","<A TARGET=_blank HREF=$1>")
str=ReplaceText(str,"\[\/URL\]","</A>")
str=ReplaceText(str,"\[EMAIL\](\S+\@[^[]*)(\[\/EMAIL\])","<a href=mailto:$1>$1</a>")
str=ReplaceText(str,"\[IMG\]([^"&CHR(34)&"[]*)(\[\/IMG\])","<img border=0 src=$1>")
str=ReplaceText(str,"\[quote\]","<blockquote>")
str=ReplaceText(str,"\[quote user="&CHR(34)&"([^[]*)"&CHR(34)&"\]","<blockquote><img border=0 src=images/icon-quote.gif> <b>$1:</b><br>")
str=ReplaceText(str,"\[\/quote\]","</blockquote>")
YbbEncode=str
End Function
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Function IsObjInstalled(strClassString)
On Error Resume Next
IsObjInstalled = False
Set xTestObj = Server.CreateObject(strClassString)
If 0 = Err Then IsObjInstalled = True
Set xTestObj = Nothing
On Error GoTo 0
End Function
'''''''''''''''''''''''''''''''''''''''''''
Function DelFile(DelFilePath)
On Error Resume Next
DelFile= False
set MyFileObject=Server.CreateOBject("Scripting.FileSystemObject")
MyFileObject.DeleteFile""&Server.MapPath(""&DelFilePath&"")&""
Set MyFileObject= Nothing
If 0 = Err or 53 = Err Then
DelFile= True
else
error2(""&DelFilePath&"\n文件无法删除！")
end if
On Error GoTo 0
End Function
'''''''''''''''''''''''''''''''''''''''''''
Function CheckPOST
if Request.ServerVariables("request_method") <> "POST" then
response.write "<form name=CheckPOST method=Post action=?"&Request.ServerVariables("Query_String")&"></form><SCRIPT>if(confirm('您确定要执行该操作?')){returnValue=CheckPOST.submit()}else{returnValue=history.back()}</SCRIPT>"
Response.End
end if
End Function
'''''''''''''''''''''''''''''''''''''''''''
Function ResponseCookies(Key,Value,Expires)
DomainPath=Left(Request.ServerVariables("script_name"),inStrRev(Request.ServerVariables("script_name"),"/"))
Response.Cookies(Key)=""&Value&""
if Expires<>0 then Response.Cookies(Key).Expires=date+Expires
Response.Cookies(Key).Path = DomainPath
End Function
'''''''''''''''''''''''''''''''''''''''''''
Function CleanCookies()
DomainPath=Left(Request.ServerVariables("script_name"),inStrRev(Request.ServerVariables("script_name"),"/"))
For Each objCookie In Request.Cookies
Response.Cookies(objCookie)= ""
Response.Cookies(objCookie).Path = DomainPath
Next
End Function
'''''''''''''''''''''''''''''''''''''''''''
Function CheckSize(ByteSize)
if ByteSize=>1024000000 then
ByteSize=formatnumber(ByteSize/1024000000)&" GB"
elseif ByteSize=>1024000 then
ByteSize=formatnumber(ByteSize/1024000)&" MB"
elseif ByteSize=>1024 then
ByteSize=formatnumber(ByteSize/1024)&" KB"
else
ByteSize=ByteSize&" 字节"
end if
CheckSize=ByteSize
End Function
'''''''''''''''''''''''''''''''''''''''''''
Function ShowRole(RoleID)
if RoleID=1 then
RoleID="管理员"
elseif RoleID=2 then
RoleID="超级版主"
elseif RoleID=3 then
RoleID="注册会员"
else
RoleID=Conn.Execute("Select Name From [BBSXP_Roles] where ID="&RoleID&"")(0)
end if
ShowRole=RoleID
End Function
'''''''''''''''''''''''''''''''''''''''''''
sub ShowRank(experience)
sql="Select top 1 * From [BBSXP_Ranks] where PostingCountMin<="&experience&" order by PostingCountMin Desc"
Set UserRank=Conn.Execute(sql)
if UserRank.eof then
RankName="未知等级"
RankIconUrl="images/level/0.gif"
else
RankName=UserRank("RankName")
RankIconUrl=UserRank("RankIconUrl")
end if
Set UserRank = Nothing
end sub
'''''''''''''在线时长等级显示子程序(20060622更新)'''''''''''''
sub ShowOnlineLeve(onlinetimes)
dim Honlinet,LonlineIconUrl,i,ii,NextT,DisT,ShowTLevel
if IsNumeric(onlinetimes)=false then onlinetimes=0
if onlinetimes>216000 then onlinetimes=215999
Honlinet=fix(onlinetimes/60) '取得用户在线时间
Levelconfig=array(2,10,24,48,96,192,300,500,800,1200,1800,3600)'每一级需要的时间，单位：小时
if Honlinet<2 then
    LOnlineIconUrl="images/Tlevel/0.gif"
    ii=0
else    
 for i=0 to 10
  if Honlinet>=Levelconfig(i) and Honlinet<Levelconfig(i+1) then
     LOnlineIconUrl="images/Tlevel/"&i+1&".gif"
     ii=i+1
     exit For
   end if
  Next
end if
NextT=Levelconfig(ii)
DisT=NextT-Honlinet '计算升级剩余时间
if onlinetimes<215999 then
ShowTLevel="<img src="&LOnlineIconUrl&" title='在线等级："&ii&"级&#13;&#10;在线时间："&Honlinet&"小时&#13;&#10;升级剩余时间："&DisT&"小时'>"
else
ShowTLevel="<img src="&LOnlineIconUrl&" title='在线等级："&ii&"级&#13;&#10;该会员累计在线超过3600小时'>"
end if
response.write ShowTLevel
end sub

'''''''''''''''''''''''''''''''''''''''''''
function Zodiac(birthday)
if IsDate(birthday) then
birth=split(cDate(birthday),"-")
birthyear=birth(0)
ZodiacList=array("猴","鸡","狗","猪","鼠","牛","虎","兔","龙","蛇","马","羊")		
Zodiac=ZodiacList(birthyear mod 12)
end if
end function
'''''''''''''''''''''''''''''''''''''''''''
function constellation(birthday)
if IsDate(birthday) then
birth=split(cDate(birthday),"-")
ConstellationMon=birth(1)
ConstellationDay=birth(2)
if Len(ConstellationMon)<2 then ConstellationMon="0"&ConstellationMon
if Len(ConstellationDay)<2 then ConstellationDay="0"&ConstellationDay
MyConstellation=ConstellationMon&ConstellationDay
if MyConstellation < 0120 then
constellation="<img src=images/Constellation/g.gif title='魔羯座 Capricorn'>"
elseif MyConstellation < 0219 then
constellation="<img src=images/Constellation/h.gif title='水瓶座 Aquarius'>"
elseif MyConstellation < 0321 then
constellation="<img src=images/Constellation/i.gif title='双鱼座 Pisces'>"
elseif MyConstellation < 0420 then
constellation="<img src=images/Constellation/^.gif title='白羊座 Aries'>"
elseif MyConstellation < 0521 then
constellation="<img src=images/Constellation/_.gif title='金牛座 Taurus'>"
elseif MyConstellation < 0622 then
constellation="<img src=images/Constellation/`.gif title='双子座 Gemini'>"
elseif MyConstellation < 0723 then
constellation="<img src=images/Constellation/a.gif title='巨蟹座 Cancer'>"
elseif MyConstellation < 0823 then
constellation="<img src=images/Constellation/b.gif title='狮子座 Leo'>"
elseif MyConstellation < 0923 then
constellation="<img src=images/Constellation/c.gif title='处女座 Virgo'>"
elseif MyConstellation < 1024 then
constellation="<img src=images/Constellation/d.gif title='天秤座 Libra'>"
elseif MyConstellation < 1122 then
constellation="<img src=images/Constellation/e.gif title='天蝎座 Scorpio'>"
elseif MyConstellation < 1222 then
constellation="<img src=images/Constellation/f.gif title='射手座 Sagittarius'>"
elseif MyConstellation > 1221 then
constellation="<img src=images/Constellation/g.gif title='魔羯座 Capricorn'>"
end if
end if
end function
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
sub top
%><script>BBSxpTop()</script>

<table class="a6" cellSpacing="1" cellPadding="5" width="100%" border="0" align="center">
<td width="100%" align="center" height="17">
	<%
if CookieUserName=empty then
%>
    <strong><span class="style2">&gt;&gt;</span> 游客: </strong> <a href="Login.asp">登录</a> | <a href="CreateUser.asp">注册</a> |
	<a href="RecoverPassword.asp">忘记密码</a> | <a href="ViewOnline.asp">在线情况</a> |
	<a href="Search.asp?ForumID=<%=Request("ForumID")%>">搜索</a> |
      <a id=StranLink><font color=000000>繁體中文</font></A>
      <SCRIPT language=Javascript src="inc/Std_StranJF.Js"></SCRIPT> | 
	<a href="Help.asp">帮助</a> <br>
	<%else%>　<%=CookieUserName%> |
	<a onmouseover="showmenu(event,'<div class=menuitems><a href=Cookies.asp?menu=Online>上线</a></div><div class=menuitems><a href=Cookies.asp?menu=eremite>隐身</a></div><div class=menuitems><a href=login.asp?menu=out>退出</a></div>')" style=cursor:default>
	<%
if Request.Cookies("eremite")="1" then
response.write "隐身"
else
response.write "上线"
end if
%></a> | <a onmouseover="showmenu(event,'<div class=menuitems><a href=Profile.asp?UserName=<%=CookieUserName%>>我的资料</a></div><div class=menuitems><a href=UpFace.asp>上传头像</a></div><div class=menuitems><a href=Blog.asp?BlogUserName=<%=CookieUserName%>>我的日志</a></div><div class=menuitems><a href=Login.asp>更改用户</a></div>')" style="cursor:default">个人服务</a>
       | <a onmouseover="showmenu(event,'<div class=menuitems><a href=UserCp.asp>控制面板</a></div><div class=menuitems><a href=EditProfile.asp>资料修改</a></div><div class=menuitems><a href=EditProfile.asp?menu=pass>密码修改</a></div><div class=menuitems><a href=MySettings.asp>个性设置</a></div><div class=menuitems><a href=MyUpFiles.asp>上传管理</a></div><div class=menuitems><a href=MyFavorites.asp>管理书签</a></div><div class=menuitems><a href=MyMessage.asp>短信服务</a></div><div class=menuitems><a href=MyFriend.asp>好友列表</a></div>')" style="cursor:default">控制面板</a>
       | <a onmouseover="showmenu(event,'<div class=menuitems><a href=ViewOnline.asp>在线情况</a></div><div class=menuitems><a href=ViewOnline.asp?menu=cutline>在线图例</a></div><div class=menuitems><a href=ViewOnline.asp?menu=UserSex>性别图例</a></div><div class=menuitems><a href=ViewOnline.asp?menu=TodayPage>今日图例</a></div><div class=menuitems><a href=ViewOnline.asp?menu=board>主题图例</a></div><div class=menuitems><a href=ViewOnline.asp?menu=ForumPosts>帖子图例</a></div><div class=menuitems><a href=UserTop.asp>会员列表</a></div><div class=menuitems><a href=Adminlist.asp>管理团队</a></div><div class=menuitems><a href=ApplyForum.asp>申请论坛</a></div>')" style="cursor:default">社区状态</a>
       | <a onmouseover="showmenu(event,'<div class=menuitems><a href=help.asp>社区帮助</a></div><div class=menuitems><a href=search.asp>搜索主题</a></div>')" style=cursor:default>社区指南</a>
       | <a onmouseover="showmenu(event,'<div class=menuitems><a href=music.asp>打开音乐</a></div><div class=menuitems><a target=_top href=Default.asp>关闭音乐</a></div>')">音乐厅</a>
       | <a id=StranLink><font color=000000>繁體中文</font></A><SCRIPT language=Javascript src="inc/Std_StranJF.Js"></SCRIPT>

<%
menu(0)



if UserRoleID = 1 then response.write " | <a href=Admin_Default.asp target=_top>管理</a>"
end if
response.write "</div><DIV class=mainbody></td></table>"

'''''如果有短讯息''''''''''''''''''''''
if NewMessage>0 then
%><bgsound src="Images/msg.wav"><table width="100%">
		<tr>
			<td width="100%" align="right">
			<a href="#" onclick="javascript:OpenFriendWindow('MyFriend.asp?menu=look&amp;<%=now()%>')">
			<img src="images/NewMail.gif" border="0" /><font color="990000">您有<%=NewMessage%>条新讯息，请注意查收</font></a>
			</td>
		</tr>
	</table>
<%
end if
'''''''''''''
toptrue=1
end sub
''''''''''''''''''''''''''''''
sub htmlend
ProcessTime=FormatNumber((timer()-startime))
if ProcessTime<1 then ProcessTime="0"&ProcessTime
%>
</div><title><%=SiteSettings("SiteName")%> - Powered By YEBBS</title>
<table class="footerSection" border=0 width="100%">
	<tr>
		<td align="center" class="nsf"><%=SiteSettings("BottomAD")%><br>
		Powered by <a class="nsf" target="_blank" href="#">YEBBS For BBSXP<%=ForumsVersion%></a> &copy; 1998-2006<br>
		Server Time <%=now()%><br>
		Processed in <%=ProcessTime%> second(s)
		</td>
	</tr>
</table>
</div>
<script>BBSxpBottom()</script>
</html>
<%
Response.End
end sub

sub AdminTop
response.write "<script>BBSxpTop()</script><div class=mainnav><center>第七代 BBS 系统 -- YEBBS 安全 快速 方便 可靠 可升级</center></div><DIV class=mainbody><br>"
end sub
''''''''''''''''''''''''''''''''
sub succeed(Message)
%>
<div class="mainnav">
<table cellspacing="1" cellpadding="5" border="0" width="100%" class="a2">
	<tr class="a3">
		<td>&nbsp;<img src="images/Forum_nav.gif" />&nbsp; <%ClubTree%> 
		→ 社区信息</td>
	</tr>
	<br>
</table>
<br>
<table cellspacing="1" cellpadding="5" border="0" width="100%" class="a2">
	<tr>
		<td width="100%" align="center" class="a1"><b>社区提示信息</b></td>
	</tr>
	<tr class="a3">
		<td valign="top" align="Left" height="122"><b>&nbsp;</b><table cellspacing="0" cellpadding="5" width="100%" border="0">
			<tr>
				<td width="83%" valign="top"><b><span id="yu">3</span><a href="javascript:countDown"></a>秒钟后系统将自动返回...</b><ul>
					<%=Message%></ul>
				</td>
				<td width="17%">
				<img height="97" src="images/succ.gif" width="95" /></td>
			</tr>
		</table>
		</td>
	</tr>
</table>
<script>function countDown(secs){yu.innerText=secs;if(--secs>0)setTimeout("countDown("+secs+")",1000);}countDown(3);</script>
<%
htmlend
end sub
sub error(Message)
if toptrue<>1 then top
%>
<table cellspacing="1" cellpadding="5" border="0" width="100%" class="a2">
	<tr class="a3">
		<td>&nbsp;<img src="images/Forum_nav.gif" />&nbsp; <%ClubTree%> 
		→ 社区信息</td>
	</tr>
</table>
<br>
<table cellspacing="1" cellpadding="5" border="0" width="100%" class="a2">
	<tr>
		<td width="100%" colspan="2" align="center" class="a1"><b>社区提示信息</b></td>
	</tr>
	<tr class="a3">
		<td valign="top" align="Left" colspan="2" height="122"><b>&nbsp;</b><table cellspacing="0" cellpadding="5" width="100%" border="0">
			<tr>
				<td width="83%" valign="top"><b>操作不成功的可能原因或建议：</b><ul>
					<%=Message%></ul>
				</td>
				<td width="17%">
				<img height="97" src="images/err.gif" width="95" /></td>
			</tr>
		</table>
		</td>
	</tr>
	<tr align="center" class="a3">
		<td valign="center" colspan="2">
		<input onclick="history.back()" type="submit" value=" << 返 回 上 一 页 " />
		</td>
	</tr>
</table></div>
<%
htmlend
end sub
sub error2(Message)
%><script>alert('<%=Message%>');history.back();</script><script>window.close();</script><%
Response.End
end sub
''''''''''''''''''''''''''''''''
sub Log(Message)
if Request.ServerVariables("Query_String")<>"" then Query_String="?"&Request.ServerVariables("Query_String")&""
Conn.Execute("insert into [BBSXP_Log] (UserName,IPAddress,UserAgent,HttpVerb,PathAndQuery,Referrer,ErrDescription,POSTData,Notes) values ('"&CookieUserName&"','"&Request.ServerVariables("REMOTE_ADDR")&"','"&HTMLEncode(Request.Servervariables("HTTP_User_AGENT"))&"','"&Request.ServerVariables("request_method")&"','http://"&Request.ServerVariables("server_name")&""&Request.ServerVariables("script_name")&""&Query_String&"','"&Request.ServerVariables("HTTP_REFERER")&"','"&Err.Description&"','"&Request.Form&"','"&Message&"')")
end sub
''''''''''''''''''''''''''''''''
sub ForumTree(selec)
sql="Select * From [BBSXP_Forums] where id="&selec&""
Set Rs1=Conn.Execute(sql)
if not rs1.eof then
ForumTreeList="<span id=temp"&selec&"><a onmouseover=loadtree('"&selec&"') href=ShowForum.asp?ForumID="&Rs1("id")&">"&Rs1("ForumName")&"</a></span> → "&ForumTreeList&""
ForumTree Rs1("followid")
end if
Set Rs1 = Nothing
end sub


sub ShowPage()
PageUrl=ReplaceText(Request.QueryString,"PageIndex=([0-9]*)&","")
if Request.Form<>empty then PageUrl=""&PageUrl&"&"&Request.Form&""
%><script>ShowPage(<%=TotalPage%>,<%=PageCount%>,"<%=PageUrl%>")</script><%
end sub

sub menu(selec)
sql="Select * From [BBSXP_Menu] where followid="&selec&" order by SortNum"
Set Rs1=Conn.Execute(sql)
do while not rs1.eof
if rs1("followid")=0 then 
%> |
<a onmouseover="showmenu(event,'<%menu(rs1("id"))%>')" style="cursor:default"><%=rs1("name")%></a><%
else
response.write "<div class=menuitems><a href="&rs1("url")&">"&rs1("name")&"</a></div>"
end if
rs1.Movenext
loop
Set Rs1 = Nothing
end sub

sub ClubTree
sql="Select * From [BBSXP_Forums] where followid=0 and ForumHide=0 order by SortNum"
Set ClubTreeRs=Conn.Execute(sql)
do while not ClubTreeRs.eof
ClubTreeList=ClubTreeList&"<div class=menuitems><a href=ShowForum.asp?ForumID="&ClubTreeRs("id")&">"&ClubTreeRs("ForumName")&"</a></div>"
ClubTreeRs.Movenext
loop
Set ClubTreeRs = Nothing
response.write "<a onmouseover="&Chr(34)&"showmenu(event,'"&ClubTreeList&"')"&Chr(34)&" href=Default.asp>"&SiteSettings("SiteName")&"</a>" 
end sub

sub BBSList(selec)
sql="Select * From [BBSXP_Forums] where followid="&selec&" and ForumHide=0 order by SortNum"
Set Rs1=Conn.Execute(sql)
do while not rs1.eof
ForumsList=ForumsList&"<option value="&rs1("ID")&">"&string(ii," ")&""&rs1("ForumName")&"</option>"
ii=ii+1
BBSList rs1("id")
ii=ii-1
rs1.Movenext
loop
Set Rs1 = Nothing
end sub

sub ShowForum()

if rs1("Moderated")<>empty then
ModeratedList=" "
filtrate=split(rs1("Moderated"),"|")
for i = 0 to ubound(filtrate)
ModeratedList=ModeratedList&"<a href=Profile.asp?UserName="&filtrate(i)&">"&filtrate(i)&"</a> "
next
else
ModeratedList=""
end if
%>
<!---------------显示模式----------------->
<tr class=a3>
<td align="middle" width="5%"><%
<!-----分坛右边图标修改----->
if Rs1("ForumToday")=0 then
response.write "<img src=images/Style/"&Request.Cookies("skins")&"/Board2.gif>"
else
response.write "<img src=images/Style/"&Request.Cookies("skins")&"/Board1.gif>"
end if 
<!-----分坛右边图标修改----->
%></td>
<td class="a4" valign="top" width="45%" style="line-height:20px;">&nbsp;&nbsp;
<b><a href="ShowForum.asp?ForumID=<%=Rs1("id")%>"><%=Rs1("ForumName")%></a></b><br>&nbsp;&nbsp;&nbsp;<%=YbbEncode(Rs1("ForumIntro"))%> <%=Rs1("ForumLogo")%></td>
<td width="5%" align="center"><%=Rs1("ForumThreads")%></td>
<td width="5%" class="a4" align="center"><%=Rs1("ForumPosts")%></td>
<td width="5%" align="center"><%=Rs1("ForumToday")%></td>
<td width="18%" valign="top" class="a4" style="padding-top:2px;padding-left:3px;line-height:14px;">
<%if ShowForumIcon=3 then%> 
私密论坛
<%else%>
主题：<%=Rs1("lastTopic")%><br>
会员：<a href="Profile.asp?UserName=<%=Rs1("lastname")%>"><%=Rs1("lastname")%></a>  <a href=NewTopic.asp?ForumID=<%=Rs1("id")%> title=在该论坛发表文章><img src=images/kpost.gif border="0"></a><br>
<%end if%> 
</td>
<td width="27%" align="center"><%=ModeratedList%><br>  <a href=bzsq-sq.asp>申请版主</a></td>
</tr>
<!---------------显示模式----------------->

<%
end sub


sub ShowThread()
if Request("checkbox")=1 then
IconImage="<input type=checkbox value="&Rs("id")&" name=ThreadID>"
elseif Rs("IsTop")=2 then
IconImage="<img src=images/top.gif border=0>"
elseif Rs("IsTop")=1 then
IconImage="<img src=images/f_top.gif border=0>"
elseif Rs("IsLocked")=1 then
IconImage="<img src=images/f_locked.gif border=0>"
elseif Rs("IsVote")="1" then
IconImage="<img src=images/f_poll.gif border=0>"
elseif Rs("replies")=>SiteSettings("PopularPostThresholdPosts") or  Rs("Views")=>SiteSettings("PopularPostThresholdViews") then
IconImage="<img src=images/f_hot.gif border=0>"
elseif Rs("replies")>0 then
IconImage="<img src=images/f_New.gif border=0>"
else
IconImage="<img src=images/f_norm.gif border=0>"
end if

if Rs("IsGood")=1 then
IsGoodIcon="<img title='精华帖子' src=images/Topicgood.gif>"
elseif Rs("UserName")=CookieUserName then
IsGoodIcon="<img title='自己的帖子' src=images/My.gif>"
else
IsGoodIcon=""
end if

if Rs("replies")=0 then
replies="-"
else
replies=Rs("replies")
end if


if Rs("SpecialTopic")<>"" then
SpecialTopicHtml="[<a href=ShowForum.asp?ForumID="&Rs("ForumID")&"&SpecialTopic="&Rs("SpecialTopic")&">"&Rs("SpecialTopic")&"</a>] "
else
SpecialTopicHtml=""
end if

if Rs("icon")>0 then
icon="<img src=images/brow/"&Rs("icon")&".gif> "
else
icon=""
end if

if int(DateDiff("h",Rs("PostTime"),Now()))<24 then
NewHtml=" <img title='24小时内新发表的主题' src=images/new.gif>"
else
NewHtml=""
end if

if Rs("TotalRatings")>0 then StarHtml="<a style=CURSOR:pointer onclick="&CHR(34)&"OpenWindow('PostRating.asp?ThreadID="&Rs("id")&"')"&CHR(34)&" ><img border=0 src=Images/Star/"&int(Rs("RatingSum")/Rs("TotalRatings"))&".gif></a>"

if Rs("replies")=>SiteSettings("PostsPerPage") then
MaxPostPage=fix(Rs("replies")/SiteSettings("PostsPerPage"))+1 '共多少页
ShowPostPage="( <img src=images/multiPage.gif> "
For PostPage = 1 To MaxPostPage
if PostPage<11 or MaxPostPage=PostPage then ShowPostPage=""&ShowPostPage&"<a href=ShowPost.asp?PageIndex="&PostPage&"&ThreadID="&Rs("ID")&"><b>"&PostPage&"</b></a> "
Next
ShowPostPage=""&ShowPostPage&")"
else
ShowPostPage=""
end if
<!------------置顶主题和分坛主题分开------------>
if Rs("IsTop")=0 and TopEnd=0 then
response.write"<tr class=a3 height=20><td></td><td colspan=6><span><font color=blue><b>论坛主题</b></font></span></td></tr>"
TopEnd=1
end if
<!------------置顶主题和分坛主题分开------------>
%>
<tr class="a3">
<td align="center" width="3%">
<a target="_blank" href="ShowPost.asp?ThreadID=<%=Rs("ID")%>"><%=IconImage%></a></td>
<td align="center" width="3%"><%=IsGoodIcon%></td>
<td>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
	<tr>
		<td><%=icon%><%=SpecialTopicHtml%><a href="ShowPost.asp?ThreadID=<%=Rs("ID")%>"><%if Rs("IsTop")>0 then%><%end if%><%=Rs("Topic")%></a><%=NewHtml%></td>
		<td align="right"><%=StarHtml%></td>
	</tr>
	<tr>
		<td colspan="2" align="right"><%=ShowPostPage%></td>
	</tr>
</table>
</td>
<td align="center"><a href="Profile.asp?UserName=<%=Rs("UserName")%>"><%=Rs("UserName")%></a></td>
<td align="center"><%=replies%></td>
<td align="center"><%=Rs("Views")%></td>
<td><%=Rs("lasttime")%> by <a href="Profile.asp?UserName=<%=Rs("lastname")%>"><%=Rs("lastname")%></a></td>
</tr>


<%
end sub




%>