--- /dev/null
+<?php\r
+/*\r
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net\r
+ * Copyright (C) 2003-2008 Frederico Caldeira Knabben\r
+ *\r
+ * == BEGIN LICENSE ==\r
+ *\r
+ * Licensed under the terms of any of the following licenses at your\r
+ * choice:\r
+ *\r
+ * - GNU General Public License Version 2 or later (the "GPL")\r
+ * http://www.gnu.org/licenses/gpl.html\r
+ *\r
+ * - GNU Lesser General Public License Version 2.1 or later (the "LGPL")\r
+ * http://www.gnu.org/licenses/lgpl.html\r
+ *\r
+ * - Mozilla Public License Version 1.1 or later (the "MPL")\r
+ * http://www.mozilla.org/MPL/MPL-1.1.html\r
+ *\r
+ * == END LICENSE ==\r
+ *\r
+ * This is the "File Uploader" for PHP.\r
+ */\r
+\r
+require('./config.php') ;\r
+require('./util.php') ;\r
+require('./io.php') ;\r
+require('./commands.php') ;\r
+require('./phpcompat.php') ;\r
+\r
+function SendError( $number, $text )\r
+{\r
+ SendUploadResults( $number, '', '', $text ) ;\r
+}\r
+\r
+\r
+// Check if this uploader has been enabled.\r
+if ( !$Config['Enabled'] )\r
+ SendUploadResults( '1', '', '', 'This file uploader is disabled. Please check the "editor/filemanager/connectors/php/config.php" file' ) ;\r
+\r
+$sCommand = 'QuickUpload' ;\r
+\r
+// The file type (from the QueryString, by default 'File').\r
+$sType = isset( $_GET['Type'] ) ? $_GET['Type'] : 'File' ;\r
+\r
+$sCurrentFolder = GetCurrentFolder() ;\r
+\r
+// Is enabled the upload?\r
+if ( ! IsAllowedCommand( $sCommand ) )\r
+ SendUploadResults( '1', '', '', 'The ""' . $sCommand . '"" command isn\'t allowed' ) ;\r
+\r
+// Check if it is an allowed type.\r
+if ( !IsAllowedType( $sType ) )\r
+ SendUploadResults( 1, '', '', 'Invalid type specified' ) ;\r
+\r
+\r
+FileUpload( $sType, $sCurrentFolder, $sCommand )\r
+\r
+?>\r