Default.Asp
上传用户:btntkt
上传日期:2021-04-16
资源大小:5296k
文件大小:10k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

DOS

  1. <!--#include file="Inc/SysConfig.Asp"-->
  2. <%
  3. Dim PageString,GCode
  4. YxBBs.Head("论坛首页")
  5. If YxBBs.BBSSetting(7)="0" then PageString=ShowInfo()
  6. PageString=PageString&ShowBoard()
  7. If YxBBs.BBSSetting(10)="0" then PageString=PageString&ShowOnline()
  8. Response.Write PageString &"<iframe name='hiddenframe' frameborder='0' height='0' id='hiddenframe'></iframe>"
  9. If YxBBs.BBSSetting(32)="0" then ShowBirthday()
  10. If YxBBs.BBSSetting(8)="0" then ShowLink()
  11. YxBBs.Footer()
  12. Set Cache = Nothing
  13. Set YxBBs = Nothing
  14. Function ShowInfo()
  15. Dim Temp,OnlingType
  16. If YxBBs.FoundUser Then
  17. Temp = YxBBs.Template.ReadTemplate("用户信息")
  18. If YxBBs.MyIsQQpic Then
  19. Temp=Replace(Temp,"{用户头像}","<img src='http://qqshow-user.tencent.com/"&YxBBs.MyQQ&"/11/'>")
  20. Else
  21. Temp=Replace(Temp,"{用户头像}","<img src="&YxBBs.Mypic&" width="&YxBBs.Mypicw&" height="&YxBBs.Mypich&" >")
  22. End if
  23. OnlingType="<font Color=Red>[在线]</Font>"
  24. If YxBBs.MyHidden=2 Then OnlingType="<font Color=Red>[隐身]</Font>"
  25. Temp=Replace(Temp,"{用户名称}","<a href='Profile.Asp' title='查自己的资料信息'>"&YxBBs.MyName&"</a>")
  26. Temp=Replace(Temp,"{在线状态}",OnlingType)
  27. Temp=Replace(Temp,"{金钱数}",YxBBs.MyCoin)
  28. Temp=Replace(Temp,"{Y币}",""&YxBBs.BBSSetting(23)&":<font color=red>"&YxBBs.MyMark&"</font>")
  29. Temp=Replace(Temp,"{帖数}",YxBBs.MyEssayNum)
  30. Temp=Replace(Temp,"{等级名称}",YxBBs.MyGradeName)
  31. Else
  32. Temp = YxBBs.Template.ReadTemplate("快速登陆")
  33. End If 
  34. Temp=Replace(Temp,"{公告}",YxBBs.Srule)
  35.         Temp=Replace(Temp,"{新会员名称}",YxBBs.NewUser) 
  36. Temp=Replace(Temp,"{今日帖数}",YxBBs.TodayNum)
  37. Temp=Replace(Temp,"{最高日帖数}",YxBBs.MaxEssayNum)
  38. Temp=Replace(Temp,"{主题数}",YxBBs.TopicNum)
  39. Temp=Replace(Temp,"{总帖数}",YxBBs.AllEssayNum)
  40. Temp=Replace(Temp,"{会员数}",YxBBs.UserNum)
  41. Temp=Replace(Temp,"{昨日帖数}",YxBBs.YsterdayNum)
  42.         If Cint(YxBBs.BBSSetting(6))=0 Then 
  43.         Temp=Replace(Temp,"{验证码}",YxBBs.GCode)
  44.         else
  45.         Temp=Replace(Temp,"{验证码}","")
  46.         end if
  47. ShowInfo=Temp
  48. End Function
  49. Function ShowBoard()
  50. Dim Rs,Temp,i,BigBoard,BoardChild,BoardBottom,BoardStr
  51. BigBoard=YxBBs.Template.ReadTemplate("分区表格")
  52. BoardChild=YxBBs.Template.ReadTemplate("版块列表")
  53. BoardBottom=YxBBs.Template.ReadTemplate("分区底部表格")
  54. If Not IsArray(YxBBs.Board_Rs) Then YxBBs.CacheBoard()
  55. If Not IsArray(YxBBs.Board_Rs) Then Exit Function
  56. For i=0 To Ubound(YxBBs.Board_Rs,2)
  57. If YxBBs.Board_Rs(0,i)<2 Then
  58. Temp=""
  59. If YxBBs.Board_Rs(0,i)=0 Then
  60. If i >= 1 Then Temp = Temp & BoardBottom & VbCrlf
  61. Temp = Temp & Replace(BigBoard,"{分类名称}",YxBBs.Board_Rs(3,i))
  62. Else
  63. Temp=BoardChild
  64. Temp=YxBBs.GetBoardInfo(Temp,i)
  65. End If
  66. BoardStr=BoardStr & Temp
  67. End If
  68. Next
  69. ShowBoard = BoardStr& BoardBottom & VbCrlf
  70. End Function
  71. Function ShowOnline()
  72. Dim Temp
  73. Temp=YxBBs.Template.ReadTemplate("在线统计")
  74. Temp=Replace(Temp,"{在线列表}","<span id=showon></span>")
  75. Dim BrowserType
  76. Set BrowserType=New Cls_Browser
  77. Temp=Replace(Temp,"{用户系统}",BrowserType.platform)
  78. Temp=Replace(Temp,"{用户浏览器}",BrowserType.Browser & BrowserType.version)
  79. Set BrowserType=Nothing
  80. Temp=Replace(Temp,"{用户IP}",YxBBs.MyIp)
  81. Temp=Replace(Temp,"{建站时间}",FORMATDATETIME(YxBBs.BuildDate,1))
  82. Temp=Replace(Temp,"{在线总数}",YxBBs.AllOnlineNum)
  83. Temp=Replace(Temp,"{会员数}",YxBBs.UserOnlineNum)
  84. Temp=Replace(Temp,"{游客数}",YxBBs.AllOnlineNum-YxBBs.UserOnlineNum)
  85. Temp=Replace(Temp,"{在线最大数}",YxBBs.MaxOnlineNum)
  86. Temp=Replace(Temp,"{最大数时间}",YxBBs.MaxOnlineTime)
  87. If Session(YxBBs.CacheName&"online")="1" then
  88. Temp=Replace(Temp,"{在线列表开关}","<a target='hiddenframe' href='Online.Asp?Action=LoadIng' onClick='ShowOnline();' ><span id='Showtxt' >关闭详细列表</span></a>")
  89. Temp=Temp&"<iframe frameborder='0'  height='0' src='Online.Asp?Action=LoadIng&id=1'></iframe>"
  90. Else
  91. Temp=Replace(Temp,"{在线列表开关}","<a target='hiddenframe' href='Online.Asp?Action=LoadIng' onClick='ShowOnline();' ><span id='Showtxt' >显示详细列表</span></a>")
  92. End If
  93. ShowOnline=Temp
  94. End Function
  95. Sub ShowLink()
  96. Dim Link_List,LogoLink,TxtLink,Rs,Arr_Rs,I,Sql,j,k
  97. Cache.Name="Link_List"
  98. If Cache.Valid then
  99. Link_List=Cache.Value
  100. Else
  101. Sql = "Select BbsName,Url,Pic,Readme,IsPic From [YX_Link] Where  Orders  order by Orders Asc"
  102. If Not IsObject(Conn) Then ConnectionDatabase
  103. Set Rs = Server.CreateObject("Adodb.RecordSet")
  104. Rs.open Sql,Conn,1,1
  105. SqlNum=SqlNum+1
  106. If Not(rs.eof or rs.bof) Then Arr_Rs = Rs.getrows()
  107. Rs.Close:Set Rs=Nothing
  108. If IsArray(Arr_Rs) Then
  109. TxtLink="":LogoLink="":j=0:k=0
  110. For i = 0 to UBound(Arr_Rs,2)
  111. If Arr_Rs(4,i) And Arr_Rs(2,i)<>"" Then
  112. j=j+1
  113. LogoLink=LogoLink&"<td align=""center""><a href="""&Arr_Rs(1,i)&""" target=""_blank""><img src="""&Arr_Rs(2,i)&""" border=""0"" alt=""::"&Arr_Rs(0,i)&"::"&Arr_Rs(3,i)&""" width=""88"" height=""31""></a></td>"
  114. If j=7 Then j=0:LogoLink=LogoLink&"</tr><tr>"
  115. Else
  116. k=k+1
  117. TxtLink=TxtLink&"<td align=""center""><a href="""&Arr_Rs(1,i)&""" target=""_blank"" title="""&Arr_Rs(3,i)&""">"&Arr_Rs(0,i)&"</a></td>"
  118. If k=7 Then k=0:TxtLink=TxtLink&"</tr><tr>"
  119. End If
  120. Next
  121. End If
  122. Link_List="<tr><td align=""center""><table width=""100%"" border=""0"" cellpadding=""4"" cellspacing=""0""><tr>"&TxtLink&"</tr></table><table width=""100%"" border=""0"" cellpadding=""4"" cellspacing=""0""><tr>"&LogoLink&"</tr></table></td></tr>"
  123. Cache.add Link_List,dateadd("n",5000,YxBBs.NowBBSTime)
  124. End If
  125. Call YxBBs.ShowTable("论坛联盟",Link_List)
  126. End Sub
  127. Sub ShowBirthday()
  128. Dim UserBirthday,temp,rs,Arr_Rs,i,Num
  129. Cache.Name="Birthday"
  130. If Cache.valid then
  131. Temp=Split(Cache.Value,"|")
  132. Num=Temp(0)
  133. UserBirthday=Temp(1)
  134. Else
  135. Set Rs=YxBBs.Execute("Select Name,Birthday From[YX_User] where Month(Birthday)=Month(now) and day(Birthday)=day(now) and Birthday<>Cdate('1900-1-1')")
  136. IF Not Rs.eof Then Arr_Rs=Rs.getrows()
  137. Rs.Close
  138. Num=0
  139. If IsArray(Arr_Rs) Then
  140. For i = 0 to UBound(Arr_Rs,2)
  141. Num=Num+1
  142. UserBirthday=UserBirthday&"  <a href=Profile.Asp?Name="&Arr_Rs(0,i)&"><img src=Images/Birthday.gif align=""absmiddle"" border=0> 祝["&Arr_Rs(0,i)&"]生日快乐</a>  "
  143. Next
  144. End If
  145. If i>3 Then UserBirthday="<marquee onMouseOver='this.stop()' onMouseOut='this.start()' scrollamount='3' >"&UserBirthday&"</marquee>"
  146. Temp=Num&"|"&UserBirthday
  147. Cache.add Temp,dateadd("n",100,now)
  148. End If
  149. If num > 0 Then
  150. Call YxBBs.ShowTable("今天共有 "&num&" 位会员过生日","<tr><td height=30>"&UserBirthday&"</td></tr>")
  151. End If
  152. End Sub
  153. %>
  154. <%
  155. Class Cls_Browser
  156. Public Browser,version,platform,IsSearch
  157. Private Sub Class_Initialize()
  158. Dim Agent,Tmpstr
  159. Agent=Request.ServerVariables("HTTP_USER_AGENT")
  160. 'Agent="Opera/7.23 (X11; Linux i686; U)  [en]"
  161. If Left(Agent,7) ="Mozilla" Then
  162. Agent=Split(Agent,";")
  163. If InStr(Agent(1),"MSIE")>0 Then
  164. Browser="Internet Explorer "
  165. version=Trim(Left(Replace(Agent(1),"MSIE",""),6))
  166. ElseIf InStr(Agent(4),"Netscape")>0 Then 
  167. Browser="Netscape "
  168. tmpstr=Split(Agent(4),"/")
  169. version=tmpstr(UBound(tmpstr))
  170. ElseIf InStr(Agent(4),"rv:")>0 Then
  171. Browser="Mozilla "
  172. tmpstr=Split(Agent(4),":")
  173. version=tmpstr(UBound(tmpstr))
  174. If InStr(version,")") > 0 Then 
  175. tmpstr=Split(version,")")
  176. version=tmpstr(0)
  177. End If
  178. End If
  179.                         If InStr(Agent(2),"NT 6.0")>0 Then 
  180. platform="Windows vista"
  181. ElseIf InStr(Agent(2),"NT 5.2")>0 Then
  182. platform="Windows 2003"
  183. ElseIf InStr(Agent(2),"Windows CE")>0 Then
  184. platform="Windows CE"
  185. ElseIf InStr(Agent(2),"NT 5.1")>0 Then
  186. platform="Windows XP"
  187. ElseIf InStr(Agent(2),"NT 4.0")>0 Then
  188. platform="Windows NT"
  189. ElseIf InStr(Agent(2),"NT 5.0")>0 Then
  190. platform="Windows 2000"
  191. ElseIf InStr(Agent(2),"NT")>0 Then
  192. platform="Windows NT"
  193. ElseIf InStr(Agent(2),"9x")>0 Then
  194. platform="Windows ME"
  195. ElseIf InStr(Agent(2),"98")>0 Then
  196. platform="Windows 98"
  197. ElseIf InStr(Agent(2),"95")>0 Then
  198. platform="Windows 95"
  199. ElseIf InStr(Agent(2),"Win32")>0 Then
  200. platform="Win32"
  201. ElseIf InStr(Agent(2),"Linux")>0 Then
  202. platform="Linux"
  203. ElseIf InStr(Agent(2),"SunOS")>0 Then
  204. platform="SunOS"
  205. ElseIf InStr(Agent(2),"Mac")>0 Then
  206. platform="Mac"
  207. ElseIf UBound(Agent)>2 Then
  208. If InStr(Agent(3),"NT 5.1")>0 Then
  209. platform="Windows XP"
  210. End If 
  211. If InStr(Agent(3),"Linux")>0 Then
  212. platform="Linux"
  213. End If
  214. End If
  215. If InStr(Agent(2),"Windows")>0 And platform="unknown" Then
  216. platform="Windows"
  217. End If
  218. ElseIf Left(Agent,5) ="Opera" Then
  219. Agent=Split(Agent,"/")
  220. Browser="Mozilla "
  221. tmpstr=Split(Agent(1)," ")
  222. version=tmpstr(0)
  223.                         If InStr(Agent(1),"NT 6.0")>0 Then 
  224. platform="Windows vista"
  225. ElseIf InStr(Agent(1),"NT 5.2")>0 Then
  226. platform="Windows 2003"
  227. ElseIf InStr(Agent(1),"Windows CE")>0 Then
  228. platform="Windows CE"
  229. ElseIf InStr(Agent(1),"NT 5.1")>0 Then
  230. platform="Windows XP"
  231. ElseIf InStr(Agent(1),"NT 4.0")>0 Then
  232. platform="Windows NT"
  233. ElseIf InStr(Agent(1),"NT 5.0")>0 Then
  234. platform="Windows 2000"
  235. ElseIf InStr(Agent(1),"NT")>0 Then
  236. platform="Windows NT"
  237. ElseIf InStr(Agent(1),"9x")>0 Then
  238. platform="Windows ME"
  239. ElseIf InStr(Agent(1),"98")>0 Then
  240. platform="Windows 98"
  241. ElseIf InStr(Agent(1),"95")>0 Then
  242. platform="Windows 95"
  243. ElseIf InStr(Agent(1),"Win32")>0 Then
  244. platform="Win32"
  245. ElseIf InStr(Agent(1),"Linux")>0 Then
  246. platform="Linux"
  247. ElseIf InStr(Agent(1),"SunOS")>0 Then
  248. platform="SunOS"
  249. ElseIf InStr(Agent(1),"Mac")>0 Then
  250. platform="Mac"
  251. ElseIf UBound(Agent)>2 Then
  252. If InStr(Agent(3),"NT 5.1")>0 Then
  253. platform="Windows XP"
  254. End If 
  255. If InStr(Agent(3),"Linux")>0 Then
  256. platform="Linux"
  257. End If
  258. End If
  259. Else
  260. '识别搜索引擎
  261. Dim botlist,i
  262. Botlist="Google,Isaac,SurveyBot,Baiduspider,ia_archiver,P.Arthur,FAST-WebCrawler,Java,Microsoft-ATL-Native,TurnitinBot,WebGather,Sleipnir"
  263. Botlist=split(Botlist,",")
  264. For i=0 to UBound(Botlist)
  265. If InStr(Agent,Botlist(i))>0  Then 
  266. platform=Botlist(i)&"搜索器"
  267. IsSearch=True
  268. Exit For
  269. End If
  270. Next 
  271. End If
  272. End Sub
  273. End Class
  274. %>