<!--#include file="conn.asp"-->
<!--#include file="inc/const.asp"-->
<!--#include file="header.htm"-->
<div align=center>
<%
mymenu()
%>
</div>
<table cellspacing=0 cellpadding=3 class=mytableborder align=center>
<tr>
<!--左边栏目开始-->
<td width="170" align=left class=tablebody1 valign=top>
<%
usergo()
response.write "<br>"
topic()
response.write "<br>"
online()
response.write "<br>"
users()
response.write "<br>"
userstj()
response.write "<br>"
topuser()
%>
</td>
<!--左边栏目结束-->

<!--中间开始-->
<td width="*" align=center class=tablebody1 valign=top>

<%

bbsnews()
response.write "<br>"
forumwords()
response.write "<br>"
mynewtopic()
mybesttopic()
response.write "<br>"
'不要设区祈愿板则注释掉下面一行
forumpray()


%>




</td>
<!--中间结束-->

<!--右边栏目开始-->
<td width="170" align=left class=tablebody1 valign=top>
<%
allstar()
response.write "<br>"
todaystar()
response.write "<br>"
myboard()
%>
</td>
<!--右边栏目结束-->
</tr></table>
<br>
<%
showtoday()
response.write "<br>"
userinfo()
response.write "<br>"
Getmylink()
%>
<br>
<div align="center">欢迎光临<%=Dvbbs.Forum_Info(0)%><br>
Powered by Dvbbs 7.0 SP2&nbsp;|&nbsp;Made by <a href="http://bbs.swsq.net" target="_blank">swsw.net</a>

<!--#include file="footer.htm"-->

<%
sub mymenu()
	If Session(Dvbbs.CacheName & "UserID")(0)="Dvbbs" Then
	response.write "<a href=home.asp>&nbsp;社区</a>&nbsp;|&nbsp;"
	response.write "<a href=index.asp>&nbsp;论坛</a>&nbsp;|&nbsp;"
	response.write "<a href=usermanager.asp target=_blank>用户控制面板</a>&nbsp;|&nbsp;"
	response.write "<a href=query.asp?boardid=0 target=_blank>搜索</a>&nbsp;|&nbsp;"
	response.write "<a href=show.asp?boardid=0 target=_blank>论坛展区</a>&nbsp;|&nbsp;"
	response.write "<a href=hlogout.asp>退出</a>"
		if Dvbbs.MyUserInfo(19)=1 then
			response.write "&nbsp;|&nbsp;<a href=admin_login.asp target=_blank>管理</a>&nbsp;|&nbsp;"
			response.write "<a href=recycle.asp target=_blank>回收站</a>"
		end if	
	else
	response.write "<a href=home.asp>&nbsp;社区</a>&nbsp;|&nbsp;"
	response.write "<a href=index.asp target=_blank>&nbsp;论坛</a>"
	end if
end sub
sub usergo()
	response.write "<table cellspacing=1 cellpadding=5 class=mytableborder align=center>"
	response.write "<tr><th align=left height=24> · 登陆论坛:</th></tr>"
	response.write "<tr><td class=tablebody1 align=left>"
	'if Dvbbs.Name="Forum_GuestOnline" then
	If Session(Dvbbs.CacheName & "UserID")(0)="Dvbbs" Then
	response.write "<tr><td class=tablebody1 align=center valign=middle>"
	response.write "<img src="&Dvbbs.MyUserInfo(11)&" border=0 width="&Dvbbs.MyUserInfo(12)&" height="&Dvbbs.MyUserInfo(13)&"></td></tr><tr><td class=tablebody1 align=left>"
	response.write "用户昵称: "
	response.write ""&Dvbbs.MyUserInfo(5)&"<br>"
	'response.write ""&Dvbbs.MyUserInfo(7)&"<br>" 邮箱
	response.write "发贴总数: "
	response.write ""&Dvbbs.MyUserInfo(8)&"<br>"
	dim tempstr
	tempstr=split(Dvbbs.MyUserInfo(36),"|")
	response.write "今日发贴: "
	response.write ""&tempstr(0)&"<br>"	
	response.write "论坛等级: "
	response.write ""&Dvbbs.MyUserInfo(18)&"<br>"
	response.write "金&nbsp;&nbsp;&nbsp;&nbsp;钱: "
	response.write ""&Dvbbs.MyUserInfo(21)&"<br>"
	response.write "经&nbsp;&nbsp;&nbsp;&nbsp;验: "
	response.write ""&Dvbbs.MyUserInfo(22)&"<br>" '经验
	response.write "魅&nbsp;&nbsp;&nbsp;&nbsp;力: "
	response.write ""&Dvbbs.MyUserInfo(23)&"<br>" '魅力
	response.write "威&nbsp;&nbsp;&nbsp;&nbsp;望: "
	response.write ""&Dvbbs.MyUserInfo(24)&"<br>" '威望
	'response.write ""&Dvbbs.MyUserInfo(25)&"<br>" '生日
	'response.write ""&Dvbbs.MyUserInfo(27)&"<br>" '被删文章
	response.write "用户头衔: "
	response.write ""&Dvbbs.MyUserInfo(34)&"<br>"
	else

	response.write "<table width=""100%"" border=0 cellspacing=0 cellpadding=0>"
	response.write "<form action=hlogin.asp?action=chk method=post><tr><td align=center height=""30"">"
	response.write "<br>"
	response.write "用户姓名：<input maxLength=16 name=username size=11><br>"
	response.write "用户密码：<input maxLength=20 name=password size=11 type=password>"
	response.write "<br><select name=CookieDate><option selected value=0>不保存</option><option value=1>保存一天</option><option value=2>保存一月</option><option value=3>保存一年</option></select><input type=submit name=submit value=""登录""><input onclick=""window.location.href='home.asp'"" type=button  value=""游客""></td></tr> </form>"
	response.write "</table>"

	end if
	response.write "</td></tr>"
	response.write "<tr><td width=""100%"" height=""24"" background=""17snow/catb.gif"" colspan=5></td></tr></table>"
end sub

sub bbsnews()
	dim rs,sql,i,n,tlen
	n=6
	tlen=10
	response.write "<table cellspacing=1 cellpadding=5 align=center valign=top class=mytableborder>"
	response.write "<tr><th colspan=2 align=left> · 社区公告栏:</th></tr>"
	response.write "<tr>"
	response.write "<td align=left class=tablebody1 width=""50%"">请大家重新设好头像<br>否则把你调到首页显示出来就不好看了<br>另外最好把自己的资料填完整<br></td>"
	response.write "<td align=left class=tablebody1 width=""50%"">"
	sql="select top "&n&" boardid,title,username,addtime,id from [Dv_bbsnews] order by id desc"
	set rs=Dvbbs.Execute(sql)
	If Not RS.Eof then
	SQL=Rs.GetRows(-1)
    	else
	response.write "论坛目前没有公告"
	response.write "</td></tr>"
	response.write "<tr><td width=""100%"" height=""24"" background=""17snow/catb.gif"" colspan=2></td></tr>"
	response.write "</table>"
	Exit sub
	end if
    	rs.close:set rs=nothing

response.write "<MARQUEE behavior=scroll align=center direction=up height=100 scrollamount=1 scrolldelay=20 onmouseover='this.stop()' onmouseout='this.start()'>"

	for i=0 to Ubound(sql,2)
	response.write "▲&nbsp;"
	response.write "<a href=""announcements.asp?action=showone&boardid="& SQL(0,i) &"&id="&SQL(4,i)&""" target=""_blank"" title=""发表人:"&SQL(2,i)&"&nbsp;&nbsp;时间:"&SQL(3,i)&""">"
	response.write ""&left(sql(1,i),tlen)&"..."
	response.write "("&sql(3,i)&")"
	response.write "</a>"
	response.write "<br>"
	next

response.write "</MARQUEE>"

	response.write "</td></tr>"
	response.write "<tr><td width=""100%"" height=""24"" background=""17snow/catb.gif"" colspan=2></td></tr>"
	response.write "</table>"
End sub
sub online()
	Dim rs,sql,m,k,i
	m=0
	k=0
	sql="select username from [Dv_online] orders"
	Set Rs=DVbbs.Execute(sql)
	If Not RS.Eof then
		SQL=Rs.GetRows(-1)
	else 
		response.write "<table cellspacing=1 cellpadding=5 class=mytableborder align=center>"
		response.write "<tr><th align=left height=24> · 目前在线:</th></tr>"
		response.write "<tr><td class=tablebody1>"
		Response.Write "目前论坛无人在线"
		response.write "</td></tr>"
		response.write "<tr><td width=""100%"" height=""24"" background=""17snow/catb.gif"" colspan=5></td></tr></table>"
		exit sub
    	end if
    	rs.close:set rs=nothing
	For i=0 To Ubound(SQL,2)
		m=m+1
	next
	For i=0 To Ubound(SQL,2)
		if SQL(0,i)="客人" then
		k=k+1
		end if
	next
	response.write "<table cellspacing=1 cellpadding=5 class=mytableborder align=center>"
	response.write "<tr><th align=left height=24> · 目前在线:</th></tr>"
	response.write "<tr><td class=tablebody1>"
	Response.Write " · 会员:"
	Response.Write ""&m-k&"<br>"
	Response.Write " · 访客:"
	Response.Write ""&k&"<br>"
	Response.Write " · 总在线:"	
	Response.Write ""&m&""
	response.write "</td></tr>"
	response.write "<tr><td width=""100%"" height=""24"" background=""17snow/catb.gif"" colspan=5></td></tr></table>"
end sub
sub userstj()
	dim daynum,monthnum,yearnum
	daynum=Dvbbs.CacheData(10,0)\(datediff("d",Dvbbs.Forum_Setting(74),date()))
	monthnum=daynum*30
	yearnum=daynum*365
	if yearnum>Dvbbs.CacheData(10,0) then
	yearnum=Dvbbs.CacheData(10,0)
	end if
	response.write "<table cellspacing=1 cellpadding=5 class=mytableborder align=center>"
	response.write "<tr><th align=left height=24> · 会员注册统计:</th></tr>"
	response.write "<tr><td class=tablebody1>"
	Response.Write " · 每天:"&daynum&"<br>"
	Response.Write " · 每月:"&monthnum&"<br>"
	Response.Write " · 每年:"&yearnum&"<br>"
	response.write "</td></tr>"
	response.write "<tr><td width=""100%"" height=""24"" background=""17snow/catb.gif"" colspan=5></td></tr></table>"
end sub
sub topuser()
	dim rs,sql,i,n
	n=10
	sql="select top "&n&" userid,username,UserPost from [Dv_user] order by UserPost desc,userid desc"
	set rs=Dvbbs.Execute(sql)
	If Not RS.Eof then
		SQL=Rs.GetRows(-1)
    end if
    rs.close:set rs=nothing
	response.write "<table cellspacing=1 cellpadding=5 class=mytableborder align=center>"
	response.write "<tr><th align=left height=24 colspan=3> · 发贴总排行:</th></tr>"
	For i=0 To Ubound(SQL,2)
	response.write "<tr>"
	response.write "<td class=tablebody1>"
	response.write ""&i+1&""
	response.write "</td>"
	response.write "<td class=tablebody1>"

	response.write "<a href="

	Response.Write "dispuser.asp?id="
	Response.Write SQL(0,i)
	Response.Write " target=_blank title=查看"
	Response.Write Dvbbs.htmlencode(SQL(1,i))
	Response.Write "的个人资料>"
    	response.write Dvbbs.htmlencode(SQL(1,i))
	response.write "</a>"
	response.write "</td>"
	response.write "<td class=tablebody1>"
       	response.write ""&Dvbbs.htmlencode(SQL(2,i))&""
	response.write "</td>"
	response.write "</tr>"
	response.write "</td></tr>"
	next
	response.write "<tr><td width=""100%"" height=""24"" background=""17snow/catb.gif"" colspan=3></td></tr></table>"
end sub
Function topic()
	response.write "<table cellspacing=1 cellpadding=5 class=mytableborder align=center>"
	response.write "<tr><th align=left height=24> · 帖子信息: </th></tr>"
	response.write "<tr><td class=tablebody1>"	
	Response.Write " · 今日贴数:"&Dvbbs.CacheData(9,0)&"<br>"
	Response.Write " · 昨日贴数:"&Dvbbs.CacheData(11,0)&"<br>"
	Response.Write " · 主题总数:"&Dvbbs.CacheData(7,0)&"<br>"
	Response.Write " · 帖子总数:"&Dvbbs.CacheData(8,0)&"<br>"

	response.write "</td></tr>"
	response.write "<tr><td width=""100%"" height=""24"" background=""17snow/catb.gif"" colspan=5></td></tr></table>"
end Function
function sexg(sexgb)
     Dim sqlgb
     Dim Rs
     if sexgb=1 then
     sqlgb="where Usersex=1"
     else
     sqlgb="where Usersex<>1"
     end if
     ConnectionDatabase
     set rs=conn.execute("Select count(*) from [dv_user]"&sqlgb) 
     sexg=rs(0) 
     set rs=nothing 
end function
sub users()
	dim tnum,ynum,boynum,rs,sql,i
	tnum=0
	ynum=0
	BoyNum=sexg(1)
	sql="select JoinDate from [Dv_user] orders"
	Set Rs=DVbbs.Execute(sql)
	If Not RS.Eof then
		SQL=Rs.GetRows(-1)
    	end if
    	rs.close:set rs=nothing
	For i=0 To Ubound(SQL,2)
		if FormatDateTime(SQL(0,i),vbShortDate)=FormatDateTime(date,vbShortDate) then
 		tnum=tnum+1
		end if
		if FormatDateTime(SQL(0,i),vbShortDate)=FormatDateTime(DateAdd("d", -1, date()),vbShortDate) then
 		ynum=ynum+1
		end if
	next
	response.write "<table cellspacing=1 cellpadding=5 class=mytableborder align=center>"
	response.write "<tr><th align=left height=24> · 会员统计: </th></tr>"
	response.write "<tr><td class=tablebody1>"
	Response.Write " · 今日注册:"&tnum&"<br>"
	Response.Write " · 昨日注册:"&ynum&"<br>"
	Response.Write " · 论坛女生 "&Dvbbs.CacheData(10,0)-BoyNum&" <br> · 论坛男生 "&BoyNum&" <br>"
	Response.Write " · 会员总数:"&Dvbbs.CacheData(10,0)&"<br>"
	Response.Write " · 新进来宾:"&Dvbbs.CacheData(14,0)&"<br>"
	response.write "</td></tr>"
	response.write "<tr><td width=""100%"" height=""24"" background=""17snow/catb.gif"" colspan=5></td></tr></table>"
end sub
Function Getmylink() 
	Dim Rs,sql
	Dim m,i,k
	m=0
	k=1
	sql="select boardname,readme,url,logo,islogo from [Dv_Bbslink] orders"
	Set Rs=DVbbs.Execute(sql)
	If Not RS.Eof then
		SQL=Rs.GetRows(-1)
    	end if
    	rs.close:set rs=nothing
	response.write "<table cellspacing=1 cellpadding=3 class=mytableborder align=center>"
	response.write "<tr><th align=left height=24>≡ 友情链接 ≡</th></tr>"
	response.write "<tr><td class=tablebody1>"
	if Ubound(SQL,2)=0 then
 		response.write "目前还没有友情链接!"
	else

	For i=0 To Ubound(SQL,2)
		if SQL(4,i)=1 then
		response.write "<a href="&SQL(2,i)&" target=""_blank""><img src="&SQL(3,i)&" border=0 width=""88"" height=""31"" title="&SQL(1,i)&"></a>"
                response.write "&nbsp;"
		k=k+1
		if k Mod(9)=1 then
		response.write "<br>"
		end if
		end if

	next
	response.write "<br>"
	end if
	For i=0 To Ubound(SQL,2)
		if SQL(4,i)=0 then
		response.write "<a href="&SQL(2,i)&" target=""_blank"" title="&SQL(1,i)&">"&SQL(0,i)&"</a>"      
                response.write "&nbsp;&nbsp;"
		end if
	next

	response.write "</td></tr>"
	response.write "<tr><td width=""100%"" height=""24"" background=""17snow/catb.gif"" colspan=5></td></tr></table>"
End Function

sub showtoday()
	dim u_num,sql,rs,i
	u_num=0
	response.write "<table cellpadding=3 cellspacing=1 align=center class=mytableborder style=""word-break:break-all;""><TR ><Th align=left colspan=2>≡ 今日到访会员 ≡</Th></TR>"
	sql="select UserName,LastLogin from [Dv_User] orders"
	set rs=Dvbbs.Execute(sql)
	If Not RS.Eof then
		SQL=Rs.GetRows(-1)
	else
		response.write "<tr><td class=tablebody1>今日没有会员到访</td></tr></table>"
		exit sub
    	end if
    	rs.close:set rs=nothing
	response.write "<tr><td class=tablebody1 align=left width=""100%"">"
	for i=0 To Ubound(SQL,2)
		if FormatDateTime(sql(1,i),vbShortDate)=FormatDateTime(date,vbShortDate) then
		response.write "<a href=dispuser.asp?name="&sql(0,i)&" target=""_blank"" title=查看"&sql(0,i)&"的个人资料>"
		response.write ""&sql(0,i)&"</a>"
			
		response.write "&nbsp;&nbsp;"		
		end if
	next
	response.write "</td></tr>"
	response.write "<tr><td width=""100%"" height=""24"" background=""17snow/catb.gif""></td></tr></table>"
end sub

sub allstar()
	dim rs,sql,i,mysex,tempstr,mydate,tempface,face
	i=0
	sql="select top 1 userid,username,userpost,usersex,userface,userwidth,userheight,usertitle,joindate,lastlogin,userclass,usertoday from [dv_user] order by userpost desc"
	set rs=Dvbbs.Execute(sql)
	If Not RS.Eof then
		SQL=Rs.GetRows(-1)
    	end if
    	rs.close:set rs=nothing
	tempface=split(sql(4,i),"|")
	If Ubound(tempface)>0 Then
	face=tempface(1)
	else
	face=tempface(0)
	end if
	if sql(3,i)=1 then
	mysex="Boy"
	else
	mysex="Girl"
	end if
	mydate=Split(sql(8,i)," ")
	'if sql(11,i)=null then
	'tempstr="0"
	'else
	'tempstr=Split(sql(11,i),"|")
	'end if
	response.write "<table cellspacing=1 cellpadding=5 class=mytableborder align=center>"
	response.write "<tr><th align=left height=24> · 社区明星:</th></tr>"
	response.write "<tr><td class=tablebody1 align=center valign=middle>"
	response.write "<img src="&face&" border=0 height="&sql(6,i)&" width="&sql(5,i)&"></td></tr>"
	response.write "<tr><td class=tablebody1 align=left>"
	response.write "会员昵称: "&sql(1,i)&"<br>"
	response.write "性&nbsp;&nbsp;&nbsp;&nbsp;别: "&mysex&"<br>"
	response.write "论坛等级: "&sql(10,i)&"<br>"
	response.write "头&nbsp;&nbsp;&nbsp;&nbsp;衔: "&sql(7,i)&"<br>"
	response.write "总发贴量: "&sql(2,i)&"<br>"
	response.write "加盟日期: "&mydate(0)&"<br>"
	'response.write "今日发贴: "&tempstr(0)&"<br>"
	response.write "</td></tr>"
	response.write "<tr><td width=""100%"" height=""24"" background=""17snow/catb.gif""></td></tr></table>"	
end sub

sub todaystar()
	dim rs,sql,i,mysex,tempstr,tempname,mydate,tempface,face
	i=0
	sql="select top 1 username,count(username) from Dv_bbs1 where DateAndTime>Date() group by username order by count(username) desc"
	set rs=Dvbbs.Execute(sql)
	If Not RS.Eof then
		tempname=rs(0)
		SQL=Rs.GetRows(-1)

	else
	response.write "<table cellspacing=1 cellpadding=5 class=mytableborder align=center>"
	response.write "<tr><th align=left height=24> · 今日发贴状元:</th></tr>"
	response.write "<tr><td align=center class=tablebody1>新的一天开始了,记录等你来改写</td></tr>"
	response.write "<tr><td width=""100%"" height=""24"" background=""17snow/catb.gif""></td></tr></table>"	
	exit sub
    	end if
	
	sql="select top 2 userid,username,userpost,usersex,userface,userwidth,userheight,usertitle,joindate,lastlogin,userclass,usertoday from [dv_user] where username='"&tempname&"' order by userpost desc"
	set rs=Dvbbs.Execute(sql)
	If Not RS.Eof then
		SQL=Rs.GetRows(-1)
	end if

    	rs.close:set rs=nothing
 	tempface=split(sql(4,i),"|")
	If Ubound(tempface)>0 Then
	face=tempface(1)
	else
	face=tempface(0)
	end if
	mydate=Split(sql(8,i)," ")
	if sql(3,i)=1 then
	mysex="Boy"
	else
	mysex="Girl"
	end if
	tempstr=Split(sql(11,i),"|")
	response.write "<table cellspacing=1 cellpadding=5 class=mytableborder align=center>"
	response.write "<tr><th align=left height=24> · 今日发贴状元:</th></tr>"
	response.write "<tr><td class=tablebody1 align=center valign=middle>"
	response.write "<img src="&face&"	border=0 height="&sql(6,i)&" width="&sql(5,i)&"></td></tr>"
	response.write "<tr><td class=tablebody1 align=left>"
	response.write "会员昵称: "&sql(1,i)&"<br>"
	response.write "性&nbsp;&nbsp;&nbsp;&nbsp;别: "&mysex&"<br>"
	response.write "论坛等级: "&sql(10,i)&"<br>"
	response.write "头&nbsp;&nbsp;&nbsp;&nbsp;衔: "&sql(7,i)&"<br>"
	response.write "总发贴量: "&sql(2,i)&"<br>"
	response.write "加盟日期: "&mydate(0)&"<br>"
	response.write "今日发贴: "&tempstr(0)&"<br>"
	response.write "</td></tr>"
	response.write "<tr><td width=""100%"" height=""24"" background=""17snow/catb.gif""></td></tr></table>"	
end sub

sub myboard()
	dim rs,sql,i,n
	n=30  '板块排行调用个数
	i=0
	sql="select top "&n&"  boardid,boardtype,depth,postnum from [dv_board] where depth<>0 order by postnum desc"
	set rs=Dvbbs.Execute(sql)
	If Not RS.Eof then
	SQL=Rs.GetRows(-1)
	else
	response.write "<table cellspacing=1 cellpadding=5 class=mytableborder align=center>"
	response.write "<tr><th align=left height=24 colspan=3> · 板块发贴排行:</th></tr>"
	response.write "<tr><td class=tablebody1 colspan=3>论坛无板块</td></tr>"
	response.write "<tr><td width=""100%"" height=""24"" background=""17snow/catb.gif"" colspan=3></td></tr></table>"
	exit sub	
			
    	end if
    	rs.close:set rs=nothing
	response.write "<table cellspacing=1 cellpadding=5 class=mytableborder align=center>"
	response.write "<tr><th align=left height=24 colspan=3> · 板块发贴排行:</th></tr>"
	For i=0 To Ubound(SQL,2)
	response.write "<tr>"
	response.write "<td class=tablebody1>"
	response.write ""&i+1&""
	response.write "</td>"
	response.write "<td class=tablebody1>"
	response.write "<a href=index.asp?boardid="&sql(0,i)&" target=""_blank"" title=""进入板块浏览"">"
	response.write ""&sql(1,i)&""
	response.write "</a></td>"
	response.write "<td class=tablebody1>"
	response.write ""&sql(3,i)&""
	response.write "</td></tr>"
	next
response.write "<tr><td width=""100%"" height=""24"" background=""17snow/catb.gif"" colspan=3></td></tr></table>"	
end sub

sub mynewtopic()
	dim rs,sql,i,n,myboard,ds,tempstr
	i=0
	n=8  '新贴调用个数
	sql="select top "&n&" topicid,title,boardid,postusername,lastpost,lastposttime,dateandtime from [dv_topic] where boardid<>444 order by dateandtime desc"
	set rs=Dvbbs.Execute(sql)
	If Not RS.Eof then
	SQL=Rs.GetRows(-1)
	else
	response.write "<table cellspacing=1 cellpadding=5 class=mytableborder align=center>"
	response.write "<tr><th align=left height=24 colspan=4> · 论坛最新贴:</th></tr>"
	response.write "<tr><td class=cbg align=center>版面</td><td class=cbg align=center>标题</td><td class=cbg align=center>发贴人</td><td class=cbg align=center>最后回复</td></tr>"
	response.write "<tr><td colspan=4 height=30 class=tablebody1 align=center valign=middle>论坛目前没有新贴</td></tr>"
	response.write "<tr><td width=""100%"" height=""24"" background=""17snow/catb.gif"" colspan=4></td></tr></table>"	
	exit sub

    	end if
    	rs.close:set rs=nothing

	response.write "<table cellspacing=1 cellpadding=5 class=mytableborder align=center>"
	response.write "<tr><th align=left height=24 colspan=4> · 论坛最新贴:</th></tr>"
	response.write "<tr><td class=cbg align=center>版面</td><td class=cbg align=center>标题</td><td class=cbg align=center>发贴人</td><td class=cbg align=center>最后回复</td></tr>"
	For i=0 To Ubound(SQL,2)
	tempstr=Split(sql(4,i),"$")
	set ds=Dvbbs.Execute("select boardtype from [dv_board] where boardid="&SQL(2,i))
	myboard=ds(0)
	response.write "<tr><td class=tablebody1 width=""100"" align=center>"
	response.write ""&myboard&""
	response.write "</td><td class=tablebody1 align=left>"
	response.write "<a href=dispbbs.asp?boardid="&sql(2,i)&"&id="&sql(0,i)&" target=""_blank"">"
	response.write ""&left(dvbbs.htmlencode(sql(1,i)),16)&"..."
	response.write "</a></td><td class=tablebody1 align=center width=""80"">"
	response.write ""&sql(3,i)&""
	response.write "</td><td class=tablebody1 align=center width=""120"">"
	response.write ""&tempstr(2)&"<br>by "&tempstr(0)&""
	response.write "</td></tr>"
	next
	response.write "<tr><td width=""100%"" height=""24"" background=""17snow/catb.gif"" colspan=4></td></tr></table>"	

end sub

sub mybesttopic()
	dim rs,sql,i,n,myboard,ds,tempstr
	i=0
	n=6  '精华调用个数
	sql="select top "&n&" topicid,title,boardid,postusername,lastpost,lastposttime,dateandtime from [dv_topic] where boardid<>444 and isbest=1 order by dateandtime desc"
	set rs=Dvbbs.Execute(sql)
	If Not RS.Eof then
	SQL=Rs.GetRows(-1)
	else
	response.write "<table cellspacing=1 cellpadding=5 class=mytableborder align=center>"
	response.write "<tr><th align=left height=24 colspan=4> · 论坛精华贴:</th></tr>"
	response.write "<tr><td class=cbg align=center>版面</td><td class=cbg align=center>标题</td><td class=cbg align=center>发贴人</td><td class=cbg align=center>最后回复</td></tr>"
	response.write "<tr><td colspan=4 height=30 class=tablebody1 align=center valign=middle>论坛目前没有精华贴</td></tr>"
	response.write "<tr><td width=""100%"" height=""24"" background=""17snow/catb.gif"" colspan=4></td></tr></table>"	
	exit sub

    	end if
    	rs.close:set rs=nothing

	response.write "<table cellspacing=1 cellpadding=5 class=mytableborder align=center>"
	response.write "<tr><th align=left height=24 colspan=4> · 论坛精华贴:</th></tr>"
	response.write "<tr><td class=cbg align=center>版面</td><td class=cbg align=center>标题</td><td class=cbg align=center>发贴人</td><td class=cbg align=center>最后回复</td></tr>"
	For i=0 To Ubound(SQL,2)
	tempstr=Split(sql(4,i),"$")
	set ds=Dvbbs.Execute("select boardtype from [dv_board] where boardid="&SQL(2,i))
	myboard=ds(0)
	response.write "<tr><td class=tablebody1 width=""100"" align=center>"
	response.write ""&myboard&""
	response.write "</td><td class=tablebody1 align=left>"
	response.write "<a href=dispbbs.asp?boardid="&sql(2,i)&"&id="&sql(0,i)&" target=""_blank"">"
	response.write ""&left(sql(1,i),16)&"..."
	response.write "</a></td><td class=tablebody1 align=center width=""80"">"
	response.write ""&sql(3,i)&""
	response.write "</td><td class=tablebody1 align=center width=""120"">"
	response.write ""&tempstr(2)&"<br>by "&tempstr(0)&""
	response.write "</td></tr>"
	next
	response.write "<tr><td width=""100%"" height=""24"" background=""17snow/catb.gif"" colspan=4></td></tr></table>"	

end sub

sub userinfo()
	'Dim BrowserType,TempStr
	'Set BrowserType=New Cls_Browser
	Dvbbs.GetBrowser
	response.write "<table cellpadding=5 cellspacing=1 class=tableborder1 align=center style=""word-break:break-all;""><TR>"
    	response.write "<Th align=left colSpan=2 height=25>≡ 用户来访信息 ≡</Th>"
  	response.write "</TR><TR>"
    	response.write "<TD vAlign=top class=tablebody1 height=25 width=100% >您的真实<b>ＩＰ</b> 是："
	response.write ""&Dvbbs.UserTrueIP&""
	response.write "，<b>操作系统</b>："	
	response.write ""&Dvbbs.Platform&""
	response.write "，<b>浏 览 器</b>："
	response.write ""&Dvbbs.Browser&" "&Dvbbs.version&""
	response.write "</TD></TR>"
	response.write "<tr><td width=""100%"" height=""24"" background=""17snow/catb.gif"" colspan=2></td></tr></table>"	
end sub
sub forumwords()
	response.write "<table cellpadding=5 cellspacing=1 class=tableborder1 align=center style=""word-break:break-all;""><TR>"
    	response.write "<Th align=left colSpan=2 height=25>· 封面寄语:</Th>"
  	response.write "</TR><TR>"
	response.write "<td class=tablebody1 align=center>"
	response.write "<br>亲爱的你慢慢飞,小心前面带刺的玫瑰,亲爱的你张张嘴,风中花香会让你沉醉<br>"
	response.write "亲爱的你跟我飞,穿过丛林去看小溪水,亲爱的来跳个舞,爱的春天不会有天黑<br>"
	response.write "我和你缠缠绵绵翩翩飞,飞跃这红尘永相随,追逐你一生,爱恋我千回,不辜负我的柔情你的美<br>"
	response.write "我和你缠缠绵绵翩翩飞,飞跃这红尘永相随,等到秋风尽秋叶落成堆,能陪你一起枯萎也无悔"
	response.write "<br><br>"
	response.write "by 庞龙 两只蝴蝶"
	response.write "<br>"

	response.write "</td></tr>"	
	response.write "<tr><td width=""100%"" height=""24"" background=""17snow/catb.gif"" colspan=2></td></tr></table>"		
end sub

sub forumpray()
	response.write "<table cellpadding=5 cellspacing=1 class=tableborder1 align=center style=""word-break:break-all;""><TR>"
    	response.write "<Th align=left colSpan=2 height=25>· 祈愿版:</Th>"
  	response.write "</TR><TR>"
	response.write "<tr><td width=""30%"" class=cbg align=center>祈愿人</td>"
	response.write "<td width=""70%"" class=cbg align=center>愿望</td></tr>"
	response.write "<tr><td align=center class=tablebody1>"
	response.write "流淌的岁月</td>"
	response.write "<td align=center class=tablebody1>"
	response.write "祝小杰哥哥的13个MM们永远开心快乐,越长越漂亮</td></tr>"
	response.write "<tr><td align=center class=tablebody1>"
	response.write "NoNO</td>"
	response.write "<td align=center class=tablebody1>"
	response.write "祝好朋友们和家人都身体健康</td></tr>"
	response.write "<tr><td align=center class=tablebody1>"
	response.write "雪夜不归</td>"
	response.write "<td align=center class=tablebody1>"
	response.write "祝自己今年选择对的，放弃错的</td></tr>"
	response.write "<tr><td align=center class=tablebody1>"
	response.write "pearl</td>"
	response.write "<td align=center class=tablebody1>"
	response.write "祈望我与身边的他事业都能够春暖花开，希望流淌的岁月能走得更远，祝福身边的每个人幸福安康</td></tr>"
	response.write "<tr><td align=center class=tablebody1>"
	response.write "嘿嘿云</td>"
	response.write "<td align=center class=tablebody1>"
	response.write "希望自己不要这么消沉</td></tr>"
	response.write "<tr><td align=center class=tablebody1>"
	response.write "sparkwong</td>"
	response.write "<td align=center class=tablebody1>"
	response.write "能够得到自己所想要也是本应得到的一些东西</td></tr>"
	
	response.write "<tr><td width=""100%"" height=""24"" background=""17snow/catb.gif"" colspan=2></td></tr></table>"				
end sub














%>