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

📄 top10.asp

📁 blog 程序 DIV BLOG 0.6 Readme [ http://www.IamTing.com ] DIV BLOG 0.6版更新说明 =====================
💻 ASP
字号:
<!--#INCLUDE FILE="conn.asp" -->
<!--#INCLUDE FILE="ubbcode.asp" -->
<html>
<head>
<title>.. TOP 10 Commoted Log ..</title>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">

.caBox { font-size:10px;color:#686868 }
.caBox a:link {  text-decoration: none; color: #009c30; background-color: #ffffff}
.caBox a:visited {  text-decoration: none; color: #009c30; background-color: #FFFFFF}
.caBox a:hover {  text-decoration: none; color: #000000; background-color: #CCCCCC}

a:link {  text-decoration: none; color: #000000}
a:visited {  text-decoration: none; color: #000000}
a:hover {  text-decoration: none; color: #000000}


table,body {
        color: #000000;
	font-family: "Verdana,宋体";
	font-size: 12px;
	
	line-height:15px;
	word-break:break-all;
	}
body{color: #000000}
.bk {  color: #686868; border: 1px solid; border-color: #c8ccc8;font-family: "Verdana,宋体";font-size:12px}
.runhtmlbuttom{border:#000000 1px solid;font-size:10px;font-family:verdana}

</style>
</head>
<body bgcolor="#ffffff" text="#000000"  leftmargin="35" topmargin="5">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
  <tr>
    <td align="center">
    <table width="50%" border="0" cellspacing="1" cellpadding="4" bgcolor="#CCCCCC">
        <tr> 
            <td><b>最新10条评论:</b></td>
        </tr>
        <tr>
            <td bgcolor="#f8f8f8">
<%
function FormatTitle(str) 
if len(trim(str))>=36 then 
FormatTitle=left(trim(str),35)&"..." 
else 
FormatTitle=trim(str)
end if 
end function 

dim top
dim SQL
set top = Server.CreateObject("ADODB.Recordset")
SQL = "Select top 10 * from log_r order by log_r_id desc"
top.open SQL,conn,1,1

i = 0
total = 0

if top.Eof or top.Bof then
   response.write "Sorry, 暂时没有评论"
end if
do until top.Eof or total = 10

Response.Write "<b> "&i+1 &".</b> <a href=""showlog.asp?log_id="& top("log_ID") &"""> "& FormatTitle(top("log_r_content")) &" </a><br><font style='font-size:10px'>&nbsp;&nbsp;&nbsp;| by:["&top("log_r_author")&"] at "&top("r_written_time")&"  |  <b><a href=""showlog.asp?log_id="& top("log_ID") &""" style='color:red'> Show the Log >>> </a></b></font><br><br>"
top.MoveNext          
i = i + 1
total = total + 1
loop                  


set top=nothing
conn.Close
set conn = nothing
%>
</td>
        </tr>
<tr>
    <td>感谢<a href="http://eddyhome.com" target="_blank">Eddy</a>提供最新10评论代码~:)</td>
</tr>
      </table>
    </td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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