📄 best_more.asp
字号:
<!--#include file="conn.asp"-->
<%
'=========================================================
' 随然日记本(多用户版) Version:3.0
' Date: 2004-11-15
' Script Written by 随然(dampure)
' 随然日记本演示地址:http://www.suiran.cn
'=========================================================
' Copyright (C) 2003,2004 真露无香. All rights reserved.
' Web: www.yongzi.com
' Diary:http://www.suiran.cn
'=========================================================
set rs=server.createobject("adodb.recordset")
sql="select * from diary order by best desc, id desc"
rs.open sql,conn,1,1
const MaxPerPage=25
page=request("page")
if page<>empty and page<>"" then
'检测输入页数是否合法
pagestrlong=len(page)
chOK="0123456789"
chvalid=true
j=1
do while j<=pagestrlong
ch=mid(page,j,1)
If instr(chOK,ch)=0 then
chvalid=false
exit do
end if
j=j+1
loop
'检测完毕
if not chvalid then '如果不合法
currentPage=1 '默认为第1页
else
currentPage=int(page) '如果合法则取整数
if currentpage=0 then '如果是0页取1
currentpage=1
end if
end if
else
currentPage=1 '如果空白测取第1页
end if
if rs.eof and rs.bof then
showadd
else
totalPut=rs.recordcount '记录总数
'判断最大显示页数
if totalput<=maxperpage then
maxpagenum=1
else
pageys=totalput/maxperpage
if pageys > int(pageys) then
maxpagenum=int(pageys)+1
else
maxpagenum=int(pageys)
end if
end if
if currentPage=1 then
j = 1
showContent
else
if (currentPage-1)*MaxPerPage>=totalPut then
currentPage=maxpagenum
end if
rs.move (currentPage-1)*MaxPerPage
j = (currentPage-1)*MaxPerPage+1
showContent
end if
rs.close
end if
set rs=nothing
conn.close
set conn=nothing
sub showContent
%>
<HTML><HEAD><TITLE>真露无香-网络日记本——优秀日记</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META http-equiv=robots content=all>
<LINK href="images/styles.css" type=text/css rel=stylesheet>
<STYLE>A {
COLOR: #999999; TEXT-DECORATION: none
}
A:hover {
COLOR: #e65c09; FONT-SIZE: 10pt;LINE-HEIGHT: 14pt; TEXT-DECORATION: underline
}
</STYLE>
<META content="MSHTML 5.50.4522.1800" name=GENERATOR></HEAD>
<BODY leftMargin=0 background=images/bg.gif topMargin=0>
<TABLE cellSpacing=0 cellPadding=0 width=617 align=center border=0>
<TBODY>
<TR>
<TD vAlign=top bgColor=#ffffff height=16>
<TABLE cellSpacing=0 cellPadding=0 width=617 align=center border=0>
<TBODY>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD height=2><IMG height=8 src="images/top01.gif"
width=617></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=609 align=center
border=0><TBODY>
<TR>
<TD width=569 bgColor=#ffffff>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD width="23%">
<DIV align=center><img src="images/diary_title.jpg" width="171" height="47"></DIV></TD>
<TD width="77%">
<DIV align=right></DIV></TD></TR></TBODY></TABLE></TD>
<TD vAlign=bottom width=40 bgColor=#ffffff>
<DIV align=center> </DIV></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=609 align=center
border=0><TBODY>
<TR>
<TD height=2><IMG height=1 src="images/top02.gif"
width=605></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=609 align=center
bgColor=#9c9a9d border=0>
<TBODY>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center
border=0>
<TBODY>
<TR>
<TD width="71%"></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=609 align=center
bgColor=#636562 border=0>
<TBODY>
<TR>
<TD width=319> </TD>
<TD width=290>
<DIV align=center><IMG height=16
src="images/top_words.gif"
width=244></DIV></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=609 align=center
border=0><TBODY>
<TR>
<TD height=2><IMG height=4 src="images/top03.gif"
width=605></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=609 align=center
bgColor=#ffffff border=0>
<TBODY>
<TR>
<TD vAlign=top width=265 height=105><IMG height=105
src="images/title_mini03.jpg" width=416></TD>
<TD vAlign=center width=189 height=105>
<DIV align=center><A target=_blank
href="http://www.yongzi.com"><IMG
height=105 src="images/editor.jpg" width=190
border=0></A></DIV></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=609 align=center
border=0><TBODY>
<TR>
<TD height=2><IMG height=4 src="images/top03.gif"
width=605></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=609 align=center
bgColor=#636562 border=0>
<TBODY>
<TR>
<TD>
<DIV align=left></DIV></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=609 align=center
bgColor=#999999 border=0>
<TBODY>
<TR>
<TD align="center"><a href="index.asp"><FONT color=#ffffff size=2>日记首页</FONT></a> <a href="diary_more.asp"><FONT color=#ffffff size=2>公开日记</FONT></a> <a href="best_more.asp"><FONT color=#ffffff size=2>优秀日记</FONT></a> <a href="user_more.asp"><FONT color=#ffffff size=2>用户列表</FONT></a> <a href="leibie_more.asp"><FONT color=#ffffff size=2>日记类型</FONT></a> <a href="reg.asp"><FONT color=#ffffff size=2>免费注册日记本</FONT></a></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD vAlign=top bgColor=#ffffff>
<TABLE cellSpacing=0 cellPadding=0 width=609 align=center border=0>
<TBODY>
<TR>
<TD height=2>
<TABLE borderColor=#e3e3e3 cellSpacing=0 borderColorDark=#e3e3e3
cellPadding=0 width=609 align=center bgColor=#ffffff border=1
bordercolorlight="#E3E3E3">
<TBODY>
<TR>
<TD width="42%" bgColor=#e6e6e6> <DIV align=center><FONT size=2>主 题</FONT></DIV></TD>
<TD width="10%" bgColor=#e6e6e6> <DIV align=center><FONT size=2>字数</FONT></DIV></TD>
<TD width="8%" bgColor=#e6e6e6> <DIV align=center><FONT size=2>阅读</FONT></DIV></TD>
<TD width="8%" bgColor=#e6e6e6> <DIV align=center><FONT size=2>评论</FONT></DIV></TD>
<TD width="16%" bgColor=#e6e6e6> <DIV align=center><FONT size=2>作者</FONT></DIV></TD>
<TD width="16%" bgColor=#e6e6e6> <DIV align=center><FONT size=2>时间</FONT></DIV></TD>
</TR>
<%
i=1
do while not (rs.eof or err)
if len(rs("title"))>12 then
title=left(rs("title"),12)&"......"
elseif rs("title")="" then
title=left(rs("content"),12)&"......"
else
title=rs("title")
end if
set rs2=server.createobject("adodb.recordset")
sql="select * from admin where userid="&rs("userid")
rs2.open sql,conn,1,1
nickname=rs2("nickname")
user=rs2("user")
nowtime=rs("date")
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -