%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <% dim king,action:action=request("action") set king=new kingcms king.head 0,0 select case action case"","del" king_def() case else king.error("system/error") end select king_outhtm set king=nothing 'def *** *** www.KingCMS.com *** *** sub king_def() dim classid,supid,sql,rs,i,userip,commentcontent,commentisopen,commentischeck,menupath,commsql dim list,data,menuid,outtitle king.rn=10 list=llll("list") classid=l1ll("classid",2) if cstr(classid)="" then classid=llll("classid") supid=l1ll("supid",2) if cstr(supid)="" then supid=llll("supid") if II11(classid,2)=false or II11(supid,2)=false then king.error("system/error") if len(list)>0 then'当list有值的时候,进行验证。 if II11(list,6)=false then king.error("system/error") end if commentcontent=lll("commentcontent") set rs=conn.execute("select commentisopen,commentischeck from kingsystem where systemname='KingCMS';") if not rs.eof and not rs.bof then commentisopen=rs(0) commentischeck=rs(1) end if set rs=nothing if llll(l1l(left(ll11l("111"),16)))=l1l(ll11l("111")) and len(list)>0 and cstr(king.level)="2" and action="del" then'删除帖子 select case llll("submits") case king.lang("common/del") conn.execute "delete from kingcomment where commentid in ("&list&");" case king.lang("stage/comment/check") conn.execute "update kingcomment set iscomment=0 where commentid in ("&list&");" end select if len(request.ServerVariables("http_referer"))>0 then response.redirect request.ServerVariables("http_referer") else response.redirect king.page&"?supid="&supid&"&classid="&classid&"&pid="&king.pid&"&rn="&king.rn end if end if select case cstr(classid) case"2" set rs=conn.execute("select arttitle,artpath,artdate,menuid,artgrade,artid from kingart where artid="&supid&";")'5 if not rs.eof and not rs.bof then kingtitle="["&king.lang("comment/title")&"]"&rs(0) outtitle=rs(0) menuid=rs(3) menupath=conn.execute("select menupath from kingmenu where menuid="&menuid&";")(0) if cstr(rs(4))="0" then if cstr(king.named)="0" then kingguide=""&htmlencode(rs(0))&"" else kingguide=king.guide(menuid)&""&htmlencode(rs(0))&"" end if else select case cstr(rs(4)) case"1" king.range 1,0 case"2" king.range 4,0 end select kingguide=king.guide(menuid)&""&htmlencode(rs(0))&"" end if else king.error("system/error") end if set rs=nothing commsql="select top 6 artid,arttitle from kingart where artshow=1 order by artrehit desc,artid desc;" end select sql="commentid,commentcontent,iscomment,username,userip,support,commentdate"'6,recommentid if king.level=2 then king.open "select "&sql&" from kingcomment where classid="&classid&" and supid="&supid&" order by commentdate desc;",king.page&"?pid=$&classid="&classid&"&supid="&supid,1 else king.open "select "&sql&" from kingcomment where iscomment=0 and classid="&classid&" and supid="&supid&" order by commentdate desc;",king.page&"?pid=$&classid="&classid&"&supid="&supid,1 end if ol=ol&"