<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <% dim king,action:action=request("action") set king=new kingcms king.head 0,0 select case action case"" king_def() case else king.error("system/error") end select set king=nothing 'def *** *** www.KingCMS.com *** *** sub king_def() dim rs,sql,data,datamenu,invalue,tmphtm,arrcontent,artpath,isbot,artid artid=l1ll(1,8) sql ="artid,menuid,arttitle,artauthor,artfrom,artcontent,artinput,artkeyword,artdescription"'8 sql=sql&",artpath,artimg,artdate,sysdate,artgrade,arthit,artrehit"'15 isbot=king.robot() set rs=conn.execute("select "&sql&" from kingart where artid="&artid&";") if not rs.bof and not rs.eof then data=rs.getrows() else king.error("sub2/tip/none") end if rs.close set rs=nothing sql="menulanguage,menutmp,menupath,menuname" set rs=conn.execute("select "&sql&" from kingmenu where menuid="&data(1,0)&" and classid=2;") if not rs.eof and not rs.bof then datamenu=rs.getrows() else king.error("system/error") end if rs.close set rs=nothing '判断是否为爬虫,如果是爬虫,就跳过验证,直接输出 if isbot=false then '判断访问级别,如果是无验证文件,就自动跳转到相关的静态页面去. select case cstr(data(13,0)) case"0" if cstr(king.named)="0" then artpath=data(9,0) else artpath=III11(data(12,0))&"/"&data(9,0) artpath="../"&datamenu(2,0)&"/"&artpath&king.ext if lllll(artpath) then response.redirect artpath'如果文件存在就跳过去 case"1" king.range 1,0 case"2" king.range 4,0 case else king.error("system/error") end select end if king.language=datamenu(0,0) arrcontent=split(data(5,0),king_break) if king.pid-1>ubound(arrcontent) then king.error("system/error") tmphtm=datamenu(1,0) invalue="title:"&I11II(htmlencode(data(2,0))) invalue=invalue&"|keyword:"&I11II(htmlencode(data(7,0))) invalue=invalue&"|date:"&I11II(data(11,0)) invalue=invalue&"|guide:"&I11II(king.guide(data(1,0))&htmlencode(data(2,0))) invalue=invalue&"|description:"&I11II(htmlencode(king.cls(data(8,0)))) if isbot=false and ubound(arrcontent)>0 then'若为爬虫,就不需要显示第2页 invalue=invalue&"|pagelist:"&I11II(IlI(king.page&"?pid=$&/"&data(0,0)&king.ext,king.pid,ubound(arrcontent)+1)) end if invalue=invalue&"|artid:"&data(0,0) invalue=invalue&"|menuid:"&data(1,0) invalue=invalue&"|from:"&I11II(htmlencode(data(4,0))) if len(data(10,0))>0 then invalue=invalue&"|image:"&I11II(III11(data(12,0))&"/"&data(10,0)) else invalue=invalue&"|image:"&I11II("not/notpic.gif") end if invalue=invalue&"|author:"&I11II(htmlencode(data(3,0))) invalue=invalue&"|input:"&I11II(htmlencode(data(6,0))) invalue=invalue&"|path:"&I11II(king.inst&king.path&"/article.asp?"&data(9,0)&king.ext) if isbot then'如果是爬虫,就格式化content值.不要完全显示,以免被人伪造useragent后查看 invalue=invalue&"|content:"&I11II(king.lefte(llIIl(arrcontent(0)),1000)) else invalue=invalue&"|content:"&I11II(arrcontent(king.pid-1)) end if invalue=invalue&"|comment:"&I11II(king.inst&king.path&"/comment.asp?supid="&data(0,0)&"&classid=2") invalue=invalue&"|menupath:"&I11II(king.inst&datamenu(2,0)&"/index"&king.ext) invalue=invalue&"|menuname:"&I11II(htmlencode(data(3,0))) invalue=invalue&"|hit:"&I11II(cdbl(data(14,0))+1) invalue=invalue&"|revert:"&I11II(data(15,0)) response.write king.create(tmphtm,invalue,0) ol="" end sub 'out *** *** www.KingCMS.com *** *** sub king_outhtm() l403 end sub %>