28require
'config.inc.php';
32require
'connector.lib.php';
34if (!$Config[
'Enabled']) {
35 SendError(1,
'This connector is disabled. Please check the "editor/filemanager/connectors/php/config.inc.php" file');
47 if (!isset($_GET[
'Command']) || !isset($_GET[
'Type']) || !isset($_GET[
'CurrentFolder'])) {
53 $sResourceType =
GETPOST(
'Type');
54 $sCurrentFolder = GetCurrentFolder();
57 if (!IsAllowedCommand($sCommand)) {
58 SendError(1,
'The "'.$sCommand.
'" command isn\'t allowed');
61 if (!IsAllowedType($sResourceType)) {
62 SendError(1,
'Invalid type specified');
66 if ($sCommand ==
'FileUpload') {
67 FileUpload($sResourceType, $sCurrentFolder, $sCommand);
72 CreateXmlHeader($sCommand, $sResourceType, $sCurrentFolder);
77 GetFolders($sResourceType, $sCurrentFolder);
79 case 'GetFoldersAndFiles':
80 GetFoldersAndFiles($sResourceType, $sCurrentFolder);
83 CreateFolder($sResourceType, $sCurrentFolder);
This class is used to manage file upload using ajax.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.