[2007正式版以上]最新主题 最新回复 热门帖子 精华帖子 + 蓝飞快速登陆!

By 神话工作室 at 2007-07-22 • 0人收藏 • 1337人看过

修改版,但是不知道原创是谁了!

我自己测试了 2007.2   2007.3.1

打开 Default.asp

找到

<table cellspacing=1 cellpadding=5 width=100% id=CommonListArea>
 <tr id=CommonListTitle>
  <td>公告</td>
 </tr>
 <tr id=CommonListCell>
  <td>
   <marquee onMouseOver="this.stop();" onMouseOut="this.start();" scrollAmount="3">
 <%
  Do While Not Rs.Eof
   Response.Write "<a href='ShowPost.asp?ThreadID="&Rs("ThreadID")&"'><b>"&Rs("Topic")&"</b> ("&FormatDateTime(Rs("PostTime"),2)&")</a>  "
   Rs.MoveNext
  Loop
 %> 
   </marquee>
  </td>
 </tr>
</table>

<%
End If
Rs.Close

 

(在此处加下面的代码!)

if GroupID>0 then GroupIDSQL=" and GroupID="&GroupID&""

 

代码1:(首页调用)

ShowTopic=10 '每项最多显示多少条
'if Cookieskins=default then
cutnum=13 '截取标题长度
'end if
'if Cookieskins=green then
'cutnum=17 '截取标题长度
'end if
Iconsize=14 '表情图片到小
%>
<table cellspacing=1 cellpadding=5 width=100% id=CommonListArea>
<tr id=CommonListTitle>
<td width=25%>最新主题</td>
<td width=25%>最新回复</td>
<td width=25%>热门帖子</td>
<td width=25%>精华帖子</td>
</tr>
<tr id=CommonListCell>
<td width="25%" valign="top">
<table border="0" cellpadding="0" cellspacing="0">
<%
sql="select top 10 * from [BBSXP_Threads] where IsApproved=1 and IsDel=0 order by ThreadID Desc"
Set Rs=Conn.Execute(sql)
if Rs.Eof then
response.write "暂无"
else
i=0
while Not Rs.eof and i<ShowTopic
Topic=LTrim(left(ReplaceText(Rs("Topic"),"<[^>]*>",""),cutnum))
response.write("<tr id=CommonListCell><td height=18><IMG Src=images/expand.gif border=0>&nbsp;<a href='ShowPost.asp?ThreadID="&Rs("ThreadID")&"' title="&ReplaceText(rs("topic"),"<[^>]*>","")&">"&Topic&"</a></td></tr>")
Rs.MoveNext
i=i+1
wend
Rs.close
end if
 %>
 </table>
</td>
<td width="25%" valign="top">
<table border="0" cellpadding="0" cellspacing="0">
<%
sql="select top 10 * from [BBSXP_Threads] where IsApproved=1 and IsDel=0 and TotalReplies>0 order by LastTime Desc"
Set Rs=Conn.Execute(sql)
if Rs.Eof then
response.write "暂无"
else
i=0
while Not Rs.eof and i<ShowTopic
Topic=LTrim(left(ReplaceText(Rs("Topic"),"<[^>]*>",""),cutnum))
response.write("<tr id=CommonListCell><td height=18><IMG Src=images/expand.gif border=0>&nbsp;<a href='ShowPost.asp?ThreadID="&Rs("ThreadID")&"' title="&ReplaceText(rs("topic"),"<[^>]*>","")&">"&Topic&"</a></td></tr>")
Rs.MoveNext
i=i+1
wend
Rs.close
end if
%>
</table>
</td>
<td width="25%" valign="top">
<table border="0" cellpadding="0" cellspacing="0">
<%
sql="select top 10 * from [BBSXP_Threads] where IsApproved=1 and IsDel=0 and PostTime>"&SqlNowString&"-"&SiteConfig("PopularPostThresholdDays")&" order by TotalReplies Desc"
Set Rs=Conn.Execute(sql)
if Rs.Eof then
response.write "暂无"
else
i=0
while Not Rs.eof and i<ShowTopic
Topic=LTrim(left(ReplaceText(Rs("Topic"),"<[^>]*>",""),cutnum))
response.write("<tr id=CommonListCell><td height=18><IMG Src=images/expand.gif border=0>&nbsp;<a href='ShowPost.asp?ThreadID="&Rs("ThreadID")&"' title="&ReplaceText(rs("topic"),"<[^>]*>","")&">"&Topic&"</a></td></tr>")
Rs.MoveNext
i=i+1
wend
Rs.close
end if
%>
</table>
</td>
<td width="25%" valign="top">
<table border="0" cellpadding="0" cellspacing="0">
<%
Sql="Select Top 10 * From [BBSXP_Threads] where IsApproved=1 and IsDel=0 and IsGood=1 order by ThreadID Desc"
Set Rs=Conn.Execute(sql)
if Rs.Eof then
response.write "暂无"
else
i=0
while Not Rs.eof and i<ShowTopic
Topic=LTrim(left(ReplaceText(Rs("Topic"),"<[^>]*>",""),cutnum))
response.write("<tr id=CommonListCell><td height=18><IMG Src=images/expand.gif border=0>&nbsp;<a href='ShowPost.asp?ThreadID="&Rs("ThreadID")&"' title="&ReplaceText(rs("topic"),"<[^>]*>","")&">"&Topic&"</a></td></tr>")
Rs.MoveNext
i=i+1
wend
Rs.close
end if
%>
</table>
</td>
</tr>
</table>
<%

 

代码2:(首页调用+蓝飞快速登陆)

if CookieUserName=empty then
%>
  <center>
<table cellspacing=1 cellpadding=5 width=100% id=CommonListArea>
 <form action="Login.asp" method="POST" name=form>
 <tr id=CommonListTitle>
  <td width="20%">快速登录</td>
  <td width="80%">游客 -> 请 [<a href=Login.asp>登录</a>] 或 [<a href="CreateUser.asp">注册</a>] 后进行操作</td>
  </tr>
  <tr id=CommonListCell>
    <td width="973" colspan="2">用户名称:<input name="UserName" value="<%=CookieUserName%>" style="WIDTH:90" size="10">
    用户密码:<input type="password" name="Userpass" style="WIDTH:90" size="10">
    <%if SiteConfig("EnableAntiSpamTextGenerateForLogin")=1 then%>
    验证码:<input name="VerifyCode" MaxLength="4" size="10" onblur="CheckVerifyCode(this.value)" onKeyUp="if (this.value.length == 4)CheckVerifyCode(this.value)"><img src="VerifyCode.asp" title="验证码,看不清楚?请点击刷新验证码" style="cursor:pointer" onclick="this.src='VerifyCode.asp?'+Math.random()"> <span id="CheckVerifyCode" style="color:#FF0000"></span>
    <%end if%>
    <input type="checkbox" value="1" name="IsSave" id="IsSave"><label for="IsSave">自动登录</label>
    <input type="submit" value=" 登录 ">
    <input onclick="window.location='CreateUser.asp';" type="submit" value=" 注册 " name="Submit">
    <a href="RecoverPassword.asp">找回密码</a></td>
  </tr></f<%response.write "orm"%>>
</table>
  </center>
<%end if%>
<br>
<%
ShowTopic=10 '每项最多显示多少条
'if Cookieskins=default then
cutnum=13 '截取标题长度
'end if
'if Cookieskins=green then
'cutnum=17 '截取标题长度
'end if
Iconsize=14 '表情图片到小
%>
<table cellspacing=1 cellpadding=5 width=100% id=CommonListArea>
<tr id=CommonListTitle>
<td width=25%>最新主题</td>
<td width=25%>最新回复</td>
<td width=25%>热门帖子</td>
<td width=25%>精华帖子</td>
</tr>
<tr id=CommonListCell>
<td width="25%" valign="top">
<table border="0" cellpadding="0" cellspacing="0">
<%
sql="select top 10 * from [BBSXP_Threads] where IsApproved=1 and IsDel=0 order by ThreadID Desc"
Set Rs=Conn.Execute(sql)
if Rs.Eof then
response.write "暂无"
else
i=0
while Not Rs.eof and i<ShowTopic
Topic=LTrim(left(ReplaceText(Rs("Topic"),"<[^>]*>",""),cutnum))
response.write("<tr id=CommonListCell><td height=18><IMG Src=images/expand.gif border=0>&nbsp;<a href='ShowPost.asp?ThreadID="&Rs("ThreadID")&"' title="&ReplaceText(rs("topic"),"<[^>]*>","")&">"&Topic&"</a></td></tr>")
Rs.MoveNext
i=i+1
wend
Rs.close
end if
 %>
 </table>
</td>
<td width="25%" valign="top">
<table border="0" cellpadding="0" cellspacing="0">
<%
sql="select top 10 * from [BBSXP_Threads] where IsApproved=1 and IsDel=0 and TotalReplies>0 order by LastTime Desc"
Set Rs=Conn.Execute(sql)
if Rs.Eof then
response.write "暂无"
else
i=0
while Not Rs.eof and i<ShowTopic
Topic=LTrim(left(ReplaceText(Rs("Topic"),"<[^>]*>",""),cutnum))
response.write("<tr id=CommonListCell><td height=18><IMG Src=images/expand.gif border=0>&nbsp;<a href='ShowPost.asp?ThreadID="&Rs("ThreadID")&"' title="&ReplaceText(rs("topic"),"<[^>]*>","")&">"&Topic&"</a></td></tr>")
Rs.MoveNext
i=i+1
wend
Rs.close
end if
%>
</table>
</td>
<td width="25%" valign="top">
<table border="0" cellpadding="0" cellspacing="0">
<%
sql="select top 10 * from [BBSXP_Threads] where IsApproved=1 and IsDel=0 and PostTime>"&SqlNowString&"-"&SiteConfig("PopularPostThresholdDays")&" order by TotalReplies Desc"
Set Rs=Conn.Execute(sql)
if Rs.Eof then
response.write "暂无"
else
i=0
while Not Rs.eof and i<ShowTopic
Topic=LTrim(left(ReplaceText(Rs("Topic"),"<[^>]*>",""),cutnum))
response.write("<tr id=CommonListCell><td height=18><IMG Src=images/expand.gif border=0>&nbsp;<a href='ShowPost.asp?ThreadID="&Rs("ThreadID")&"' title="&ReplaceText(rs("topic"),"<[^>]*>","")&">"&Topic&"</a></td></tr>")
Rs.MoveNext
i=i+1
wend
Rs.close
end if
%>
</table>
</td>
<td width="25%" valign="top">
<table border="0" cellpadding="0" cellspacing="0">
<%
Sql="Select Top 10 * From [BBSXP_Threads] where IsApproved=1 and IsDel=0 and IsGood=1 order by ThreadID Desc"
Set Rs=Conn.Execute(sql)
if Rs.Eof then
response.write "暂无"
else
i=0
while Not Rs.eof and i<ShowTopic
Topic=LTrim(left(ReplaceText(Rs("Topic"),"<[^>]*>",""),cutnum))
response.write("<tr id=CommonListCell><td height=18><IMG Src=images/expand.gif border=0>&nbsp;<a href='ShowPost.asp?ThreadID="&Rs("ThreadID")&"' title="&ReplaceText(rs("topic"),"<[^>]*>","")&">"&Topic&"</a></td></tr>")
Rs.MoveNext
i=i+1
wend
Rs.close
end if
%>
</table>
</td>
</tr>
</table>
<%

[此帖子已被 admin 在 2007-8-6 14:58:45 编辑过]

1 个回复 | 最后更新于 2008-07-01
2008-07-01   #1
试一下先

登录后方可回帖

登 录
信息栏

Carbon Forum是一个基于话题的高性能轻型PHP论坛

下载地址:Carbon Forum v5.9.0
QQ群:12607708(QQ我不常上)

donate

手机支付宝扫描上方二维码可向本项目捐款

粤公网安备 44030602003677号
粤ICP备17135490号

Loading...