📄 index.asp
字号:
<!-- #include file="const.asp" -->
<%
dim sql,crs,rscount,rscount2,i,j,frs,CID,FID,tempstr,rs,tu,nu,tp,tt,td,fadmin,post,topic,today,todaydate
dim CTitle,FProfile,authent,FPic,lasttopic,topicid,lasttime,lastname,FTitle,notopic,Fvalid
tp=0
tt=0
td=0
call opendb()
sql="select name from m3_users order by regtime desc"
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
tu=rs.recordcount
if not rs.eof then
nu=rs("name")
end if
rs.close
sql="select sum(post),sum(topic) from m3_forum"
set rs=conn.execute(sql)
tp=rs(0)
tt=rs(1)
if isnull(tp) then tp=0
if isnull(tt) then tt=0
sql="select sum(today) as ntoday from m3_forum where todaydate=#"&date&"#"
set rs=conn.execute(sql)
td=rs(0)
set rs=nothing
if isnull(td) then td=0
%>
<html>
<head>
<title><%=sitename%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="keywords" content="m3, M3, m3论坛, M3论坛, matrix, MATRIX, matrix3, MATRIX3, studio, matrix3.cn, bbs, forum, BBS, 论坛, lilo, billylai, gyb, web, asp, jsp, VC, VC++, vc, c++, java, flash, photoshop, tutorials, utilities, MUSIC, Music, music, software, design">
<meta name="description" content="m3, M3, m3论坛, M3论坛, matrix, MATRIX, matrix3, MATRIX3,studio, matrix3.cn, bbs, forum, BBS, 论坛, lilo, billylai, gyb, web, asp, jsp, VC, VC++, vc, c++, java, flash, photoshop, tutorials, utilities, MUSIC, Music, music, software, design">
<link href="images/skin.css" rel="stylesheet" type="text/css">
<script language="JavaScript" src="images/effect.js"></script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" class="mainbg">
<tr>
<td height="10" align="center" valign="top"><!-- #include file="topbar.asp" --></td>
</tr>
<tr>
<td align="center" valign="top"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="12" class="left_main"> </td>
<td width="1" bgcolor="#E8BC3C"></td>
<td width="10"> </td>
<td valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="20" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" nowrap class="v7b"><img src="images/btn_face.gif" width="10" height="7">
欢迎来到 <%=sitename%> !</td>
</tr>
</table></td>
</tr>
<tr>
<td height="2" bgcolor="#ECE9D9"></td>
</tr>
<tr>
<td height="12"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="130" height="17" nowrap class="body_bar_1"> <span class="v8"> <img src="images/fang-1.gif" align="absmiddle"><font color="#FFFFFF">
≡ 统计信息 ≡</font></span></td>
<td height="17" nowrap class="body_bar_1_bg"> </td>
</tr>
</table>
<table width="100%" border="0" cellpadding="5" cellspacing="1" class="body_tb_border">
<tr bgcolor="#FFFFFF">
<td valign="top" nowrap class="mainbg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="65%" class="v7"><font color="#333333">用户总数:<%=tu%>
最新用户:<a href="profile.asp?name=<%=nu%>" target="_blank"><%=nu%></a></font></td>
<td width="35%" align="right" nowrap class="v7"><font color="#333333">帖子总数:
<%=tp%>, 主题总数:<%=tt%>, 今日发帖:<%=td%> </font></td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="2" class="body_sp_min"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/blank.gif" width="1" height="3"></td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<%
set crs=server.CreateObject("adodb.recordset")
set frs=server.CreateObject("adodb.recordset")
sql="select CID,CTitle from m3_category where Cvalid=1 order by Cindex asc"
crs.open sql,conn,1,1
if crs.eof and crs.bof then
response.Write("<tr><td colspan=3 height=20> 暂无分区 ...</td><tr>")
else
crs.movefirst
rscount=crs.recordcount
set CID=crs(0)
set CTitle=crs(1)
i=0
while i<rscount
%>
<tr>
<td> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/blank.gif" width="1" height="5"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="right"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
<tr>
<td width="130" nowrap class="body_bar_2"> <img src="images/fang-1.gif" width="7" height="7" align="absmiddle"> <font color="#FFFFFF">≡
<a href="category.asp?cid=<%=CID%>" class="white" title="进入分区"><%=CTitle%></a>
≡ </font></td>
<td valign="top" bgcolor="#cccccc" class="body_bar_2_bg"> </td>
</tr>
</table></td>
</tr>
<%if request.Cookies("matrix3")("matrix3_admin")="matrix3" then
sql="select FID,FTitle,todaydate,topic,today,post,FProfile,authent,FPic,lasttopic,topicid,lastname,lasttime,FAdmin,Fvalid from m3_forum where CID="&CID&" order by Findex asc"
else
sql="select FID,FTitle,todaydate,topic,today,post,FProfile,authent,FPic,lasttopic,topicid,lastname,lasttime,FAdmin,Fvalid from m3_forum where CID="&CID&" and Fvalid=1 order by Findex asc"
end if
frs.open sql,conn,1,1
if frs.eof then
response.write("<tr><td align=center>")
response.write("<table width=100% border=0 cellpadding=4 cellspacing=1 bgcolor=#CCCCCC>")
response.write("<tr><td bgcolor=#FFFFFF><font color=#999999>此分区暂无论坛 ...</font></td></tr>")
response.write("</table>")
response.write("<table width=100% border=0 cellpadding=0 cellspacing=0>")
response.write("<tr><td height=2 bgcolor=#ECE9D9></td></tr></table>")
response.write("</td></tr>")
else
frs.movefirst
rscount2=frs.recordcount
set FID=frs(0)
set FTitle=frs(1)
set todaydate=frs(2)
set topic=frs(3)
set today=frs(4)
set post=frs(5)
set FProfile=frs(6)
set authent=frs(7)
set FPic=frs(8)
set lasttopic=frs(9)
set topicid=frs(10)
set lastname=frs(11)
set lasttime=frs(12)
set fadmin=frs(13)
set Fvalid=frs(14)
j=0
while j<rscount2
%>
<tr>
<td align="right"> <table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="100%" height="30"> <table width="100%" border="0" cellpadding="1" cellspacing="1" class="body_tb_border">
<tr>
<td width="30" align="center" nowrap class="mainbg">
<%if todaydate=date() then%>
<img src="images/forum_isnews.gif" width="24" height="24" title="有新帖子">
<%else%>
<img src="images/forum_nonews.gif" width="24" height="24" title="无新帖子">
<%end if%>
</td>
<td class="mainbg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="160" nowrap>『<span class="v7b">
<a href="list.asp?forumid=<%=FID%>" title="浏览论坛"><%=FTitle%></a></span>
』<span class="v7"> </span></td>
<td nowrap><span class="v7"><a href="post.asp?forumid=<%=FID%>"><img src="images/fabiao.gif" width="12" height="13" border="0" align="absmiddle" title="在 『 <%=FTitle%> 』 发表新帖子"></a> <a href="newpost.asp?forumid=<%=FID%>"><img src="images/findposter.gif" width="12" height="13" border="0" align="absmiddle" title="查看 『 <%=FTitle%> 』 的新帖"></a> <a href="list.asp?forumid=<%=FID%>&view=hot"><img src="images/retie.gif" width="12" height="13" border="0" align="absmiddle" title="查看 『 <%=FTitle%> 』 的热门帖子"></a> <a href="distillate.asp?forumid=<%=FID%>"><img src="images/jinhua.gif" width="12" height="13" border="0" align="absmiddle" title="查看 『 <%=FTitle%> 』 的精华帖子"></a>
<%if Fvalid=0 then
response.Write(" <font color=#990000>隐藏论坛</font>")
elseif cint(authent)=1 then
response.Write(" <a title='需通过本论坛的认证才可浏览'><font color=#999999>认证论坛</font></a>")
elseif cint(authent)=2 then
response.Write(" <a title='需登陆论坛后才可浏览'><font color=#999999>普通论坛</font></a>")
elseif cint(authent)=0 then
response.Write(" <a title='游客可浏览'><font color=#999999>开放论坛</font></a>")
end if%>
</span></td>
</tr>
</table></td>
</tr>
<tr>
<td height="32" valign="middle"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" style="word-break:break-all;WORD-WRAP: break-word;">
<tr>
<td><img src="images/catbullet.gif" width="12" height="13" align="absmiddle"><span class="v7">
<font color="#666666">
<%tempstr=FProfile
if Strlength(tempstr)>182 then
tempstr=Strleft(tempstr,180)&"..."
end if
response.write(tempstr)
%>
</font></span></td>
</tr>
</table></td>
</tr>
</table></td>
<%if trim(FPic)<>"" then%>
<td width="60" align="center"><img src="<%=trim(FPic)%>"></td>
<%end if%>
<td width="200" align="right">
<%if cint(authent)=1 then%>
<table width="190" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="16%" nowrap class="v7"><font color="#333333">认证论坛,<br>
仅认证用户进入浏览、讨论</font></td>
</tr>
</table>
<%else%>
<table width="190" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="16%" nowrap class="v7">新帖: </td>
<td width="84%" nowrap class="v7">
<%
tempstr=lasttopic
if trim(tempstr)="" then
notopic=1
response.Write("<font color=#666666>没有新帖<font>")
else
notopic=0
if Strlength(tempstr)>24 then
tempstr=Strleft(lasttopic,22)&" <font color=red>...</font>"
end if
response.Write("<a href=""bbs.asp?id="&topicid&""" title='浏览此帖子'>"&tempstr&"</a>")
end if
%>
</td>
</tr>
<tr>
<td nowrap class="v7">作者: </td>
<td nowrap class="v7">
<%if notopic=1 then
response.Write("<font color=#666666>无<font>")
else%>
<a href="profile.asp?name=<%=lastname%>" target="_blank" title='查看 <%=lastname%> 的个人简介'><%=frs("lastname")%></a>
<%end if%>
</td>
</tr>
<tr>
<td nowrap class="v7">时间: </td>
<td nowrap class="v6">
<%if notopic=1 then
response.Write("<font color=#666666>无<font>")
else
response.Write(lasttime)
end if%>
</td>
</tr>
</table>
<%end if%>
</td>
</tr>
<tr>
<td colspan="3" class="body_light"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><span class="v7b"> </span><span class="v7"><font color="#333333">版主:
<%
dim tmp_i
fadmin=frs(13)
if not isnull(fadmin) and fadmin<>"" then
fadmin=split(fadmin,",")
for tmp_i=0 to ubound(fadmin)
if tmp_i=0 then
response.write("<a href='profile.asp?name="&fadmin(tmp_i)&"' target='_blank'>"&fadmin(tmp_i)&"</a> ")
else
response.write(", <a href='profile.asp?name="&fadmin(tmp_i)&"' target='_blank'>"&fadmin(tmp_i)&"</a>")
end if
next
else
response.write("暂时空缺")
end if
%>
</font></span></td>
<td width="200" align="right" class="v7"><table width="190" border="0" cellspacing="0" cellpadding="0">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -