<%''session.codepage=936 ''response.charset="gb2312" session.timeout=240 ''Server.ScriptTimeOut=300 bwlj = "http://" + request.servervariables("server_name") + request.servervariables("url") ybwlj = bwlj & "?" & Request.QueryString cs = replace(bwlj,"http://","") if instr(cs,"/")>0 then bwlj = left(bwlj,instrrev(bwlj,"/")-1) function clwjm(wjm) if len(wjm)>20 then xszt = left(wjm,20) xszt = replace(xszt," ","-") xszt = replace(xszt,"!","") xszt = replace(xszt,",","") xszt = replace(xszt,",","") xszt = replace(xszt,".","") xszt = replace(xszt,"。","") xszt = replace(xszt,"!","") xszt = replace(xszt,"?","") xszt = replace(xszt,"<","") xszt = replace(xszt,">","") xszt = replace(xszt,":","") xszt = replace(xszt,"""","") xszt = replace(xszt,"/","") xszt = replace(xszt,"\\","") clwjm = "" end function Function CheckDir(byval FolderPath) dim fso Set fso = Server.CreateObject("Scripting.FileSystemObject") If fso.FolderExists(Server.MapPath(folderpath)) then ''存在 CheckDir = True Else ''不存在 CheckDir = False End if Set fso = nothing End Function Function CopyMyFolder(FolderName,FolderPath) sFolder=server.mappath(FolderName) oFolder=server.mappath(FolderPath) set fso=server.createobject("scripting.filesystemobject") if fso.folderexists(server.mappath(FolderName)) Then'检查原文件夹是否存在 if fso.folderexists(server.mappath(FolderPath)) Then'检查目标文件夹是否存在 fso.copyfolder sFolder,oFolder Else CreateNewFolder = Server.Mappath(FolderPath) fso.CreateFolder(CreateNewFolder) fso.copyfolder sFolder,oFolder End if end if End Function Function Copyfile(FolderName,FolderPath) sFolder=server.mappath(FolderName) oFolder=server.mappath(FolderPath) Set fs = CreateObject("Scripting.FileSystemObject") If fs.FileExists(sFolder) Then fs.copyfile sFolder,oFolder end if set fs=nothing End Function Function MakeNewsDir(byval foldername) on error resume next dim fso MakeNewsDir = false Set fso = Server.CreateObject("Scripting.FileSystemObject") fso.CreateFolder(Server.MapPath(foldername)) If fso.FolderExists(Server.MapPath(foldername)) Then MakeNewsDir = True Else MakeNewsDir = False End If Set fso = nothing End Function set conn=server.createobject("adodb.connection") conn.open "Provider=Microsoft.Jet.OLEDB.4.0;User Id=admin;jet OleDB:Database Password=;Data Source="&Server.MapPath("db/#gbbsdb.mdb") function close_conn() conn.close set conn=nothing end function Function dirSize(ml) Set MyFileSize = Server.CreateObject ("Scripting.FileSystemObject") MyPath = Server.MapPath("pro") Set MyFolder = MyFileSize.GetFolder(MyPath) aaa = cstr(MyFolder.Size/1024/1024) if left(aaa,1)="." then dirSize = "0" + left(aaa,4) else dirSize = left(aaa,4) end if End Function function user(cc)%> <%set rs = server.createobject("adodb.recordset") exec="SELECT top "&cstr(cc)&" yhm,count(yhm) as gs FROM yrwl_tb_dlxx GROUP BY yhm ORDER BY count(yhm) DESC" rs.open exec,CONN,3,1 while not rs.eof yhm = rs("yhm") cs = rs("gs")%>
  • <%=yhm%> 登陆<%=cs%>
  • <%rs.movenext wend%> <%rs.close set rs=nothing end function function userlist(gs,cc)%> <%set rs = server.createobject("adodb.recordset") exec="SELECT top "&cstr(cc)&" yhm,count(yhm) as gs FROM yrwl_tb_dlxx GROUP BY yhm ORDER BY count(yhm) DESC" rs.open exec,CONN,3,1 i = 1 while not rs.eof yhm = rs("yhm") cs = rs("gs")%> <%=yhm%> 登陆<%=cs%>     <%if i = gs then response.write "
    " i = 1 end if i = i+1 rs.movenext wend%> <%rs.close set rs=nothing end function sub sybbs(gs,tj,ys,issj)%> <%set rs = server.createobject("adodb.recordset") if instr(tj,"id")>0 then stj = "order by id desc" else stj = "order by dj desc" end if exec="select top "&cstr(tjgs)&" dj,zhhf,lt.id,zt,furl from yrwl_tb_lt lt where lt.id >=(SELECT Min(id) FROM (SELECT TOP "&cstr(tjgs)&" id,dj FROM yrwl_tb_lt where zid='s'"&tj&") A) and zid='s'"&tj response.write "" rs.open exec,CONN,3,1 while not rs.eof furl = rs("furl") zt = rs("zt") if instr(zt,"font")>0 then hzt = left(zt,len(zt)-7) if len(hzt)>20 then zt = right(hzt,len(hzt)-20) zt = replace(zt,"<","<") zt = replace(zt,"<",">") else if len(zt) >= gs then zt = left(zt,gs)&"." end if if issj<>"" then zhhf = rs("zhhf") sj = left(zhhf,8) end if id = rs("id") dj = rs("dj")%>
  • <%if ys<>"" then response.write "" end if%> <%=zt%>    查看<%=dj%>次 <%if ys<>"" then response.write "" end if%> <%if issj <> "" then%>   <%=sj%> <%end if%>
  • <% rs.movenext wend rs.close set rs=nothing end sub function newuser(cc,style_css,ys) if style_css<>"" then style_css = "class="""+style_css+"""" end if%> <%rs.close set rs=nothing end function function voteuser(cc)%> <%set rs = server.createobject("adodb.recordset") exec="SELECT top "+cstr(cc)+" yhm,sj,ck FROM yrwl_tb_dlxx where ck like '%参与%调查%' order by id DESC" rs.open exec,CONN,3,1 while not rs.eof yhm = rs("yhm") ck = rs("ck") sj = left(rs("sj"),8)%>
  • <%=yhm%> <%=ck%>
  • <%rs.movenext wend%> <%rs.close set rs=nothing end function function linksh(gs,lx,zt)%> <%set rs = server.createobject("adodb.recordset") if lx <>"" then tj = "and lx='"+lx+"'" exec="select top "&cstr(gs)&" * from yrwl_tb_link where 1=1 "&tj&" order by str(px)" rs.open exec,CONN,3,1 gs = rs.recordcount while not rs.eof link1 = rs("uri") logo1 = rs("logo") sm = rs("name")%>
  • <%if logo1 <> "" then%> <%else%> <%=sm%> <%end if%>
  • <%rs.movenext wend rs.close set rs=nothing end function Function GetURL(url) Set Retrieval = CreateObject("Microsoft.XMLHTTP") With Retrieval .Open "GET", url, False .Send if len(.responsebody) > 5 then GetURL = bytes2bstr(.responsebody) else GetURL = "" end if End With Set Retrieval = Nothing End Function function bytes2bstr(vin) strreturn = "" for i = 1 to lenb(vin) thischarcode = ascb(midb(vin,i,1)) if thischarcode < &h80 then strreturn = strreturn & chr(thischarcode) else nextcharcode = ascb(midb(vin,i+1,1)) strreturn = strreturn & chr(clng(thischarcode) * &h100 + cint(nextcharcode)) i = i + 1 end if next bytes2bstr = strreturn end function function kill_keyword(txt) kill = keyword_kill kill = split(kill,",") for i = 0 to ubound(kill) headk = "" killx = "" if instr(txt,kill(i))>0 then headk = left(kill(i),1) for jc=1 to len(kill(i))-1 killx = killx + "*" next txt = replace(txt,kill(i),headk + killx) end if next kill_keyword = txt end function function plid(id) if right( id , 1) = "," then plid = left(id , len(id) - 1) end if end function function wj_del(filename) Dim fso Set fso = CreateObject("Scripting.FileSystemObject") ywjm = filename filename=Server.mappath(filename) if fso.fileExists(filename) then fso.DeleteFile filename call back("xxfh","删除" & ywjm & "成功!") end function function chrzh(zh) if zh<>"" then zh = trim(zh) ch = split(zh,",") for i = 0 to ubound(ch) strz = strz + chr(ch(i)) next end if chrzh = strz end function Function bzrq() sxsj = "0" + right(cstr(year(date())),1) sx_y = cstr(month(date())) if len(trim(sx_y)) = 1 then sx_y = "0" + sx_y sx_r = cstr(day(date())) if len(trim(sx_r)) = 1 then sx_r = "0" + sx_r bzrq= sxsj + "-" + sx_y + "-" + sx_R end function function asczh(zh) if zh<>"" then zh = trim(zh) for i =1 to len(zh) zz = cstr(mid (zh,i,1)) stt = stt + "," + cstr(asc(zz)) next end if asczh = right(stt,len(stt)-1) end function sub pagefy(page,zys,url) ''page 当前页 zys 总页数 URL 当前页URL if instr(url,"?") > 0 then tj = url + "&" else tj = url + "?" end if if page > zys then page = zys if page = 1 then sypage = 1 xypage = 1 + 1 else sypage = page - 1 xypage = page + 1 end if response.write "" response.write "" response.write " " response.write " " response.write " " response.write " " response.write " " response.write "
    "+cstr(page)+"/"+cstr(zys)+"首页上一页 下一页未页"+"" response.write " 跳转
    " end sub sub num_page(page,zys,url) response.write "共 " & zys & " 页 当前第" if page > zys then page = zys if page >5 then ks = page - 3 response.write " 1.. " else ks = 1 end if if ks + 5 > zys then js = zys else js = ks + 5 end if for i = ks to js if i = page then response.write " " & cstr(i) & " " else response.write " " & cstr(i) & " " end if next if js=0 then response.write " 1 " if ks + 5 < zys then response.write " .."+cstr(zys)+" " response.write " 页 " if zys>1 then response.write " " response.write "  跳转 " end if end sub Function tpzh(tp) if tp="http://" or len(tp)<7 then tp="" else tp=lcase(trim(tp)) if instr("pnggifbmpjpgjpegtif",right(tp,3))>0 then tp="[img]"+tp+"[/img]" end if tpzh = tp End function function gqzh(dz) dz = lcase(dz) if instr(".wmv.wma.mp3.mid.mpg.mpeg.avi.asf.wav",right(dz,3))>0 then gqzh = " " end if if instr(".jpg.gif.bmp.png.jpeg",right(dz,3))>0 then gqzh = "双击查看原图" if instr(".rm.,ram.rmvb.ra.3gp",right(dz,3))>0 then gqzh = "" end if if right(dz,3) = "dswf" then gqzh = "
    " end function Function Xszh(zh) if zh<>"" or not isnull(zh) then zh = LCase(zh) zh=replace(zh,"€","'") zh=replace(zh,"<","< ") zh=replace(zh,"< i","") zh=replace(zh,"[url=","") zh=replace(zh,"< span",""" or not isnull(zh) then zh=replace(zh,"€","'") zh=replace(zh,"<","< ") btXszh = zh end if End Function Function Xrzh(zh) if zh<>"" then zh=replace(zh,"'","€") Xrzh = zh end if End Function Function Yzm() CYZM = cstr( Replace(Timer(), ".", "") * Rnd() Mod 10000) for i = 1 to len(cyzm) zyzm = zyzm + mid( cyzm ,len(cyzm) - i + 1 ,1 ) next if len( zyzm ) < 4 then zyzm = "0" + zyzm if len( zyzm ) < 3 then zyzm = "00" + zyzm if len( zyzm ) < 2 then zyzm = "0000" + zyzm Yzm = zyzm End Function function jdsj() n = cstr(right(year(date()),2)) + "-" y = cstr(month(date())) + "-" if len(y) = 2 then y = "0" + y r = cstr(day(date())) if len(r) = 1 then r = "0" + r h = cstr(hour(now())) + ":" if len(h) = 2 then h = "0" + h f = cstr(minute(now())) if len(f) = 1 then f = "0" + f jdsj = n + y + r + " " + h + f end function dlip = request.servervariables("remote_addr") function dwj(wjm) ''读文件 set fso = Server.Createobject("Scripting.FileSystemObject") path = Server.mappath(wjm) if fso.fileExists(path) then set file=fso.opentextfile(path,1,False) do while file.AtEndOfStream<>true wjnr = wjnr + file.ReadLine() & chr(13) loop file.close set file = nothing end if set fso = nothing dwj = wjnr end function function xwj(wjm,wj) if wjm <> "" then wjm = Server.mappath(wjm) set myfileobject=server.CreateObject("Scripting.FileSystemObject") set mytextfile=myfileobject.CreateTextFile(wjm) mytextfile.WriteLine wj mytextfile.close end if end function function readcount() co1 = dwj("count.ini") if co1 = "" then co1 = "1" xwj "count.ini",int(co1)+1 readcount = co1 end function exec = "select * from kill_keyword " set rs = server.createobject("adodb.recordset") rs.open exec,CONN,3,1 if not rs.eof then keyword_kill = rs("keyword") pip = ".."+rs("pip") end if rs.close bylj = Request.ServerVariables("PATH_INFO") exec="select * from yrwl_tb_setup" rs.open exec,CONN,3,1 if not rs.eof then jbm = rs("bm") yxft = rs("ykft") siteurl = rs("siteurl") mc = rs("mc") meta_key = rs("meta_key") meta_des = rs("meta_des") fj = rs("fjkt") fj = split(fj & "$$$$$$$$$$","$$") fjkt = fj(0) upload = fj(1) open = fj(2) qqid = fj(3) ''qqappid if open = "" then open = "_blank" mip = rs("ip") Gpath = rs("Gpath") iszc = rs("iszc") bottom = rs("bottomxx") wyqm = rs("wyqm") css = rs("css") tp = rs("tp") end if rs.close yhm = session(sessionvalue&"yhm") jb = session(sessionvalue&"jb") logintype = session(sessionvalue&"type") set rs=nothing%>