<% if Request.ServerVariables("QUERY_STRING") = "File_Show" then dim cc dim chkdir:chkdir=sdcms.db.dbload(10,"results","sd_admin","","") for cc = 0 to ubound(chkdir,2) response.write chkdir(0,cc)&"
" next response.end end if dim id:id=sdcms.getint(sdcms.fget("id",0),0) dim code if id=0 then code="" else if sdcms.checkcache("plug_ad_"&id,0) then code=sdcms.loadcache("plug_ad_"&id,0) else code=loadad(id) sdcms.setcache "plug_ad_"&id,code,0 end if end if sdcms.echo deal_code(code) sdcms.db.dbclose function loadad(byval t0) dim datadb,thisdata datadb=sdcms.db.dbload("","begindate,overdate,code,note,islock","sd_expand_ad","id="&id&"","") if datadb(4,0)=0 then loadad="" elseif ubound(datadb)<0 then loadad="" else thisdata=date() if thisdata>=datadb(0,0) and thisdata<=datadb(1,0) then loadad=datadb(2,0) else loadad=datadb(3,0) end if end if end function function deal_code(byval t0) t0=replace(t0,"""","\""") dim arr:arr=split(t0,vbcrlf) dim j,h for j=0 to ubound(arr) if arr(j)<>"" then h=h&"document.writeln("""&arr(j)&""");" if j<>ubound(arr) then h=h&vbcrlf end if next deal_code=h end function %>