<!-- #include file="setup.asp" -->
<!--#include file="daylove.asp"-->
<%
id=int(Request("id"))
if id<>empty then Response.Cookies("forumid")=id
if ""&adminpassword&""=empty then response.redirect "install.asp"
top
if ""&nowdate&""<>""&date()&"" then
today=conn.execute("Select SUM(today)from bbsconfig")(0)
if ""&today&""="" then today=0
conn.execute("update [clubconfig] set today=0,oldday="&today&",Nowdate='"&date()&"'")
conn.execute("update [bbsconfig] set today=0")
end if

<!-----------------首页提示开始--------------->
if always=1 or (always=2 and request.Cookies("note")=empty)  then
%>
<style type="text/css">
#fadeinbox{position:absolute;width:350px;left:0;top:-400px;border:2px #4D76B3;background-color:#F3F6FA;padding:4px;z-index:100;visibility:hidden;}
</style>
<DIV id=fadeinbox style="filter:progid:DXImageTransform.Microsoft.RandomDissolve(duration=1) progid:DXImageTransform.Microsoft.Shadow(color=gray,direction=135) ; -moz-opacity:0">
<table border=0 width=350 cellspacing=2 cellpadding=4 class=a2>
<tr><td width=100% class=a4 align=center><font color=blue><B><%=clubname%>BBS社区 提示您：</B></font></td></tr>
<tr><td width=100% class=a4>
<table border=0 width=100%  cellspacing=0 cellpadding=0>
<tr><td width=100% align=center>
<script>document.write(ybbcode("<%=notecontent%>"))</script><BR></td></tr><tr><td align="right">
<span style=cursor:hand onClick="hidefadebox();return false">[关闭显示] </span>
</td></tr></table></td></tr></table></div>
<script defer src="inc/SuperNote.js"></script>
<%
response.Cookies("note")=1
end if
%>
<!-----------------首页提示结束--------------->
<SCRIPT>valigntop()</SCRIPT>
<table border="0" cellspacing="1" cellpadding="2" width="97%" align="center" class="a2">
<tr class=a2>
<td height="23" class=a1 colspan=3>
<p align="center"><b><%=clubname%>公告</b></td>
</tr>
<tr class=a3>
<td width=100% class=a3 align=center height=23 colspan=3>
<marquee onmouseover="this.stop()" onmouseout="this.start()" width="90%" scrollamount="3"><a target=_blank href="affiche.asp"><%=affichetitle%></a></marquee>
<tr class=a4> 
<td width="30%" valign="top">
<table width="100%" border="0" cellpadding="3" cellspacing="1" class=a2>
<tr class=a1><td><b>最新讨论话题</b></td></tr>
<tr class=a4>
<td><%
sql="select top 8 id,icon,topic,posttime from forum where deltopic<>1 order by id Desc"
rs.Open sql,Conn
Do While Not RS.EOF
%>
<font color=red>☆</font> <a href=ShowPost.asp?id=<%=rs("id")%> title="<%=rs("topic")%>"><%=rs("topic")%></a><br>
<%
RS.MoveNext
loop
RS.Close   
%></td>
</tr>         
</table>
</td>
<td width="50%" align="center" valign="top">

<table width="100%" border="0" cellpadding="3" cellspacing="1" class=a2>
 <tr align="center" class=a1>
 <td>
	<p align="left"><b>我的工具条</b></td>
 </tr><tr class=a4>
<td>
<table width="100%"  border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td><%
if Request.Cookies("username") = empty then
%>
<form action="login.asp" method="post">
<input type="hidden" value="add" name="menu">
<input type="hidden" value="Default.asp" name="url">
<table border="0" width="100%">
<tr>
<td align="center">用户名称:
<input size="15" name="username" value="<%=Request.Cookies("username")%>" class=fminpt onMouseOver=this.focus() onFocus=this.select()></td>
<td>

<input type="checkbox" value="1" name="eremite" id="eremite"><label for="eremite">隐身登录</label> 
</td>
<td align="center">

<input type="submit" value=" 登录 " name="Submit1"></td>
</tr>
<tr>
<td align="center">

用户密码: <input type="password" size="15" value name="userpass"></td>
<td> 

<input type="checkbox" value="1" name="xuansave" id="xuansave"><label for="xuansave">记住密码</label>　
</td>
<td align="center"> <input type="reset" value=" 取消 " name="Submit"></td>
	</tr>
<%if yanzhengma>0 then%>
	<tr>
	  <td align="center">用户验证:
	    <input size="15" name="addcode" value name="addcode">
	  </td>
	  <td><%=getcode1()%></td>
	  <td align="center"></td>
	  </tr><%end if%>
</form>
</table>
<%
else%>
<table border="0" width="100%">
<tr><%
if Request.Cookies("username") <> "" then

sql="select * from [user] where username='"&Request.Cookies("username")&"'"
Set Rs=Conn.Execute(sql)


%>
<td> ::
<a href="message.asp">我的留言</a>( <b><font color=red><%=rs("newmessage")%></font></b> )</td><%
rs.close
end if
bbsname=clubname
forumid=0

%>
<td> ::
<a onclick="javascript:open('message.asp?menu=post','','width=320,height=170')" href="#">发送短信</a></td>
<td> ::
<a href="upface.asp">上传头像</a></td>
</tr>
<tr>
<td> ::
<a href="profile.asp">我的资料</a></td>
<td> ::
<a href="ShowBBS.asp?menu=5">我的帖子</a></td>
<td> ::
<a href="favorites.asp">我的收藏</a></td>
</tr>
<tr>
<td> ::
                <a href="banzhu.asp"><font color=red>版主评定</font></a></td>
<td> ::
                <a href="bzsq-sq.asp"><font color=red>VIP申 请</font></a></td>
<td> ::
<a href="todaynews.asp"><font color=red>今日新闻</font></a></td>
</tr>
</table>


<%
end if
%>
</td>

<br></td>
  </tr>
</table>
</td></tr></table><table width="100%" border="0" cellpadding="3" cellspacing="1" class=a2>
<tr class=a1><td><b>社区财神</b></td><td><b>社区水神</b></td><td><b>社区贴神</b></td></tr>
<tr class=a4><td><%
order="money+savemoney"
sql="select top 1 * from (select * from [user] order by " &order& " desc) "
rs.Open sql,Conn,1
Do While Not RS.EOF
%>
<%=rs("username")%>[<font color=red><%=rs("savemoney")+rs("money")%>元</font>] 

<%
RS.MoveNext
loop
RS.Close   
%></td><td><%
sql="select top 1 * from (select username,postrevert from [user] where postrevert>=0 order by postrevert desc)"
Set Rs=Conn.Execute(sql)
Do While Not RS.EOF
    
   response.write""&rs("username")&"[<font color=red>"&rs("postrevert")&"帖</font>] " 

RS.MoveNext
loop
RS.Close   
%></td><td><%
sql="select top 1 * from (select username,posttopic from [user] where posttopic>=0 order by posttopic desc)"
Set Rs=Conn.Execute(sql)
Do While Not RS.EOF
    
   response.write""&rs("username")&"[<font color=red>"&rs("posttopic")&"篇</font>] " 

RS.MoveNext
loop
RS.Close   
%></td></tr></table><td width="20%" align="center" valign="top">
<table width="100%" border="0" cellpadding="3" cellspacing="1" class=a2>
 <tr class=a1>
   <td align="center" colspan=2>论坛统计</td>
 </tr>
 <tr class=a4>
   <td>会员：</td>
   <td>&nbsp;<b><%=conn.execute("Select count(id)from [user]")(0)%></b>位</td>
 </tr>
 <tr class=a4>
   <td>新进：</td>
   <td>&nbsp;[<b><%
sql="select top 1 username from [user] order by id Desc"
rs.Open sql,Conn
Do While Not RS.EOF 
response.write "<a href=Profile.asp?username="&rs("username")&">"&rs("username")&"</a>"
RS.MoveNext
loop
RS.Close
%></b>]</td>
 </tr>
 <tr class=a4>
   <td>今日：</td>
   <td>&nbsp;<b><font color=red><%=today%></font></b>篇</td>
 </tr>
 <tr class=a4>
   <td>昨日：</td>
   <td>&nbsp;<b><%=oldday%></b>篇</td>
 </tr>
 <tr class=a4>
   <td>主题：</td>
   <td>&nbsp;<b><%=conn.execute("Select count(id)from [forum]")(0)%></b>篇</td>
 </tr>
 <tr class=a4>
    <td>回贴：</td>
    <td>&nbsp;<b><%=conn.execute("Select count(id)from [reforum]")(0)%></b>篇</td>
  </tr>
</table></td></tr>

<tr><td colspan=3 class=a4 align="right">
<p align="center">
<a href="ShowBBS.asp?menu=2">本周热门帖子</a> | 
	<a href="ShowBBS.asp?menu=1">本周人气帖子</a> | 
	<a href="ShowBBS.asp">社区新帖</a>  | 
	<a href="ShowBBS.asp?menu=3">精华帖子</a>  | 
	<a href="ShowBBS.asp?menu=4">投票帖子</a>  |
	<a href="userlist.asp">社区排行</a>  |
        <%if membercode>4 then %><a href="bbsxz.asp"><font color=blue>颁发勋章</a><%end if%>
	
</td></tr></table>
	



<!----点歌代码开始--->
<%if diange=1 then%>
<!-- #include file="sqdg.asp" -->
<%end if%>
<!---点歌代码结束--->

<%
if Request.Cookies("forumid")<>empty then

sql="select * from bbsconfig where id="&int(Request.Cookies("forumid"))&""
Set Rs=Conn.Execute(sql)
if Rs.eof then Response.Cookies("forumid")=""
if ""&Rs("password")&""="" then:password=0:else:password=1:end if
%><script>ShowList("<%=Rs("pass")%>","<%=Rs("id")%>","<%=Rs("bbsname")%>","<%=Rs("icon")%>","<%=Rs("intro")%>","<%=Rs("moderated")%>","<%=Rs("today")%>","<%=Rs("toltopic")%>","<%=Rs("tolrestore")%>","<%=Rs("lasttime")%>","<%=Rs("lastname")%>","<%=Rs("lasttopic")%>","<%=password%>");</script><%
rs.close

else
ForumList(0)
end if
%>

</table>
<SCRIPT>valignbottom()</SCRIPT>
<!----明星代码开始--->
<br>
<%if mingx=1 then %>
<!-- #include file="sqmx.asp" -->
<!--#include file="mingxing.asp"-->
<br>
<% end if%>
<!----明星代码结束--->
<!----社区聊天代码开始--->
<%if fabiao=1 then%>
<!-- #include file="cfchat.asp" -->
<br>
<%end if%>
<!----社区聊天代码结束--->
<!----社区动态代码开始--->
<%if dongtai=1 then%>
<!-- #include file="sqdt.asp" -->
<br>
<%end if%>
<!----社区动态代码结束--->
<SCRIPT>valigntop()</SCRIPT>
<%
if Request.Cookies("username") <> "" then

sql="select * from [user] where username='"&Request.Cookies("username")&"'"
Set Rs=Conn.Execute(sql)


%> <%
rs.close
end if
bbsname=clubname
forumid=0

%> <!-- #include file="inc/line.asp" -->
<table cellspacing="1" cellpadding="1" width="97%" align="center" border="0" class="a2"><tr><td height="25" class="a1" colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;≡ 用户来访信息 ≡</td></tr><tr>
<td class="a4"><table cellspacing="0" cellpadding="3" width="100%" border="0" style="border-left: 0px none; border-top: 0px none; border-bottom: 1px none"><tr><td><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td>
<script>
temp=navigator.appVersion
temp=temp.replace(")","");
temp=temp.replace("MSIE","Internet Explorer");
temp=temp.replace("NT 5.0","2000");
temp=temp.replace("NT 5.1","XP");
temp=temp.replace("NT 5.2","2003");
var appVersion= temp.split ('; '); 
</script>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;您的真实ＩＰ：<font face="Georgia, Times New Roman, Times, serif"><%=Request.ServerVariables("REMOTE_ADDR")%></font></td><td>端口：<font face="Georgia, Times New Roman, Times, serif"><%=Request.ServerVariables("REMOTE_PORT")%></font></td><td>操作系统：<script>document.write(appVersion[2])</script></td><td colspan="2">浏览器：<script>document.write(appVersion[1])</script></td></tr></table>
<table cellspacing="0" cellpadding="0" width="97%" align="center" border="0" class="a2">
<hr width=97% color=777777 size=1>
<!----建站天数代码开始--->
&nbsp;&nbsp;&nbsp;<img loaded="no" src="images/minus.gif">&nbsp;建站天数:<b><font color=red><%=datediff("d","2006-6-20",date())%></font>天</b>　|　贵阳艾迪维科技有限公司
<!----建站天数代码结束--->
<br>
<!-- #include file="birth.asp" -->
<td valign="top" class="a4"><table cellspacing="0" cellpadding="2" width="100%">
<%
regonline=conn.execute("Select count(sessionid)from online where username<>''")(0)

if Application(CacheName&"BestOnline")<onlinemany then
Application(CacheName&"BestOnline")=onlinemany
Application(CacheName&"BestOnlineTime")=now()
end if
%>
<!-----在线峰值代码开始----->

<%
online=conn.execute("Select count(*)from online")(0)
sql="select * from ecc"
rs.Open sql,Conn,1,3
if online>rs("toponline") then
%>

<%
rs("toponline")=online
rs("toponlinetime")=now
rs.update
end if
%>

&nbsp;&nbsp;&nbsp;<img loaded="no" src="images/minus.gif"> 历史最高在线记录：<font color="#FF0000"><%=rs("toponline")%></font> 人，历史时刻：<font color="#FF0000"><%=rs("toponlinetime")%></font>。<%
rs.close
%>
<br>
<!-----在线峰值代码结束----->
&nbsp;&nbsp;&nbsp;<img loaded="no" src="images/plus.gif" alt='点击查看用户详细列表' id="followImg0" style="cursor:hand;" onclick="loadThreadFollow(0,0)"> 目前论坛总共有 <b><%=onlinemany%></b> 人在线，其中注册用户 <b><%=regonline%></b> 人，访客 <b><%=onlinemany-regonline%></b> 
	人。近日最高在线 <font color=red><b><%=Application(CacheName&"BestOnline")%></b></font> 人，发生在 <b><%=Application(CacheName&"BestOnlineTime")%></b> </td></tr><tr height="25" style="display:none" id="follow0"><td id="followTd0" align="left" class="a4" width="94%" colspan="5">
		　Loading...</td></tr><td height="5" align="center" width="100%" colspan="2"><hr width=100% color=777777 size=1><font color=red>名单图例</font>：<img src=images/membercode/6.gif border=0> 社区区长 ‖<img src=images/membercode/5.gif border=0>  管理员 ‖<img src=images/membercode/4.gif border=0>  超级版主 ‖<img src=images/membercode/3.gif border=0>  社区版主 ‖<img src=images/membercode/2.gif border=0> 贵宾会员 ‖<img src=images/membercode/1.gif border=0>   社区会员 ‖<img src=images/membercode/0.gif border=0>  隐身会员或访客</table></td></tr></table></td></tr></table></td></tr></table>
<SCRIPT>valignbottom()</SCRIPT>
<br>

<SCRIPT>valigntop()</SCRIPT>
<!-----------自助友情链接开始--------->
<table cellspacing="1" cellpadding=5 width="97%" border="0" class="a2" align="center">
<tr><td height="25" class="a1" colspan="3" valign="top">≡友情链接≡</td></tr>
<%
sql="select * from [link]"
set rsh=conn.execute(sql)
do while not rsh.eof
if rsh("topme")=1 then
link3=link3+"<tr class=a3><td width=5% valign=top align=center><img src=images/mini.gif></td><td width=80% class=a4 valign=center><b><a title='"&rsh("name")&""&chr(10)&""&rsh("intro")&"' href="&rsh("url")&" target=_blank>"&rsh("name")&"</a></b><br>"&rsh("intro")&"</td><td width=15% valign=top align=center><img src="&rsh("logo")&" border=0 width=88 height=31></td></tr>"
else
if rsh("logo")="" or rsh("logo")="http://" then
link1=link1+"<a title='"&rsh("intro")&"' href="&rsh("url")&" target=_blank>"&rsh("name")&"</a> | "
else
link2=link2+"<a title='"&rsh("name")&""&chr(10)&""&rsh("intro")&"' href="&rsh("url")&" target=_blank><img src="&rsh("logo")&" border=0 width=88 height=31></a>&nbsp;"
end if
end if
rsh.movenext
loop
rsh.close
set rsh=nothing
%>
<%=link3%>
<tr class="a4">
<td width="5%" rowspan="2" valign=center><img src=images/shareforum.gif></td>
<td width="95%" colspan="2" valign=center>
<table cellspacing="0" cellpadding=0 style="TABLE-LAYOUT: fixed" width=100%>
<tr><td><%=link2%></td></tr></table>
</td>
</tr>
<tr class="a4">
<td colspan="2" valign=center>
<table cellspacing="0" cellpadding=0 style="TABLE-LAYOUT: fixed" width=100%>
<tr><td><%=link1%></td></tr></table>
</td>
</tr>
</table>
<!-----------自助友情链接结束--------->
<SCRIPT>valignbottom()</SCRIPT>
<br>
<center>&nbsp;<img src=images/skins/<%=Request.Cookies("skins")%>/Board0.gif alt="禁止浏览">&nbsp;关闭论坛&nbsp;&nbsp;<img src=images/skins/<%=Request.Cookies("skins")%>/Board1.gif alt="任何人均可浏览">&nbsp;正规论坛&nbsp;&nbsp;<img src=images/skins/<%=Request.Cookies("skins")%>/Board2.gif alt="游客禁止浏览">&nbsp;会员论坛&nbsp;&nbsp;<img src=images/skins/<%=Request.Cookies("skins")%>/Board3.gif alt="需要授权才能浏览">&nbsp;私密论坛<br>


<% if advimg<>"" then %>
<!-- #include file="adv.asp" -->
<%end if%>

<%
htmlend


sub ForumList(selec)

sql="Select * From bbsconfig where followid="&selec&" and hide=0 order by SortNum"
Set Rs1=Conn.Execute(sql)
do while not Rs1.eof
if selec=0 then ListStyle=rs1("ListStyle")
if ii=0 then
%>
<SCRIPT>valignbottom()</SCRIPT><br>
<SCRIPT>valigntop()</SCRIPT>
<table width="97%" align="center" border="0" class="a2" cellspacing=1 cellpadding=0>
<tr class=a1 id=TableTitleLink><td colspan=7 height=25 title='<%=Rs1("intro")%>'><b>　<a href=ShowForum.asp?forumid=<%=Rs1("id")%>><%=Rs1("bbsname")%></a></b></td></tr>
<%
else
if ""&Rs1("password")&""="" then:password=0:else:password=1:end if

if ListStyle=0 then
%><script>SmallShowList("<%=Rs1("id")%>","<%=Rs1("bbsname")%>","<%=Rs1("intro")%>","<%=Rs1("moderated")%>","<%=Rs1("today")%>","<%=Rs1("toltopic")%>","<%=Rs1("tolrestore")%>");</script><%
else
%><script>ShowList("<%=Rs1("pass")%>","<%=Rs1("id")%>","<%=Rs1("bbsname")%>","<%=Rs1("icon")%>","<%=Rs1("intro")%>","<%=Rs1("moderated")%>","<%=Rs1("today")%>","<%=Rs1("toltopic")%>","<%=Rs1("tolrestore")%>","<%=Rs1("lasttime")%>","<%=Rs1("lastname")%>","<%=Rs1("lasttopic")%>","<%=password%>");</script><%
end if

end if

ii=ii+1
if ii < int(floor) then ForumList Rs1("id")
ii=ii-1

Rs1.movenext
loop
Set Rs1 = Nothing
if ListStyle=0 then
%><script>makeupShowList();</script><%
end if


end sub


Function getcode1()
	Dim test
	On Error Resume Next
	Set test=Server.CreateObject("Adodb.Stream")
	Set test=Nothing
	If Err Then
		Dim zNum
		Randomize timer
		zNum = cint(8999*Rnd+1000)
		Session("GetCode") = zNum
		getcode1= Session("GetCode")		
	Else
		getcode1= "<img src=""nccode.asp"">"		
	End If
End Function

%>
