<%@LANGUAGE="VBSCRIPT"%>
<%	option explicit
	 Response.Buffer = True  
  Response.ExpiresAbsolute = Now() - 1  
  Response.Expires = 0  
  Response.CacheControl = "no-cache" 
	dim startime
	dim conn
	dim connstr
	dim db
	startime=timer()
	'更改数据库名字
	db="datarexsp/datarexsp.mdb"
	Set conn = Server.CreateObject("ADODB.Connection")
	connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(db)
'如果你的服务器采用较老版本Access驱动，请用下面连接方法
'	connstr="driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath(db)
	conn.Open connstr

function CloseDatabase

	Conn.close
	Set conn = Nothing

End Function
%>
<!-- #include file="inc/const.asp" -->
<!-- #include file="chkuser.asp" -->
<!-- #include file="mingxing/mx.asp" -->


<!--#include file="inc/char.asp"-->
<!--#include file="inc/ad_fixup.asp"-->
<!--#include file="inc/ad_move.asp"-->
<!--#include file=inc/theme.asp -->
<%
	Dim LastLogin,birthnum
	dim Guests
 

Rem 首页顶部信息
sub index_head()
	Stats="论坛首页"
	call nav()
	sql="select top 1 TopicNum,BbsNum,TodayNum,UserNum,lastUser from config where active=1"
	set rs=server.createobject("adodb.recordset")
	rs.open sql,conn,0,1
	if isnull(index_ad_t) or index_ad_t="" then
	response.write "<TABLE border=0 width="&TableWidth&" align=center><TBODY>"&_
				"<TR><TD align=left><a href='"& HostURL &"'><img border=0 src='"& Forumlogo &"'></a></TD>"&_
				"<TD Align=right><font color="&BodyFontColor&" style=""line-height: 15pt"">欢迎新会员 <a href=dispuser.asp?name="& htmlencode(rs(4)) &" target=_blank>"&_
				"<font color="& AlertFontColor &">"& htmlencode(rs(4)) &"</font></a> 加入 [<a href=toplist.asp?orders=2>新进来宾</a>]<BR><font color="&AlertFontColor&"><b><script src=count/mystat.asp></script></b></font>&nbsp;今日贴数：<font color="&AlertFontColor&"><b>"& rs(2) &"</b></font>"&_
				" | 主题总数：<b>"& rs(0) &"</b> | 帖子总数：<b>"& rs(1) &"</b> | "&_
				"注册会员<B>"& rs(3) &"</B>"&_
				"<p><img src="&picurl&P_nowTime&">  <a href=team.asp>管理团队</a><img src="&picurl&P_newTopic&"> <a href=remen.asp>论坛热贴</a><img src="&picurl&P_userlist&"> <a href=toplist.asp?orders=7>注册会员</a><img src="&picurl&P_Top20&"> <a href=toplist.asp?orders=1>发贴排行</a></font>"&_
				"</TD></TR></TBODY></TABLE>"
	else
	response.write "<TABLE border=0 width="&TableWidth&" align=center><TBODY>"&_
				"<TR><TD align=left><a href='"& HostURL &"'><img border=0 src='"& Forumlogo &"'></a></TD>"&_
				"<TD Align=center width=350>"&index_ad_t&"</td><td   style=""line-height: 15pt"">"&_
				"<img src="&picurl&P_nowTime&">  <a href=team.asp>管理团队</a><BR><img src="&picurl&P_newTopic&"> <a href=remen.asp>论坛热贴</a><BR><img src="&picurl&P_userlist&"> <a href=toplist.asp?orders=7>注册会员</a><BR><img src="&picurl&P_Top20&"> <a href=toplist.asp?orders=1>发贴排行</a></font>"&_
				"</TD></TR><tr><td colspan=3 align=right><font color="&BodyFontColor&"><font color="&AlertFontColor&"><b><script src=count/mystat.asp></script></b></font>&nbsp;今日贴数：<font color="&AlertFontColor&"><b>"& rs(2) &"</b></font>"&_
				" | 主题总数：<b>"& rs(0) &"</b> | 帖子总数：<b>"& rs(1) &"</b> | "&_
				"注册会员<B>"& rs(3) &"</B> | 欢迎新会员 <a href=dispuser.asp?name="& htmlencode(rs(4)) &" target=_blank>"&_
				"<font color="& AlertFontColor &">"& htmlencode(rs(4)) &"</font></a> 加入 [<a href=toplist.asp?orders=2>新进来宾</a>]</td></tr></TBODY></TABLE>"
	end if
	response.write "<style>"&_
				"TABLE {BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 1px; }"&_
				"TD {BORDER-RIGHT: 0px; BORDER-TOP: 0px;  }"&_
				"</style>"&_
				"<table cellpadding=6 cellspacing=1 width="&TableWidth&" align=center  bordercolor="&Tablebackcolor&"  border=0>"&_
				"<TR ><TD align=left height=18 colSpan=8 id='elFader' style='position:relative; left: 20px;visibility:hidden; height:16'>&nbsp;"

	rs.close
	if FoundUser then
	sql="select lastlogin from [user] where username='"&membername&"'"
	set rs=conn.execute(sql)
	lastlogin=rs(0)
	rs.close
	set rs=nothing
	end if
	if isnull(lastlogin) or lastlogin="" then lastlogin=now()
	sql="select top 3 boardid,title,addtime from bbsnews where boardid=0 order by addtime desc"
	set rs=server.createobject("adodb.recordset")
	rs.open sql,conn,0,1
	if rs.bof and rs.eof then
	titlelist="""<IMG align=absMiddle src="&Picurl&P_call&">没有公告"","""""
	else
	do while not rs.eof
	dim titlelist
	titlelist=titlelist&"""<a href=announcements.asp?boardid="&boardid&" target=_blank><IMG align=absMiddle border=0 src="&Picurl&P_call&">"&rs(1)&"</a>  ("&rs(2)&")"","""","
	
	rs.movenext
		loop
		titlelist=titlelist&"""<IMG align=absMiddle src="&Picurl&P_call&">欢迎访问"&forumname&"  ("&now()&")"","""""
		end if
	rs.close
	set rs=nothing
	 %>
	 <SCRIPT LANGUAGE='JavaScript' SRC='inc/fader.js' TYPE='text/javascript'></script>
		 <SCRIPT LANGUAGE='JavaScript' TYPE='text/jscript'>
prefix="";
arNews = [<%=titlelist%>]
</SCRIPT>
	  <%response.write "</font></TD></TR></table>"
	
end sub

Rem 首页主体内容
sub index_body()
if membername="" or membername="客人" then
	if cint(fastlogin)=1 then call fast_login()
end if
'response.write "<table cellpadding=6 cellspacing=0 width="&TableWidth&" align=center  bordercolor="""&Tablebackcolor&""" border=1>"&_
  '      "<TR  bgColor="""&Tabletitlecolor&""">"&_
   '     "<TD  width=26><B><FONT COLOR="&TableFontcolor&">状态</font></b></TD>"&_
   '     "<TD vAlign=center width=*><B><FONT COLOR="&TableFontcolor&">论坛名称</FONT></B></TD>"&_
   '     "<TD vAlign=center align=middle width=80><B><FONT COLOR="&TableFontcolor&">版主</FONT></B></TD>"&_
    '    "<TD vAlign=center noWrap align=middle width=38><B><FONT COLOR="&TableFontcolor&">主题</FONT></B> </TD>"&_
    '    "<TD vAlign=center noWrap align=middle width=38><B><FONT COLOR="&TableFontcolor&">贴子</FONT></B> </TD>"&_
    '    "<TD vAlign=center noWrap align=middle width=190><B><FONT COLOR="&TableFontcolor&">最后发表</FONT></B> </TD>"&_
    '    "<TD vAlign=center align=middle width=26><B><FONT COLOR="&TableFontcolor&">收藏</FONT></B></TD>"&_
	'	"</TR></table>"
	sql="select id,class from class order by id"
	set rs=server.createobject("adodb.recordset")
	rs.open sql,conn,0,1
	do while not rs.eof
response.write "<table cellspacing=0 border=0 width="&TableWidth&" bgcolor="""&Tablebackcolor&""" align=center><tr><td height=1></td></tr></table><table cellpadding=6 cellspacing=0 width="&TableWidth&" align=center  bordercolor="""&Tablebackcolor&""" border=1>"&_
        "<TR class=coolbg><TD bgColor="""&aTablebodycolor&""" colSpan=7><B>≡"&rs(1)&"≡</B></TD></TR>"
	call board(rs(0))
	response.write "</table><br>"
	rs.movenext
	loop
	rs.close
	set rs=nothing
	if master then
	response.write "<table cellspacing=0 border=0 width="&TableWidth&" bgcolor="""&Tablebackcolor&""" align=center><tr><td height=1></td></tr></table><table cellpadding=6 cellspacing=0 width="&TableWidth&" align=center  bordercolor="""&Tablebackcolor&""" border=1>"&_
        "<TR class=coolbg><TD bgColor="""&Tablebodycolor&""" colSpan=7><B>论坛回收站</B></TD></TR>"

response.write "<TR><TD vAlign=top align=middle width=26 bgColor="""&aTablebodycolor&""">"
response.write "<img src=pic/ifolder.gif width=18 height=18 alt=论坛回收站>"

response.write "</TD><TD vAlign=top width=* bgColor="""&Tablebodycolor&""" colspan=6> <a href=""recycle.asp""><font color="&BoardLinkColor&">论坛所有版面版主删除的帖子。</font></a>"
response.write "</TD></TR>"

	response.write "</table><br>"
	end if
 response.write "<table cellspacing=0 border=0 width="&TableWidth&" bgcolor="""&Tablebackcolor&""" align=center><tr><td height=1></td></tr></table><table cellpadding=6 cellspacing=0 width=95% align=center  bordercolor="""&Tablebackcolor&""" border=1>"&_
        "<TR class=coolbg><TD bgColor="""&Tabletitlecolor&""" colSpan=2><b>明星网友</b>"
	if request("action1")="mingxing" then
		response.write "[<a href=index.asp?action1=&action="&request("action")&">显示详细列表</a>]</td></tr></table>"
	else
		response.write "[<a href=index.asp?action="&request("action")&"&action1=mingxing>关闭详细列表</a>]</td></tr></table>"
	end if
	if request("action1")<>"mingxing" then
		call showmx()'显示明星
        end if
if membername="" or membername="客人" then
	if cint(fastlogin)=2 then call fast_login()
end if
	response.write "<BR>"
	set rs=server.createobject("adodb.recordset")
	sql="select boardname,readme,url from bbslink order by id"
	rs.open sql,conn,1,1
	if not rs.eof and not rs.bof then
	
	Rem 联盟论坛
	dim Tlink,Readme,logo
	set rs=server.createobject("adodb.recordset")
	sql="select boardname,readme,url from bbslink order by id"
	rs.open sql,conn,1,1
	if not rs.eof and not rs.bof then
response.write "<table cellspacing=0 border=0 width="&TableWidth&" bgcolor="""&Tablebackcolor&""" align=center><tr><td height=1></td></tr></table>"&_
		"<table cellpadding=6 cellspacing=0 width="&TableWidth&" align=center  bordercolor="""&Tablebackcolor&""" border=1>"&_
        "<TR class=coolbg><TD bgColor="""&Tabletitlecolor&""" colSpan=2><font color="&TableFontcolor&"><b>　-=> 友情论坛</b></font></TD></TR>"
	select case LinkFlag
	case 0
	do while not rs.eof
	Tlink=split(rs(1),"$")
	readme=Tlink(0)
	if ubound(Tlink)=0 then
	logo="<font color="&BoardLinkColor&">"&htmlencode(rs(0))&"</font>"
	else
	logo="<img src="&Tlink(1)&" border=0>"
	end if
	response.write "<tr bgcolor="""&aTablebodycolor&"""><TD vAlign=top align=middle width=26><IMG src="&picurl&F_link&"> </TD><TD vAlign=top bgColor="""&Tablebodycolor&"""><a href="&rs(2)&" target=_blank><font color="&BoardLinkColor&">"&htmlencode(rs(0))&"</font></a><br>"&htmlencode(readme)&"</TD></TR>"
	rs.movenext
	loop
	case 1
	response.write "<tr bgcolor="""&aTablebodycolor&"""><TD vAlign=top align=middle width=26><IMG src="&picurl&F_link&"> </TD><TD vAlign=top bgColor="""&Tablebodycolor&""">"
	do while not rs.eof
	Tlink=split(rs(1),"$")
	readme=Tlink(0)
	if ubound(Tlink)=0 then
	logo="<font color="&BoardLinkColor&">"&htmlencode(rs(0))&"</font>"
	else
	logo="<img src="&Tlink(1)&" border=0>"
	end if
	response.write "<a href="&rs(2)&" target=_blank title="&htmlencode(rs(0))&"&#13;&#10;"&htmlencode(readme)&"><font color="&BoardLinkColor&">"&htmlencode(rs(0))&"</font></a>"
	rs.movenext
	loop
	response.write "</TD></tr>"
	case 2
	do while not rs.eof
	Tlink=split(rs(1),"$")
	readme=Tlink(0)
	if ubound(Tlink)=0 then
	logo="<font color="&BoardLinkColor&">"&htmlencode(rs(0))&"</font>"
	else
	logo="<img src="&Tlink(1)&" border=0>"
	end if
	response.write "<tr bgcolor="""&aTablebodycolor&"""><TD vAlign=top align=middle width=26><IMG src="&picurl&F_link&"> </TD><TD vAlign=top bgColor="""&Tablebodycolor&"""><a href="&rs(2)&" target=_blank><table align=left><tr><td><a href="&rs(2)&" target=_blank title="&htmlencode(rs(0))&"&#13;&#10;"&htmlencode(readme)&">"&logo&"</a></td><td width=10></td></tr></table><font color="&BoardLinkColor&">"&htmlencode(rs(0))&"</font></a><br>"&htmlencode(readme)&"</TD></TR>"
	rs.movenext
	loop
	case 3
	response.write "<tr bgcolor="""&aTablebodycolor&"""><TD vAlign=top align=middle width=26><IMG src="&picurl&F_link&"> </TD><TD vAlign=top bgColor="""&Tablebodycolor&""">"
	do while not rs.eof
	Tlink=split(rs(1),"$")
	readme=Tlink(0)
	if ubound(Tlink)=0 then
	logo="<font color="&BoardLinkColor&">"&htmlencode(rs(0))&"</font>"
	else
	logo="<img src="&Tlink(1)&" border=0>"
	end if
	response.write "<a href="&rs(2)&" target=_blank title="&htmlencode(rs(0))&"&#13;&#10;"&htmlencode(readme)&">"&logo&"</a>"
	rs.movenext
	loop
	response.write "</TD></tr>"
	end select
	response.write "</table>"
	end if
	rs.close
	set rs=nothing

	Rem 用户信息
	dim userip,userip2
	userip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
	userip2 = Request.ServerVariables("REMOTE_ADDR")
	birthday
response.write "<BR>"&_
		"<table cellspacing=0 border=0 width="&TableWidth&" bgcolor="""&Tablebackcolor&""" align=center><tr><td height=1></td></tr></table>"&_
		"<table cellpadding=6 cellspacing=0 width="&TableWidth&" align=center  bordercolor="""&Tablebackcolor&""" border=1>"&_
        "<TR class=coolbg><TD bgColor="""&Tabletitlecolor&""" colSpan=2><font color="&TableFontcolor&"><b>　-=> 用户来访信息</b></font></TD></TR>"&_
        "<TR><TD vAlign=top align=middle width=26 bgColor="""&aTablebodycolor&"""><IMG align=absMiddle src="&picurl&P_userfrom&"> </TD>"&_
        "<TD vAlign=top bgColor="""&Tablebodycolor&""">"
   if userip = ""  then
      response.write "ＩＰ："&userip2&"，"&_
		            "来自："&address(userip2)&"，"
   else
      response.write "您的真实ＩＰ 是："&userip&"，"&_
		             "来自："&address(userip)&""&_
                     "<br>您的代理ＩＰ 是："&userip2&"，"&_
		            "代理鉴定来自："&address(userip2)&"，"
   end if
      response.write ""&system(Request.ServerVariables("HTTP_USER_AGENT"))&"，"&browser(Request.ServerVariables("HTTP_USER_AGENT"))&"</TD></TR>"
	if cint(BirthFlag)=1 then
      response.write "<TR><TD bgColor="""&Tabletitlecolor&""" colSpan=2><font color="&TableFontcolor&"><b>　-=> 今天过生日的用户（共 "&birthNum&" 人）</b></font></TD></TR>"
      response.write "<TR><TD vAlign=top align=middle width=26 bgColor="""&aTablebodycolor&"""><IMG align=absMiddle src="&picurl&P_birth&"> </TD><TD vAlign=top bgColor="""&Tablebodycolor&""" width=*>"&birthday&"</TD></TR>"
	end if
		response.write "</TABLE>"
	Rem 更新在线峰值
	dim onlinenum,guestnum,hiddennum
	onlinenum=online(0)
	guestnum=guest(0)
	hiddennum=hidden(0)
	if Cint(allonline())>Cint(Maxonline) then
	conn.execute("update config set Maxonline="&allonline()&",MaxonlineDate=Now()")
	end if
	response.write "<table cellpadding=6 cellspacing=0 width="&TableWidth&" align=center  bordercolor="""&Tablebackcolor&""" border=1 style=""word-break:break-all;"">"&_
        "<TR class=coolbg><TD bgColor="""&Tabletitlecolor&""" colSpan=2><font color="&TableFontcolor&"><b>　-=> 论坛在线统计</b>（同时在线峰值<b>"&Maxonline&"</b>，发生时刻<b>"&formatdatetime(MaxonlineDate,1)&"&nbsp;"&formatdatetime(MaxonlineDate,4)&"</b>）"
	if request("action")="show" then
		response.write "[<a href=index.asp?action=off><font color="&TableFontcolor&">关闭详细列表</font></a>]"
	else
		if cint(online_u)=1 and request("action")<>"off" then
		response.write "[<a href=index.asp?action=off><font color="&TableFontcolor&">关闭详细列表</font></a>]"
		else
		response.write "[<a href=index.asp?action=show><font color="&TableFontcolor&">显示详细列表</font></a>]"
		end if
	end if
response.write "&nbsp;[<a href=online.asp><font color="&TableFontcolor&">在线用户</font></a>]</font></TD></TR>"&_
        "<TR><TD vAlign=top align=middle width=26 bgColor="""&aTablebodycolor&"""><IMG align=absMiddle src="&picurl&P_online_s&"> </TD>"&_
        "<TD vAlign=top bgColor="""&Tablebodycolor&""">  目前论坛上总共有 <b>"&clng(allonline())&"</b> 人在线，其中注册会员 <b>"&onlinenum&"</b> 人，隐身会员<b>"&hiddennum&"</b>人，访客 <b>"&guestnum&"</b> 人。<br><font color="&alertfontcolor&">在线名单图例</font>：<img src="&picurl&pic_om&"> 总坛主   ‖　<img src="&picurl&pic_ob&"> 论坛坛主   ‖   <img src="&picurl&pic_ov&"> 论坛贵宾   ‖   <img src="&picurl&pic_ou&"> 普通会员或隐身会员   ‖   <img src="&picurl&pic_oh&"> 客人<hr size=1><table width=100% border=0 cellspacing=0 cellpadding=0>"
	if request("action")="off" then
		call onlineuser(0,0,0)
	elseif request("action")="show" then
		call onlineuser(1,1,0)
	else
		call onlineuser(online_u,online_g,0)
	end if
response.write "</table></TD></TR></TABLE><br>"

response.write "<table cellspacing=0 cellpadding=0 width="&TableWidth&" bgcolor="""&Tablebackcolor&""" align=center border=0>"&_
	"<tr><td><table cellspacing=1 cellpadding=3 width=100% border=0>"&_
	"<tr class=coolbg><td width=75%  bgcolor="& Tabletitlecolor &"><font color="& TableFontColor &">"&_
	"<b>　-=> "& ForumName &"图例</b></font></td>"&_
	"<td align=right noWrap bgcolor="& Tabletitlecolor &" width=""25%""><font color="&TableFontcolor&">所有时间均为 - "&GMT&" </font>&nbsp;</td></tr>"&_
	"<tr><td bgcolor="& TableBodyColor &" colspan=3>"&_
	"<table cellspacing=4 cellpadding=0 width=92% border=0 align=center>"&_
	"<tr><td colspan=6>论坛图例仅当你登陆并且上次访问后才显示&nbsp;（您必须登陆才能查看详情，否则只显示该论坛的无新贴图例）</div></td></tr>"&_
	"<tr><td><font color="& AlertFontColor &" TITLE=允许注册会员发言和回复>常规论坛</font></td>"&_
	"<td><font color="& AlertFontColor &" TITLE=只允许登陆用户浏览发言和回复>正规论坛</font></td>"&_
	"<td><font color="& AlertFontColor &" TITLE=允许任何人发言和回复>开放论坛</font></td>"&_
	"<td><font color="& AlertFontColor &" TITLE=允许坛主和版主发言，其他注册用户只能回复>评论论坛</font></td>"&_
	"<td><font color="& AlertFontColor &" TITLE=允许拥有访问密码或已经经过认证的注册会员发言>秘密论坛</font></td>"&_
	"<td colspan=2><font color="& AlertFontColor &">特殊论坛</font></td></tr>"&_
	"<tr><td><img src="&picurl&F_mode1_n&" width=18 height=18> 有新贴子</td>"&_
	"<td><img src="&picurl&F_mode6_n&" width=18 height=18> 有新贴子</td>"&_
	"<td><img src="&picurl&F_mode2_n&" width=18 height=18> 有新贴子</td>"&_
	"<td><img src="&picurl&F_mode3_n&" width=18 height=18> 有新贴子</td>"&_
	"<td><img src="&picurl&F_mode5_n&" width=18 height=18> 有新贴子</td>"&_
	"<td><img src="&picurl&F_mode4_n&" width=18 height=18 TITLE=只允许坛主和版主发言和操作>只读精华</td>"&_
	"<td align=right valign=top rowspan=2><a href=http://www.ppcode.com/ target=_blank "&_
	"><img src=pic/logo_2.gif border=0></a></td></tr>"&_
	"<tr><td><img src="&picurl&F_mode1_o&" width=18 height=18>无新贴子</td>"&_
	"<td><img src="&picurl&F_mode6_o&" width=18 height=18>无新贴子</td>"&_
	"<td><img src="&picurl&F_mode2_o&" width=18 height=18>无新贴子</td>"&_
	"<td><img src="&picurl&F_mode3_o&" width=18 height=18>无新贴子</td>"&_
	"<td><img src="&picurl&F_mode5_o&" width=18 height=18>无新贴子</td>"&_
	"<td><img src="&picurl&F_link&" width=18 height=18 TITLE=和本论坛友情链接的联盟论坛> 联盟论坛</td></tr>"&_
	"</table></td></tr></table></td></tr></table></CENTER>"

if instr(scriptname,"index.asp")>0 or instr(scriptname,"list.asp")>0 then
	if index_moveFlag=1 then
	call admove()
	end if
	if index_fixupFlag=1 then
	call fixup()
	end if
end if
end if
end sub
call index_head()
call index_body()
call count()
call endline()


Rem 版面信息
sub board(id)
	dim sql1,rs1
	dim boardview
	dim master_1
	if boardmaster or master then
	sql1="select boardid,boardtype,class,readme,lastbbsnum,boardmaster,lockboard,lasttopicnum,indexIMG,boardskin,boarduser,LastPost from board "
	sql1=sql1&" where class="&id&" order by boardid"
	else
	sql1="select boardid,boardtype,class,readme,lastbbsnum,boardmaster,lockboard,lasttopicnum,indexIMG,boardskin,boarduser,LastPost from board "
	sql1=sql1&" where class="&id&" and lockboard=0 order by boardid"
	end if
	set rs1=server.createobject("adodb.recordset")
	rs1.open sql1,conn,1,1
	do while not rs1.eof
	LastPostInfo=split(rs1(11),"$")
response.write "<TR><TD vAlign=top align=middle width=26 bgColor="""&aTablebodycolor&""">"

select case rs1(9)
case 1
	if datediff("h",lastlogin,LastPostInfo(2))=0 then
	response.write "<img src="&picurl&F_mode1_n&" width=18 height=18 alt=常规论坛，有新帖子>"
	else
	response.write "<img src="&picurl&F_mode1_o&" width=18 height=18 alt=常规论坛，无新帖子>"
	end if
	boardview="常规论坛"
case 2
	if datediff("h",lastlogin,LastPostInfo(2))=0 then
	response.write "<img src="&picurl&F_mode2_n&" width=18 height=18 alt=开放论坛，有新帖子>"
	else
	response.write "<img src="&picurl&F_mode2_o&" width=18 height=18 alt=开放论坛，无新帖子>"
	end if
	boardview="开放论坛"
case 3
	if datediff("h",lastlogin,LastPostInfo(2))=0 then
	response.write "<img src="&picurl&F_mode3_n&" width=18 height=18 alt=评论论坛，有新帖子>"
	else
	response.write "<img src="&picurl&F_mode3_o&" width=18 height=18 alt=评论论坛，无新帖子>"
	end if
	boardview="评论论坛"
case 4
	if datediff("h",lastlogin,LastPostInfo(2))=0 then
	response.write "<img src="&picurl&F_mode4_n&" width=18 height=18 alt=精华区，有新帖子>"
	else
	response.write "<img src="&picurl&F_mode4_o&" width=18 height=18 alt=精华区，无新帖子>"
	end if
	boardview="精华论坛"
case 5
	if datediff("h",lastlogin,LastPostInfo(2))=0 then
	response.write "<img src="&picurl&F_mode5_n&" width=18 height=18 alt=秘密论坛，有新帖子>"
	else
	response.write "<img src="&picurl&F_mode5_o&" width=18 height=18 alt=秘密论坛，无新帖子>"
	end if
	boardview="秘密论坛"
case 6
	if datediff("h",lastlogin,LastPostInfo(2))=0 then
	response.write "<img src="&picurl&F_mode6_n&" width=18 height=18 alt=正规论坛，有新帖子>"
	else
	response.write "<img src="&picurl&F_mode6_o&" width=18 height=18 alt=正规论坛，无新帖子>"
	end if
	boardview="正规论坛"
	case 7
	if datediff("h",lastlogin,LastPostInfo(2))=0 then
	response.write "<img src="&picurl&F_mode5_n&" width=18 height=18 alt=认证论坛，有新帖子>"
	else
	response.write "<img src="&picurl&F_mode5_o&" width=18 height=18 alt=认证论坛，无新帖子>"
	end if
	boardview="认证论坛"
end select
if rs1(8)<>"" then
response.write "</TD><TD vAlign=top width=* bgColor="""&Tablebodycolor&"""><font color="&TableContentColor&"><img src="&rs1(8)&" align=top> <a href=""list.asp?boardid="&rs1(0)&"""><font color="&BoardLinkColor&">『"&rs1(1)&"』</font></a>  <font color=gray>"&boardview&"</font>&nbsp;&nbsp;&nbsp;&nbsp;<a href=""announce.asp?boardid="&rs1(0)&"""><img src=pic/newpost_a.gif width=11 height=11 border=0 alt=在此分论坛发表一个新帖子></a> <a href=""vote.asp?boardid="&rs1(0)&"""><img src=pic/newvote_a.gif width=11 height=11 border=0 alt=在此分论坛发起一个新投票></a> <a href=""query.asp?boardid="&rs1(0)&"""><img src=pic/newqu_a.gif width=13 height=11 border=0 alt=在此分论坛查找我要的文章></a><br><br> "
	 
	else
	response.write "</TD><TD vAlign=top width=* bgColor="""&Tablebodycolor&"""><font color="&TableContentColor&"> <a href=""list.asp?boardid="&rs1(0)&"""><font color="&BoardLinkColor&">"&rs1(1)&"</font></a>  <font color=gray>"&boardview&"</font>&nbsp;&nbsp;&nbsp;&nbsp;<a href=""announce.asp?boardid="&rs1(0)&"""><img src=pic/newpost_a.gif width=11 height=11 border=0 alt=在此分论坛发表一个新帖子></a> <a href=""vote.asp?boardid="&rs1(0)&"""><img src=pic/newvote_a.gif width=11 height=11 border=0 alt=在此分论坛发起一个新投票></a> <a href=""query.asp?boardid="&rs1(0)&"""><img src=pic/newqu_a.gif width=13 height=11 border=0 alt=在此分论坛查找我要的文章></a> <br><br>"
end if
response.write rs1(3)
response.write "</TD><TD vAlign=center align=middle bgColor="""&aTablebodycolor&""" width=80>"
master_1=split(rs1(5), "|")
for i = 0 to ubound(master_1)
	if i>2 then
	master_2=master_2
	else
	master_2=""+master_2+"<a href=dispuser.asp?name="+master_1(i)+" target=_blank><font color="&TableContentcolor&">"+master_1(i)+"</a><br>"
	end if
next
if i>3 then master_2=master_2 & "<font color=gray>More...</font>"
response.write master_2
master_2=""

response.write "</TD>"&_
		"<TD vAlign=center noWrap align=middle width=38 bgColor="""&Tablebodycolor&""">"&rs1(7)&"</TD>"&_
        "<TD vAlign=center noWrap align=middle width=38 bgColor="""&Tablebodycolor&""">"&rs1(4)&"</TD>"&_
        "<TD noWrap width=190 bgColor="""&aTablebodycolor&""">"
if rs1(9)=5 then
	response.write "秘密论坛，认证用户进入查看，如需认证，请到站长办公留言申请。"
else
     if len(htmlencode(LastPostInfo(3)))>10 then
	response.write "<img border=0 src="&picurl&"zhuti.gif>&nbsp;主题：<a href='dispbbs.asp?Boardid="&rs1(0)&"&ID="&LastPostInfo(1)&"&rootID="&LastPostInfo(1)&"#"&LastPostInfo(1)&"'>"&left(replace(htmlencode(LastPostInfo(3)),"&nbsp;",""),10)&"…</a><br>"
	 else
	 response.write "<img border=0 src="&picurl&"zhuti.gif>&nbsp;主题：<a href='dispbbs.asp?Boardid="&rs1(0)&"&ID="&LastPostInfo(1)&"&rootID="&LastPostInfo(1)&"#"&LastPostInfo(1)&"'>"&htmlencode(LastPostInfo(3))&"</a><br>"
	 end if
	response.write "<img border=0 src="&picurl&"zuozhe.gif>&nbsp;作者：<a href=dispuser.asp?name="&htmlencode(LastPostInfo(0))&" target=_blank>"&htmlencode(LastPostInfo(0))&"</a><IMG border=0 src="&picurl&"lastpost.gif><br><img border=0 src="&picurl&"shijian.gif>&nbsp;时间：" & FormatDateTime(LastPostInfo(2),1) & "" & FormatDateTime(LastPostInfo(2),4)
end if
response.write "</TD><TD vAlign=center noWrap align=middle width=26 bgColor="""&Tablebodycolor&""">"&_
		"<A href=""javascript:window.external.AddFavorite('"&ForumURL&"list.asp?boardid="&rs1(0)&"','"&ForumName&"--"&rs1(1)&"论坛（"&ForumUrl&"）')"" target=_self><img src="&picurl&"fav.gif border=0></A>"&_
		"</TD></TR>"
boardview=""
		rs1.movenext
		loop
		rs1.close
		set rs1=nothing
end sub

sub fast_login()
session("loginmun")=0
 dim s
randomize timer
s=Int((8999)*Rnd +1000)

	response.write "<table cellspacing=0 border=0 width="&TableWidth&" bgcolor="""&Tablebackcolor&""" align=center><tr><td height=1></td></tr></table><table width="&TableWidth&" cellpadding=6 cellspacing=0 align=center bordercolor="""&Tablebackcolor&""" border=1><tr class=coolbg><td bgColor="""&Tabletitlecolor&""" colSpan=7><font color="&TableFontcolor&"><b>-=&gt; 　　快速登录入口</b>"&_
	"[<a href=reg.asp><font color="&TableFontcolor&">注册用户</font></a>]　[<a href=lostpass.asp style=""CURSOR: help""><font color="&TableFontcolor&">忘记密码</font></a>]   <b>随机附加码：</b><font color=red><b> "&s&"</b></font><br>"&_
    "</font></td></tr><form action=chklogin.asp method=post><tr><td align=middle bgColor="""&Tablebodycolor&""""&_
	"width=26><img src="&picurl&P_userlist&" width=16 height=16></td><td bgColor="""&Tablebodycolor&""" colSpan=6 width=*>"&_
	"&nbsp;用户名：<input maxLength=16 name=username size=12>"&_
	"　　密码：<input maxLength=20 name=password size=12 type=password>"&_
		"　　附加码：<input maxLength=20 name=secruity size=12 type=text>"&_
		"<input maxLength=20 name=checksecruity size=12 type=hidden value="&s&">"&_
	"　　<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=""登 陆""></font>&nbsp;&nbsp;&nbsp;<INPUT type=checkbox value=1 name=hiddenuser>隐身</td></tr></form></table><br>"
end sub

function birthday()
	dim age
	dim birthuser
	dim foundbirth
	foundbirth=false
	birthNum=0
	on error resume next
	set rs=server.createobject("adodb.recordset")
	sql="select birthuser from config where active=1"
	rs.open sql,conn,1,1
	if not isnull(rs(0)) or rs(0)<>"" then
	birthuser=split(rs(0),"$")
	if ubound(birthuser)<3 then
		foundbirth=false
	elseif datediff("d",birthuser(2),Now())>0 then
		foundbirth=false
	else
		foundbirth=true
	end if
	else
	foundbirth=false
	end if
	if not foundbirth then
	set rs=conn.execute("select username,birthday from [user] where month(birthday)=month(Now()) and day(birthday)=day(Now())")
	if rs.eof and rs.bof then
		birthday="今天没有朋友过生日"
	else
		do while not rs.eof
		age=datediff("yyyy",rs(1),Now())
		birthday=birthday & "<a href=dispuser.asp?name="&rs(0)&" title=学生之友全体站员祝"&rs(0)&age&"岁生日快乐！ target=_blank>"&rs(0)&"</a>&nbsp;"
		birthNum=birthNum+1
		rs.movenext
		loop
	end if
	rs.close
	set rs=nothing
	conn.execute("update config set birthuser='" & birthday & "$" & birthNum & "$" & Now() & "' where active=1")
	else
	birthday=birthuser(0)
	birthNum=birthuser(1)
	end if
end function
%><!--#include file="online_l.asp"--><!--#include file="inc/ad_fixup.asp"--><!--#include file="footer.asp"--><!--#include file="count.asp"-->