|
我的论坛代码(申请加精)
<!--#include file="inc.asp"-->
<!--#include file="inc/Cls_Brower.asp"-->
<%Dim PageString
BBS94KK.Head("首页")
If BBS94KK.BbsCache(12)="0" then PageString=ShowInfo()
PageString=PageStringShowBoard()
If BBS94KK.BbsCache(15)="0" then PageString=PageStringShowOnline()
Response.Write PageString "<iframe name='hiddenframe' frameborder='0' height='0' id='hiddenframe'></iframe>"
If BBS94KK.BbsCache(37)="0" then ShowBirthday()
If BBS94KK.BbsCache(13)="0" then ShowLink()
ShowBoardTypePic()
BBS94KK.Footer()
Set Cache=Nothing
Set BBS94KK = Nothing
Function ShowInfo()
Dim Temp,OnlingType
If BBS94KK.FoundUser Then
Temp = BBS94KK.Template.ReadTemplate("用户信息")
If BBS94KK.MyIsQQpic Then
Temp=Replace(Temp,"{用户头像}","<img src='http://qqshow-user.tencent.com/"BBS94KK.MyQQ&"/11/'>")
Else
Temp=Replace(Temp,"{用户头像}","<img src="BBS94KK.Mypic&" width="&BBS94KK.Mypicw&" height="&BBS94KK.Mypich&" >")
End if
If BBS94KK.MyHidden=2 Then
Temp=Replace(Temp,"{用户名称}","<a href='UserInfo.asp' title='查自己的资料信息'>"BBS94KK.MyName&"</a>")
Temp=Replace(Temp,"{在线状态}",OnlingType)
Temp=Replace(Temp,"{金钱数}",BBS94KK.MyCoin)
Temp=Replace(Temp,"{积分数}",BBS94KK.MyMark)
Temp=Replace(Temp,"{帖数}",BBS94KK.MyEssayNum)
Temp=Replace(Temp,"{等级}",BBS94KK.MyGrade)
Temp=Replace(Temp,"{等级名称}",BBS94KK.GradeName(cint(BBS94KK.MyGrade)))
Else
Temp = BBS94KK.Template.ReadTemplate("快速登陆")
End If
Temp=Replace(Temp,"{公告}",BBS94KK.Placard(0))
Temp=Replace(Temp,"{新会员名称}",BBS94KK.NewUser)
Temp=Replace(Temp,"{今日帖数}",BBS94KK.TodayNum)
Temp=Replace(Temp,"{最高日帖数}",BBS94KK.MaxEssayNum)
Temp=Replace(Temp,"{主题数}",BBS94KK.TopicNum)
Temp=Replace(Temp,"{总帖数}",BBS94KK.AllEssayNum)
Temp=Replace(Temp,"{会员数}",BBS94KK.UserNum)
Temp=Replace(Temp,"{昨日帖数}",BBS94KK.YsterdayNum)
ShowInfo=Temp
End Function
Function ShowBoard()
Dim Rs,Temp,i,BigBoard,BoardChild,BoardBottom,BoardStr
BigBoard=BBS94KK.Template.ReadTemplate("分区表格")
BoardChild=BBS94KK.Template.ReadTemplate("版块列表")
BoardBottom=BBS94KK.Template.ReadTemplate("分区底部表格")
If Not IsArray(BBS94KK.Board_Rs) Then BBS94KK.CacheBoard()
If Not IsArray(BBS94KK.Board_Rs) Then
Temp=BBS94KK.Template.ReadTemplate("内容表格")
Temp=Replace(Temp,"{标题}","<p>论坛版块还没建立</p>")
Temp=Replace(Temp,"{内容}","请到后台建立论坛版块!")
ShowBoard=Temp
Exit Function
End if
For i=0 To Ubound(BBS94KK.Board_Rs,2)
If BBS94KK.Board_Rs(0,i)<2 Then
Temp=""
If BBS94KK.Board_Rs(0,i)=0 Then
If i >= 1 Then Temp = Temp BoardBottom & VbCrlf
Temp = Temp Replace(BigBoard,"{分类名称}",BBS94KK.Board_Rs(3,i))
Else
Temp=BoardChild
Temp=BBS94KK.GetBoardInfo(Temp,i)
End If
BoardStr=BoardStr Temp
End If
Next
ShowBoard = BoardStr BoardBottom & VbCrlf
End Function
Function ShowOnline()
Dim Temp
Temp=BBS94KK.Template.ReadTemplate("在线统计")
Temp=Replace(Temp,"{在线列表}","<span id=showon></span>")
Dim BrowserType
Set BrowserType=New Cls_Browser
Temp=Replace(Temp,"{用户系统}",BrowserType.platform)
Temp=Replace(Temp,"{用户浏览器}",BrowserType.Browser BrowserType.version)
Set BrowserType=Nothing
Temp=Replace(Temp,"{用户IP}",BBS94KK.MyIp)
Temp=Replace(Temp,"{建站时间}",FORMATDATETIME(BBS94KK.BuildDate,1))
Temp=Replace(Temp,"{在线总数}",BBS94KK.AllOnlineNum)
Temp=Replace(Temp,"{会员数}",BBS94KK.UserOnlineNum)
Temp=Replace(Temp,"{游客数}",BBS94KK.AllOnlineNum-BBS94KK.UserOnlineNum)
Temp=Replace(Temp,"{在线最大数}",BBS94KK.MaxOnlineNum)
Temp=Replace(Temp,"{最大数时间}",BBS94KK.MaxOnlineTime)
If Session(BBS94KK.CacheName"online")="1" then
Temp=Replace(Temp,"{在线列表开关}","<a target='hiddenframe' href='online.asp' ><span id='Showtxt' >关闭详细列表</span></a>")
Temp=Temp"<iframe frameborder='0' height='0' src='online.asp?id=1'></iframe>"
Else
Temp=Replace(Temp,"{在线列表开关}","<a target='hiddenframe' href='online.asp' ><span id='Showtxt' >显示详细列表</span></a>")
End If
ShowOnline=Temp
End Function
Sub ShowLink()
Call BBS94KK.ShowTable("论坛联盟 【<a href=link.asp target='hiddenframe' onclick=AutoLink()>自助申请连接</a>】","<span id=ShowLinkjs><SCRIPT src=Inc/Link.js></SCRIPT></span><span id=ShowLink></span>")
End Sub
Sub ShowBoardTypePic()
Response.Write BBS94KK.Template.ReadTemplate("首页图例")
End Sub
Sub ShowBirthday
Dim UserBirthday,temp,rs,Arr_Rs,i,Num
Cache.Name="Birthday"
If Cache.valid then
Temp=Split(Cache.Value,"|")
Num=Temp(0)
UserBirthday=Temp(1)
Else
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
Num=0
If IsArray(Arr_Rs) Then
For i = 0 to UBound(Arr_Rs,2)
Num=Num+1
UserBirthday=UserBirthday" <img src=images/Birthday.gif><a href=userinfo.asp?name="&Arr_Rs(0,i)&">祝"&Arr_Rs(0,i)&"生日快乐</a> "
Next
End If
If i>5 Then UserBirthday="<marquee scrollamount='3' >"UserBirthday&"</marquee>"
Temp=Num"|"&UserBirthday
Cache.add Temp,dateadd("n",100,now)
End If
Call BBS94KK.ShowTable("今天共有 "num&" 位会员过生日",UserBirthday)
End Sub
%> |
|