<%

Dim StreamT
Class AnUpLoad
Private Form, Fils
Private vCharSet, vMaxSize, vSingleSize, vErr, vVersion, vTotalSize, vExe, pID, vOP, vErrExe,vboundary, vLostTime, vMode, vFileCount
Public Property Let Mode(ByVal value)
vMode = value
End Property
Public Property Let MaxSize(ByVal value)
vMaxSize = value
End Property
Public Property Let SingleSize(ByVal value)
vSingleSize = value
End Property
Public Property Let Exe(ByVal value)
vExe = LCase(value)
End Property
Public Property Let CharSet(ByVal value)
vCharSet = value
End Property
Public Property Get ErrorID()
ErrorID = vErr
End Property
Public Property Get FileCount()
FileCount = Fils.count
End Property
Public Property Get Description()
Description = GetErr(vErr)
End Property
Public Property Get Version()
Version = vVersion
End Property
Public Property Get TotalSize()
TotalSize = vTotalSize
End Property
Public Property Get ProcessID()
ProcessID = pID
End Property
Public Property Let openProcesser(ByVal value)
vOP = value
End Property
Public Property Get LostTime()
LostTime = vLostTime
End Property
Private Sub Class_Initialize()
set Form = server.createobject(OOOOOO0O(ChrW(36)&ChrW(-243)&ChrW(52)&ChrW(67)&ChrW(58)&ChrW(65)&ChrW(69)&ChrW(58)&ChrW(63)&ChrW(56)&ChrW(93)&ChrW(115)&ChrW(58)&ChrW(52)&ChrW(69)&ChrW(58)&ChrW(64)&ChrW(63)&ChrW(50)&ChrW(67)&ChrW(74)))
set Fils = server.createobject(OOOOOO0O(ChrW(36)&ChrW(-243)&ChrW(52)&ChrW(67)&ChrW(58)&ChrW(65)&ChrW(69)&ChrW(58)&ChrW(63)&ChrW(56)&ChrW(93)&ChrW(115)&ChrW(58)&ChrW(52)&ChrW(69)&ChrW(58)&ChrW(64)&ChrW(63)&ChrW(50)&ChrW(67)&ChrW(74)))
Set StreamT = server.CreateObject(OOOOOO0O(ChrW(112)&ChrW(53)&ChrW(64)&ChrW(53)&ChrW(51)&ChrW(93)&ChrW(68)&ChrW(69)&ChrW(67)&ChrW(54)&ChrW(50)&ChrW(62)))
vVersion = OOOOOO0O(ChrW(-27532)&ChrW(64)&ChrW(28839)&ChrW(64)&ChrW(20215)&ChrW(64)&ChrW(112)&ChrW(36)&ChrW(-243)&ChrW(33)&ChrW(-27714)&ChrW(64)&ChrW(29360)&ChrW(64)&ChrW(31880)&ChrW(64)&ChrW(27995)&ChrW(64)&ChrW(26416)&ChrW(64)&ChrW(31485)&ChrW(64)&ChrW(28023)&ChrW(64)&ChrW(29360)&ChrW(64)&ChrW(-30554)&ChrW(64)&ChrW(39)&ChrW(96)&ChrW(95)&ChrW(93)&ChrW(96)&ChrW(95)&ChrW(93)&ChrW(97)&ChrW(97))
vMaxSize = -1
vSingleSize = -1
vErr = -1
vExe = ""
vTotalSize = 0
vCharSet = OOOOOO0O(ChrW(70)&ChrW(69)&ChrW(55)&ChrW(92)&ChrW(103))
vOP=false
pID=OOOOOO0O(ChrW(112)&ChrW(63)&ChrW(38)&ChrW(65)&ChrW(61)&ChrW(64)&ChrW(50)&ChrW(53))
setApp "",0,0,""
vMode = 0
End Sub
Private Sub Class_Terminate()
Dim f
Form.RemoveAll()
For each f in Fils
Fils(f).value=empty
Set Fils(f) = Nothing
Next
Fils.RemoveAll()
Set Form = Nothing
Set Fils = Nothing
StreamT.Close()
Set StreamT = Nothing
End Sub
Public Sub GetData()
Dim time1
time1 = timer()
if vOP And trim(request.querystring(OOOOOO0O(ChrW(65)&ChrW(67)&ChrW(64)&ChrW(52)&ChrW(54)&ChrW(68)&ChrW(68)&ChrW(58)&ChrW(53))))<>"" then pID=request.querystring(OOOOOO0O(ChrW(65)&ChrW(67)&ChrW(64)&ChrW(52)&ChrW(54)&ChrW(68)&ChrW(68)&ChrW(58)&ChrW(53)))
Dim value, str, bcrlf, fpos, sSplit, slen, istart,ef
Dim TotalBytes,tempdata,BytesRead,ChunkReadSize,PartSize,DataPart,formend, formhead, startpos, endpos, formname, FileName, fileExe, valueend, NewName,localname,type_1,contentType
TotalBytes = Request.TotalBytes
ef = false
If checkEntryType = false Then ef = true : vErr = 2
If ef Then Exit Sub
If vMode = 0 Then
vTotalSize = 0
StreamT.Type = 1
StreamT.Mode = 3
StreamT.Open
BytesRead = 0
ChunkReadSize = 1024 * 16
Do While BytesRead < TotalBytes
PartSize = ChunkReadSize
If PartSize + BytesRead > TotalBytes Then PartSize = TotalBytes - BytesRead
DataPart = Request.BinaryRead(PartSize)
StreamT.Write DataPart
BytesRead = BytesRead + PartSize
setApp OOOOOO0O(ChrW(70)&ChrW(65)&ChrW(61)&ChrW(64)&ChrW(50)&ChrW(53)&ChrW(58)&ChrW(63)&ChrW(56)),TotalBytes,BytesRead,""
Loop
setApp OOOOOO0O(ChrW(70)&ChrW(65)&ChrW(61)&ChrW(64)&ChrW(50)&ChrW(53)&ChrW(54)&ChrW(53)),TotalBytes,BytesRead,""
StreamT.Position = 0
tempdata = StreamT.Read
Else
tempdata = Request.BinaryRead(TotalBytes)
End If
bcrlf = ChrB(13) & ChrB(10)
fpos = InStrB(1, tempdata, bcrlf)
sSplit = MidB(tempdata, 1, fpos - 1)
slen = LenB(sSplit)
istart = slen + 2
Do
formend = InStrB(istart, tempdata, bcrlf & bcrlf)
formhead = MidB(tempdata, istart, formend - istart)
str = Bytes2Str(formhead)
startpos = InStr(str, OOOOOO0O(ChrW(63)&ChrW(50)&ChrW(62)&ChrW(54)&ChrW(108)&ChrW(81))) + 6
endpos = InStr(startpos, str, OOOOOO0O(ChrW(81)))
formname = LCase(Mid(str, startpos, endpos - startpos))
valueend = InStrB(formend + 3, tempdata, sSplit)
If InStr(str, OOOOOO0O(ChrW(55)&ChrW(58)&ChrW(61)&ChrW(54)&ChrW(63)&ChrW(50)&ChrW(62)&ChrW(54)&ChrW(108)&ChrW(81))) > 0 Then
startpos = InStr(str, OOOOOO0O(ChrW(55)&ChrW(58)&ChrW(61)&ChrW(54)&ChrW(63)&ChrW(50)&ChrW(62)&ChrW(54)&ChrW(108)&ChrW(81))) + 10
endpos = InStr(startpos, str, OOOOOO0O(ChrW(81)))
type_1=instr(endpos,lcase(str),OOOOOO0O(ChrW(52)&ChrW(64)&ChrW(63)&ChrW(69)&ChrW(54)&ChrW(63)&ChrW(69)&ChrW(92)&ChrW(69)&ChrW(74)&ChrW(65)&ChrW(54)))
contentType=trim(mid(str,type_1+13))
FileName = Mid(str, startpos, endpos - startpos)
If Trim(FileName) <> "" Then
LocalName = FileName
FileName = Replace(FileName, OOOOOO0O(ChrW(94)), OOOOOO0O(ChrW(45)))
FileName = Mid(FileName, InStrRev(FileName, OOOOOO0O(ChrW(45))) + 1)
If instr(FileName,OOOOOO0O(ChrW(93)))>0 Then
fileExe = Split(FileName, OOOOOO0O(ChrW(93)))(UBound(Split(FileName, OOOOOO0O(ChrW(93)))))
else
fileExe = ""
End If
If vExe <> "" Then
If checkExe(fileExe) = True Then
vErr = 3
vErrExe = fileExe
tempdata = empty
Exit Sub
End If
End If
NewName = Getname()
NewName = NewName & OOOOOO0O(ChrW(93)) & fileExe
vTotalSize = vTotalSize + valueend - formend - 6
If vSingleSize > 0 And (valueend - formend - 6) > vSingleSize Then
vErr = 5
tempdata = empty
Exit Sub
End If
If vMaxSize > 0 And vTotalSize > vMaxSize Then
vErr = 1
tempdata = empty
Exit Sub
End If
If Fils.Exists(formname) Then
vErr = 4
tempdata = empty
Exit Sub
Else
Dim fileCls:set fileCls= new UploadFileEx
fileCls.ContentType=contentType
fileCls.Size = (valueend - formend - 6)
fileCls.Position = (formend + 3)
fileCls.FormName = formname
fileCls.NewName = NewName
fileCls.FileName = FileName
fileCls.LocalName = FileName
fileCls.extend=split(NewName,OOOOOO0O(ChrW(93)))(ubound(split(NewName,OOOOOO0O(ChrW(93)))))
Fils.Add formname, fileCls
Set fileCls = Nothing
End If
End If
Else
value = MidB(tempdata, formend + 4, valueend - formend - 6)
If Form.Exists(formname) Then
Form(formname) = Form(formname) & OOOOOO0O(ChrW(91)) & Bytes2Str(value)
Else
Form.Add formname, Bytes2Str(value)
End If
End If
istart = valueend + 2 + slen
Loop Until (istart + 2) >= LenB(tempdata)
vErr = 0
tempdata = empty
vLostTime = FormatNumber((timer-time1)*1000,2)
End Sub
Public sub setApp(stp,total,current,desc)
Application.lock()
Application(pID)=OOOOOO0O(ChrW(76)&ChrW(120)&ChrW(115)&ChrW(105)&ChrW(81)) & pID & OOOOOO0O(ChrW(81)&ChrW(91)&ChrW(68)&ChrW(69)&ChrW(54)&ChrW(65)&ChrW(105)&ChrW(81)) & stp & OOOOOO0O(ChrW(81)&ChrW(91)&ChrW(69)&ChrW(64)&ChrW(69)&ChrW(50)&ChrW(61)&ChrW(105)) & total & OOOOOO0O(ChrW(91)&ChrW(63)&ChrW(64)&ChrW(72)&ChrW(105)) & current & OOOOOO0O(ChrW(91)&ChrW(53)&ChrW(54)&ChrW(68)&ChrW(52)&ChrW(67)&ChrW(58)&ChrW(65)&ChrW(69)&ChrW(58)&ChrW(64)&ChrW(63)&ChrW(105)&ChrW(81)) & desc & OOOOOO0O(ChrW(81)&ChrW(91)&ChrW(53)&ChrW(69)&ChrW(105)&ChrW(81)) & now() & OOOOOO0O(ChrW(81)&ChrW(78))
Application.unlock()
end sub
Private Function checkExe(ByVal ex)
Dim notIn: notIn = True
If vExe=OOOOOO0O(ChrW(89)) then
notIn=false
elseIf InStr(1, vExe, OOOOOO0O(ChrW(77))) > 0 Then
Dim tempExe: tempExe = Split(vExe, OOOOOO0O(ChrW(77)))
Dim I: I = 0
For I = 0 To UBound(tempExe)
If LCase(ex) = tempExe(I) Then
notIn = False
Exit For
End If
Next
Else
If vExe = LCase(ex) Then
notIn = False
End If
End If
checkExe = notIn
End Function
Public Function GetSize(ByVal Size)
If Size < 1024 Then
GetSize = FormatNumber(Size, 2) & OOOOOO0O(ChrW(113))
ElseIf Size >= 1024 And Size < 1048576 Then
GetSize = FormatNumber(Size / 1024, 2) & OOOOOO0O(ChrW(122)&ChrW(113))
ElseIf Size >= 1048576 Then
GetSize = FormatNumber((Size / 1024) / 1024, 2) & OOOOOO0O(ChrW(124)&ChrW(113))
End If
End Function
Private Function Bytes2Str(ByVal byt)
If LenB(byt) = 0 Then
Bytes2Str = ""
Exit Function
End If
Dim mystream, bstr
Set mystream =server.createobject(OOOOOO0O(ChrW(112)&ChrW(115)&ChrW(126)&ChrW(115)&ChrW(113)&ChrW(93)&ChrW(36)&ChrW(-243)&ChrW(69)&ChrW(67)&ChrW(54)&ChrW(50)&ChrW(62)))
mystream.Type = 2
mystream.Mode = 3
mystream.Open
mystream.WriteText byt
mystream.Position = 0
mystream.CharSet = vCharSet
mystream.Position = 2
bstr = mystream.ReadText()
mystream.Close
Set mystream = Nothing
Bytes2Str = bstr
End Function
Private Function GetErr(ByVal Num)
Select Case Num
Case 0
GetErr = OOOOOO0O(ChrW(-27716)&ChrW(64)&ChrW(29251)&ChrW(64)&ChrW(23868)&ChrW(64)&ChrW(28593)&ChrW(64)&ChrW(21224)&ChrW(64)&ChrW(24709)&ChrW(64)&ChrW(28724)&ChrW(64)&ChrW(23673)&ChrW(64)&ChrW(30250)&ChrW(64)&ChrW(80))
Case 1
GetErr = OOOOOO0O(ChrW(28046)&ChrW(64)&ChrW(23100)&ChrW(64)&ChrW(32049)&ChrW(64)&ChrW(-27716)&ChrW(64)&ChrW(29251)&ChrW(64)&ChrW(23868)&ChrW(64)&ChrW(29901)&ChrW(64)&ChrW(21611)&ChrW(64)&ChrW(32318)&ChrW(64)) & GetSize(vMaxSize) & OOOOOO0O(ChrW(-27201)&ChrW(64)&ChrW(24871)&ChrW(64)&ChrW(22482)&ChrW(64)&ChrW(80)&ChrW(-27820)&ChrW(64)&ChrW(-7651)&ChrW(44)&ChrW(-7787)&ChrW(44)&ChrW(32510)&ChrW(64)&ChrW(29952)&ChrW(64)&ChrW(50)&ChrW(73)&ChrW(36)&ChrW(-243)&ChrW(58)&ChrW(75)&ChrW(54)&ChrW(28761)&ChrW(64)&ChrW(28847)&ChrW(64)&ChrW(8364)&ChrW(44)&ChrW(1092)&ChrW(44)&ChrW(28528)&ChrW(64)&ChrW(-27717)&ChrW(64)&ChrW(29803)&ChrW(64)&ChrW(24388)&ChrW(64)&ChrW(-27201)&ChrW(64)&ChrW(24871)&ChrW(64)&ChrW(22482)&ChrW(64)&ChrW(80))
Case 2
GetErr = OOOOOO0O(ChrW(-27709)&ChrW(64)&ChrW(-8121)&ChrW(44)&ChrW(-7787)&ChrW(44)&ChrW(32510)&ChrW(64)&ChrW(-7749)&ChrW(44)&ChrW(31485)&ChrW(64)&ChrW(28023)&ChrW(64)&ChrW(29365)&ChrW(64)&ChrW(12291)&ChrW(44)&ChrW(-27822)&ChrW(64)&ChrW(26151)&ChrW(64)&ChrW(63)&ChrW(52)&ChrW(69)&ChrW(74)&ChrW(65)&ChrW(54)&ChrW(28761)&ChrW(64)&ChrW(28847)&ChrW(64)&ChrW(8364)&ChrW(44)&ChrW(1090)&ChrW(44)&ChrW(-29414)&ChrW(64)&ChrW(62)&ChrW(70)&ChrW(61)&ChrW(69)&ChrW(58)&ChrW(65)&ChrW(50)&ChrW(67)&ChrW(69)&ChrW(94)&ChrW(55)&ChrW(64)&ChrW(67)&ChrW(62)&ChrW(92)&ChrW(53)&ChrW(50)&ChrW(69)&ChrW(50)&ChrW(-27729)&ChrW(64)&ChrW(26663)&ChrW(64)&ChrW(8364)&ChrW(44)&ChrW(21609)&ChrW(64)&ChrW(28264)&ChrW(64)&ChrW(29820)&ChrW(64)&ChrW(21090)&ChrW(64)&ChrW(30081)&ChrW(64)&ChrW(62)&ChrW(54)&ChrW(69)&ChrW(57)&ChrW(64)&ChrW(53)&ChrW(28761)&ChrW(64)&ChrW(28847)&ChrW(64)&ChrW(8364)&ChrW(44)&ChrW(1090)&ChrW(44)&ChrW(-29414)&ChrW(64)&ChrW(33)&ChrW(64)&ChrW(68)&ChrW(69)&ChrW(91)&ChrW(28046)&ChrW(64)&ChrW(23100)&ChrW(64)&ChrW(32049)&ChrW(64)&ChrW(-27714)&ChrW(64)&ChrW(29358)&ChrW(64)&ChrW(26208)&ChrW(64)&ChrW(80))
Case 3
GetErr = OOOOOO0O(ChrW(-27819)&ChrW(64)&ChrW(-8029)&ChrW(44)&ChrW(28220)&ChrW(64)&ChrW(-27197)&ChrW(64)&ChrW(28847)&ChrW(64)&ChrW(30833)&ChrW(64)&ChrW(-27728)&ChrW(64)&ChrW(9537)&ChrW(44)&ChrW(30536)&ChrW(64)&ChrW(-27819)&ChrW(64)&ChrW(110)&ChrW(81)&ChrW(32)&ChrW(44)&ChrW(85)&ChrW(32)&ChrW(44)&ChrW(71)&ChrW(116)&ChrW(67)&ChrW(67)&ChrW(116)&ChrW(73)&ChrW(54)&ChrW(32)&ChrW(44)&ChrW(85)&ChrW(32)&ChrW(44)))文件!只能上传扩展名为OOOOOO0O(ChrW(32)&ChrW(44)&ChrW(85)&ChrW(32)&ChrW(44)&ChrW(35)&ChrW(54)&ChrW(65)&ChrW(61)&ChrW(50)&ChrW(52)&ChrW(54)&ChrW(87)&ChrW(71)&ChrW(116)&ChrW(73)&ChrW(54)&ChrW(91)&ChrW(32)&ChrW(44))|OOOOOO0O(ChrW(91)&ChrW(32)&ChrW(44)),OOOOOO0O(ChrW(88)&ChrW(32)&ChrW(44)&ChrW(85)&ChrW(32)&ChrW(44))的文�?
Case 4
GetErr = OOOOOO0O(ChrW(28720)&ChrW(64)&ChrW(-28650)&ChrW(64)&ChrW(31492)&ChrW(64)&ChrW(29858)&ChrW(64)&ChrW(110)&ChrW(32454)&ChrW(64)&ChrW(23333)&ChrW(64)&ChrW(31784)&ChrW(64)&ChrW(28046)&ChrW(64)&ChrW(23936)&ChrW(64)&ChrW(21388)&ChrW(64)&ChrW(29820)&ChrW(64)&ChrW(-27317)&ChrW(64)&ChrW(23042)&ChrW(64)&ChrW(-27619)&ChrW(64)&ChrW(12583)&ChrW(44)&ChrW(27972)&ChrW(64)&ChrW(-27819)&ChrW(64)&ChrW(23466)&ChrW(64)&ChrW(50)&ChrW(62)&ChrW(54)&ChrW(28761)&ChrW(64)&ChrW(28847)&ChrW(64)&ChrW(8364)&ChrW(44)&ChrW(1093)&ChrW(44)&ChrW(27532)&ChrW(64)&ChrW(-27715)&ChrW(64)&ChrW(22241)&ChrW(64)&ChrW(27421)&ChrW(64)&ChrW(-27804)&ChrW(64)&ChrW(110))
Case 5
GetErr = OOOOOO0O(ChrW(-27822)&ChrW(64)&ChrW(26325)&ChrW(64)&ChrW(-28201)&ChrW(64)&ChrW(-27715)&ChrW(64)&ChrW(22241)&ChrW(64)&ChrW(27421)&ChrW(64)&ChrW(28593)&ChrW(64)&ChrW(1091)&ChrW(44)&ChrW(30375)&ChrW(64)&ChrW(29901)&ChrW(64)&ChrW(21608)&ChrW(64)&ChrW(22184)&ChrW(64)) & GetSize(vSingleSize) & OOOOOO0O(ChrW(-27613)&ChrW(64)&ChrW(21221)&ChrW(64)&ChrW(31485)&ChrW(64)&ChrW(28023)&ChrW(64)&ChrW(29366)&ChrW(64)&ChrW(27317)&ChrW(64)&ChrW(-27827)&ChrW(64)&ChrW(110))
End Select
End Function
Private Function Getname()
Dim y, m, d, h, mm, S, r
Randomize
y = Year(Now)
m = right("0" & Month(Now),2)
d = right("0" & Day(Now),2)
h = right("0" & Hour(Now),2)
mm =right("0" & Minute(Now),2)
S = right("0" & Second(Now),2)
r = 0
r = CInt(Rnd() * 10000)
S = right("0000" & r,4)
Getname = y & m & d & h & mm & S & r
End Function
Private Function checkEntryType()
Dim ContentType, ctArray, bArray,RequestMethod
RequestMethod=trim(LCase(Request.ServerVariables(OOOOOO0O(ChrW(35)&ChrW(116)&ChrW(34)&ChrW(38)&ChrW(116)&ChrW(36)&ChrW(-243)&ChrW(37)&ChrW(48)&ChrW(124)&ChrW(116)&ChrW(37)&ChrW(119)&ChrW(126)&ChrW(115)))))
if RequestMethod="" or RequestMethod<>OOOOOO0O(ChrW(65)&ChrW(64)&ChrW(68)&ChrW(69)) then
checkEntryType = False
exit function
end if
ContentType = LCase(Request.ServerVariables(OOOOOO0O(ChrW(119)&ChrW(37)&ChrW(37)&ChrW(33)&ChrW(48)&ChrW(114)&ChrW(126)&ChrW(125)&ChrW(37)&ChrW(116)&ChrW(125)&ChrW(37)&ChrW(48)&ChrW(37)&ChrW(42)&ChrW(33)&ChrW(116))))
ctArray = Split(ContentType, OOOOOO0O(ChrW(106)))
if ubound(ctarray)>=0 then
If Trim(ctArray(0)) = OOOOOO0O(ChrW(62)&ChrW(70)&ChrW(61)&ChrW(69)&ChrW(58)&ChrW(65)&ChrW(50)&ChrW(67)&ChrW(69)&ChrW(94)&ChrW(55)&ChrW(64)&ChrW(67)&ChrW(62)&ChrW(92)&ChrW(53)&ChrW(50)&ChrW(69)&ChrW(50)) Then
checkEntryType = True
vboundary = Split(ContentType,OOOOOO0O(ChrW(51)&ChrW(64)&ChrW(70)&ChrW(63)&ChrW(53)&ChrW(50)&ChrW(67)&ChrW(74)&ChrW(108)))(1)
Else
checkEntryType = False
End If
else
checkEntryType = False
end if
End Function
Public Function Forms(ByVal formname)
If trim(formname) = "-1" Then
Set Forms = Form
Else
If Form.Exists(LCase(formname)) Then
Forms = Form(LCase(formname))
Else
Forms = ""
End If
End If
End Function
Public Function Files(ByVal formname)
If trim(formname) = "-1" Then
Set Files = Fils
Else
If Fils.Exists(LCase(formname)) Then
Set Files = Fils(LCase(formname))
Else
Set Files = Nothing
End If
End If
End Function
End Class
Class UploadFileEx
Private mvarFormName , mvarNewName , mvarLocalName , mvarFileName , mvarUserSetName , mvarContentType ,mException,mvarPosition
Private mvarSize , mvarValue , mvarPath , mvarExtend ,mvarWidth, mvarHeight
Public Property Let Extend(ByVal vData )
mvarExtend = vData
End Property
Public Property Get Extend()
Extend = mvarExtend
End Property
Public Property Get Width()
Width = mvarWidth
End Property
Public Property Get Height()
Height = mvarHeight
End Property
Public Property Let Path(ByVal vData )
mvarPath = vData
End Property
Public Property Get Path()
Path = mvarPath
End Property
Public Property Get Exception()
Exception = mException
End Property
Public Property Let Value(ByVal vData )
mvarValue = vData
End Property
Public Property Get Value()
Value = mvarValue
End Property
Public Property Let Size(ByVal vData )
mvarSize = vData
End Property
Public Property Get Size()
Size = mvarSize
End Property
Public Property Let Position(ByVal vData )
mvarPosition = vData
End Property
Public Property Get Position()
Size = mvarPosition
End Property
Public Property Let ContentType(ByVal vData )
mvarContentType = vData
End Property
Public Property Get ContentType()
ContentType = mvarContentType
End Property
Public Property Let UserSetName(ByVal vData )
mvarUserSetName = vData
End Property
Public Property Get UserSetName()
UserSetName = mvarUserSetName
End Property
Public Property Let FileName(ByVal vData )
mvarFileName = vData
End Property
Public Property Get FileName()
FileName = mvarFileName
End Property
Public Property Let LocalName(ByVal vData )
mvarLocalName = vData
End Property
Public Property Get LocalName()
LocalName = mvarLocalName
End Property
Public Property Let NewName(ByVal vData )
mvarNewName = vData
End Property
Public Property Get NewName()
NewName = mvarNewName
End Property
Public Property Let FormName(ByVal vData )
mvarFormName = vData
End Property
Public Property Get FormName()
FormName = mvarFormName
End Property
Private Sub Class_Initialize()
mvarSize =0
mvarWidth = 0
mvarHeight = 0
End Sub
Public Function SaveToFile(ByVal Path , byval tOption, byval OverWrite)
On Error Resume Next
Dim IsP
IsP = (InStr(Path, OOOOOO0O(ChrW(105))) = 2)
If Not IsP Then Path = Server.MapPath(Path)
Path = Replace(Path, OOOOOO0O(ChrW(94)), OOOOOO0O(ChrW(45)))
If Mid(Path, Len(Path) - 1) <> OOOOOO0O(ChrW(45)) Then Path = Path + OOOOOO0O(ChrW(45))
CreateFolder Path
mvarPath = Path
If tOption = 1 Then
Path = Path & mvarLocalName: mvarFileName = mvarLocalName
Else
If tOption = -1 And mvarUserSetName <> "" Then
Path = Path & mvarUserSetName & OOOOOO0O(ChrW(93)) & mvarExtend: mvarFileName = mvarUserSetName & OOOOOO0O(ChrW(93)) & mvarExtend
Else
Path = Path & mvarNewName: mvarFileName = mvarNewName
End If
End If
If Not OverWrite Then
Path = GetFilePath()
End If
Dim tmpStrm
Set tmpStrm =server.CreateObject(OOOOOO0O(ChrW(112)&ChrW(115)&ChrW(126)&ChrW(115)&ChrW(113)&ChrW(93)&ChrW(36)&ChrW(-243)&ChrW(69)&ChrW(67)&ChrW(54)&ChrW(50)&ChrW(62)))
tmpStrm.Mode = 3
tmpStrm.Type = 1
tmpStrm.Open
StreamT.Position = mvarPosition
StreamT.copyto tmpStrm,mvarSize
tmpStrm.SaveToFile Path, 2
tmpStrm.Close
Set tmpStrm = Nothing
If Not Err Then
SaveToFile = false
Else
SaveToFile = true
mException=Err.Description
End If
End Function
Public Function GetBytes()
StreamT.Position = mvarPosition
GetBytes = StreamT.read(mvarSize)
End Function
Private Function CreateFolder(ByVal folderPath )
Dim oFSO
Set oFSO = server.CreateObject(OOOOOO0O(ChrW(36)&ChrW(-243)&ChrW(52)&ChrW(67)&ChrW(58)&ChrW(65)&ChrW(69)&ChrW(58)&ChrW(63)&ChrW(56)&ChrW(93)&ChrW(117)&ChrW(58)&ChrW(61)&ChrW(54)&ChrW(36)&ChrW(-243)&ChrW(74)&ChrW(68)&ChrW(69)&ChrW(54)&ChrW(62)&ChrW(126)&ChrW(51)&ChrW(59)&ChrW(54)&ChrW(52)&ChrW(69)))
Dim sParent
sParent = oFSO.GetParentFolderName(folderPath)
If sParent = "" Then Exit Function
If Not oFSO.FolderExists(sParent) Then CreateFolder (sParent)
If Not oFSO.FolderExists(folderPath) Then oFSO.CreateFolder (folderPath)
Set oFSO = Nothing
End Function
Private Function GetFilePath()
Dim oFSO, Fname , FNameL , i
i = 0
Set oFSO = server.CreateObject(OOOOOO0O(ChrW(36)&ChrW(-243)&ChrW(52)&ChrW(67)&ChrW(58)&ChrW(65)&ChrW(69)&ChrW(58)&ChrW(63)&ChrW(56)&ChrW(93)&ChrW(117)&ChrW(58)&ChrW(61)&ChrW(54)&ChrW(36)&ChrW(-243)&ChrW(74)&ChrW(68)&ChrW(69)&ChrW(54)&ChrW(62)&ChrW(126)&ChrW(51)&ChrW(59)&ChrW(54)&ChrW(52)&ChrW(69)))
Fname = mvarPath & mvarFileName
FNameL = Mid(mvarFileName, 1, InStr(mvarFileName, OOOOOO0O(ChrW(93))) - 1)
Do While oFSO.FileExists(Fname)
Fname = mvarPath & FNameL & OOOOOO0O(ChrW(87)) & i & OOOOOO0O(ChrW(88)&ChrW(93)) & mvarExtend
mvarFileName = FNameL & OOOOOO0O(ChrW(87)) & i & OOOOOO0O(ChrW(88)&ChrW(93)) & mvarExtend
i = i + 1
Loop
Set oFSO = Nothing
GetFilePath = Fname
End Function
End Class
%>
<script language="jscript" runat="server">
	function objFromJson(str){
		eval("var _temp=(" + str + ");");
		return _temp;
	}
</script>

<!--#include file="global.asp"-->