--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">\r
+<!--\r
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net\r
+ * Copyright (C) 2003-2007 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
+ * Page used to upload new files in the current folder.\r
+-->\r
+<html xmlns="http://www.w3.org/1999/xhtml">\r
+ <head>\r
+ <link href="browser.css" type="text/css" rel="stylesheet" />\r
+ <script type="text/javascript" src="js/common.js"></script>\r
+ <script type="text/javascript">\r
+\r
+function SetCurrentFolder( resourceType, folderPath )\r
+{\r
+ var sUrl = oConnector.ConnectorUrl + 'Command=FileUpload' ;\r
+ sUrl += '&Type=' + resourceType ;\r
+ sUrl += '&CurrentFolder=' + encodeURIComponent( folderPath ) ;\r
+\r
+ document.getElementById('frmUpload').action = sUrl ;\r
+}\r
+\r
+function OnSubmit()\r
+{\r
+ if ( document.getElementById('NewFile').value.length == 0 )\r
+ {\r
+ alert( 'Please select a file from your computer' ) ;\r
+ return false ;\r
+ }\r
+\r
+ // Set the interface elements.\r
+ document.getElementById('eUploadMessage').innerHTML = 'Upload a new file in this folder (Upload in progress, please wait...)' ;\r
+ document.getElementById('btnUpload').disabled = true ;\r
+\r
+ return true ;\r
+}\r
+\r
+function OnUploadCompleted( errorNumber, data )\r
+{\r
+ // Reset the Upload Worker Frame.\r
+ window.parent.frames['frmUploadWorker'].location = 'javascript:void(0)' ;\r
+\r
+ // Reset the upload form (On IE we must do a little trick to avout problems).\r
+ if ( document.all )\r
+ document.getElementById('NewFile').outerHTML = '<input id="NewFile" name="NewFile" style="WIDTH: 100%" type="file">' ;\r
+ else\r
+ document.getElementById('frmUpload').reset() ;\r
+\r
+ // Reset the interface elements.\r
+ document.getElementById('eUploadMessage').innerHTML = 'Upload a new file in this folder' ;\r
+ document.getElementById('btnUpload').disabled = false ;\r
+\r
+ switch ( errorNumber )\r
+ {\r
+ case 0 :\r
+ window.parent.frames['frmResourcesList'].Refresh() ;\r
+ break ;\r
+ case 1 : // Custom error.\r
+ alert( data ) ;\r
+ break ;\r
+ case 201 :\r
+ window.parent.frames['frmResourcesList'].Refresh() ;\r
+ alert( 'A file with the same name is already available. The uploaded file has been renamed to "' + data + '"' ) ;\r
+ break ;\r
+ case 202 :\r
+ alert( 'Invalid file' ) ;\r
+ break ;\r
+ default :\r
+ alert( 'Error on file upload. Error number: ' + errorNumber ) ;\r
+ break ;\r
+ }\r
+}\r
+\r
+window.onload = function()\r
+{\r
+ window.top.IsLoadedUpload = true ;\r
+}\r
+ </script>\r
+ </head>\r
+ <body bottommargin="0" topmargin="0">\r
+ <form id="frmUpload" action="" target="frmUploadWorker" method="post" enctype="multipart/form-data" onsubmit="return OnSubmit();">\r
+ <table height="100%" cellspacing="0" cellpadding="0" width="100%" border="0">\r
+ <tr>\r
+ <td nowrap="nowrap">\r
+ <span id="eUploadMessage">Upload a new file in this folder</span><br>\r
+ <table cellspacing="0" cellpadding="0" width="100%" border="0">\r
+ <tr>\r
+ <td width="100%"><input id="NewFile" name="NewFile" style="WIDTH: 100%" type="file"></td>\r
+ <td nowrap="nowrap"> <input id="btnUpload" type="submit" value="Upload"></td>\r
+ </tr>\r
+ </table>\r
+ </td>\r
+ </tr>\r
+ </table>\r
+ </form>\r
+ </body>\r
+</html>\r