📄 index.asp
字号:
<!--#include file="Connections.asp" -->
<!--#include file="inc_admenu.asp"-->
<!--#include file="top.asp" -->
<% if h_viewcpb=1 and isuser=false then response.redirect("login.asp")
cpbtitle="首页"
call toptitle(l_title,cpbtitle)%>
<script src=js/move.js></script>
<%'判断星期
function t_day(text)
select case text
case "1"
response.write("星期日")
case "2"
response.write("星期一")
case "3"
response.write("星期二")
case "4"
response.write("星期三")
case "5"
response.write("星期四")
case "6"
response.write("星期五")
case "7"
response.write("星期六")
end select
end function
'-----------判断当日日期
fyear=year(nowtime)'判断当前年份
fmonth=month(nowtime)'判断当前月份
fday=day(nowtime)'判断当前日期
fweek=weekday(nowtime)'判断当前星期
'以下计算当天发帖和注册会员
sqluser="select top 1 username from user order by time desc"
set rsuser=conn.execute(sqluser)
if not(rsuser.bof and rsuser.eof) then
username1=rsuser("username")
end if
sqltt="select n_num,t_num,r_num,o_num,o_time,h_tjnowday,h_tjpreday,h_tjnowmonth,h_tjpremonth,h_tjtoday,h_tjmonth,h_tjstart,tongji,tongji1,tongjiip,h_posttoday,h_replytoday,h_regtoday from total"
set rstt=conn.execute(sqltt)
n_num=rstt("n_num")
t_num=rstt("t_num")
r_num=rstt("r_num")
o_num=rstt("o_num")
o_time=rstt("o_time")
h_tjnowday=rstt("h_tjnowday")
h_tjpreday=rstt("h_tjpreday")
h_tjnowmonth=rstt("h_tjnowmonth")
h_tjpremonth=rstt("h_tjpremonth")
h_tjtoday=rstt("h_tjtoday")
h_tjmonth=rstt("h_tjmonth")
h_tjstart=rstt("h_tjstart")
tongji=rstt("tongji")
tongji1=rstt("tongji1")
tongjiip=rstt("tongjiip")
h_regtoday=rstt("h_regtoday")
h_replytoday=rstt("h_replytoday")
h_posttoday=rstt("h_posttoday")
set rstt=nothing
'取出变量
dim h_birder,h_mingxing,h_viewonline,t_link,h_servertext
sql="select h_birder,h_mingxing,h_viewonline,h_servertext,t_link from home"
set rsconn1=conn.execute(sql)
if not rsconn1.eof then
h_birder=rsconn1("h_birder")'显示会员生日
h_mingxing=rsconn1("h_mingxing")'显示明星
h_viewonline=rsconn1("h_viewonline")'查看在线人数字段
t_link=rsconn1("t_link")'联盟显示
h_servertext=rsconn1("h_servertext")'论坛所在时区
end if
set rsconn1=nothing
'标记为已读
if request("action")="edittime" then
sqlonline = "update user set u_lastlogin='"&now()&"' where username = '" & cpbusername&"'"
conn.Execute (sqlonline)
response.redirect("index.asp")
end if
'-----删除cookies-----
if request("action")="clearcookies" then
Response.Cookies(l_url&"feiyue")("Username")= ""
Response.Cookies(l_url&"feiyue")("Password")= ""
session("fy_lpassword")=""
Response.Cookies("fyskin")=""
Response.Cookies("feiyuedays")=""
Response.Cookies("feiyuecpbtime")=""
Response.Cookies("feiyuecpbselect")=""
Response.Cookies("cpbhidden")=""
response.redirect("index.asp")
end if
'-------更新界面-----
if request("editskin")<>"" then
Response.Cookies("fyskin")=request("skin")
Response.Cookies("fyskin").Expires=date+3650
response.redirect("index.asp")
end if
%>
<%call fannounce()%>
<SCRIPT type="text/javascript" src="popprg.js"></SCRIPT>
<table border=1 borderColor=<%=tdc2%> cellPadding=4 cellSpacing=0 width=<%=tdc3%> style="border-collapse: collapse" rules=none align=center>
<tbody>
<tr class="tdc"><td bgcolor=<%=tColor1%> colspan="2">
<BR>
<div align="left"><% if cpbusername="" then%>欢迎光临 <B><%=l_title%></B><br>
如果这是您第一次访问本站, 请点击论坛上方的链接阅读论坛<a href="help.asp">帮助</a>. 您可能需要<a href="reg.asp">注册</a>才能发布信息: 点击上方的<a href="reg.asp">注册</a>链接即可.
请选择下面您所感兴趣的论坛进行浏览.<%else%>欢迎 <B><%=cpbusername%> </b>回来,您上次访问本论坛的时间是:<%=u_lastlogin%> <a href=mysendtopic.asp title=查看我发表的主题>我发表的主题</a> <a href=myreplytopic.asp title=查看我参与发表的主题>我参与的主题</a><%end if%><hr class=tdc2 size=1></td>
</tr>
<tr>
<td class=tdc bgcolor=<%=tColor1%> align="left" height="21">今日注册会员:<b><%=h_regtoday%></b> | 用户总数:<b><%=n_num%></b> | 欢迎我们的新会员:<a href="viewuser.asp?username=<%=HTMLEncode(username1)%>" target=_blank><b><%=HTMLEncode(username1)%></b></a><br>今日主题帖
:<b><%=h_posttoday%></b> | 今日回复帖:<b><%=h_replytoday%></b> | 帖子总数:<b><%=t_num+r_num%></b> | 主题总数:<b><%=t_num%></b> | 回复总数:<b><%=r_num%></b>
</td>
<td class=tdc bgcolor=<%=tColor1%> align="right"> <a target="_blank" href="viewsend.asp?view=man">管理团队</a> <a target="_parent" href="stats.asp">论坛统计</a> <a href="viewsend.asp">发帖排行</a> <a href="todaytopic.asp">论坛新帖</a><br>当前服务器时间:<%=nowtime%> </td>
</tr>
</tbody>
</table>
<% if cpbusername="" then
'产生随机码
dim p
randomize
p = Int((8999 * Rnd) + 1000)
session("cpbcode")=p
%>
<table border=1 borderColor=<%=tdc2%> cellPadding=4 cellSpacing=0 width=<%=tdc3%> style="border-collapse: collapse" align=center>
<tbody> <tr>
<td class=tdc1 <%=tColor%> align="center" height="23" colspan="2">
<p align="left"> >>==快速登陆入口</td>
</tr>
<form name="form1" method="post" action="loginfo.asp"><tr height="23" >
<td class=tdc bgcolor=<%=tColor2%> align="center" width="5%" >
<img src=image/mamgeruser.gif></td>
<td class=tdc bgcolor=<%=tColor2%> align="center" >用户名:<input type="text" name="l_user" size="12" class="bdtj3" value="<%=cpbusername%>">
密码:<input type="password" name="l_password" size="12" class="bdtj3" value="<%=Request.Cookies(l_url&"feiyue")("password")%>"> <%if t_viewcheck=0 then response.write(" 验证码:<input type=""text"" name=""cpbcode"" size=5 class=bdtj3> <B><span style=""background-color: "&tColor1&""">"&session("cpbcode")&"</span></b>")%> <select size="1" name="Cookies_Time" class="bdtj3">
<option value="1">保存一天</option>
<option value="0" selected>不要保存</option>
<option value="365">保存一年</option>
<option value="30">保存一月</option>
</select>
<select size="1" name="o_hidden" class="bdtj3">
<option value="0" selected>正常</option>
<option value="1" >隐身</option>
</select> <a href="reg.asp">我要注册</a> <a href="findpw.asp">忘记密码</a> <input type="submit" name="Submit" value="登录" class="bdtj"></td>
</tr></form>
</tbody>
</table>
<% end if
rsuser.Close
set rsuser=nothing
'滚动新闻开始%>
<table border=1 borderColor=<%=tdc2%> cellPadding=4 cellSpacing=0 width=<%=tdc3%> style="border-collapse: collapse" frame=vsides align=center>
<tbody><tr><td class=tdc1 <%=tColor%> align="center" height="20">
<p align="center">论坛滚动新闻</td>
</tr>
<script language="JavaScript">
var myScroller1 = new Scroller(1, 1,700, 22, 1, 4);
myScroller1.setColors("<%=tColor1%>", "<%=tColor1%>", "<%=tColor1%>");
myScroller1.addItem("<div class=tdc align=center>今天是:<b><%=fyear%> 年 <%=fmonth%> 月 <%=fday%> 日 <%=t_day(fweek)%></b></div>");
myScroller1.addItem("<div class=tdc align=center>欢迎我们的新会员:<b><a href='viewuser.asp?username=<%=HTMLEncode(username1)%>' target=_blank><%=HTMLEncode(username1)%></a></b></div>");
<%sqlconn="select a_title,a_content,a_username,a_time from announce where a_num=0 order by a_time desc"
set rsconn=conn.execute(sqlconn)
if not(rsconn.bof and rsconn.eof) then
do while not rsconn.eof%>
myScroller1.addItem("<div class=tdc align=center>公告:<a href=announce.asp target=_blank><b><%=rsconn("a_title")%></b> </a>发布时间:<b><%=rsconn("a_time")%></b></div>");
<%rsconn.movenext
loop
end if
set rsconn=nothing%>
function runmikescroll() {
var layer;
var mikex, mikey;
layer = getLayer("announce");
mikex = getPageLeft(layer);
mikey = getPageTop(layer);
myScroller1.create();
myScroller1.hide();
myScroller1.moveTo(mikex, mikey);
myScroller1.setzIndex(100);
myScroller1.show();
}
window.onload=runmikescroll
</script>
<tr>
<td class=tdc bgcolor=<%=tColor1%> align="center" height="28"><div id="announce" style="position:relative; width:100%; height:23px;"></div></td>
</tr>
</tbody>
</table>
<tbody>
<table border=1 borderColor=<%=tdc2%> cellPadding=4 cellSpacing=0 width=<%=tdc3%> style="border-collapse: collapse" align=center>
<tr>
<td width="5%" height="22" class=tdc1 <%=hColor%>></td>
<td <%=hColor%> class=tdc1 width="40%">
<p align="center">讨论区</p>
</td>
<td width="6%" align="center" class=tdc1 <%=hColor%>>主题数</td>
<td width="6%" align="center" class=tdc1 <%=hColor%>>总帖数</td>
<td width="22%" align="center" class=tdc1 <%=hColor%>>最后发帖</td>
<td width="12%" align="center" class=tdc1 <%=hColor%>>版主</td>
</tr>
<% '-----------中间讨论区,主题开始 ------------
dim sql_fenlei,rs_fenlei,sql_lanmu,rs_lanmu,sql_topic,rs_topic
sql_fenlei = "select f_id,f_title from fenlei order by f_num"
set rs_fenlei=conn.execute(sql_fenlei)
do while not rs_fenlei.Eof
%>
<tbody> <tr >
<td colspan="6" height="23" <%=tColor%> class=tdc1 width="<%=tdc3%>" > <%=rs_fenlei("f_title")%></td> </tr> </tbody>
<%
sql_lanmu= "select l_id,l_title,l_content,l_topiccount,l_count,s_face,l_access,l_password,l_banzhu from lanmu where f_id="&rs_fenlei("f_id")&" order by l_num"
set rs_lanmu=conn.Execute (sql_lanmu)
do while not rs_lanmu.Eof
l_banzhu=rs_lanmu("l_banzhu")
sql_topic= "select top 1 t_lasttime,t_lastusername,t_count,t_replynum,t_lasttitle,t_id,t_username,t_time from topic where l_id="&rs_lanmu("l_id")&" and t_lock<>2 order by t_lasttime desc"
set rs_topic=conn.Execute (sql_topic)
%>
<tbody><TR class=tdc width="<%=tdc3%>" bgcolor=<%=tcolor1%> onmouseover=this.bgColor='<%=tcolor2%>'; onmouseout=this.bgColor='<%=tcolor1%>';>
<td width="5%" align=center>
<a href=list.asp?l_id=<%=rs_lanmu("l_id")%> target=_blank>
<%if rs_lanmu("l_access")=3 then
response.write("<img border=""0"" src=image/forumlock.gif alt=只读论坛,开新窗口浏览>")
elseif not rs_topic.eof then
if rs_topic("t_lasttime")>u_lastlogin then
response.write("<img border=""0"" src=image/forumnew.gif alt=有新帖,开新窗口浏览>")
else
response.write("<img border=""0"" src=image/forumold.gif alt=无新帖,开新窗口浏览>")
end if
else
response.write("<img border=""0"" src=image/forumold.gif alt=无新帖,开新窗口浏览>")
end if%>
</a> </td>
<td width="40%" valign="top" align=left>
<Table width=98% align=center>
<tbody>
<TR >
<TD class=tdc rowspan="2">
<% if rs_lanmu("s_face")<>"" then response.write("<img border=""0"" src="&rs_lanmu("s_face")&">")%>
</td>
<TD class=tdc align=left >
<a href=list.asp?l_id=<%=rs_lanmu("l_id")%>><%=rs_lanmu("l_title")%></a>
</td>
<td class=tdc align="right" width=20%>
<a href="postnew.asp?l_id=<%=rs_lanmu("l_id")%>" title="在<%=rs_lanmu("l_title")%>论坛内发新主题"><img src=image/quickpost.gif border=0></a>
<a href="postnew.asp?l_id=<%=rs_lanmu("l_id")%>&action=vote"><img src=image/quickvote.gif border=0 alt="在<%=rs_lanmu("l_title")%>论坛内发新投票"></a>
<a href="jinhua.asp?l_id=<%=rs_lanmu("l_id")%>"><img src=image/quickjh.gif border=0 alt="查看<%=rs_lanmu("l_title")%>论坛精华帖"></a>
</td>
</TR>
<tr>
<td colspan="2" class=tdc align=left width=100%>
<%=rs_lanmu("l_content")%>
<%if rs_lanmu("l_access")=2 then
response.write("(版主以上才可进入)")
elseif rs_lanmu("l_access")=1 then
response.write("(注册会员才可以进入)")
elseif rs_lanmu("l_access")=4 then
response.write("(认证会员才可以进入)")
end if%>
</td></tr>
</tbody>
</table>
</td>
<td width="6%" align="center" ><%=rs_lanmu("l_topiccount")%> </td>
<td width="6%" align="center" ><%=rs_lanmu("l_count")+rs_lanmu("l_topiccount")%> </td>
<td width="22%" >
<%
if rs_lanmu("l_password")<>"" then
response.write(" 此为加密版块")
elseif rs_lanmu("l_access")=4 then
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -