1
|
<%@ CodePage=65001 Language="VBScript"%>
|
2
|
<%
|
3
|
Option Explicit
|
4
|
Response.Buffer = True
|
5
|
%>
|
6
|
<%
|
7
|
' FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
8
|
' Copyright (C) 2003-2009 Frederico Caldeira Knabben
|
9
|
'
|
10
|
' == BEGIN LICENSE ==
|
11
|
'
|
12
|
' Licensed under the terms of any of the following licenses at your
|
13
|
' choice:
|
14
|
'
|
15
|
' - GNU General Public License Version 2 or later (the "GPL")
|
16
|
' http://www.gnu.org/licenses/gpl.html
|
17
|
'
|
18
|
' - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
19
|
' http://www.gnu.org/licenses/lgpl.html
|
20
|
'
|
21
|
' - Mozilla Public License Version 1.1 or later (the "MPL")
|
22
|
' http://www.mozilla.org/MPL/MPL-1.1.html
|
23
|
'
|
24
|
' == END LICENSE ==
|
25
|
'
|
26
|
' This is the "File Uploader" for ASP.
|
27
|
%>
|
28
|
<!--#include file="config.asp"-->
|
29
|
<!--#include file="util.asp"-->
|
30
|
<!--#include file="io.asp"-->
|
31
|
<!--#include file="commands.asp"-->
|
32
|
<!--#include file="class_upload.asp"-->
|
33
|
<%
|
34
|
|
35
|
Sub SendError( number, text )
|
36
|
SendUploadResults number, "", "", text
|
37
|
End Sub
|
38
|
|
39
|
' Check if this uploader has been enabled.
|
40
|
If ( ConfigIsEnabled = False ) Then
|
41
|
SendUploadResults "1", "", "", "This file uploader is disabled. Please check the ""editor/filemanager/connectors/asp/config.asp"" file"
|
42
|
End If
|
43
|
|
44
|
Dim sCommand, sResourceType, sCurrentFolder
|
45
|
|
46
|
sCommand = "QuickUpload"
|
47
|
|
48
|
sResourceType = Request.QueryString("Type")
|
49
|
If ( sResourceType = "" ) Then sResourceType = "File"
|
50
|
|
51
|
sCurrentFolder = "/"
|
52
|
|
53
|
' Is Upload enabled?
|
54
|
if ( Not IsAllowedCommand( sCommand ) ) then
|
55
|
SendUploadResults "1", "", "", "The """ & sCommand & """ command isn't allowed"
|
56
|
end if
|
57
|
|
58
|
' Check if it is an allowed resource type.
|
59
|
if ( Not IsAllowedType( sResourceType ) ) Then
|
60
|
SendUploadResults "1", "", "", "The " & sResourceType & " resource type isn't allowed"
|
61
|
end if
|
62
|
|
63
|
FileUpload sResourceType, sCurrentFolder, sCommand
|
64
|
|
65
|
%>
|