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

📄 index2.asp

📁 仿雅虎论坛静态生成html版 后台管理:admin/admin.asp 用户名:admin 密码:admin TOP/top.htm 顶部模板 left.htm 左边树形菜单模板
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="../conn.asp"-->
<!--#include file="Const.asp"-->
<!--#include file="BtBBS_Fun.asp"-->
<%
response.buffer=true
dim username,login
dim StarTime,EndTime,AccessNum
dim bbsid,link1,link2,rs1id,fileid
dim rs,bbsfltable,indexidimage,rs2,titleinfo,test,wz,bz,lens,p,titlename,fmname,fmtime,bbsfltable1,bbsfltable2,i,aRS
StarTime = Timer():AccessNum=0
username=Request.Cookies("username")
login=Request.Cookies("login")
Call JCC_Board_Top
Server.ScriptTimeout=10
Call Login_EN
Call InfoNum
bbsid=Request.QueryString("bbsid")
if bbsid="" then '如果不指定论坛,则显示所有论坛
 Response.Write "<br>"
 if Application(BBSname&"index")="" then Call BBSIndex else Response.Write Application(BBSname&"index") end if
else
 Call BBSList
end if

'计算帖子数
'================================================
 BT_Board():aRS=Application(BBSname&"BT_Board")
 For j=0 to UBound(aRS,2)
    fileznum=fileznum+aRS(8,j)
    filelnum=filelnum+aRS(9,j)
 Next
 filenum=fileznum+filelnum
 
 set rs=conn.Execute("select count(id) as num FROM BT_Topic where datediff('d',LastPostTime,now())=0")
 'set rs=conn.Execute("select count(id) as num FROM BT_Topic where day(PostTime)=day(now())")
 nowfile=rs("num")
 rs.close
'================================================

Response.Write "<table width=743 border=0 cellspacing=0 cellpadding=0 align=center><tr><td height=27 class=light1 colspan=2>&nbsp;<font class=HeadFont><b>论坛及用户来访信息</b></font></td></tr>"
Response.Write "<tr><td height=18 class=light0>&nbsp;<font color=#888888>■</font>I P 地址:&nbsp;"&youipdress&"</td></tr>"
Response.Write "<tr><td height=18 class=light0>&nbsp;<font color=#888888>■</font>系统信息:&nbsp;"&GetSBInfo(Request.ServerVariables("HTTP_USER_AGENT"),1)&"&nbsp;"&GetSBInfo(Request.ServerVariables("HTTP_USER_AGENT"),2)&"</td></tr>"
Response.Write "<tr><td height=25 class=light colspan=2>&nbsp;在线情况:&nbsp;<script src=online.asp?userwz=论坛首页></script></td></tr>"
Response.Write "<tr><td height=25 class=light0 colspan=2>&nbsp;论坛自 "&OpenTime&" 创建以来,共有&nbsp;"&filenum&"&nbsp;篇帖子,其中主题&nbsp;"&fileznum&"&nbsp;篇,回帖&nbsp;"&filelnum&"&nbsp;篇,今日主题&nbsp;<font color=red>"&nowfile&"</font>&nbsp;篇</td></tr></table><br>"

'Response.Write "<table width=743 border=0 cellspacing=0 cellpadding=0 align=center class=table1><tr><td height=40 class=light1>&nbsp;&nbsp;<script src=online.asp?userwz=论坛首页></script></td></tr></table>"
Response.Write "<table width=743 border=0 cellspacing=0 cellpadding=0 align=center class=table1><tr><td height=27 class=light1>&nbsp;<font class=HeadFont><b>友情链接</b></font></td></tr>"
Response.Write "<tr><td height=27 class=light0>"
call Link
Response.Write "</td></tr></table>"
set conn=nothing
EndTime = Timer()
%><script src="http://www.jcc.name/counter/mystat.asp"></script><%
'==============================================================================
 Function InfoNum()
        '已打开消息数据库,统计消息条数--------------------------------------;
         set rsn=conn.execute("select count(id) as num from shortinfo where 收件人='"&username&"' and 收件人删除标记='N' and 是否已读='N'  ")
         num=rsn("num")
         num=cstr(num)
         Set rsn=nothing 
         if num>0 then
            %><table width=743 border=0 cellspacing=0 cellpadding=0><tr><td align=right>你有&nbsp;<%=num%>&nbsp;条消息,请&nbsp;<a href=JavaScript:openScript('shortinfo.asp?optionvar=短消息&shortinfo=收件箱',500,400)>查收</a>&nbsp;消息</td></tr></table><%
         end if
 End Function
'------------------------------------------------------------------------------
 Function BBSIndex()  '论坛首页所有论坛列表
   dim speak
   speak=1
   AccessNum=AccessNum+1
   Set rs=conn.execute("select id,分类名称 from 论坛分类 Order BY OrderID ")
   if rs.bof and rs.eof then
    speak="0" 
   else
    rs.MoveFirst  
   End if
   BT_Board():aRS=Application(BBSname&"BT_Board")
   if aRS(1,0)=-1 or VarType(aRS)=0 then 
    speak="0" 
   end if
   if speak<>"0" then
   while not rs.EOF
     bbsfltable="<table border=1 width=743 cellspacing=0 cellpadding=0 align=center class=table1><tr><td colspan=4 height=30 class=TBHead>&nbsp;<a href=index.asp?bbsid="&cstr(rs("id"))&"><font class=HeadFont><b>"&rs("分类名称")&"</b></font></a></td></tr>"
     for i=0 to UBound(aRS,2)
       if aRS(2,i)=rs("分类名称") then
        if Application(BBSname&aRS(3,i))="" then
         if aRS(4,i)=1 then indexidimage="<img src=../images/indexid1.gif alt=正常开放论坛>" end if
         if aRS(4,i)=2 then indexidimage="<img src=../images/indexid2.gif alt=锁定论坛>" end if
         if aRS(4,i)=3 then indexidimage="<img src=../images/indexid3.gif alt=注册认证论坛>" end if
         if aRS(4,i)=4 then indexidimage="<img src=../images/indexid4.gif alt=论坛被关闭>" end if
         rs1id=aRS(0,i)
         fileid=aRS(11,i)
         AccessNum=AccessNum+1
         Set rs2=conn.execute("select top 1 id,BoardID,FileName,Subject,PostTime,PostUser from BT_Topic where BoardID="&rs1id&" and id="&fileid&" ")
          if aRS(10,i)<>"" and aRS(10,i)<>" " then titleinfo="<a href=dislist.asp?page=1&boardid="+cstr(aRS(0,i))+"><img src="+aRS(10,i)+" align=left border=0></a><table border=0 cellspacing=3 cellpadding=0 width=380 ><tr><td><a href=dislist.asp?page=1&boardid="+cstr(aRS(0,i))+">"+aRS(3,i)+"</a></td></tr>" else titleinfo="<table border=0 cellspacing=3 cellpadding=0 width=380><tr><td><a href=dislist.asp?page=1&boardid="+cstr(aRS(0,i))+">"+aRS(3,i)+"</a></td></tr>" end if
          if aRS(6,i)<>"" then titleinfo=titleinfo+"<tr><td>"+aRS(6,i)+"</td></tr>" else titleinfo=titleinfo+"<tr><td>&nbsp;</td></tr>" end if
          if aRS(7,i)<>"" then
         '---------------------------------  
          test=aRS(7,i)
          wz=1
          bz=""
          while not wz=0
           lens=Len(test)
           wz=InStr(1,test,"|")
           if wz<>0 then p=left(test,wz-1) else p=test end if
           test=right(test,lens-wz)
           if p=" " then bz=bz+"无" else bz=bz+"<a href=LookUserInfo.asp?username="+p+">"+p+"</a>&nbsp;" end if
          wend
         '---------------------------------
          titleinfo=titleinfo+"<tr><td>论坛版主:"+bz+"</td></tr></table>" 
          else titleinfo=titleinfo+"<tr><td>论坛版主:</td></tr></table>" 
          end if
          '---------------------------------------------------------------------
         if rs2.bof and rs2.eof then
          bbsfltable1=bbsfltable1+"<tr><td width=40 height=65 align=center class=light1>"+indexidimage+"</td><td class=light width=435>"+titleinfo+"</td><td width=30 align=center class=light><a href=newfile.asp?boardname="+aRS(7,i)+"&boardid="+cstr(aRS(0,i))+"><img src=../images/post.gif border=0 alt=在此论坛发表新帖></a><br><br><a href=dislist_jh.asp?page=1&boardid="+cstr(aRS(0,i))+"><img src=../images/elist.gif border=0 alt=该论坛精华区></a></td><td class=light><table border=0 cellspacing=3 cellpadding=0><tr><td>主题:-------</td><tr><td>作者:-------</td><tr><td>主题总数:0 回帖总数:0</td></tr></table></td></tr>"
         else
          if rs2("Subject")<>"" then
           titlename=rs2("Subject")
           if len(titlename)>30 then
            titlename=left(titlename,28)
            titlename=titlename+"..."
            titlename="<a href=bbs"+cstr(rs2("BoardID"))+"/"+rs2("FileName")+">"+titlename+"</a>" 
           else
            titlename="<a href=bbs"+cstr(rs2("BoardID"))+"/"+rs2("FileName")+">"+titlename+"</a>" 
           end if
          else
           titlename="-------" 
          end if
          if rs2("PostUser")<>"" then fmname="<a href=LookUserInfo.asp?username="+rs2("PostUser")+">"+rs2("PostUser")+"</a>" else fmname="-------" end if
          if rs2("PostTime")<>"" then fmtime=cstr(rs2("PostTime")) else fmtime="" end if
          Application.Lock
          Application(BBSname&aRS(3,i))="<tr><td width=40 height=65 align=center class=light1>"+indexidimage+"</td><td class=light width=435>"+titleinfo+"</td><td width=30 align=center class=light><a href=newfile.asp?boardname="+aRS(3,i)+"&boardid="+cstr(aRS(0,i))+"><img src=../images/post.gif border=0 alt=在此论坛发表新帖></a><br><br><a href=dislist_jh.asp?page=1&boardid="+cstr(aRS(0,i))+"><img src=../images/elist.gif border=0 alt=该论坛精华区></a></td><td class=light><table border=0 cellspacing=3 cellpadding=0><tr><td>主题:"+titlename+"<br></td><tr><td>作者:"+fmname+"&nbsp;"+fmtime+"<br></td><tr><td>主题总数:"+cstr(aRS(8,i))+"&nbsp;回帖总数:"+cstr(aRS(9,i))+"</td></tr></table></td></tr>"
          Application.UnLock
          bbsfltable1=bbsfltable1&Application(BBSname&aRS(3,i))
         end if
         rs2.close
        else
         bbsfltable1=bbsfltable1&Application(BBSname&aRS(3,i))
        end if
       end if
     Next
     bbsfltable=bbsfltable+bbsfltable1+"</table><br>"
     bbsfltable2=bbsfltable2+bbsfltable
     bbsfltable1=""
     rs.MoveNext
   wend
   else
    Application(BBSname&"index")=""
    Response.Write "没有任何版面"
   end if
   rs.Close
   Response.Write bbsfltable2
   Application.Lock
   Application(BBSname&"index")=bbsfltable2
   Application.UnLock
End Function

⌨️ 快捷键说明

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