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
* This is the File Manager Connector for PHP.
27
require('./config.php') ;
28
require('./util.php') ;
30
require('./basexml.php') ;
31
require('./commands.php') ;
32
require('./phpcompat.php') ;
34
if ( !$Config['Enabled'] )
35
SendError( 1, 'This connector is disabled. Please check the "editor/filemanager/connectors/php/config.php" file' ) ;
44
if ( !isset( $_GET['Command'] ) || !isset( $_GET['Type'] ) || !isset( $_GET['CurrentFolder'] ) )
47
// Get the main request informaiton.
48
$sCommand = $_GET['Command'] ;
49
$sResourceType = $_GET['Type'] ;
50
$sCurrentFolder = GetCurrentFolder() ;
52
// Check if it is an allowed command
53
if ( ! IsAllowedCommand( $sCommand ) )
54
SendError( 1, 'The "' . $sCommand . '" command isn\'t allowed' ) ;
56
// Check if it is an allowed type.
57
if ( !IsAllowedType( $sResourceType ) )
58
SendError( 1, 'Invalid type specified' ) ;
60
// File Upload doesn't have to Return XML, so it must be intercepted before anything.
61
if ( $sCommand == 'FileUpload' )
63
FileUpload( $sResourceType, $sCurrentFolder, $sCommand ) ;
67
CreateXmlHeader( $sCommand, $sResourceType, $sCurrentFolder ) ;
69
// Execute the required command.
73
GetFolders( $sResourceType, $sCurrentFolder ) ;
75
case 'GetFoldersAndFiles' :
76
GetFoldersAndFiles( $sResourceType, $sCurrentFolder ) ;
79
CreateFolder( $sResourceType, $sCurrentFolder ) ;
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
* This is the File Manager Connector for PHP.
27
require('./config.php') ;
28
require('./util.php') ;
30
require('./basexml.php') ;
31
require('./commands.php') ;
32
require('./phpcompat.php') ;
34
if ( !$Config['Enabled'] )
35
SendError( 1, 'This connector is disabled. Please check the "editor/filemanager/connectors/php/config.php" file' ) ;
44
if ( !isset( $_GET['Command'] ) || !isset( $_GET['Type'] ) || !isset( $_GET['CurrentFolder'] ) )
47
// Get the main request informaiton.
48
$sCommand = $_GET['Command'] ;
49
$sResourceType = $_GET['Type'] ;
50
$sCurrentFolder = GetCurrentFolder() ;
52
// Check if it is an allowed command
53
if ( ! IsAllowedCommand( $sCommand ) )
54
SendError( 1, 'The "' . $sCommand . '" command isn\'t allowed' ) ;
56
// Check if it is an allowed type.
57
if ( !IsAllowedType( $sResourceType ) )
58
SendError( 1, 'Invalid type specified' ) ;
60
// File Upload doesn't have to Return XML, so it must be intercepted before anything.
61
if ( $sCommand == 'FileUpload' )
63
FileUpload( $sResourceType, $sCurrentFolder, $sCommand ) ;
67
CreateXmlHeader( $sCommand, $sResourceType, $sCurrentFolder ) ;
69
// Execute the required command.
73
GetFolders( $sResourceType, $sCurrentFolder ) ;
75
case 'GetFoldersAndFiles' :
76
GetFoldersAndFiles( $sResourceType, $sCurrentFolder ) ;
79
CreateFolder( $sResourceType, $sCurrentFolder ) ;
b'\\ No newline at end of file'