📄 news.asp
字号:
<!--#include file="conn.asp"-->
<%
'<script src="news.asp?ListNum=10&ShowLenght=30&ShowDate=1&ShowGuestName=1"></script>
'ListNum--调用条数
'ShowLenght--标题字符数
'ShowDate--是否显示留言时间
'ShowGuestName--是否显示姓名
'*************************************
dim Rs,ListNum,ShowDate,ShowGuestName,ShowOpen,ShowNew
if trim(request("ListNum"))<>"" and IsNumeric(request("ListNum")) then
ListNum=cint(request("ListNum"))
else
ListNum=8
end if
if trim(request("ShowDate"))<>"" and IsNumeric(request("ShowDate")) then
ShowDate=cint(request("ShowDate"))
else
ShowDate=0
end if
if trim(request("ShowGuestName"))<>"" and IsNumeric(request("ShowGuestName")) then
ShowGuestName=cint(request("ShowGuestName"))
else
ShowGuestName=0
end if
if trim(request("ShowOpen"))<>"" and IsNumeric(request("ShowOpen")) then
ShowOpen=cint(request("ShowOpen"))
else
ShowOpen=0
end if
if trim(request("ShowNew"))<>"" and IsNumeric(request("ShowNew")) then
ShowNew=cint(request("ShowNew"))
else
ShowNew=0
end if
set Rs=conn.execute("select top "&ListNum&" * from gb ORDER BY id DESC")
If not Rs.Eof then
for i=1 to ListNum and not Rs.bof
id=Rs(0)
title=Rs(1)
title = Replace(title,"<I></I> ",CHR(32))
if len(title)>Cint(request("ShowLenght")) then
title=left(title,request("ShowLenght"))&"..."
end if
if ShowGuestName=1 then
name=Rs(2)
else
name=""
end if
if ShowDate=1 then
POSTTIME=Rs(4)
else
POSTTIME=""
end if
if Rs(6)="close" then title="悄悄话"
if left(Rs(6),2)="wa" then title="待审核留言"
response.write "document.write('<font color=#FF6666>○</font> <a href=ViewLY.asp?id="&id&">"&title&"</a> "&name&" "&POSTTIME&"<br>');"
Rs.movenext
if Rs.eof then exit for
Next
response.write "document.write('<p align=right><a href=index.asp>More...</a> </p>');"
else
response.write "document.write('暂未有新留言!!');"
end if
Rs.close
set Rs=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -