📄 index.asp
字号:
<!--#include file="up.asp"-->
<script language="JavaScript">
<!--
var checktj;
checktj=1;
function tj0() {
if(onlinetj.style.display=="") {
onlinetj.style.display = "none";
} else {
onlinetj.style.display="";
if (checktj==1) {
tj.location="online.asp?onlinetj=index";
}
checktj=2;
}
}
//-->
</script>
<%
dim newuser,maxonline,maxontime,onnum1,onnum,paper,papern,papers,indexinfo,gonggao,lm,online,realnowtime,nowtime,nowon,strsplit,q1,ties,usern,userinfo,newhotbbs,thisadmin,adi
indexinfo=checknum(request.Cookies(prefix&"1")("indexinfo"))
lm=checknum(request.Cookies(prefix&"1")("lm"))
online=checknum(request.Cookies(prefix&"1")("online"))
newhotbbs=checknum(request.Cookies(prefix&"1")("newhotbbs"))
'===============================================================================
Dim BbsPlacard, BbsPostInfo, BbsLoginInfo
'-------------------------------------------------------------------------------
if indexinfo=1 or indexinfo="" then
set papers=conn.execute("select * from paper where bd=0 order by id desc")
if papers.eof then
BbsPlacard="论坛运行正常,目前暂无公告!"
else
do while not papers.eof
paper=papers("paper")
paper=split(paper,"|")
BbsPlacard="<a onclick=""openscript('paper.asp?id="&papers("id")&"')""><b><font color="""&c3&""">"&kbbs(lefttrue(paper(0),30))&" [ "&paper(2)&" ]</font></b></a>"
papers.movenext
loop
end if
set papers=nothing
end if
'-------------------------------------------------------------------------------
set rs=conn.execute("select maxonline,maxtopic,maxontime,nowtime,todaynum,topicnum,allnum,usernum,newuser from config")
newuser=split(rs("newuser"),"|")
maxonline=rs("maxonline")
maxontime=rs("maxontime")
realnowtime=formatdatetime(now()+timeset/24,2)
nowtime=replace(rs("nowtime"),",","")
if nowtime<>realnowtime then
conn.execute("update bdinfo set todaynum=0")
conn.execute("update config set todaynum=0,nowtime='"&realnowtime&"'")
end if
BbsPostInfo="总帖数:" & rs("allnum") & " 主题数:<b>" & rs("topicnum") & "</b> 最高日帖数:<b>" & rs("maxtopic") & "</b> 今日帖数:<b>" & rs("todaynum") & "</b> 注册会员:<b>" & rs("usernum") & "</b> 最新注册:<a target=""_blank"" href=""userinfo.asp?userid=" & newuser(0) & """ title=""查看 " & kbbs(newuser(1)) & " 的资料""><b><font color=""blue"">" & kbbs(newuser(1)) & "</font></b></a>"
'-------------------------------------------------------------------------------
if isnull(lguserid) or lguserid="" then
BbsLoginInfo="用户名:<input type=""text"" size=""8"" name=""lgname"" /> 密码:<input type=""password"" name=""lgpwd"" size=""8"" />$RegCode$ <input type=""submit"" value=""登陆"" name=""Submit"" /></form>"
if conn.execute("select postcode from config")(0)=0 then
BbsLoginInfo=Replace(BbsLoginInfo,"$RegCode$"," 验证码:<input size=""3"" name=""adminid"" maxlength=""6"" /> <img src=""inc/code.asp"" />")
else
BbsLoginInfo=Replace(BbsLoginInfo,"$RegCode$","")
end if
else
set rs=conn.execute("select*from [user] where name='"&lgname&"'")
q1=rs("mark")
ties=rs("alltopicnum")
set usern=conn.execute("select top 1 userinfo from [user] where userid="&lguserid&"")
userinfo=split(usern("userinfo"),"|")
BbsLoginInfo="<a href=""usersetup.asp"">我的资料</a> | <a href=""elselist.asp?action=mytop"">我发表的帖子</a> | <a href=""sms.asp"">我的论坛留言</a> | <a href=""elselist.asp?action=withmetop"">我参与的帖子</a> | <a href=""sms.asp?action=write"">我要发送短信</a> | <a href=""z_faction.asp"">我的小区帮派</a> | <a href=""z_love.asp"">我的小区恋人</a>"
end if%>
<div id="BBS_HeadInfo" class="BBS_BoardList">
<form method="post" action="login.asp?action=login">
<h1>论坛数据</h1>
<div id="BBS_Placard"><img src="images/Comm/ico_cast.gif" border="0" align="absmiddle" /> <%=BbsPlacard%></div>
<div id="BBS_PostInfo"><img src="images/Comm/ico_state.gif" border="0" align="absmiddle" /> <%=BbsPostInfo%></div>
<div id="BBS_LoginInfo"><img src="images/Comm/ico_user.gif" border="0" align="absmiddle" /> <%=BbsLoginInfo%></div>
</form>
</div>
<%dim rs1,lasttopic,lastinfo
set rs=conn.execute("select * from bdinfo where followid=0 and type<2 order by orders desc,id")
do while not rs.eof
if allthebbs="" then allbbs=allbbs & "<div><a href=""index.asp""><img src=""pic/fl.gif"" border=""0"" align=""absmiddle""> <b>" & rs("bdinfo") & "</b></a></div>"
response.write ttop
response.write "<div class=""BBS_BoardList"">"
response.write " <h1><img border=""0"" src=""pic/fl.gif"" align=""absmiddle"" onclick=""showtb("&rs("id")&")""> "&rs("bdinfo")&"</h1>" & VbCrLf
if rs("type")="1" then
response.write " <div id=""tbtype"&rs("id")&""" style=""display:none;"">" & VbCrLf
else
response.write " <div id=""tbtype"&rs("id")&""">" & VbCrLf
end if
set rs1=conn.execute("select * from bdinfo where followid="&rs("id")&" order by orders desc,id")
do while not rs1.eof
bdinfo=split(rs1("bdinfo"),"|")
if allthebbs="" then allbbs=allbbs & "<div> <a href=""list.asp?bd="&rs1("id")&""">" & bdinfo(0) & "</a></div>"
lasttopic=rs1("lasttopic")
if isnull(lasttopic) or lasttopic="" then
lastinfo="本版面还没有帖子!"
elseif rs1("type")=3 or rs1("type")=4 then
lastinfo="VIP或认证版面,数据不对外公开!"
else
lasttopic=split(lasttopic,"|")
lastinfo="作者:<a href=""userinfo.asp?userid="&lasttopic(0)&""">"&kbbs(lasttopic(1))&"</a><br />时间:"&lasttopic(2)&"<br />内容:<img src=""images/face/"&lasttopic(4)&".gif"" align=""middle""> <a href=""show.asp?bd="&rs1("id")&"&id="&lasttopic(5)&"&totable="&lasttopic(6)&"&topage="&lasttopic(7)&""">"&kbbs(lasttopic(3))&"</a>"
end if%>
<table border="0" cellspacing="1" cellpadding="3" class="BBS_Board">
<tr>
<td width="60" rowspan="3" align="center" valign="middle"><img border="0" src="images/skin/<%=sid%>/type<%=rs1("type")%>.gif" /></td>
<td><a href="list.asp?bd=<%=rs1("id")%>"><%=bdinfo(0)%></a></td>
<td width="80" rowspan="3" align="center" valign="middle">
<%if not (isnull(bdinfo(2)) or bdinfo(2)="") then response.write "<img border=""0"" src=""" & bdinfo(2) & """ />"%>
</td>
<td width="30%" rowspan="2"><%=lastinfo%></td>
</tr>
<tr>
<td><img src="pic/tl.gif" hspace="5" border="0" align="absmiddle" /><%=bdinfo(1)%></td>
</tr>
<tr>
<td>
<%if isnull(rs1("admin")) or rs1("admin")="" then
response.write "版主征集中ING"
else
response.write"本版版主:"
adi=0
thisadmin=split(kbbs(rs1("admin")),"|")
do while thisadmin(adi)<>""
response.write "<a href=userinfo.asp?username="&trim(thisadmin(adi))&" title=查看该版主的资料>"&thisadmin(adi)&"</a> "
adi=adi+1
loop
end if%>
</td>
<td width="30%">话题:<%=rs1("topicnum")%> 今日帖数:<font color="red"><%=rs1("todaynum")%></font></td>
</tr>
</table>
<%rs1.movenext
Loop
rs1.Close
set rs1=nothing
response.write " </div>" & VbCrLf
response.write "</div>" & VbCrLf
response.write tbottom
rs.movenext
Loop
rs.Close
set rs=nothing
if allthebbs="" then
allbbs="<div class=""BBS_NavMenuItem"">" & allbbs & "</div>"
response.write"<script language=""JavaScript"">var allthebbs='" & allbbs & "';</script>"
application(prefix&"allthebbs")=allbbs
End if
if isnull(lguserid) or lguserid="" then
if conn.execute("select userid from online where ip='"&ip&"'").eof then
sql="insert into online(ip,lasttime,onbd) values('"&ip&"',now(),0)"
else
sql="update online set userid=0,name='',lasttime=now(),pic=0,onbd=0,nowon='' where ip='"&ip&"'"
end if
else
if conn.execute("select userid from online where userid="&lguserid&" or ip='"&ip&"'").eof then
if lgtype=2 then
sql="insert into online(userid,name,ip,lasttime,pic,onbd) values("&lguserid&",'"&lgname&"','"&ip&"',now(),6,0)"
else
sql="insert into online(userid,name,ip,lasttime,pic,onbd) values("&lguserid&",'"&lgname&"','"&ip&"',now(),"&usertype&",0)"
end if
else
sql="update online set userid="&lguserid&",name='"&lgname&"',ip='"&ip&"',lasttime=now(),pic="&usertype&",onbd=0,nowon='' where ip='"&ip&"' or userid="&lguserid&""
end if
end if
conn.execute(sql)
if online=1 or online="" then
conn.execute("delete from online where now()-lasttime>"&onlinetime&"/24")
dim sql
sql="select * from online order by userid desc"
set rs = server.createobject("adodb.recordset")
rs.Open sql,conn,1
onnum=rs.recordcount
onnum=conn.execute("select count(userid) from online")(0)
if int(onnum)>=int(maxonline) then
conn.execute("update [config] set maxonline="&onnum&",maxontime=now+"×et&"/24")
maxonline=onnum
maxontime=now+timeset/24
end if
strsplit=split(Request.Servervariables("HTTP_USER_AGENT"),";")
strsplit(1)=replace(strsplit(1),"MSIE","Internet Explorer")
strsplit(2)=replace(strsplit(2),")","")
strsplit(2)=replace(strsplit(2),"NT 5.2","2003")
strsplit(2)=replace(strsplit(2),"NT 5.1","XP")
strsplit(2)=replace(strsplit(2),"NT 5.0","2000")
strsplit(1)=Trim(strsplit(1))
strsplit(2)=Trim(strsplit(2))
onnum1=conn.execute("select count(userid) from online where userid=0")(0)%>
<div id="BBS_Online" class="BBS_BoardList">
<h1><img src="pic/gl.gif" border="0" align="absmiddle" style="cursor: hand;" title="详细列表" onclick="tj0()" /> 在线统计</h1>
<table border="0" width="95%" cellspacing="0" cellpadding="3" align="center">
<tr valign="middle">
<td><font face="Wingdings" color="#9ec750">v</font> 在线人数:<font color="blue"><b><%=onnum%></b></font> 人</td>
<td><font face="Wingdings" color="#9ec750">v</font> 最高在线:<b><%=maxonline%></b> 人</td>
<td><font face="Wingdings" color="#9ec750">v</font> 您的IP是:<b><%=ip%></b></td>
</tr>
<tr valign="middle">
<td><font face="Wingdings" color="#9ec750">v</font> 在线会员:<b><%=onnum-onnum1%></b> 人</td>
<td><font face="Wingdings" color="#9ec750">v</font> 发生时间:<b><%=maxontime%></b></td>
<td><font face="Wingdings" color="#9ec750">v</font> 操作系统:<b><%=strsplit(2)%></b></td>
</tr>
<tr valign="middle">
<td><font face="Wingdings" color="#9ec750">v</font> 在线访客:<b><%=onnum1%></b> 人</td>
<td><font face="Wingdings" color="#9ec750">v</font> 建站时间:<b><%=bbsinfo(26)%></b></td>
<td><font face="Wingdings" color="#9ec750">v</font> 浏 览 器:<b><%=strsplit(1)%></b></td>
</tr>
</table>
<div id="onlinetj" style="display:none"><iframe name="tj" marginwidth="3" marginheight="3" width="100%" border="0" frameborder="0" height="80"></iframe></div>
<h2><b>每日贴士:</b><script language=Javascript src=plus/tie.js></script></h2>
</div>
<%if lm=1 or lm="" then
if thebbslink="" then
dim showlink,td
set rs=conn.execute("select * from bbslink where bbslinktype=1 and new=0")
td=1
do while not rs.eof
showlink=rs("name")
thebbslink2=thebbslink2&"<li><a title="""&kbbs(rs("readme"))&""" target=""_blank"" href="""&rs("url")&""">"&showlink&"</a></li>"
rs.movenext
loop
set rs=nothing
thebbslink2="<ul>" & thebbslink2 & "</ul><ul>"
set rs=conn.execute("select * from bbslink where bbslinktype=2 and new=0")
do while not rs.eof
showlink="<img src="&rs("picurl")&" border=0>"
thebbslink2=thebbslink2&"<li><a title="""&kbbs(rs("readme"))&""" target=""_blank"" href="""&rs("url")&""">"&showlink&"</a></li>"
rs.movenext
loop
set rs=nothing
thebbslink2=thebbslink2 & "</ul>"
application(prefix&"thebbslink")=thebbslink2
thebbslink=thebbslink2
end if
response.write ttop%>
<div id="BBS_Link" class="BBS_BoardList">
<h1><img src="pic/gl.gif" border="0" align="absmiddle"> 论坛联盟 ± <a href="link.asp" title="加入连接">加入连接</a></h1>
<%=thebbslink2%>
</div>
<%=tbottom%>
<%end if%>
<div id="BBS_ICON">
<div><img src="images/skin/<%=sid%>/type0.gif" align="absMiddle" border="0"> 普通版面   <img src="images/skin/<%=sid%>/type1.gif" align="absMiddle" border="0"> 会员版面   <img src="images/skin/<%=sid%>/type2.gif" align="absMiddle" border="0"> 只读版面   <img src="images/skin/<%=sid%>/type3.gif" align="absMiddle" border="0"> 认证版面   <img src="images/skin/<%=sid%>/type4.gif" align="absMiddle" border="0"> Vip版面</div>
<div><img border="0" src="pic/0.gif" align="absmiddle" /> 游客   <img border="0" src="pic/1.gif" align="absmiddle" /> 会员   <img border="0" src="pic/6.gif" align="absmiddle" /> 隐士   <img border="0" src="pic/2.gif" align="absmiddle" /> VIP会员   <img border="0" src="pic/3.gif" align="absmiddle" /> 版主   <img border="0" src="pic/4.gif" align="absmiddle" /> 超级版主   <img border="0" src="pic/5.gif" align="absmiddle" /> 管理员</div>
</div>
<% response.write tbottom
if checknum(bbsinfo(23))=0 then response.write"<script language=""JavaScript"">onlinetj.style.display='';tj.location='online.asp?onlinetj=index';</script>"
end if
call down%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -