%
'*** *** *** *** ***
' 发帖页面
'*** *** *** *** ***
dim fb
set king=new kingcms
king.checkplugin king.path'检查插件安装状态
set fb=new feedback
select case action
case "" king_def
case "post" king_post
end select
set fb=nothing
set king=nothing
'write *** Copyright © KingCMS.com All Rights Reserved. ***
sub king_def()
dim sql,rs,data,dp,i,rn,pid,I1
pid=quest("pid",0):if len(pid)=0 then pid=1
rn=quest("rn",0):if len(rn)=0 then rn=50
sql="fbid,fbtitle,fbcontent,fbname,fbmail,fbtel,fbphone,fbip,fbdate,fbreplyname,fbreplycontent,fbreplydate"
king.ol="
"
king.ol="
"
king.ol="
"
king.ol="
我要留言"
king.ol="
"
king.ol="
"
king.ol="
查看留言"
king.ol="
"
king.ol="
"
king.ol="
"
set dp=new record
dp.create "select "&sql&" from king"&fb.path&" where fbshow=1 order by fbid desc;"
king.ol=dp.plist
for i=0 to dp.length
king.ol="
"
king.ol="
[NO."&htmlencode(dp.data(0,i))&"]"&fb.lang("list/name")&":"&htmlencode(dp.data(3,i))&"
"
king.ol="
留言时间: "&htmlencode(dp.data(8,i))&"
"
king.ol="
"&fb.lang("list/ip")&":"&htmlencode(dp.data(7,i))&"
"
king.ol="
"&fb.lang("list/title")&":"&htmlencode(dp.data(1,i))&"
"
king.ol="
内容:"&king.ubbencode(dp.data(2,i))
if len(dp.data(10,i))>0 then
king.ol="
"
king.ol="
回复:"&king.ubbencode(dp.data(10,i))&"
"
king.ol="
"
end if
king.ol="
"
king.ol="
"
next
king.ol=dp.plist
set dp=nothing
king.ol="
"
king.ol="
"
king.value "title",encode(fb.lang("common/title"))
king.value "inside",encode(king.writeol)
king.outhtm fb.template,"",king.invalue
end sub
'write *** Copyright © KingCMS.com All Rights Reserved. ***
sub king_post()
dim sql,data,dataform,i,re,count
sql="fbtitle,fbcontent,fbname,fbmail,fbtel,fbphone,fbshow"
re=request.servervariables("http_referer")
if len(form("re"))>0 then re=form("re"):if len(re)=0 then re="/"
if king_dbtype=1 then
count=conn.execute("select count(*) from king"&fb.path&" where fbip='"&safe(king.ip)&"' and getdate()-fbdate<0.25;")(0)
else
count=conn.execute("select count(*) from king"&fb.path&" where fbip='"&safe(king.ip)&"' and now()-fbdate<0.25;")(0)
end if
king.ol=""
king.ol="
"
king.ol="
我要留言"
king.ol="
"
king.ol="
"
king.ol="
查看留言"
king.ol="
"
king.ol="
"
if cdbl(count)"
king.ol=""
king.ol=""
if king.ismethod and king.ischeck then
conn.execute "insert into king"&fb.path&" ("&sql&",fbip,fbdate) values ('"&safe(data(0))&"','"&safe(data(1))&"','"&safe(data(2))&"','"&safe(data(3))&"','"&safe(data(4))&"','"&safe(data(5))&"','"&safe(fb.fbshow)&"','"&safe(king.ip)&"','"&safe(tnow)&"');"
king.clearol
king.ol=""
king.ol="
发表留言 浏览留言"
king.ol="
"
end if
else
king.ol="
"
end if
king.ol="
"
king.value "title",encode(fb.lang("common/title"))
king.value "inside",encode(king.writeol)
king.outhtm fb.template,"",king.invalue
end sub
%>