1<%@ CodePage=65001 Language="VBScript"%>
2<%
3Option Explicit
4Response.Buffer = True
5%>
6<%
7 ' FCKeditor - The text editor for Internet - http://www.fckeditor.net
8 ' Copyright (C) 2003-2007 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' Check if this uploader has been enabled.
36If ( ConfigIsEnabled = False ) Then
37	SendUploadResults "1", "", "", "This file uploader is disabled. Please check the ""editor/filemanager/connectors/asp/config.asp"" file"
38End If
39
40	Dim sCommand, sResourceType, sCurrentFolder
41
42	sCommand = "QuickUpload"
43
44	sResourceType = Request.QueryString("Type")
45	If ( sResourceType = "" ) Then sResourceType = "File"
46
47	sCurrentFolder = GetCurrentFolder()
48
49	' Is Upload enabled?
50	if ( Not IsAllowedCommand( sCommand ) ) then
51		SendUploadResults "1", "", "", "The """ & sCommand & """ command isn't allowed"
52	end if
53
54	' Check if it is an allowed resource type.
55	if ( Not IsAllowedType( sResourceType ) ) Then
56		SendUploadResults "1", "", "", "The " & sResourceType & " resource type isn't allowed"
57	end if
58
59	FileUpload sResourceType, sCurrentFolder, sCommand
60
61%>
62