📄 index.asp
字号:
<%@ Language=VBScript %>
<% option explicit %>
<!-- #include file="conn_forum.asp" -->
<!-- #include file="conn_member.asp" -->
<!-- #include file="conn_webqq.asp" -->
<!-- #include file="inc_session.asp" -->
<%
dim uid
uid=GetSession()
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>r4c 论坛首页</title>
<link rel="stylesheet" type="text/css" href="../main.css">
</head>
<body bgcolor="#ffffff">
<SCRIPT language=JavaScript>
//refresh window
//window.focus();
setTimeout("refreshwindow()",600000);
function refreshwindow()
{
window.location = "index.asp";
}
</SCRIPT>
<SCRIPT language=JavaScript>
//open an URL in new window
function openwq(htmlurl)
{
var newwin=window.open(htmlurl,"webqq","toolbar=yes,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=300,height=360");
newwin.focus();
return false;
}
</SCRIPT>
<SCRIPT language=JavaScript src="../include/header.inc" type=text/javascript></SCRIPT>
<!-- #include file="inc_forumheader.asp" -->
<!-- 论坛区列表 -->
<center>
<div align="center">
<%
dim iThemeCount
dim iReplyCount
dim iMemberCount
dim rs
set rs=Server.CreateObject ("ADODB.Recordset")
rs.Open "SELECT * FROM tConfig",connf,1,1
if not(rs.BOF and rs.EOF) then
iThemeCount=rs("themecount")
iReplyCount=rs("replyCount")
end if
rs.Close
rs.Open "SELECT * FROM tConfig",connm,3,3
if not(rs.BOF and rs.EOF) then
iMemberCount=rs("membercount")
end if
rs.Close
%>
<table border="0" width="760" cellspacing="1">
<tr>
<td width="100%" align="right">主题:<%=iThemeCount%> | 回复:<%=iReplyCount%> | 会员:<%=iMemberCount%></td>
</tr>
</table>
<table border="0" width="760" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td width="30" height="25" align="center" bgcolor="#687088"></td>
<td width="308" height="25" align="center" bgcolor="#687088"><b><font color="#FFFFFF">讨论区</font></b></td>
<td width="57" height="25" align="center" bgcolor="#687088"><b><font color="#FFFFFF">主题数</font></b></td>
<td width="55" height="25" align="center" bgcolor="#687088"><b><font color="#FFFFFF">回复数</font></b></td>
<td width="205" height="25" align="center" bgcolor="#687088"><b><font color="#FFFFFF">最后主题</font></b></td>
<td width="85" height="25" align="center" bgcolor="#687088"><b><font color="#FFFFFF">版 主</font></b></td>
</tr>
<%
rs.Open "SELECT * FROM tindex ORDER BY AreaID",connf,1,1
if not(rs.bof and rs.eof) then rs.MoveFirst
do while not rs.EOF
%>
<tr>
<td width="30" height="22" align="center" bgcolor="#ECECEC"></td>
<td width="308" height="50" bgcolor="#F5F5F5" align="left" >
<a href="listtheme.asp?area=<%=clng(rs("areaID"))%>">
<img src="images/board/<%=rs("areaIcon")%>" border="0" align="left">
<%=rs("areaname")%></a><br>
<%=rs("areaDescript")%>
</td>
<td width="57" height="50" bgcolor="#ECECEC" align="center"><%=rs("themecount")%></td>
<td width="55" height="50" bgcolor="#F5F5F5" align="center"><%=rs("replycount")%></td>
<td width="205" height="50" bgcolor="#ECECEC" align="right">
<%
dim sLastTheme
sLastTheme=rs("lastTheme")
if len(sLastTheme) > 16 then sLastTheme=Left(sLastTheme,13) & "..."
if sLastTheme <> "" then
Response.Write "<a href='viewtheme.asp?area=" & rs("areaid") & "&id=" & rs("LastThemeID") & "'>" & _
sLastTheme & "</a><br>" & rs("LastTime") & " <img src='images/post.gif' border='0'> " & _
"<a href='viewinfo.asp?uid=" & _
rs("LastAuthor") & "'>" & _
rs("LastAuthor") & "</a>"
else
Response.Write " "
end if
%>
</td>
<td width="85" height="50" bgcolor="#F5F5F5" align="center">
<%
dim i
dim adminName
dim adminCount
if rs("master")="" then
adminCount=0
else
adminName=split(rs("master"),",")
adminCount=ubound(adminName)+1
end if
if adminCount>0 then
for i=1 to adminCount
Response.Write "<a href='viewinfo.asp?uid=" & adminName(i-1) & "'>" & adminName(i-1) & "</a> "
next
end if
%>
</td>
</tr>
<%
rs.MoveNext
loop
rs.Close
%>
</table>
</div>
</center>
<p></p>
<!-- 最新文章 -->
<div align="center">
<center>
<table border="0" width="760" cellspacing="1">
<tr>
<td width="100%"><font color="#FF9933">最新文章</font></td>
</tr>
</table>
<table border="0" width="760" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td width="30" height="25" bgcolor="#687088" align="center"> </td>
<td width="298" height="25" bgcolor="#687088" align="center"><font color="#FFFFFF">主 题</font></td>
<td width="80" height="25" bgcolor="#687088" align="center"><font color="#FFFFFF">作 者</font></td>
<td width="126" height="25" bgcolor="#687088" align="center"><font color="#FFFFFF">更新时间</font></td>
<td width="52" height="25" bgcolor="#687088" align="center"><font color="#FFFFFF">点击数</font></td>
<td width="45" height="25" bgcolor="#687088" align="center"><font color="#FFFFFF">回复数</font></td>
<td width="85" height="25" bgcolor="#687088" align="center"><font color="#FFFFFF">回复者</font></td>
</tr>
<%
rs.Open "SELECT * FROM tRecent ORDER BY Time DESC",connf,1,1
if not(rs.bof and rs.eof) then rs.MoveFirst
do while not rs.EOF
%>
<tr>
<td width="30" height="22" bgcolor="#ECECEC" align="center"><%="<img src='images/titleicon/" & rs("Icon") & "' border='0'>"%></td>
<td width="298" height="22" bgcolor="#F5F5F5"><%
Response.Write "<a href='viewtheme.asp?area=" & rs("areaid") & "&id=" & rs("ThemeID") & "'>"
Response.Write rs("Theme") & "</a>"
if rs("selected")=1 then
Response.Write " <img src='images/topmost.gif' alt='顶端主题' border='0'>"
end if
if rs("Hit") >= 35 then
Response.Write " <img src='images/hot.gif' alt='热门主题' border='0'>"
end if
%></td>
<td width="80" height="22" bgcolor="#ECECEC" align="center"><%
Response.Write "<a href='viewinfo.asp?uid=" & rs("Author") & "'>" & rs("Author") & "</a>"
%></td>
<td width="126" height="22" bgcolor="#F5F5F5"><%=rs("Time")%></td>
<td width="52" height="22" bgcolor="#ECECEC" align="right"><%=rs("Hit")%></td>
<td width="45" height="22" bgcolor="#F5F5F5" align="right"><%=rs("ReplyCount")%></td>
<td width="85" height="22" bgcolor="#ECECEC" align="center"><%
Response.Write "<a href='viewinfo.asp?uid=" & rs("Replier") & "'>" & rs("Replier") & "</a>"
%></td>
</tr>
<%
rs.movenext
loop
rs.close
set rs=nothing
call closeconnf
%>
</table>
</center>
</div>
<%
if uid="" then
dim uid_cookie
uid_cookie=Request.Cookies ("r4cForumUserID")
%>
<p align="left">
<img border="0" src="images/person.gif" width="32" height="32">请先登录或注册成为新会员。
</p>
<p align="left">
<form method="POST" action="login.asp">
<table border="0" width="215" cellspacing="1" height="105" bgcolor="#AAAAAA">
<tr>
<td width="65" bgcolor="#ECECEC" align="right">
用户名:<br><br>密码:
</td>
<td width="143" bgcolor="#ECECEC"> <input type="text" name="uid" size="16" value="<%=uid_cookie%>" style="border-style: solid; border-width: 1">
<br><br> <input type="password" name="pwd" size="16" style="border-style: solid; border-width: 1">
</td>
</tr>
<tr>
<td width="208" bgcolor="#FFFFFF" align="right" colspan="2">
<p align="center">
<input type="submit" value="登录" name="CmdLogin"> <A href="reg_index.asp">注册成为新会员</A>
</td>
</tr>
</table>
</form>
</p>
<%
else
dim rsm
set rsm=Server.CreateObject ("ADODB.Recordset")
rsm.Open "SELECT * FROM tmember WHERE uid='" & uid & "'" ,connm,1 ,1
dim lt
dim rt
dim wt
dim sc
dim le
lt=clng(rsm("logintimes"))
rt=clng(rsm("readtimes"))
wt=clng(rsm("writetimes"))
sc=clng(rsm("score"))
le=clng(rsm("level"))
rsm.close
%>
<p> </p>
<div align="center">
<center>
<!-- (访客)个人信息 -->
<table border="0" width="760" cellspacing="1" ID="Table1">
<tr>
<td width="100%"><font color="#FF9933">个人信息</font></td>
</tr>
</table>
<table border="0" width="760" cellspacing="1" bgcolor="#CCCCCC" ID="Table2">
<tr>
<td width="100%" bgcolor="#687088" height="25"></td>
</tr>
<tr>
<td bgcolor="#FFFFFF">
<img border="0" src="images/person.gif" width="32" height="32">
<b><%=uid%></b>
<p>
登录次数:<%=lt%> 发表文章:<%=wt%><br>
阅读文章:<%=rt%> 当前积分:<%=sc%> 等 级: <% response.write "<img src='images/level/level" & le & ".gif'>" %>
<p>功能:
<%
dim iMesCount
rsm.Open "SELECT receiver FROM tMessage WHERE receiver='" & uid & "'",connq,1,1
if not(rsm.BOF and rsm.EOF) then
rsm.MoveLast
iMesCount=rsm.RecordCount
else
iMesCount=0
end if
if iMesCount>0 then
Response.Write "<a href='webqq/login.asp' onClick='return openwq(this.href);' target=_blank>"
Response.Write "<img border='0' src='images/logo_qq.gif' alt='打开 WebQQ'> 您有 " & iMesCount & " 条信息 <img src='images/message.gif' border='0'></A> | "
if Session("popuped") <> "1" then
%>
<script language="vbscript">
openwq("webqq/login.asp")
</script>
<%
Session("popuped")="1"
end if
else
Response.Write "<a href='webqq/login.asp' onClick='return openwq(this.href);' target=_blank>"
Response.Write "<img border='0' src='images/logo_qq.gif' alt='打开 WebQQ'> 打开 WebQQ</a> | "
end if
%>
<A href="viewinfo.asp?uid=<%=uid%>">我的个人资料</a>
</p>
</td>
</tr>
<%
set rsm=nothing
call closeconnm
call closeconnq
end if
%>
</table>
</center>
</div>
<p></p>
<SCRIPT language=JavaScript src="../include/buttom.inc" type=text/javascript></SCRIPT>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -