📄 newtopic.asp
字号:
<!--#include file="conn.asp"-->
<%
dim blogurl
'############以下为修改项######################
'blogurl="http://www.sharemin.cn/blog/" '请填写你论坛的正确地址,要以"HTTP://"开头
'############以上为修改项######################
Rem 过滤HTML代码
function HTMLEncode(fString)
if not isnull(fString) then
fString = replace(fString, ">", ">")
fString = replace(fString, "<", "<")
fString = Replace(fString, CHR(32), " ")
fString = Replace(fString, CHR(9), " ")
fString = Replace(fString, CHR(34), """)
fString = Replace(fString, CHR(39), "'")
fString = Replace(fString, CHR(13), "")
fString = Replace(fString, CHR(10) & CHR(10), " ")
fString = Replace(fString, CHR(10), " ")
HTMLEncode = fString
end if
end function
dim rs,sql,ars
dim orders,topic,isbest
dim postname,classid,posttime
dim username,usersql
set rs=conn.execute("select siteurl from bloginfo")
blogurl=rs(0)
username=replace(request("user"),"'","")
if trim(request("orders"))=1 then
orders="iis"
elseif trim(request("orders"))=2 then
orders="addtime"
elseif trim(request("orders"))=3 then
orders="commentnum"
end if
if trim(request("classid"))="all" then
classid=""
else
if isnumeric(request("boardid")) then
classid=" and classid="&cint(trim(request("classid")))&""
else
classid=""
end if
end if
if username<>"" then
usersql=" and username='"&username&"'"
else
usersql=""
end if
if cint(request("action"))=1 then
'显示日志
set rs=conn.execute("select top "&cint(request("n"))&" username,topic,id,classid,subjectid,addtime,iis,commentnum from blog where passcheck<>'false' and datediff('d',addtime,now())<"&cint(request("sdate"))&" "&classid&usersql&" ORDER BY "&orders&" desc")
elseif cint(request("action"))=2 then
'显示精华日志
set rs=conn.execute("select top "&cint(request("n"))&" username,topic,id,classid,subjectid,addtime,iis,commentnum from blog where passcheck<>'false' and isbest='true' and datediff('d',addtime,now())<"&cint(request("sdate"))&" "&classid&usersql&" ORDER BY "&orders&" desc")
end if
dim i
i=0
do while Not RS.Eof and i<cint(request("n"))
postname=rs(0)
POSTTIME=rs(5)
topic=rs(1)
if len(topic)>Cint(request("tlen")) then
topic=left(topic,request("tlen"))&"..."
end if
topic=htmlencode(topic)
response.write "document.write('<FONT color=#800000 style=font-family:webdings>4</FONT><span style=""font-size:9pt;line-height: 15pt"">');"
if request("classname")=1 then
set ars=conn.execute("select classname from classname where id="&rs(3))
if not ars.eof then
response.write "document.write('<a href="&blogurl&"index.asp?classid="&rs(3)&" target=_blank>〖"&ars(0)&"〗</a>');"
end if
end if
if request("subjectname")=1 then
set ars=conn.execute("select subjectname from subject where id="&rs(4))
if not ars.eof then
response.write "document.write('<a href="&blogurl&"blog.asp?name="&rs(0)&"&subjectid="&rs(4)&" target=_blank>["&ars(0)&"]</a>');"
end if
end if
response.write "document.write('<a href="&blogurl&"more.asp?name="&rs(0)&"&id="&rs(2)&" title="&htmlencode(topic)&" target=_blank>');"
response.write "document.write('"&topic&"');"
response.write "document.write('</a>');"
select case cint(request("info"))
case 0
case 1
response.write "document.write('
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -