%
Dim PageString
BBS94KK.Head "首页"
If BBS94KK.Info(20)="1" then ShowInfo()
ShowBoard()
If BBS94KK.Info(21)="1" then PageString=PageString&ShowOnline()
Response.Write PageString &""
If BBS94KK.Info(22)="1" then ShowBirthday()
If BBS94KK.Info(23)="1" then ShowLink()
BBS94KK.Footer()
Set BBS94KK = Nothing
Sub ShowInfo()
With BBS94KK
Dim S,OnlingType
If .FoundUser Then
S = .ReadSkins("用户信息")
If Session(CacheName & "MyInfo")(11)="1" Then
S=Replace(S,"{用户头像}","
")
Else
S=Replace(S,"{用户头像}","
")
End if
If .MyHidden="0" Then
OnlingType="隐身中"
Else
OnlingType="在线中"
End If
S=Replace(S,"{用户名称}",""&.MyName&"")
S=Replace(S,"{在线状态}",OnlingType)
S=Replace(S,"{帖数}",Session(CacheName & "MyInfo")(4))
S=Replace(S,"{积分数}",Session(CacheName & "MyInfo")(6))
S=Replace(S,"{金钱数}",Session(CacheName & "MyInfo")(7))
S=Replace(S,"{等级}",Session(CacheName & "MyGradeInfo")(2))
Else
S = .ReadSkins("游客信息")
End If
S=Replace(S,"{总帖数}",.InfoUpdate(0))
S=Replace(S,"{主题数}",.InfoUpdate(1))
S=Replace(S,"{今日帖数}",.InfoUpdate(2))
S=Replace(S,"{昨日帖数}",.InfoUpdate(3))
S=Replace(S,"{最高日帖数}",.InfoUpdate(4))
S=Replace(S,"{会员数}",.InfoUpdate(5))
S=Replace(S,"{新会员名称}",.InfoUpdate(6))
If .Info(14)="1" Then
S=Replace(S,"{验证码}",BBS94KK.GetSafeCode)
Else
S=Replace(S,"{验证码}","")
End If
S=Replace(S,"{公告}",.Placard(0))
Response.Write S
End With
End Sub
Sub ShowBoard()
Dim Board,Rs,i,BigBoard,BoardChild,BoardString,BoardStr,II
Dim area,area2,Child,width
With BBS94KK
If Not IsArray(.Board_Rs) Then .GetBoardCache()
If Not IsArray(.Board_Rs) Then Exit Sub
area=.ReadSkins("版块分区表格")
area2=.ReadSkins("版块分区简洁表格")
For i=0 To Ubound(.Board_Rs,2)
' 只显示2级
If .Board_Rs(0,i)<2 Then
' Board_Rs()=0深度+1ID+2父ID+3名称+4图片+5简介+6版主+7认证用+8子论坛个数+9子论组+10组类+11版组
If .Board_Rs(0,i)=0 Then
BoardString=Split(.Board_Rs(11,i),"|")
If BoardString(1)="1" Then
BigBoard=area2
Child=Int(.Board_Rs(8,i))
If Child0 Then
Width=100\Child
Else
width=100\Int(BoardString(2))
End If
II=0
Else
BigBoard=area
End If
If i >= 1 Then
BoardStr=Replace(BoardStr,"{显示版块}",BoardChild)
Board=Board&BoardStr
BoardChild =""
End IF
BoardStr=Replace(BigBoard,"{分类名称}",.Board_Rs(3,i))
Else
If BoardString(1)="1" or Session(CacheName& "BoardStyle")="1" Then
Child=Child-Int(.Board_Rs(8,i))
II=II+1
If II=Int(BoardString(2)) or II=Child Then
BoardChild=BoardChild&""&.GetBoardInfo("1",i)&"
"
Else
BoardChild=BoardChild&""&.GetBoardInfo("1",i)&"
"
End If
If II=Child Then BoardChild=BoardChild&""
Else
BoardChild=BoardChild&.GetBoardInfo("0",i)
End IF
End If
End If
Next
BoardStr=Replace(BoardStr,"{显示版块}",BoardChild)
Board = Board&BoardStr
Response.Write Board
End With
End Sub
Function ShowOnline()
Dim S
S=BBS94KK.ReadSkins("首页在线统计")
S=Replace(S,"{显示在线列表}","")
Dim BrowserType
Set BrowserType=New Cls_Browser
S=Replace(S,"{用户系统}",BrowserType.platform)
S=Replace(S,"{用户浏览器}",BrowserType.Browser & BrowserType.version)
Set BrowserType=Nothing
S=Replace(S,"{用户IP}",BBS94KK.MyIp)
S=Replace(S,"{建站时间}",BBS94KK.Info(5))
S=Replace(S,"{在线总数}",BBS94KK.AllOnlineNum)
S=Replace(S,"{会员数}",BBS94KK.UserOnlineNum)
S=Replace(S,"{游客数}",BBS94KK.AllOnlineNum-BBS94KK.UserOnlineNum)
S=Replace(S,"{在线最大数}",BBS94KK.InfoUpdate(7))
S=Replace(S,"{最大数时间}",BBS94KK.InfoUpdate(8))
If Session(CacheName&"online")="1" then
S=S&""
End If
ShowOnline=S
End Function
'显示生日 94kkBBS2.0没有会员生日时不显示
Sub ShowBirthday()
Dim S
If BBS94KK.Cache.valid("Birthday") then
S=Split(BBS94KK.Cache.Value("Birthday"),"|")
If S(0)="0" Then Exit Sub
BBS94KK.ShowTable S(0),S(1)
Else
Dim Rs,Arr_Rs,I,Num,UserBirthday
Set Rs=BBS94KK.Execute("Select Name,Birthday From [KK_User] where Month(Birthday)=Month(now) and day(Birthday)=day(now)")
IF Not Rs.eof Then Arr_Rs=Rs.getrows()
Rs.Close
Set Rs=Nothing
Num=0
If IsArray(Arr_Rs) Then
For i = 0 to UBound(Arr_Rs,2)
Num=Num+1
UserBirthday=UserBirthday&"
祝"&Arr_Rs(0,i)&"生日快乐 "
Next
End If
If i>5 Then UserBirthday=""
If Num=0 Then
S="0|0"
Else
S="今天共有 "&num&" 位会员过生日"
BBS94KK.ShowTable S,UserBirthday
S=S&"|"&UserBirthday
End If
BBS94KK.Cache.add "Birthday",S,dateadd("n",1200,now)
End If
End Sub
Sub ShowLink()
Dim rs,Arr_Rs,I,Temp,lpic
If BBS94KK.Cache.valid("LinkInfo") then
Temp=BBS94KK.Cache.Value("LinkInfo")
Else
Set Rs=BBS94KK.Execute("Select ID,Orders,BbsName,Url,pic,Readme,pass,Ispic From[KK_Link] where pass=1 and IsIndex=1 order by ispic,orders")
If Rs.Eof Then
Exit Sub
Else
Arr_Rs=Rs.GetRows
Rs.Close
Set Rs=Nothing
For i=0 To Ubound(Arr_Rs,2)
If Arr_rs(7,i)=0 Then lpic=Arr_rs(2,i) Else Lpic="
"
Temp=Temp&""&lpic&" | "
IF (I+1) mod 7 = 0 Then Temp=Temp&""
Next
Temp=""
BBS94KK.Cache.add "LinkInfo",Temp,dateadd("n",10000,now)
End If
End If
BBS94KK.ShowTable "论坛联盟 【全部友情链接】【自助申请连接】",""&Temp&"
"
End Sub
%>