<% Response.Expires=0 Response.Buffer = TRUE Response.Clear 'Response.BinaryWrite(Request.BinaryRead(Request.TotalBytes)) byteCount = Request.TotalBytes 'Response.BinaryWrite(Request.BinaryRead(varByteCount)) RequestBin = Request.BinaryRead(byteCount) Dim UploadRequest Set UploadRequest = CreateObject("Scripting.Dictionary") BuildUploadRequest RequestBin %> <% Call incFile(getTemplate(), "Header") Call writePageNavigation("" & Application(getLang() & "_strJBS_00060") & "", Application(getLang() & "_strJBS_02600"), "", "") %>
<% Dim uploadMessage Dim Error Dim C : C = 0 Dim strFileDeleted : strFileDeleted = "False" intMaxSize = Application("JBSX_sSettings_MaxFileSize") Dim strValidFileType : strValidFileType = Application("JBSX_sSettings_ValidFileType") Dim arrValidFileType : arrValidFileType = Split(strValidFileType,",") IF UploadRequest.Item("SubFolder").Item("Value") <> "" THEN Dim SubFolder : SubFolder = UploadRequest.Item("SubFolder").Item("Value") for each fobj in UploadRequest uploadMessage = "" Error = "False" IF UploadRequest.Item(fobj).Item("FileName") <> "" then C = C + 1 contentType = UploadRequest.Item(fobj).Item("ContentType") filepathname = UploadRequest.Item(fobj).Item("FileName") filename = Right(filepathname,Len(filepathname)-InstrRev(filepathname,"\")) value = UploadRequest.Item(fobj).Item("Value") 'Create FileSytemObject Component Set ScriptObject = Server.CreateObject("Scripting.FileSystemObject") If ScriptObject.FileExists(Server.mappath(Application("JBSX_sSettings_UploadPath") & SubFolder & "/" & filename)) Then uploadMessage = "  " & Application(getLang() & "_strJBS_02990") & "!" Error = "True" End If If Error = "False" Then Filetype = right(filename, len(filename)-instrRev(filename,".")) Filetype = lcase(Filetype) X = "False" For t = 0 To Ubound(arrValidFileType) if X = "True" then exit For if Filetype = lcase(arrValidFileType(t)) then X = "True" Next If X = "False" Then Error = "True" uploadMessage = "   """ & Filetype & """" & Application(getLang() & "_strJBS_02900") & "!" End If End If If Error = "False" Then pathEnd = Len(Server.mappath(Request.ServerVariables("PATH_INFO")))-14 Set MyFile = ScriptObject.CreateTextFile(Server.mappath(Application("JBSX_sSettings_UploadPath") & SubFolder & "/" & filename)) For i = 1 to LenB(value) MyFile.Write chr(AscB(MidB(value,i,1))) Next Set chkFile = ScriptObject.getFile(Server.mappath(Application("JBSX_sSettings_UploadPath") & SubFolder & "/" & filename)) If Round((chkFile.Size / 1024), 3) < int(intMaxSize) then uploadMessage = "  " & Application(getLang() & "_strJBS_03190") & "!" Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" Else uploadMessage = "   """ & Round((chkFile.Size / 1024), 2) & """ kB " & Application(getLang() & "_strJBS_02890") & "!" Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" chkFile.delete() End If Set chkFile = Nothing MyFile.Close Else Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" End If ELSE Response.Write "" END IF Next ELSE Response.Write "" Response.Write "" Response.Write "" Response.Write "" END IF IF UploadRequest.Item("SubFolder").Item("Value") <> "" THEN If C = 0 Then Response.Write "" Response.Write "" Response.Write "" Response.Write "" End If END IF %>
 :: <% = Application(getLang() & "_strJBS_02600") %>  ::
 #   <% = Application(getLang() & "_strJBS_02830") %> <% = Application(getLang() & "_strJBS_02870") %> <% = Application(getLang() & "_strJBS_02840") %>  Preview  <% = Application(getLang() & "_strJBS_00670") %>
" & C & " " & filename & " " & Round((chkFile.Size / 1024), 2) & " kB " & fileType & " " & uploadMessage & "
" & C & " " & filename & " " & Round((chkFile.Size / 1024), 2) & " kB " & fileType & " " & uploadMessage & "
" & C & " " & filename & " - " & fileType & " " & uploadMessage & "
-    " & Application(getLang() & "_strJBS_02920") & "!
-    " & Application(getLang() & "_strJBS_02960") & "!


" onClick="window.location='bannerLibrary.asp?SubFolder=<%=SubFolder%>';">
 
<% Call incFile(getTemplate(), "Bottom") %>