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

📄 index.asp

📁 一个美化的论坛程序
💻 ASP
字号:
<!--#include file="top.asp"-->
<img src="" width="1" height="3">
<table width="680" border="0" bordercolor="<%=tablebackcolor%>" cellspacing="1" cellpadding="4" align="center" bgcolor="<%=tablebackcolor%>">
  <tr bgcolor="<%=tablebodycolor%>"> 
    <td  width="100%" colspan="7" background="images/tablebg02.gif"><img src="images/gb.gif">论坛消息广播: 
      <%
	sql="select top 1 title,dateandtime from announce where boardid=0 order by id desc"
	rs.open sql,conn,1,1
	if rs.eof then
		response.write "<b>当前没有公告</b>&nbsp;(&nbsp;"&now()&"&nbsp;)"
	else
		response.write "<b><a href=announce.asp?boardid=0>"&rs("title")&"</a></b>&nbsp;(&nbsp;"&rs("dateandtime")&"&nbsp;)"
	end if
	rs.close%>
    </td>
  </tr>
  </table>
  
<table border="0" bordercolor="#999999" cellspacing="1" cellpadding="1" align="center" bgcolor="<%=tablebackcolor%>" width="680">
  <tr bgcolor="<%=tabletitlecolor%>" align="center">
    <td height=25 width="42" bgcolor="#f2f0fd"><b><font color="#000000">状态</font></b></td>
    <td width="301" bgcolor="#f2f0fd" height="25"><b><font color="#000000">论坛名称</font></b></td>
    <td width="71" bgcolor="#f2f0fd" height="25"><b><font color="#000000">版主</font></b></td>
    <td width="39" bgcolor="#f2f0fd" height="25"><b><font color="#000000">主题</font></b></td>
    <td width="38" bgcolor="#f2f0fd" height="25"><b><font color="#000000">帖子</font></b></td>
    <td width="140" bgcolor="#f2f0fd" height="25"><b><font color="#000000">最后发表</font></b></td>
    <td bgcolor="#f2f0fd" width="27" height="25" ><b><font color="#000000">收藏</font></b></td>
  </tr>
  </table>
<%
	sql="select board.boardid,board.boardtype,board.lastreplytime,board.lastreplyuser,board.logo,board.topiccount,board.count,board.boardtitle,board.boardintro,board.boardmaster,class.classid,class.classname from board,class where class.classid=board.classid order by board.classid,board.boardid"
	rs.open sql,conn,1,1
	do while not rs.eof
	response.write " <table width=""680"" border=""1"" bordercolor="""&tablebackcolor&""" cellspacing=""0"" cellpadding=""6"" align=""center"" bgcolor="&tablebackcolor&"><tr>"
	if classname<>rs("classname") then
		response.write "<td width=""100%"" bgcolor="""&tablebodycolor&""" colspan=""7""  background=""images/tablebg02.gif"">≡&nbsp;"&rs("classname")&"&nbsp;≡</td></tr>"
		classname=rs("classname")
	end if
	response.write "    <td  height=25  width=""6%"" align=""center"" bgcolor="""&tablebodycolor&"""><img src=images/"
	if datediff("d",rs("lastreplytime"),now)<1 then
		response.write "new"&rs("boardtype")&".gif  alt=今日有新帖子"
	else
		response.write "old"&rs("boardtype")&".gif  alt=今日无新帖子"
	end if
	response.write " style=""CURSOR: hand;""></td>"&_
				   "    <td  width=""46% "" bgcolor="""&tablebodyacolor&""" bgcolor="""&tablebodyacolor&""" onMouseOver=""this.bgColor='"&tabletitlecolor&"'"" onMouseOut=""this.bgColor='"&tablebodyacolor&"'""><a href=list.asp?boardid="&rs("boardid")&"><b>→</b>『"&rs("boardtitle")&"』<b>←</b></a>"
	if rs("boardtype")=2 then Response.Write "&nbsp;&nbsp;&nbsp;&nbsp;<font color=999999>[正规论坛]</font>"
	Response.Write "<br>"
	if rs("logo")<>"" then response.write "<img src="&rs("logo")&" align=left>"
	response.write rs("boardintro")&"</td>"&_
				   "	<td  width=""12% "" align=""center"" bgcolor="""&tablebodycolor&""">"
	if rs("boardmaster")<>"" then
		masterarr=split(rs("boardmaster"),"|")
		for i=0 to ubound(masterarr)
			response.write "<a href=userinf.asp?name="&server.urlencode(masterarr(i))&">"&masterarr(i)&"</a>"
			if ubound(masterarr)>i then response.write "<br>"
		next
	else
		response.write "就等你来当"
	end if
	response.write "</td>"&_
				   "	<td  width=""7% "" align=""center"" bgcolor="""&tablebodyacolor&""">"&rs("topiccount")&"</td>"&_
				   "	<td  width=""7% "" align=""center"" bgcolor="""&tablebodycolor&""">"&rs("count")&"</td>"&_
				   "	<td  width=""100% "" bgcolor="""&tablebodyacolor&""">最后发表:<a href=userinf.asp?name="&rs("lastreplyuser")&">"&rs("lastreplyuser")&"</a><br>"&rs("lastreplytime")&"</td>"&_
				   "	<td  width=""6%"" align=""center"" bgcolor="""&tablebodycolor&"""><A href=""javascript:window.external.AddFavorite('http://"&Request.ServerVariables("server_name")&_
					replace(Request.ServerVariables("path_info"),"index.asp","list.asp")&"?boardid="&rs("boardid")&"','"&rs("boardtitle")&"论坛')"" target=_self><img src=images/love.gif border=0></A></td>"&_
			   		"  </tr></table>"&_
	rs.movenext
	loop
	rs.close
%>
<img src="" width="1" height="3">
<table width="680" border="0" cellspacing="1" cellpadding="6" bgcolor="<%=tablebackcolor%>" align=center>
  <tr> 
    <td bgcolor="<%=tabletitlecolor%>" background="images/tablebg02.gif"> 
      <table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td width="73%"><font color=#ffffff><b> <font color="#000000">在线用户名单</font></b></font></td>
          <td align="right"><font color="#000000">[<a href="online.asp">在线用户</a>]</font><font color="#FFFFFF"><font color="#000000"> 
            [<a href="USERLIST.ASP">所有用户</a>]</font>]</font>&nbsp;&nbsp;</td>
        </tr>
      </table>
    </td>
  </tr>
  <tr> 
    <td bgcolor="<%=tablebodycolor%>" height="25"> 
<%
if Request.Cookies("bookbaby")("username")<>"" then
    set rs=conn.execute("select username from online where username='"&Request.Cookies("bookbaby")("username")&"'")
    if rs.eof then
	conn.execute("insert into online(username,sex,stat,lasttime) values ('"&Request.Cookies("bookbaby")("username")&"',"&Request.Cookies("bookbaby")("usersex")&",'首页','"&now()&"')")
    end if
    set rs=nothing
else
	conn.execute("delete * from online where datediff('n',lasttime,now())>20")
end if
sql="select count(sex) from online"
set rs=conn.execute (sql)
response.write "目前论坛总共在线注册用户为<font color=blue><b>&nbsp;"&rs(0)&"&nbsp;</b></font>人.不包括客人。&nbsp;&nbsp;&nbsp;--==>&nbsp;<img align=absmiddle src=images/male.gif width=16>&nbsp;代表帅哥&nbsp;&nbsp;<img align=absmiddle src=images/female.gif width=16>&nbsp;代表靓妹<br>"
rs.close
sql="select username,sex,stat from online"
set rs=conn.execute (sql)
do while not rs.eof
i=i+1
	response.write "<img align=absmiddle src=images/"
if not rs("sex") then response.write "fe"
response.write "male.gif height=16 width=16>&nbsp;<a href=userinf.asp?name="&rs("username")&" target=_top title=当前位置:"&rs("stat")&">"
if rs("username")=Request.Cookies("bookbaby")("username") then
	response.write "<font color=f00000>"&rs("username")&"</font>"
else
	response.write rs("username")
end if
response.write "</a>&nbsp;&nbsp;"
rs.movenext
loop
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
    </td>
  </tr>
</table><img src="" width="1" height="3">
<table width="680" border="0" cellspacing="1" cellpadding="6" align="center" bgcolor="<%=tablebackcolor%>">
  <tr bgcolor="<%=tabletitlecolor%>">
    <td width=516 bgcolor="<%=tabletitlecolor%>" background="images/tablebg02.gif"><font color=#ffffff><b> 
      <font color="#000000">论坛图例</font></b></font></td>
    <td width=227 background="images/tablebg02.gif"><font color=#ffffff> <font color="#000000">所有时间均为 
      - 北京时间</font></font></td>
  </tr>
  <tr bgcolor="<%=tablebodycolor%>">
    <td colspan=2 align=center><img src=images/old1.gif width=17 height=21> 开放论坛无新贴  <img src=images/new1.gif width=17 height=21> 开放论坛有新贴  <img src=images/old2.gif width=17 height=21> 正规论坛无新贴  <img src=images/new2.gif width=17 height=21> 正规论坛有新贴</td>
  </tr>
</table>
<!--#include file="copyright.asp"-->

⌨️ 快捷键说明

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