<% response.buffer=true '========================================================= ' File: index.asp ' Version:5.0 ' Date: 2002-9-21 ' Script Written by satan '========================================================= ' Copyright (C) 2001,2002 AspSky.Net. All rights reserved. ' Web: http://www.aspsky.net,http://www.dvbbs.net ' Email: info@aspsky.net,eway@aspsky.net '========================================================= Dim OnlineNum,GuestNum Dim reBoard_Setting,BoardCount,k,ColSpanNum Dim Board_Count Dim TdTableWidth OnlineNum=online(0) GuestNum=guest(0) Stats="论坛首页" call activeonline() Rem 首页顶部信息 call nav() if isnull(lastlogin) or lastlogin="" then lastlogin=now() if Clng(Forum_OnlineNum)>Clng(Maxonline) then conn.execute("update config set Maxonline="&allonline()&",MaxonlineDate=Now()") end if %> border=0 align=center> <%if founduser then%>
<%if Cint(newincept())>Cint(0) then%> <%if Cint(forum_setting(10))=1 then%> <%end if%> > 我的收件箱 (<%=newincept()%> 新) <%else%> > 我的收件箱 (0 新) <%end if%> <%else%>
<%end if%>
<% sql="select top 1 TopicNum,BbsNum,TodayNum,UserNum,lastUser,yesterdaynum,maxpostnum,maxpostdate,LastPost from config where active=1" set rs=conn.execute(sql) LastPostInfo=split(rs("LastPost"),"$") if not isdate(LastPostInfo(2)) then LastPostInfo(2)=Now() LastPostTime=LastPostInfo(2) if datediff("d",LastPostTime,Now())>0 and ubound(LastPostInfo)=7 then conn.execute("update config set yesterdaynum=todaynum,LastPost='"&checkStr(LastPostInfo(0))&"$"&checkStr(LastPostInfo(1))&"$"&Now()&"$"&checkStr(LastPostInfo(3))&"$"&checkStr(LastPostInfo(4))&"$"&checkStr(LastPostInfo(5))&"$"&checkStr(LastPostInfo(6))&"$"&checkStr(LastPostInfo(7))&"'") conn.execute("update config set todaynum=0") end if if rs(2)>rs(6) then conn.execute("update config set maxpostnum=todaynum,maxpostdate=Now()") %>
欢迎新加入会员 target=_blank><%= htmlencode(rs(4)) %> [新进来宾]
论坛共有 <%= rs(3)%> 位注册会员 , 主题总数:<%= rs(0) %> , 帖子总数:<%= rs(1) %>
今日论坛共发贴:<%=rs(2)%> , 昨日发贴:<%=rs(5)%> , 最高日发贴:<%=rs(6)%>
查看新贴 , 热门话题 , 发贴排行 , 用户列表
您最后一次访问是在:<%=Now()%>
<% if Cint(Forum_setting(4))=1 then call main_2() else call main_1() end if sub main_1() if not founduser and Cint(forum_setting(31))=1 then call FastLogin() end if Dim cBoardID Response.Cookies("BoardList").expires= date+7 cBoardID= Request("cBoardid") if isnumeric(cBoardID) then if request("CatLog")="N" then Response.Cookies("BoardList")(cBoardID & "BoardID")= "NotShow" else Response.Cookies("BoardList")(cBoardID & "BoardID")= "Show" end if end if dim simdisp simdisp=false k=0 '只列出深度小于2的版面 sql="select * from board where depth<="&forum_setting(5)&" order by rootid,orders" set rs=server.createobject("adodb.recordset") rs.open sql,conn,1,1 if not (rs.eof and rs.bof) then BoardCount=rs.recordcount else boardcount=0 end if do while not rs.eof k=k+1 reBoard_Setting=split(rs("Board_setting"),",") if rs("BoardMaster")<>"" and not isnull(rs("BoardMaster")) then master_1=split(rs("BoardMaster"), "|") for i = 0 to ubound(master_1) if i>6 then master_2=master_2 else master_2=master_2 & ""&master_1(i)&" " end if next if i>7 then master_2=master_2 & "More..." else master_2="暂无" end if if rs("ParentID")=0 then if request.cookies("BoardList")(rs("boardid") & "BoardID")="NotShow" then ColSpanNum=reBoard_Setting(41) if not isnumeric(ColSpanNum) and Cint(ColSpanNum)=0 then ColSpanNum=4 simdisp=true elseif request.cookies("BoardList")(rs("boardid") & "BoardID")="Show" then simdisp=false ColSpanNum=2 else if Cint(reBoard_Setting(39))=1 then ColSpanNum=reBoard_Setting(41) if not isnumeric(ColSpanNum) and Cint(ColSpanNum)=0 then ColSpanNum=4 simdisp=true else simdisp=false ColSpanNum=2 end if end if response.write "" response.write "" Board_Count=0 else if simdisp then call main_1_boardlist_2() else call main_1_boardlist_1() end if end if master_2="" rs.movenext if k " next response.write "" end if if rs("parentid")=0 then response.write "
 " if simdisp then response.write ""&rs("boardtype")&"" else response.write ""&rs("boardtype")&"" end if response.write "

" simdisp=false ColSpanNum=2 end if else if Board_count " next response.write "" end if end if loop set rs=nothing response.write "" if not founduser and Cint(forum_setting(31))=2 then call FastLogin() end if end sub sub main_1_boardlist_1() if (Cint(reBoard_Setting(1))=1 and Cint(GroupSetting(37))=1) or Cint(reBoard_Setting(1))=0 then response.write "" LastPostInfo=split(rs("LastPost"),"$") if not isdate(LastPostInfo(2)) then LastPostInfo(2)=Now() '=========================BoardInfo============================ response.write "
" if Cint(reBoard_Setting(0))=1 then if datediff("h",lastlogin,LastPostInfo(2))=0 then response.write "有新帖子" else response.write "无新帖子" end if else if datediff("h",lastlogin,LastPostInfo(2))=0 then response.write "有新帖子" else response.write "无新帖子" end if end if %> > <% response.write "" response.write "
><%=rs("boardtype")%> <% if rs("child")>0 then response.write "("&rs("child")&")" end if %> " if rs("indeximg")<>"" then response.write "
" end if response.write "
" if Cint(reBoard_Setting(2))=1 then response.write "认证论坛,请认证用户进入浏览" else response.write "主题:"&htmlencode(left(LastPostInfo(3),10))&"..
作者:"&htmlencode(LastPostInfo(0))&"
日期:" & FormatDateTime(LastPostInfo(2),1) & "" & FormatDateTime(LastPostInfo(2),4)&" " end if response.write "
" response.write rs("readme") response.write"
版主:"&master_2&"" response.write " " response.write "" response.write "
今日帖 "&rs("TodayNum")&"主题 "&rs("LastTopicNum")&"文章 "&rs("LastBBSNum")&"
" '============================End=============================== end if end sub sub main_1_boardlist_2() TdTableWidth=100/ColSpanNum if Board_Count=ColSpanNum or Board_Count=0 then response.write "" response.write "" if (Cint(reBoard_Setting(1))=1 and Cint(GroupSetting(37))=1) or Cint(reBoard_Setting(1))=0 then response.write "
版主:"&master_2&""" colspan=2>"&rs("boardtype")&"" if rs("child")>0 then response.write "("&rs("child")&")" end if response.write "
今日:"&rs("TodayNum")&"发贴:"&rs("LastBbsNum")&"
" end if response.write "" if Board_Count=ColSpanNum-1 then response.write "" if Cint(Board_Count)>Cint(ColSpanNum)-1 then Board_Count=1 else Board_Count=Board_Count+1 end if end sub sub main_2() if not founduser and Cint(forum_setting(31))=1 then call FastLogin() end if %> <% Dim cBoardID Response.Cookies("BoardList").expires= date+7 cBoardID= Request("cBoardid") if isnumeric(cBoardID) then if request("CatLog")="N" then Response.Cookies("BoardList")(cBoardID & "BoardID")= "NotShow" else Response.Cookies("BoardList")(cBoardID & "BoardID")= "Show" end if end if dim simdisp simdisp=false k=0 '只列出深度小于2的版面 sql="select * from board where depth<="&forum_setting(5)&" order by rootid,orders" set rs=server.createobject("adodb.recordset") rs.open sql,conn,1,1 if not (rs.eof and rs.bof) then BoardCount=rs.recordcount else boardcount=0 end if do while not rs.eof k=k+1 reBoard_Setting=split(rs("Board_setting"),",") if rs("BoardMaster")<>"" and not isnull(rs("BoardMaster")) then master_1=split(rs("BoardMaster"), "|") for i = 0 to ubound(master_1) if i>6 then master_2=master_2 else master_2=master_2 & ""&master_1(i)&"
" end if next if i>2 then master_2=master_2 & "More..." else master_2="暂无" end if if rs("ParentID")=0 then if request.cookies("BoardList")(rs("boardid") & "BoardID")="NotShow" then ColSpanNum=reBoard_Setting(41) if not isnumeric(ColSpanNum) and Cint(ColSpanNum)=0 then ColSpanNum=4 simdisp=true elseif request.cookies("BoardList")(rs("boardid") & "BoardID")="Show" then simdisp=false ColSpanNum=6 else if Cint(reBoard_Setting(39))=1 then ColSpanNum=reBoard_Setting(41) if not isnumeric(ColSpanNum) and Cint(ColSpanNum)=0 then ColSpanNum=4 simdisp=true else simdisp=false ColSpanNum=6 end if end if response.write "" Board_Count=0 else if simdisp then call main_2_boardlist_2() else call main_2_boardlist_1() end if end if master_2="" rs.movenext if k " next response.write "
状态 论坛名称 版主 主题 贴子 最后发表
 " if simdisp then response.write ""&rs("boardtype")&"" else response.write ""&rs("boardtype")&"" end if response.write "
" end if if rs("parentid")=0 then simdisp=false ColSpanNum=6 end if else if Board_count " next response.write "" end if end if loop set rs=nothing if not founduser and Cint(forum_setting(31))=2 then call FastLogin() end if response.write "" set rs=nothing end sub sub main_2_boardlist_1() dim boardstat if (Cint(reBoard_Setting(1))=1 and Cint(GroupSetting(37))=1) or Cint(reBoard_Setting(1))=0 then LastPostInfo=split(rs("LastPost"),"$") if not isdate(LastPostInfo(2)) then LastPostInfo(2)=Now() '=========================BoardInfo============================ response.write "" if Cint(reBoard_Setting(0))=1 then if datediff("h",lastlogin,LastPostInfo(2))=0 then response.write "有新帖子" else response.write "无新帖子" end if else if datediff("h",lastlogin,LastPostInfo(2))=0 then response.write "有新帖子" else response.write "无新帖子" end if end if %>
"> ><%=rs("boardtype")%>
<% if rs("indeximg")<>"" then response.write "
" end if %> <%=rs("readme")%>
<%=master_2%> <%=rs("LastTopicNum")%> <%=rs("LastBbsNum")%> 作者:<%=htmlencode(LastPostInfo(0))%>
主题:<%=htmlencode(left(LastPostInfo(3),10))%>..
<%= FormatDateTime(LastPostInfo(2),1) %><%= FormatDateTime(LastPostInfo(2),4) %> <% end if end sub sub main_2_boardlist_2() TdTableWidth=100/ColSpanNum if Board_Count=ColSpanNum or Board_Count=0 then response.write "" response.write "" if Board_Count=ColSpanNum-1 then response.write "" if Cint(Board_Count)>Cint(ColSpanNum)-1 then Board_Count=1 else Board_Count=Board_Count+1 end if end sub response.write "
" if (Cint(reBoard_Setting(1))=1 and Cint(GroupSetting(37))=1) or Cint(reBoard_Setting(1))=0 then response.write "
版主:"&master_2&""" colspan=2>"&rs("boardtype")&"" if rs("child")>0 then response.write "("&rs("child")&")" end if response.write "
今日:"&rs("TodayNum")&"发贴:"&rs("LastBbsNum")&"
" end if response.write "
"&_ ""&_ "
-=> 友情论坛
"&_ "" myCache.name="bbslink" if myCache.valid then response.write myCache.value 'mycache.makeEmpty else Dim linkinfo i=7 sql="select boardname,readme,url from bbslink where islogo=0 order by id" set rs=conn.execute(sql) if not rs.eof and not rs.bof then do while not rs.eof if i>6 then linkinfo = linkinfo & "" if i=6 then linkinfo = linkinfo & "" i=i+1 loop end if i=7 sql="select boardname,readme,url,logo from bbslink where islogo=1 order by id" set rs=conn.execute(sql) if not rs.eof and not rs.bof then linkinfo = linkinfo & "" do while not rs.eof if i>6 then linkinfo = linkinfo & "" if i=6 then linkinfo = linkinfo & "" i=i+1 loop end if set rs=nothing if isnull(linkinfo) or linkinfo="" then linkinfo=" " myCache.add linkinfo,dateadd("n",9999,now) response.write linkinfo end if response.write "
" i=1 else linkinfo = linkinfo & "" end if linkinfo = linkinfo & ""&rs(0)&"" rs.movenext linkinfo = linkinfo & "

" i=1 else linkinfo = linkinfo & "" end if linkinfo = linkinfo & "" rs.movenext linkinfo = linkinfo & "
" '=========生日显示开始================ if cint(forum_setting(29))=1 then myCache.name="userbirthday" if myCache.valid then response.write myCache.value 'mycache.makeEmpty else dim age dim birthuser dim foundbirth dim showbirthday dim birthNum,birthday foundbirth=false birthNum=0 'on error resume next sql="select birthuser from config where active=1" set rs=conn.execute(sql) if not isnull(rs(0)) or rs(0)<>"" then birthuser=split(rs(0),"$") if ubound(birthuser)<3 then foundbirth=false elseif cint(birthuser(1))<>0 then foundbirth=true 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 birthday<>'' order by userid") do while not rs.eof if isdate(rs(1)) then if month(rs(1))=month(Now()) and day(rs(1))=day(Now()) then age=datediff("yyyy",rs(1),Now()) birthday=birthday & "〖祝 "&rs(0)&" 生日快乐 ," birthNum=birthNum+1 end if end if rs.movenext loop rs.close set rs=nothing if birthday="" then birthday="今天没有朋友过生日..." conn.execute("update config set birthuser='" & birthday & "$" & birthNum & "$" & Now() & "' where active=1") else birthday=birthuser(0) birthNum=birthuser(1) end if showbirthday="
≡ 今天过生日的用户(共 "&birthNum&" 人)≡
"&birthday&"
" myCache.add showbirthday,date+1 end if end if '=========生日显示结束================ response.write "
"&_ ""&_ ""&_ ""&_ ""&_ "
-=> 用户来访信息
" Dim userip,userip2 userip = Request.ServerVariables("HTTP_X_FORWARDED_FOR") userip2 = Request.ServerVariables("REMOTE_ADDR") if userip = "" then response.write "您的真实IP 是:"&userip2&"," else response.write "您的真实IP 是:"&userip&"," end if response.write usersysinfo(Request.ServerVariables("HTTP_USER_AGENT"),2)&","&usersysinfo(Request.ServerVariables("HTTP_USER_AGENT"),1) response.write "
-=> 论坛在线统计 " if request("action")="show" then response.write "[关闭详细列表]" else if cint(Forum_Setting(14))=1 and request("action")<>"off" then response.write "[关闭详细列表]" else response.write "[显示详细列表]" end if end if response.write "[查看在线用户位置]
目前论坛上总共有 "&Forum_OnlineNum&" 人在线,其中注册会员 "&OnlineNum&" 人,访客 "&GuestNum&" 人。
"&_ "历史最高在线纪录是 "&Maxonline&" 人同时在线,发生时间是:"&formatdatetime(MaxonlineDate,1)&" "&formatdatetime(MaxonlineDate,4)&""&_ "
名单图例:" response.write " 总坛主 ‖  论坛坛主 ‖ 论坛贵宾 ‖ 普通会员 ‖ 客人或隐身会员" response.write "
"&_ "" if request("action")="off" then call onlineuser(0,0,0) elseif request("action")="show" then call onlineuser(1,1,0) else call onlineuser(Forum_Setting(14),Forum_Setting(15),0) end if %>

 没有新的帖子       有新的帖子       被锁定的论坛
<% if instr(scriptname,"index.asp")>0 or instr(scriptname,"list.asp")>0 then if Forum_ads(2)=1 then call admove() end if if Forum_ads(13)=1 then call fixup() end if end if sub FastLogin() %>
-=> 快速登录入口 [注册用户] [忘记密码]
 用户名:  密码:    
<% end sub call footer() %>