1
<cfsetting enablecfoutputonly="yes" showdebugoutput="no">
3
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
4
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
8
* Licensed under the terms of any of the following licenses at your
11
* - GNU General Public License Version 2 or later (the "GPL")
12
* http://www.gnu.org/licenses/gpl.html
14
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
15
* http://www.gnu.org/licenses/lgpl.html
17
* - Mozilla Public License Version 1.1 or later (the "MPL")
18
* http://www.mozilla.org/MPL/MPL-1.1.html
22
* File Browser connector for ColdFusion (MX 6.0 and above).
23
* (based on the original CF connector by Hendrik Kramer - hk@lwd.de)
27
<cfparam name="url.command">
28
<cfparam name="url.type">
29
<cfparam name="url.currentFolder">
31
<!--- note: no serverPath url parameter - see config.cfm if you need to set the serverPath manually --->
33
<cfinclude template="config.cfm">
34
<cfinclude template="cf_util.cfm">
35
<cfinclude template="cf_io.cfm">
36
<cfinclude template="cf_basexml.cfm">
37
<cfinclude template="cf_commands.cfm">
39
<cfif not Config.Enabled>
40
<cfset SendError( 1, 'This connector is disabled. Please check the "editor/filemanager/connectors/cfm/config.cfm" file' )>
43
<cfset REQUEST.Config = Config>
44
<cfif find( "/", getBaseTemplatePath() ) >
45
<cfset REQUEST.Fs = "/">
47
<cfset REQUEST.Fs = "\">
52
<cffunction name="DoResponse" output="true" returntype="void">
54
<!--- Get the main request informaiton. --->
55
<cfset var sCommand = "#URL.Command#" >
56
<cfset var sResourceType = URL.Type >
57
<cfset var sCurrentFolder = GetCurrentFolder() >
59
<!--- Check if it is an allowed command --->
60
<cfif not IsAllowedCommand( sCommand ) >
61
<cfset SendError( 1, "The """ & sCommand & """ command isn't allowed" ) >
64
<!--- Check if it is an allowed type. --->
65
<cfif not IsAllowedType( sResourceType ) >
66
<cfset SendError( 1, 'Invalid type specified' ) >
69
<!--- File Upload doesn't have to Return XML, so it must be intercepted before anything. --->
70
<cfif sCommand eq "FileUpload">
71
<cfset FileUpload( sResourceType, sCurrentFolder, sCommand )>
75
<cfset CreateXmlHeader( sCommand, sResourceType, sCurrentFolder )>
77
<!--- Execute the required command. --->
78
<cfif sCommand eq "GetFolders">
79
<cfset GetFolders( sResourceType, sCurrentFolder ) >
80
<cfelseif sCommand eq "GetFoldersAndFiles">
81
<cfset GetFoldersAndFiles( sResourceType, sCurrentFolder ) >
82
<cfelseif sCommand eq "CreateFolder">
83
<cfset CreateFolder( sResourceType, sCurrentFolder ) >
86
<cfset CreateXmlFooter()>
1
<cfsetting enablecfoutputonly="yes" showdebugoutput="no">
3
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
4
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
8
* Licensed under the terms of any of the following licenses at your
11
* - GNU General Public License Version 2 or later (the "GPL")
12
* http://www.gnu.org/licenses/gpl.html
14
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
15
* http://www.gnu.org/licenses/lgpl.html
17
* - Mozilla Public License Version 1.1 or later (the "MPL")
18
* http://www.mozilla.org/MPL/MPL-1.1.html
22
* File Browser connector for ColdFusion (MX 6.0 and above).
23
* (based on the original CF connector by Hendrik Kramer - hk@lwd.de)
27
<cfparam name="url.command">
28
<cfparam name="url.type">
29
<cfparam name="url.currentFolder">
31
<!--- note: no serverPath url parameter - see config.cfm if you need to set the serverPath manually --->
33
<cfinclude template="config.cfm">
34
<cfinclude template="cf_util.cfm">
35
<cfinclude template="cf_io.cfm">
36
<cfinclude template="cf_basexml.cfm">
37
<cfinclude template="cf_commands.cfm">
39
<cfif not Config.Enabled>
40
<cfset SendError( 1, 'This connector is disabled. Please check the "editor/filemanager/connectors/cfm/config.cfm" file' )>
43
<cfset REQUEST.Config = Config>
44
<cfif find( "/", getBaseTemplatePath() ) >
45
<cfset REQUEST.Fs = "/">
47
<cfset REQUEST.Fs = "\">
52
<cffunction name="DoResponse" output="true" returntype="void">
54
<!--- Get the main request informaiton. --->
55
<cfset var sCommand = "#URL.Command#" >
56
<cfset var sResourceType = URL.Type >
57
<cfset var sCurrentFolder = GetCurrentFolder() >
59
<!--- Check if it is an allowed command --->
60
<cfif not IsAllowedCommand( sCommand ) >
61
<cfset SendError( 1, "The """ & sCommand & """ command isn't allowed" ) >
64
<!--- Check if it is an allowed type. --->
65
<cfif not IsAllowedType( sResourceType ) >
66
<cfset SendError( 1, 'Invalid type specified' ) >
69
<!--- File Upload doesn't have to Return XML, so it must be intercepted before anything. --->
70
<cfif sCommand eq "FileUpload">
71
<cfset FileUpload( sResourceType, sCurrentFolder, sCommand )>
75
<cfset CreateXmlHeader( sCommand, sResourceType, sCurrentFolder )>
77
<!--- Execute the required command. --->
78
<cfif sCommand eq "GetFolders">
79
<cfset GetFolders( sResourceType, sCurrentFolder ) >
80
<cfelseif sCommand eq "GetFoldersAndFiles">
81
<cfset GetFoldersAndFiles( sResourceType, sCurrentFolder ) >
82
<cfelseif sCommand eq "CreateFolder">
83
<cfset CreateFolder( sResourceType, sCurrentFolder ) >
86
<cfset CreateXmlFooter()>