⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 index.asp

📁 BBS论坛的开发和设计
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="admin/BBSConfig.asp"-->
<!--#include file="INC/online.asp"-->
<!--#include file="INC/ShowMsg.asp"-->
<!--#include file="INC/header.asp"-->
<!--#include file="INC/style.asp"-->
<!--#include file="INC/Board_Config.asp"-->
<%
'****************************************************************
'*  joinboard BBS Ver2.3.0/友盟论坛 Ver2.3.0
'*
'*  版权所有: JoinBoard V2.3
'*
'*  程序制作: 友盟工作室
'*           
'*  主页地址: http://joinboard.com    友盟论坛
'*
'*  论坛地址: http://bbs.joinboard.com/、http://youmeng.com
'*	                 
'****************************************************************
'*  Powered by: JoinBoard V2.3
'* Copyright 2003-2004.  - All Rights Reserved.
'*  JoinBoard is a trademark of YouMeng Studio.
'****************************************************************
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="keywords" content="joinboard,forum,bbs,youmeng,友盟论坛">
<title><%=BBS_Config(0)%> - 首页</title>
<link href="<%=Css_path%>" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0">
<%
Call onlineuser()
top()
%>
<table border="0" align="center" cellpadding="4" cellspacing="1"  class="table-noColor">
  <tr> 
    <td width="599" valign="bottom"> 
      <%
	if userOnline = true then
		response.Write("欢迎回来:<strong>"& username &"</strong>&nbsp;<a href=""search.asp?action=search&searchin=Getnew"">查看今日热门贴子</a> | <a href=""search.asp?action=search&username="& username &"&title=yes"">查看您发表的贴子</a><br>您上次访问本站:"&lastonline&"&nbsp;现在时间:"& formatdatetime(Now(),2)&" "& formatdatetime(Now(),4) &"")
	else
		response.Write("欢迎光临 "& BBS_Config(0) &".<br>如果这是您第一次访问本站, 请<a href=""register.asp"">注册</a>才可以看到全部内容和发表你的意见。")
	End if
	%>
    </td>
<%
	All_Board
	postCount = Application(JBBMasterCookies&"postcount")
	threadcount  = postCount(0)
	replycount = postCount(1)
%>
    <td width="355" valign="bottom">
<div align="right">主题总数:<strong><%=threadcount%></strong>&nbsp; 帖子总数:<strong><%=replycount+threadcount%></strong><br>
        注册会员: 
    <%
	if Not(IsArray(Application(JBBMasterCookies&"Home_userInfo"))) then
		userCount = 0
		set rsuser = server.CreateObject("adodb.recordset")
	 	rsuser.open "select userid,username From JBB_user order By userid Desc",conn,1,1
	 	if Not rsuser.eof then
	 		userCount = rsuser.recordCount
	 		Newuser = rtrim(rsuser("username"))
	 		NewuserID = rtrim(rsuser("userID"))
	 	End if
	 	rsuser.close
	 	set rsuser = Nothing
		Application.Lock
			Application(JBBMasterCookies&"Home_userInfo") = array(userCount,Newuser,NewuserID)
		Application.UnLock
	End if
	Home_userInfo = Application(JBBMasterCookies&"Home_userInfo")
	%>
        <strong><%=Home_userInfo(0)%></strong> 位&nbsp;&nbsp; 欢迎新会员:<strong><a href="user.asp?userid=<%=Home_userInfo(2)%>"><%=Home_userInfo(1)%></a></strong></div></td>
  </tr>
</table>
<%
if userOnline<>True then
%>
<table border="0" align="center" cellpadding="3" cellspacing="1" class="table">
  <form name="form1" method="post" action="login.asp?action=check"  onsubmit="return isok(this)">
    <tr> 
      <script language="javascript">
<!--
function isok(theform)
{

if (theform.username.value=="")

  {
    alert("请输入用户名!");
    theform.username.focus();
    return (false);
  }
  
if (theform.userpass.value=="")

  {
    alert("请输入密码!");
    theform.userpass.focus();
    return (false);
  }

return (true);
}
-->
</script>
      <td height="26" class="table-dark"><strong>快速登录</strong>&nbsp;&nbsp;用户名: 
        <input name="username" type="text" id="username2" size="12" maxlength="30">
        密码: 
        <input name="userpass" type="password" id="userpass" size="9" maxlength="16"> 
        <input name="userhidden" type="radio" value="0" checked>
        正常登录 
        <input type="radio" name="userhidden" value="1">
        隐身登录 
        <input type="submit" name="Submit" value=" 登 录 ">
        &nbsp;<a href="register.asp?action=agree">[新用户注册]</a> <a href="lostpass.asp">[忘记密码了]</a></td>
    </tr>
  </form>
</table>
<%
end if
%>
<table width="100" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="2"></td>
  </tr>
</table>
<%
ClassNum = Application(JBBMasterCookies&"ClassNum")
'response.Write(ClassNum)
'response.Write(All_Board_Menu)
if IsNumeric(ClassNum) then
	for Board_Class = 1 to ClassNum
		if IsArray(Application(JBBMasterCookies&"Class"&Board_Class)) then
		ClassL = Application(JBBMasterCookies&"Class"&Board_Class)
		response.Write BBS_Skin(1)
		response.Write "<table border=""0"" align=""center"" cellpadding=""3"" cellspacing=""1"" class=""table"">"
		response.Write "<tr class=""table-title"">"
		response.Write "<td colspan=""6""><div align=""center""><strong>"&ClassL(0)&"</strong></div></td>"
		response.Write "</tr><tr class=""table-title"">"
		response.Write "<td><div align=""center""><strong>图例</strong></div></td>"
		response.Write "<td><div align=""center""><strong>论坛名称</strong></div></td>"
		response.Write "<td width=""58""> <div align=""center""><strong>帖子数量</strong></div></td>"
		response.Write "<td width=""58""> <div align=""center""><strong>主题数量</strong></div></td>"
		response.Write "<td width=""103""> <div align=""center""><strong>最后发表</strong></div></td>"
		response.Write "<td class=""table-title""> <div align=""center""><strong>版 主</strong></div></td>"
		response.Write "</tr>"
		BoardIdValues = ClassL(1)
		BoardArray=split(BoardIdValues,",")
		for board=0 to ubound(BoardArray)
			'response.write BoardArray(board)
			BoardID=BoardArray(board)
			Board_info BoardID
			Board_Config = Application(JBBMasterCookies&"Board_Config"&BoardID)
			response.Write "<tr>"
			response.Write "<td width=""36"" class=""table-light""> <div align=""center""> "
			if Board_Config(18)=True then
				response.Write "<img src="""&BBS_Skin(3)&"lock.gif"">"
			else
				if useronline = true then
					if DATEDIFF("s", Board_Config(11),lastonline)<1 then
						response.Write "<img src="""&BBS_Skin(3)&"on.gif"">"
					else
						response.Write "<img src="""&BBS_Skin(3)&"off.gif"">"
					End if
				else
						response.Write "<img src="""&BBS_Skin(3)&"off.gif"">"			
				End if	
			End if
			response.Write "</div></td>"
			response.Write "<td valign=""top"" class=""table-dark""> <table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"">"
			response.Write "<tr> "
			response.Write "<td valign=""top""><a href=""board.asp?BoardID="& Board_Config(0) &""">"&Board_Config(2)&"</a></td>"
			response.Write "</tr><tr> "
			response.Write "<td>"&Board_Config(3)&"</td>"
			response.Write "</tr></table></td>"
			threadcount=Board_Config(7)
			replycount=Board_Config(8)			
			response.Write "<td class=""table-light""><div align=""center"">"&replycount+threadcount&"</div></td>"
			response.Write "<td class=""table-dark""><div align=""center"">"&threadcount&"</div></td>"
			response.Write "<td width=""120"" class=""table-light""> <div align=""right"">"
			lastpost = Board_Config(12)
			if lastpost <> "" and Board_Config(11) <> "" then
	  			if Len(lastpost) > 9 then lastpost = left(lastpost,8)+"..."	  
				lastuserid = Board_Config(10)
				if lastuserid => 1 then
					lastuser= "<a href=""user.asp?userid="& lastuserid &""">" & Board_Config(9) & "</a>"
				else
					lastuser="游客"
				End if	
	  			response.Write  Month(Board_Config(11)) & "月" & Day(Board_Config(11)) & "日 "& formatDateTime(Board_Config(11),4) &"<br>by "& lastuser &"<br><a title="""& Board_Config(12) &""" href=""showthread.asp?threadid="& Board_Config(13) &"&page=end#end"">"& lastpost &"</a>"
			else
	  			response.Write "暂时没有贴子"
	 		End if
			response.Write "</div></td>"
			response.Write "<td width=""110"" class=""table-dark""> <div align=""center"">"
			response.Write Board_Config(26)'输出版主	
			response.Write "</div></td></tr>"			
		Next'Board
		response.Write "</table>"
		response.Write BBS_Skin(2)
		End if
	Next'Board_Class
End if
%>
<table width="100" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="2"></td>
  </tr>
</table>
<%
'================联盟论坛===================
response.write "<table style=""TABLE-LAYOUT: fixed"" border=""0"" align=""center"" cellpadding=""3"" cellspacing=""1"" class=""table"">"
response.write "<tr>"
response.write "<td class=""table-title"">&nbsp;<img src="""&BBS_Skin(3)&"img.gif"">&nbsp;== 联盟论坛 ==</td></tr>"
if Application(JBBMasterCookies&"linkStr")="" then
set rslink = server.CreateObject("adodb.recordset")
rslink.open "select sitename,siteurl,imgortxt,logo from JBB_link order By siteorder asc",conn,1,1
if Not rslink.eof then
	linkStr = linkStr&"<tr> "
    linkStr = linkStr&"<td class=""table-light"" style=""LEFT: 0px; WIDTH: 100%; WORD-WRAP: break-word"">"
	for text = 1 to rslink.recordcount
		if Not(rslink("imgortxt")) then
			linkStr = linkStr&"<a href="""&rtrim(rslink("siteurl"))&""" target=""_blank"">"&rtrim(rslink("sitename"))&"</a>;&nbsp;" 
    	End if
	rslink.MoveNext
	Next
	rslink.movefirst 
	linkStr = linkStr&"</td></tr><tr><td class=""table-light"">"
  	for img = 1 to rslink.recordcount
		if rslink("imgortxt") then 
			linkStr = linkStr&"<a title="""& rtrim(rslink("sitename")) &""" href="""&rtrim(rslink("siteurl"))&""" target=_blank""><img src="& rtrIm(rslink("logo")) &" width=""88"" height=""31"" border=""0""></a> "
		ENd if
	rslink.MoveNext
	Next
	linkStr = linkStr&"</td></tr>"
End if
rslink.close
set rslink = nothing
Application.Lock
	Application(JBBMasterCookies&"linkStr")=linkStr
Application.UnLock
End if
response.write Application(JBBMasterCookies&"linkStr")
'=========================================================
if BBS_Config(15) = "True" then
	set rsonline = server.CreateObject("adodb.recordset")
	rsonline.open "select Uname,usergroup,userid,userhidden from JBB_online order By userid desc",conn,1,1
	if Not rsonline.Eof then
		useronlinecount = BBS_Config(16)
		onlinecount = rsonline.recordCount
		useronlinecounttime = BBS_Config(17)
		if CINT(useronlinecount) < CINT(onlinecount) then
			Conn.ExeCute("update JBB_config set useronlinecount="& onlinecount &",useronlinecounttime='"& Now() &"'")
			useronlinecounttime = Now()
			ConfigArray2=Application(JBBMasterCookies&"BBS_Config")
			ConfigArray2(16) = onlinecount
			ConfigArray2(17) = useronlinecounttime			
			Application.Lock
				Application(JBBMasterCookies&"BBS_Config")=ConfigArray2
			Application.UnLock
			BBS_Config=Application(JBBMasterCookies&"BBS_Config")			
		End if	
%>
  <tr> 
    <td class="table-title">&nbsp;<img src="<%=BBS_Skin(3)%>img.gif"> <a href="onlinelist.asp">在线用户</a> 
      - 当前共 <%=onlinecount%> 人在线 | 最高纪录于 <%=formatdatetime(BBS_Config(17),2)&" "&formatdatetime(BBS_Config(17),4)%>.有 
      <%=BBS_Config(16)%> 位用户同时在线</td>
  </tr>
  <tr>
    <td class="table-light"> 
      在线名单图例:<img src="images/1.gif" width="16" height="18"> 管理员 ‖<img src="images/2.gif" width="16" height="16"> 
      超级版主 ‖<img src="images/3.gif" width="16" height="16"> 版 主 ‖<img src="images/4.gif" width="16" height="18"> 
      贵 宾 ‖<img src="images/5.gif" width="16" height="15"> 会 员 ‖<img src="images/6.gif" width="16" height="15"> 
      游 客 . 
      <hr size="1">
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
		<%
		for o_tr = 1 to onlinecount
			if rsonline.eof then exit for
		%>
		<tr>
			<%
			for o_td = 1 to 6
				if rsonline.eof then exit for
			%>
          <td> 
            <%
			if rsonline(1) <= 6 then
				userimg="<img src=images/"& rsonline(1) &".gif>"
			End if
			if rsonline(0) <> "游客" then
				if rsonline(3) and usergroup <> 1 then
					response.Write("<img src=images/7.gif> 隐身会员")
				else
					response.Write(userimg+"<a href=""user.asp?userid="& rtrim(rsonline(2)) &""">"&rtrim(rsonline(0))&"</a>")
				End if
			else
				response.Write(userimg & "游客")
			End if
			%>
          </td>
		  	<%
			rsonline.MoveNext
			Next
			%>
        </tr>
		<%
		Next
		%>
      </table></td>
  </tr>
<%
	End if
	rsonline.close
	set rsonline = Nothing
End if
%>
</table>
<table width="60%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="24">&nbsp;</td>
    <td>&nbsp;</td>
    <td width="118">&nbsp;</td>
    <td>&nbsp;</td>
    <td width="118">&nbsp;</td>
    <td>&nbsp;</td>
    <td width="99">&nbsp;</td>
  </tr>
  <tr> 
    <td height="80">&nbsp;</td>
    <td width="32">
<div align="center"><img src="<%=BBS_Skin(3)%>on.gif"></div></td>
    <td>有新帖的论坛</td>
    <td width="35">
<div align="center"><img src="<%=BBS_Skin(3)%>off.gif"></div></td>
    <td>无新帖的论坛</td>
    <td width="35">
<div align="center"><img src="<%=BBS_Skin(3)%>lock.gif"></div></td>
    <td>关闭的论坛</td>
  </tr>
</table>
<br>
<%
'-----------------更新未在线会员最后在线时间-------------------
Conn.ExeCute ("update JBB_user set lastonline=lastactivity where DATEDIFF('s', lastactivity, '"& now() &"') > "& BBS_Config(14) &"*60 and lastonline <> lastactivity")
'-----------------------------------------------------------
Call Bottom()
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -