diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/browser.css b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/browser.css new file mode 100755 index 00000000000..4a0003cf3fd --- /dev/null +++ b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/browser.css @@ -0,0 +1,87 @@ +/* + * FCKeditor - The text editor for Internet - http://www.fckeditor.net + * Copyright (C) 2003-2010 Frederico Caldeira Knabben + * + * == BEGIN LICENSE == + * + * Licensed under the terms of any of the following licenses at your + * choice: + * + * - GNU General Public License Version 2 or later (the "GPL") + * http://www.gnu.org/licenses/gpl.html + * + * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") + * http://www.gnu.org/licenses/lgpl.html + * + * - Mozilla Public License Version 1.1 or later (the "MPL") + * http://www.mozilla.org/MPL/MPL-1.1.html + * + * == END LICENSE == + * + * CSS styles used by all pages that compose the File Browser. + */ + +body +{ + background-color: #f1f1e3; + margin-top:0; + margin-bottom:0; +} + +form +{ + margin: 0; + padding: 0; +} + +.Frame +{ + background-color: #f1f1e3; + border: thin inset #f1f1e3; +} + +body.FileArea +{ + background-color: #ffffff; + margin: 10px; +} + +body, td, input, select +{ + font-size: 11px; + font-family: 'Microsoft Sans Serif' , Arial, Helvetica, Verdana; +} + +.ActualFolder +{ + font-weight: bold; + font-size: 14px; +} + +.PopupButtons +{ + border-top: #d5d59d 1px solid; + background-color: #e3e3c7; + padding: 7px 10px 7px 10px; +} + +.Button, button +{ + color: #3b3b3b; + border: #939393 1px solid; + background-color: #dedede; +} + +.FolderListCurrentFolder img +{ + background-image: url(images/FolderOpened.gif); +} + +.FolderListFolder img +{ + background-image: url(images/Folder.gif); +} + +.fullHeight { + height: 100%; +} diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/browser.html b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/browser.html new file mode 100755 index 00000000000..d5e773b05a0 --- /dev/null +++ b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/browser.html @@ -0,0 +1,200 @@ + + + + + FCKeditor - Resources Browser + + + + + + + + + + + + + + + + + + + + + diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/frmactualfolder.html b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/frmactualfolder.html new file mode 100755 index 00000000000..dc1f517a65a --- /dev/null +++ b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/frmactualfolder.html @@ -0,0 +1,95 @@ + + + + + Folder path + + + + + + + + + +
+ +
+ + diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/frmcreatefolder.html b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/frmcreatefolder.html new file mode 100755 index 00000000000..390eb49bca0 --- /dev/null +++ b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/frmcreatefolder.html @@ -0,0 +1,114 @@ + + + + + Create Folder + + + + + + + + + + +
+ +
+ + diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/frmfolders.html b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/frmfolders.html new file mode 100755 index 00000000000..d4b3b3d3976 --- /dev/null +++ b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/frmfolders.html @@ -0,0 +1,198 @@ + + + + + Folders + + + + + + + + + + + +
+ + diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/frmresourceslist.html b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/frmresourceslist.html new file mode 100755 index 00000000000..9feb9e03f34 --- /dev/null +++ b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/frmresourceslist.html @@ -0,0 +1,183 @@ + + + + + Resources + + + + + + + + diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/frmresourcetype.html b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/frmresourcetype.html new file mode 100755 index 00000000000..e918f9fb4e5 --- /dev/null +++ b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/frmresourcetype.html @@ -0,0 +1,69 @@ + + + + + Available types + + + + + + + + + + +
+ Resource Type
+ +
+ + diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/frmupload.html b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/frmupload.html new file mode 100755 index 00000000000..e840c0a9e5a --- /dev/null +++ b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/frmupload.html @@ -0,0 +1,115 @@ + + + + + File Upload + + + + + + +
+ + + + +
+ Upload a new file in this folder
+ + + + + +
 
+
+
+ + diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/ButtonArrow.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/ButtonArrow.gif new file mode 100755 index 00000000000..a355e5a4490 Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/ButtonArrow.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/Folder.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/Folder.gif new file mode 100755 index 00000000000..ab6824d7f80 Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/Folder.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/Folder32.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/Folder32.gif new file mode 100755 index 00000000000..b93b752cb35 Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/Folder32.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/FolderOpened.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/FolderOpened.gif new file mode 100755 index 00000000000..0c5dd413efe Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/FolderOpened.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/FolderOpened32.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/FolderOpened32.gif new file mode 100755 index 00000000000..3e3fcf56cc4 Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/FolderOpened32.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/FolderUp.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/FolderUp.gif new file mode 100755 index 00000000000..ad5bc202670 Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/FolderUp.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/ai.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/ai.gif new file mode 100755 index 00000000000..699e6a3872b Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/ai.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/avi.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/avi.gif new file mode 100755 index 00000000000..97025bb6ea8 Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/avi.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/bmp.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/bmp.gif new file mode 100755 index 00000000000..f3c7f82ab63 Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/bmp.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/cs.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/cs.gif new file mode 100755 index 00000000000..b62bd026061 Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/cs.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/default.icon.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/default.icon.gif new file mode 100755 index 00000000000..976997b1b66 Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/default.icon.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/dll.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/dll.gif new file mode 100755 index 00000000000..9b54964576b Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/dll.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/doc.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/doc.gif new file mode 100755 index 00000000000..b557568b3d1 Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/doc.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/exe.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/exe.gif new file mode 100755 index 00000000000..758499394af Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/exe.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/fla.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/fla.gif new file mode 100755 index 00000000000..923079fc6bb Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/fla.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/gif.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/gif.gif new file mode 100755 index 00000000000..df5f5795c39 Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/gif.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/htm.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/htm.gif new file mode 100755 index 00000000000..a9bdf003086 Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/htm.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/html.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/html.gif new file mode 100755 index 00000000000..a9bdf003086 Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/html.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/jpg.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/jpg.gif new file mode 100755 index 00000000000..de78363f241 Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/jpg.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/js.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/js.gif new file mode 100755 index 00000000000..fe0c98e975c Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/js.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/mdb.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/mdb.gif new file mode 100755 index 00000000000..d3af9e87bf8 Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/mdb.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/mp3.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/mp3.gif new file mode 100755 index 00000000000..7d6360f2a56 Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/mp3.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/pdf.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/pdf.gif new file mode 100755 index 00000000000..4950ec87c13 Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/pdf.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/png.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/png.gif new file mode 100755 index 00000000000..0a79ebfdf5f Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/png.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/ppt.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/ppt.gif new file mode 100755 index 00000000000..023431c1640 Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/ppt.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/rdp.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/rdp.gif new file mode 100755 index 00000000000..b9eace7ed9c Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/rdp.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/swf.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/swf.gif new file mode 100755 index 00000000000..5df7de57496 Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/swf.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/swt.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/swt.gif new file mode 100755 index 00000000000..7807c075c40 Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/swt.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/txt.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/txt.gif new file mode 100755 index 00000000000..4e2c2e3ce28 Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/txt.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/vsd.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/vsd.gif new file mode 100755 index 00000000000..7624697ccd9 Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/vsd.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/xls.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/xls.gif new file mode 100755 index 00000000000..afe724a3d06 Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/xls.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/xml.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/xml.gif new file mode 100755 index 00000000000..4fae35662f0 Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/xml.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/zip.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/zip.gif new file mode 100755 index 00000000000..7157f72ad82 Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/32/zip.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/ai.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/ai.gif new file mode 100755 index 00000000000..ba5a9131240 Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/ai.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/avi.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/avi.gif new file mode 100755 index 00000000000..6f3bac9bf15 Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/avi.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/bmp.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/bmp.gif new file mode 100755 index 00000000000..7708dd895b3 Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/bmp.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/cs.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/cs.gif new file mode 100755 index 00000000000..4d927230b98 Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/cs.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/default.icon.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/default.icon.gif new file mode 100755 index 00000000000..6ce26a4dc51 Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/default.icon.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/dll.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/dll.gif new file mode 100755 index 00000000000..48d445acd2f Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/dll.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/doc.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/doc.gif new file mode 100755 index 00000000000..6535b4c0e72 Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/doc.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/exe.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/exe.gif new file mode 100755 index 00000000000..315817f5d93 Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/exe.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/fla.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/fla.gif new file mode 100755 index 00000000000..8f91a98ecb1 Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/fla.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/gif.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/gif.gif new file mode 100755 index 00000000000..a5e3e6cfb9d Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/gif.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/htm.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/htm.gif new file mode 100755 index 00000000000..0b5d6ba1fc3 Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/htm.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/html.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/html.gif new file mode 100755 index 00000000000..0b5d6ba1fc3 Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/html.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/jpg.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/jpg.gif new file mode 100755 index 00000000000..634b386139a Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/jpg.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/js.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/js.gif new file mode 100755 index 00000000000..4ea17d452ed Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/js.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/mdb.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/mdb.gif new file mode 100755 index 00000000000..0d7c102103f Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/mdb.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/mp3.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/mp3.gif new file mode 100755 index 00000000000..6f3bac9bf15 Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/mp3.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/pdf.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/pdf.gif new file mode 100755 index 00000000000..ca1f94acdd7 Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/pdf.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/png.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/png.gif new file mode 100755 index 00000000000..b6d1b32011a Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/png.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/ppt.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/ppt.gif new file mode 100755 index 00000000000..877a8c86795 Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/ppt.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/rdp.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/rdp.gif new file mode 100755 index 00000000000..916cd7e639d Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/rdp.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/swf.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/swf.gif new file mode 100755 index 00000000000..314469da14a Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/swf.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/swt.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/swt.gif new file mode 100755 index 00000000000..314469da14a Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/swt.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/txt.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/txt.gif new file mode 100755 index 00000000000..1511ba3e9fa Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/txt.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/vsd.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/vsd.gif new file mode 100755 index 00000000000..9be3daaed8f Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/vsd.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/xls.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/xls.gif new file mode 100755 index 00000000000..f57715d6a0c Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/xls.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/xml.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/xml.gif new file mode 100755 index 00000000000..455992877e1 Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/xml.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/zip.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/zip.gif new file mode 100755 index 00000000000..b1e24921e56 Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/icons/zip.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/spacer.gif b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/spacer.gif new file mode 100755 index 00000000000..35d42e808f0 Binary files /dev/null and b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/images/spacer.gif differ diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/js/common.js b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/js/common.js new file mode 100755 index 00000000000..98c4b907095 --- /dev/null +++ b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/js/common.js @@ -0,0 +1,88 @@ +/* + * FCKeditor - The text editor for Internet - http://www.fckeditor.net + * Copyright (C) 2003-2010 Frederico Caldeira Knabben + * + * == BEGIN LICENSE == + * + * Licensed under the terms of any of the following licenses at your + * choice: + * + * - GNU General Public License Version 2 or later (the "GPL") + * http://www.gnu.org/licenses/gpl.html + * + * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") + * http://www.gnu.org/licenses/lgpl.html + * + * - Mozilla Public License Version 1.1 or later (the "MPL") + * http://www.mozilla.org/MPL/MPL-1.1.html + * + * == END LICENSE == + * + * Common objects and functions shared by all pages that compose the + * File Browser dialog window. + */ + +// Automatically detect the correct document.domain (#1919). +(function() +{ + var d = document.domain ; + + while ( true ) + { + // Test if we can access a parent property. + try + { + var test = window.top.opener.document.domain ; + break ; + } + catch( e ) + {} + + // Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ... + d = d.replace( /.*?(?:\.|$)/, '' ) ; + + if ( d.length == 0 ) + break ; // It was not able to detect the domain. + + try + { + document.domain = d ; + } + catch (e) + { + break ; + } + } +})() ; + +function AddSelectOption( selectElement, optionText, optionValue ) +{ + var oOption = document.createElement("OPTION") ; + + oOption.text = optionText ; + oOption.value = optionValue ; + + selectElement.options.add(oOption) ; + + return oOption ; +} + +var oConnector = window.parent.oConnector ; +var oIcons = window.parent.oIcons ; + + +function StringBuilder( value ) +{ + this._Strings = new Array( value || '' ) ; +} + +StringBuilder.prototype.Append = function( value ) +{ + if ( value ) + this._Strings.push( value ) ; +} + +StringBuilder.prototype.ToString = function() +{ + return this._Strings.join( '' ) ; +} diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/js/fckxml.js b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/js/fckxml.js new file mode 100755 index 00000000000..b7eddc601e0 --- /dev/null +++ b/htdocs/includes/fckeditor/editor/filemanagerdol/browser/default/js/fckxml.js @@ -0,0 +1,147 @@ +/* + * FCKeditor - The text editor for Internet - http://www.fckeditor.net + * Copyright (C) 2003-2010 Frederico Caldeira Knabben + * + * == BEGIN LICENSE == + * + * Licensed under the terms of any of the following licenses at your + * choice: + * + * - GNU General Public License Version 2 or later (the "GPL") + * http://www.gnu.org/licenses/gpl.html + * + * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") + * http://www.gnu.org/licenses/lgpl.html + * + * - Mozilla Public License Version 1.1 or later (the "MPL") + * http://www.mozilla.org/MPL/MPL-1.1.html + * + * == END LICENSE == + * + * Defines the FCKXml object that is used for XML data calls + * and XML processing. + * + * This script is shared by almost all pages that compose the + * File Browser frameset. + */ + +var FCKXml = function() +{} + +FCKXml.prototype.GetHttpRequest = function() +{ + // Gecko / IE7 + try { return new XMLHttpRequest(); } + catch(e) {} + + // IE6 + try { return new ActiveXObject( 'Msxml2.XMLHTTP' ) ; } + catch(e) {} + + // IE5 + try { return new ActiveXObject( 'Microsoft.XMLHTTP' ) ; } + catch(e) {} + + return null ; +} + +FCKXml.prototype.LoadUrl = function( urlToCall, asyncFunctionPointer ) +{ + var oFCKXml = this ; + + var bAsync = ( typeof(asyncFunctionPointer) == 'function' ) ; + + var oXmlHttp = this.GetHttpRequest() ; + + oXmlHttp.open( "GET", urlToCall, bAsync ) ; + + if ( bAsync ) + { + oXmlHttp.onreadystatechange = function() + { + if ( oXmlHttp.readyState == 4 ) + { + var oXml ; + try + { + // this is the same test for an FF2 bug as in fckxml_gecko.js + // but we've moved the responseXML assignment into the try{} + // so we don't even have to check the return status codes. + var test = oXmlHttp.responseXML.firstChild ; + oXml = oXmlHttp.responseXML ; + } + catch ( e ) + { + try + { + oXml = (new DOMParser()).parseFromString( oXmlHttp.responseText, 'text/xml' ) ; + } + catch ( e ) {} + } + + if ( !oXml || !oXml.firstChild || oXml.firstChild.nodeName == 'parsererror' ) + { + alert( 'The server didn\'t send back a proper XML response. Please contact your system administrator.\n\n' + + 'XML request error: ' + oXmlHttp.statusText + ' (' + oXmlHttp.status + ')\n\n' + + 'Requested URL:\n' + urlToCall + '\n\n' + + 'Response text:\n' + oXmlHttp.responseText ) ; + return ; + } + + oFCKXml.DOMDocument = oXml ; + asyncFunctionPointer( oFCKXml ) ; + } + } + } + + oXmlHttp.send( null ) ; + + if ( ! bAsync ) + { + if ( oXmlHttp.status == 200 || oXmlHttp.status == 304 ) + this.DOMDocument = oXmlHttp.responseXML ; + else + { + alert( 'XML request error: ' + oXmlHttp.statusText + ' (' + oXmlHttp.status + ')' ) ; + } + } +} + +FCKXml.prototype.SelectNodes = function( xpath ) +{ + if ( navigator.userAgent.indexOf('MSIE') >= 0 ) // IE + return this.DOMDocument.selectNodes( xpath ) ; + else // Gecko + { + var aNodeArray = new Array(); + + var xPathResult = this.DOMDocument.evaluate( xpath, this.DOMDocument, + this.DOMDocument.createNSResolver(this.DOMDocument.documentElement), XPathResult.ORDERED_NODE_ITERATOR_TYPE, null) ; + if ( xPathResult ) + { + var oNode = xPathResult.iterateNext() ; + while( oNode ) + { + aNodeArray[aNodeArray.length] = oNode ; + oNode = xPathResult.iterateNext(); + } + } + return aNodeArray ; + } +} + +FCKXml.prototype.SelectSingleNode = function( xpath ) +{ + if ( navigator.userAgent.indexOf('MSIE') >= 0 ) // IE + return this.DOMDocument.selectSingleNode( xpath ) ; + else // Gecko + { + var xPathResult = this.DOMDocument.evaluate( xpath, this.DOMDocument, + this.DOMDocument.createNSResolver(this.DOMDocument.documentElement), 9, null); + + if ( xPathResult && xPathResult.singleNodeValue ) + return xPathResult.singleNodeValue ; + else + return null ; + } +} diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/connectors/php/basexml.php b/htdocs/includes/fckeditor/editor/filemanagerdol/connectors/php/basexml.php new file mode 100755 index 00000000000..227877b0bd4 --- /dev/null +++ b/htdocs/includes/fckeditor/editor/filemanagerdol/connectors/php/basexml.php @@ -0,0 +1,99 @@ +' ; + + // Create the main "Connector" node. + echo '' ; + + // Add the current folder node. + echo '' ; + + $GLOBALS['HeaderSent'] = true ; +} + +function CreateXmlFooter() +{ + echo '' ; +} + +function SendError( $number, $text ) +{ + if ( $_GET['Command'] == 'FileUpload' ) + SendUploadResults( $number, "", "", $text ) ; + + if ( isset( $GLOBALS['HeaderSent'] ) && $GLOBALS['HeaderSent'] ) + { + SendErrorNode( $number, $text ) ; + CreateXmlFooter() ; + } + else + { + SetXmlHeaders() ; + + // Create the XML document header + echo '' ; + + echo '' ; + + SendErrorNode( $number, $text ) ; + + echo '' ; + } + exit ; +} + +function SendErrorNode( $number, $text ) +{ + if ($text) + echo '' ; + else + echo '' ; +} +?> diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/connectors/php/commands.php b/htdocs/includes/fckeditor/editor/filemanagerdol/connectors/php/commands.php new file mode 100755 index 00000000000..53ea5a23cc7 --- /dev/null +++ b/htdocs/includes/fckeditor/editor/filemanagerdol/connectors/php/commands.php @@ -0,0 +1,299 @@ +' ; + } + closedir( $oCurrentFolder ) ; + } + + // Open the "Folders" node. + echo "" ; + + natcasesort( $aFolders ) ; + foreach ( $aFolders as $sFolder ) + echo $sFolder ; + + // Close the "Folders" node. + echo "" ; +} + +function GetFoldersAndFiles( $resourceType, $currentFolder ) +{ + // Map the virtual path to the local server path. + $sServerDir = ServerMapFolder( $resourceType, $currentFolder, 'GetFoldersAndFiles' ) ; + + // Arrays that will hold the folders and files names. + $aFolders = array() ; + $aFiles = array() ; + + $oCurrentFolder = @opendir( $sServerDir ) ; + + if ($oCurrentFolder !== false) + { + while ( $sFile = readdir( $oCurrentFolder ) ) + { + if ( $sFile != '.' && $sFile != '..' ) + { + if ( is_dir( $sServerDir . $sFile ) ) + $aFolders[] = '' ; + else + { + $iFileSize = @filesize( $sServerDir . $sFile ) ; + if ( !$iFileSize ) { + $iFileSize = 0 ; + } + if ( $iFileSize > 0 ) + { + $iFileSize = round( $iFileSize / 1024 ) ; + if ( $iFileSize < 1 ) + $iFileSize = 1 ; + } + + $aFiles[] = '' ; + } + } + } + closedir( $oCurrentFolder ) ; + } + + // Send the folders + natcasesort( $aFolders ) ; + echo '' ; + + foreach ( $aFolders as $sFolder ) + echo $sFolder ; + + echo '' ; + + // Send the files + natcasesort( $aFiles ) ; + echo '' ; + + foreach ( $aFiles as $sFiles ) + echo $sFiles ; + + echo '' ; +} + +function CreateFolder( $resourceType, $currentFolder ) +{ + if (!isset($_GET)) { + global $_GET; + } + $sErrorNumber = '0' ; + $sErrorMsg = '' ; + + if ( isset( $_GET['NewFolderName'] ) ) + { + $sNewFolderName = $_GET['NewFolderName'] ; + $sNewFolderName = SanitizeFolderName( $sNewFolderName ) ; + + if ( strpos( $sNewFolderName, '..' ) !== FALSE ) + $sErrorNumber = '102' ; // Invalid folder name. + else + { + // Map the virtual path to the local server path of the current folder. + $sServerDir = ServerMapFolder( $resourceType, $currentFolder, 'CreateFolder' ) ; + + if ( is_writable( $sServerDir ) ) + { + $sServerDir .= $sNewFolderName ; + + $sErrorMsg = CreateServerFolder( $sServerDir ) ; + + switch ( $sErrorMsg ) + { + case '' : + $sErrorNumber = '0' ; + break ; + case 'Invalid argument' : + case 'No such file or directory' : + $sErrorNumber = '102' ; // Path too long. + break ; + default : + $sErrorNumber = '110' ; + break ; + } + } + else + $sErrorNumber = '103' ; + } + } + else + $sErrorNumber = '102' ; + + // Create the "Error" node. + echo '' ; +} + +// DOL_CHANGE +//function FileUpload( $resourceType, $currentFolder, $sCommand ) +function FileUpload($resourceType, $currentFolder, $sCommand, $CKEcallback = '') +{ + if (!isset($_FILES)) { + global $_FILES; + } + $sErrorNumber = '0' ; + $sFileName = '' ; + + if ( isset( $_FILES['NewFile'] ) && !is_null( $_FILES['NewFile']['tmp_name'] ) + # This is for the QuickUpload tab box + or (isset($_FILES['upload']) and !is_null($_FILES['upload']['tmp_name']))) + { + global $Config ; + + $oFile = isset($_FILES['NewFile']) ? $_FILES['NewFile'] : $_FILES['upload']; + + // Map the virtual path to the local server path. + $sServerDir = ServerMapFolder( $resourceType, $currentFolder, $sCommand ) ; + + // Get the uploaded file name. + $sFileName = $oFile['name'] ; + $sFileName = SanitizeFileName( $sFileName ) ; + + $sOriginalFileName = $sFileName ; + + // Get the extension. + $sExtension = substr( $sFileName, ( strrpos($sFileName, '.') + 1 ) ) ; + $sExtension = strtolower( $sExtension ) ; + + if ( isset( $Config['SecureImageUploads'] ) ) + { + if ( ( $isImageValid = IsImageValid( $oFile['tmp_name'], $sExtension ) ) === false ) + { + $sErrorNumber = '202' ; + } + } + + if ( isset( $Config['HtmlExtensions'] ) ) + { + if ( !IsHtmlExtension( $sExtension, $Config['HtmlExtensions'] ) && + ( $detectHtml = DetectHtml( $oFile['tmp_name'] ) ) === true ) + { + $sErrorNumber = '202' ; + } + } + + // Check if it is an allowed extension. + if ( !$sErrorNumber && IsAllowedExt( $sExtension, $resourceType ) ) + { + $iCounter = 0 ; + + while ( true ) + { + $sFilePath = $sServerDir . $sFileName ; + + if ( is_file( $sFilePath ) ) + { + $iCounter++ ; + $sFileName = RemoveExtension( $sOriginalFileName ) . '(' . $iCounter . ').' . $sExtension ; + $sErrorNumber = '201' ; + } + else + { + move_uploaded_file( $oFile['tmp_name'], $sFilePath ) ; + + if ( is_file( $sFilePath ) ) + { + if ( isset( $Config['ChmodOnUpload'] ) && !$Config['ChmodOnUpload'] ) + { + break ; + } + + $permissions = 0777; + + if ( isset( $Config['ChmodOnUpload'] ) && $Config['ChmodOnUpload'] ) + { + $permissions = $Config['ChmodOnUpload'] ; + } + + $oldumask = umask(0) ; + chmod( $sFilePath, $permissions ) ; + umask( $oldumask ) ; + } + + break ; + } + } + + if ( file_exists( $sFilePath ) ) + { + //previous checks failed, try once again + if ( isset( $isImageValid ) && $isImageValid === -1 && IsImageValid( $sFilePath, $sExtension ) === false ) + { + @unlink( $sFilePath ) ; + $sErrorNumber = '202' ; + } + else if ( isset( $detectHtml ) && $detectHtml === -1 && DetectHtml( $sFilePath ) === true ) + { + @unlink( $sFilePath ) ; + $sErrorNumber = '202' ; + } + } + } + else + $sErrorNumber = '202' ; + } + else + $sErrorNumber = '202' ; + + + $sFileUrl = CombinePaths( GetResourceTypePath( $resourceType, $sCommand ) , $currentFolder ) ; + $sFileUrl = CombinePaths( $sFileUrl, $sFileName ) ; + + + // DOL_CHANGE + //SendUploadResults( $sErrorNumber, $sFileUrl, $sFileName ) ; + if($CKEcallback == '') + { + // this line already exists so wrap the if block around it + SendUploadResults( $sErrorNumber, $sFileUrl, $sFileName ) ; + } + else + { + //issue the CKEditor Callback + SendCKEditorResults ($CKEcallback, $sFileUrl, + ($sErrorNumber != 0 + ? 'Error '. $sErrorNumber. ' upload failed. '. $sErrorMsg + : 'Upload Successful')); + } + + exit ; +} +?> diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/connectors/php/config.php b/htdocs/includes/fckeditor/editor/filemanagerdol/connectors/php/config.php new file mode 100755 index 00000000000..0e02f6feda2 --- /dev/null +++ b/htdocs/includes/fckeditor/editor/filemanagerdol/connectors/php/config.php @@ -0,0 +1,170 @@ +syslog->enabled=1; +define('SYSLOG_FILE','c:/log/dolibarr/dolibarr.log'); +require_once("../../../../../../lib/functions.lib.php"); +dol_syslog("eee".$conf->fckeditor->dir_output); +*/ + +// SECURITY: You must explicitly enable this "connector". (Set it to "true"). +// WARNING: don't just set "$Config['Enabled'] = true ;", you must be sure that only +// authenticated users can access this file or use some kind of session checking. +$Config['Enabled'] = true ; + + +// Path to user files relative to the document root. +$Config['UserFilesPath'] = DOL_URL_ROOT.'/viewimage.php?modulepart=fckeditor&file=' ; + +// Fill the following value it you prefer to specify the absolute path for the +// user files directory. Useful if you are using a virtual directory, symbolic +// link or alias. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'. +// Attention: The above 'UserFilesPath' must point to the same directory. +$Config['UserFilesAbsolutePath'] = $dolibarr_main_data_root.'/fckeditor/'; + +// Due to security issues with Apache modules, it is recommended to leave the +// following setting enabled. +$Config['ForceSingleExtension'] = true ; + +// Perform additional checks for image files. +// If set to true, validate image size (using getimagesize). +$Config['SecureImageUploads'] = true; + +// What the user can do with this connector. +$Config['ConfigAllowedCommands'] = array('QuickUpload', 'FileUpload', 'GetFolders', 'GetFoldersAndFiles', 'CreateFolder') ; + +// Allowed Resource Types. +$Config['ConfigAllowedTypes'] = array('File', 'Image', 'Flash', 'Media') ; + +// For security, HTML is allowed in the first Kb of data for files having the +// following extensions only. +$Config['HtmlExtensions'] = array("html", "htm", "xml", "xsd", "txt", "js") ; + +// After file is uploaded, sometimes it is required to change its permissions +// so that it was possible to access it at the later time. +// If possible, it is recommended to set more restrictive permissions, like 0755. +// Set to 0 to disable this feature. +// Note: not needed on Windows-based servers. +$Config['ChmodOnUpload'] = 0775 ; + +// See comments above. +// Used when creating folders that does not exist. +$Config['ChmodOnFolderCreate'] = 0775 ; + +/* + Configuration settings for each Resource Type + + - AllowedExtensions: the possible extensions that can be allowed. + If it is empty then any file type can be uploaded. + - DeniedExtensions: The extensions that won't be allowed. + If it is empty then no restrictions are done here. + + For a file to be uploaded it has to fulfill both the AllowedExtensions + and DeniedExtensions (that's it: not being denied) conditions. + + - FileTypesPath: the virtual folder relative to the document root where + these resources will be located. + Attention: It must start and end with a slash: '/' + + - FileTypesAbsolutePath: the physical path to the above folder. It must be + an absolute path. + If it's an empty string then it will be autocalculated. + Useful if you are using a virtual directory, symbolic link or alias. + Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'. + Attention: The above 'FileTypesPath' must point to the same directory. + Attention: It must end with a slash: '/' + + - QuickUploadPath: the virtual folder relative to the document root where + these resources will be uploaded using the Upload tab in the resources + dialogs. + Attention: It must start and end with a slash: '/' + + - QuickUploadAbsolutePath: the physical path to the above folder. It must be + an absolute path. + If it's an empty string then it will be autocalculated. + Useful if you are using a virtual directory, symbolic link or alias. + Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'. + Attention: The above 'QuickUploadPath' must point to the same directory. + Attention: It must end with a slash: '/' + + NOTE: by default, QuickUploadPath and QuickUploadAbsolutePath point to + "userfiles" directory to maintain backwards compatibility with older versions of FCKeditor. + This is fine, but you in some cases you will be not able to browse uploaded files using file browser. + Example: if you click on "image button", select "Upload" tab and send image + to the server, image will appear in FCKeditor correctly, but because it is placed + directly in /userfiles/ directory, you'll be not able to see it in built-in file browser. + The more expected behaviour would be to send images directly to "image" subfolder. + To achieve that, simply change + $Config['QuickUploadPath']['Image'] = $Config['UserFilesPath'] ; + $Config['QuickUploadAbsolutePath']['Image'] = $Config['UserFilesAbsolutePath'] ; + into: + $Config['QuickUploadPath']['Image'] = $Config['FileTypesPath']['Image'] ; + $Config['QuickUploadAbsolutePath']['Image'] = $Config['FileTypesAbsolutePath']['Image'] ; + +*/ + +$Config['AllowedExtensions']['File'] = array('7z', 'aiff', 'asf', 'avi', 'bmp', 'csv', 'doc', 'fla', 'flv', 'gif', 'gz', 'gzip', 'jpeg', 'jpg', 'mid', 'mov', 'mp3', 'mp4', 'mpc', 'mpeg', 'mpg', 'ods', 'odt', 'pdf', 'png', 'ppt', 'pxd', 'qt', 'ram', 'rar', 'rm', 'rmi', 'rmvb', 'rtf', 'sdc', 'sitd', 'swf', 'sxc', 'sxw', 'tar', 'tgz', 'tif', 'tiff', 'txt', 'vsd', 'wav', 'wma', 'wmv', 'xls', 'xml', 'zip') ; +$Config['DeniedExtensions']['File'] = array() ; +$Config['FileTypesPath']['File'] = $Config['UserFilesPath'] . 'file/' ; +$Config['FileTypesAbsolutePath']['File']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'file/' ; +$Config['QuickUploadPath']['File'] = $Config['UserFilesPath'] ; +$Config['QuickUploadAbsolutePath']['File']= $Config['UserFilesAbsolutePath'] ; + +$Config['AllowedExtensions']['Image'] = array('bmp','gif','jpeg','jpg','png') ; +$Config['DeniedExtensions']['Image'] = array() ; +$Config['FileTypesPath']['Image'] = $Config['UserFilesPath'] . 'image/' ; +$Config['FileTypesAbsolutePath']['Image']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'image/' ; +$Config['QuickUploadPath']['Image'] = $Config['UserFilesPath'] ; +$Config['QuickUploadAbsolutePath']['Image']= $Config['UserFilesAbsolutePath'] ; + +$Config['AllowedExtensions']['Flash'] = array('swf','flv') ; +$Config['DeniedExtensions']['Flash'] = array() ; +$Config['FileTypesPath']['Flash'] = $Config['UserFilesPath'] . 'flash/' ; +$Config['FileTypesAbsolutePath']['Flash']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'flash/' ; +$Config['QuickUploadPath']['Flash'] = $Config['UserFilesPath'] ; +$Config['QuickUploadAbsolutePath']['Flash']= $Config['UserFilesAbsolutePath'] ; + +$Config['AllowedExtensions']['Media'] = array('aiff', 'asf', 'avi', 'bmp', 'fla', 'flv', 'gif', 'jpeg', 'jpg', 'mid', 'mov', 'mp3', 'mp4', 'mpc', 'mpeg', 'mpg', 'png', 'qt', 'ram', 'rm', 'rmi', 'rmvb', 'swf', 'tif', 'tiff', 'wav', 'wma', 'wmv') ; +$Config['DeniedExtensions']['Media'] = array() ; +$Config['FileTypesPath']['Media'] = $Config['UserFilesPath'] . 'media/' ; +$Config['FileTypesAbsolutePath']['Media']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'media/' ; +$Config['QuickUploadPath']['Media'] = $Config['UserFilesPath'] ; +$Config['QuickUploadAbsolutePath']['Media']= $Config['UserFilesAbsolutePath'] ; + +?> diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/connectors/php/connector.php b/htdocs/includes/fckeditor/editor/filemanagerdol/connectors/php/connector.php new file mode 100755 index 00000000000..535a42016ea --- /dev/null +++ b/htdocs/includes/fckeditor/editor/filemanagerdol/connectors/php/connector.php @@ -0,0 +1,87 @@ + diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/connectors/php/io.php b/htdocs/includes/fckeditor/editor/filemanagerdol/connectors/php/io.php new file mode 100755 index 00000000000..459b5fe7110 --- /dev/null +++ b/htdocs/includes/fckeditor/editor/filemanagerdol/connectors/php/io.php @@ -0,0 +1,320 @@ + 0 ) + return $Config['QuickUploadAbsolutePath'][$resourceType] ; + + // Map the "UserFiles" path to a local directory. + return Server_MapPath( $Config['QuickUploadPath'][$resourceType] ) ; + } + else + { + if ( strlen( $Config['FileTypesAbsolutePath'][$resourceType] ) > 0 ) + return $Config['FileTypesAbsolutePath'][$resourceType] ; + + // Map the "UserFiles" path to a local directory. + return Server_MapPath( $Config['FileTypesPath'][$resourceType] ) ; + } +} + +function GetUrlFromPath( $resourceType, $folderPath, $sCommand ) +{ + return CombinePaths( GetResourceTypePath( $resourceType, $sCommand ), $folderPath ) ; +} + +function RemoveExtension( $fileName ) +{ + return substr( $fileName, 0, strrpos( $fileName, '.' ) ) ; +} + +function ServerMapFolder( $resourceType, $folderPath, $sCommand ) +{ + // Get the resource type directory. + $sResourceTypePath = GetResourceTypeDirectory( $resourceType, $sCommand ) ; + + // Ensure that the directory exists. + $sErrorMsg = CreateServerFolder( $sResourceTypePath ) ; + if ( $sErrorMsg != '' ) + SendError( 1, "Error creating folder \"{$sResourceTypePath}\" ({$sErrorMsg})" ) ; + + // Return the resource type directory combined with the required path. + return CombinePaths( $sResourceTypePath , $folderPath ) ; +} + +function GetParentFolder( $folderPath ) +{ + $sPattern = "-[/\\\\][^/\\\\]+[/\\\\]?$-" ; + return preg_replace( $sPattern, '', $folderPath ) ; +} + +function CreateServerFolder( $folderPath, $lastFolder = null ) +{ + global $Config ; + $sParent = GetParentFolder( $folderPath ) ; + + // Ensure the folder path has no double-slashes, or mkdir may fail on certain platforms + while ( strpos($folderPath, '//') !== false ) + { + $folderPath = str_replace( '//', '/', $folderPath ) ; + } + + // Check if the parent exists, or create it. + if ( !empty($sParent) && !file_exists( $sParent ) ) + { + //prevents agains infinite loop when we can't create root folder + if ( !is_null( $lastFolder ) && $lastFolder === $sParent) { + return "Can't create $folderPath directory" ; + } + + $sErrorMsg = CreateServerFolder( $sParent, $folderPath ) ; + if ( $sErrorMsg != '' ) + return $sErrorMsg ; + } + + if ( !file_exists( $folderPath ) ) + { + // Turn off all error reporting. + error_reporting( 0 ) ; + + $php_errormsg = '' ; + // Enable error tracking to catch the error. + ini_set( 'track_errors', '1' ) ; + + if ( isset( $Config['ChmodOnFolderCreate'] ) && !$Config['ChmodOnFolderCreate'] ) + { + mkdir( $folderPath ) ; + } + else + { + $permissions = 0777 ; + if ( isset( $Config['ChmodOnFolderCreate'] ) ) + { + $permissions = $Config['ChmodOnFolderCreate'] ; + } + // To create the folder with 0777 permissions, we need to set umask to zero. + $oldumask = umask(0) ; + mkdir( $folderPath, $permissions ) ; + umask( $oldumask ) ; + } + + $sErrorMsg = $php_errormsg ; + + // Restore the configurations. + ini_restore( 'track_errors' ) ; + ini_restore( 'error_reporting' ) ; + + return $sErrorMsg ; + } + else + return '' ; +} + +function GetRootPath() +{ + if (!isset($_SERVER)) { + global $_SERVER; + } + $sRealPath = realpath( './' ) ; + // #2124 ensure that no slash is at the end + $sRealPath = rtrim($sRealPath,"\\/"); + + $sSelfPath = $_SERVER['PHP_SELF'] ; + $sSelfPath = substr( $sSelfPath, 0, strrpos( $sSelfPath, '/' ) ) ; + + $sSelfPath = str_replace( '/', DIRECTORY_SEPARATOR, $sSelfPath ) ; + + $position = strpos( $sRealPath, $sSelfPath ) ; + + // This can check only that this script isn't run from a virtual dir + // But it avoids the problems that arise if it isn't checked + if ( $position === false || $position <> strlen( $sRealPath ) - strlen( $sSelfPath ) ) + SendError( 1, 'Sorry, can\'t map "UserFilesPath" to a physical path. You must set the "UserFilesAbsolutePath" value in "editor/filemanager/connectors/php/config.php".' ) ; + + return substr( $sRealPath, 0, $position ) ; +} + +// Emulate the asp Server.mapPath function. +// given an url path return the physical directory that it corresponds to +function Server_MapPath( $path ) +{ + // This function is available only for Apache + if ( function_exists( 'apache_lookup_uri' ) ) + { + $info = apache_lookup_uri( $path ) ; + return $info->filename . $info->path_info ; + } + + // This isn't correct but for the moment there's no other solution + // If this script is under a virtual directory or symlink it will detect the problem and stop + return GetRootPath() . $path ; +} + +function IsAllowedExt( $sExtension, $resourceType ) +{ + global $Config ; + // Get the allowed and denied extensions arrays. + $arAllowed = $Config['AllowedExtensions'][$resourceType] ; + $arDenied = $Config['DeniedExtensions'][$resourceType] ; + + if ( count($arAllowed) > 0 && !in_array( $sExtension, $arAllowed ) ) + return false ; + + if ( count($arDenied) > 0 && in_array( $sExtension, $arDenied ) ) + return false ; + + return true ; +} + +function IsAllowedType( $resourceType ) +{ + global $Config ; + if ( !in_array( $resourceType, $Config['ConfigAllowedTypes'] ) ) + return false ; + + return true ; +} + +function IsAllowedCommand( $sCommand ) +{ + global $Config ; + + if ( !in_array( $sCommand, $Config['ConfigAllowedCommands'] ) ) + return false ; + + return true ; +} + +function GetCurrentFolder() +{ + if (!isset($_GET)) { + global $_GET; + } + $sCurrentFolder = isset( $_GET['CurrentFolder'] ) ? $_GET['CurrentFolder'] : '/' ; + + // Check the current folder syntax (must begin and start with a slash). + if ( !preg_match( '|/$|', $sCurrentFolder ) ) + $sCurrentFolder .= '/' ; + if ( strpos( $sCurrentFolder, '/' ) !== 0 ) + $sCurrentFolder = '/' . $sCurrentFolder ; + + // Ensure the folder path has no double-slashes + while ( strpos ($sCurrentFolder, '//') !== false ) { + $sCurrentFolder = str_replace ('//', '/', $sCurrentFolder) ; + } + + // Check for invalid folder paths (..) + if ( strpos( $sCurrentFolder, '..' ) || strpos( $sCurrentFolder, "\\" )) + SendError( 102, '' ) ; + + if ( preg_match(",(/\.)|[[:cntrl:]]|(//)|(\\\\)|([\:\*\?\"\<\>\|]),", $sCurrentFolder)) + SendError( 102, '' ) ; + + return $sCurrentFolder ; +} + +// Do a cleanup of the folder name to avoid possible problems +function SanitizeFolderName( $sNewFolderName ) +{ + $sNewFolderName = stripslashes( $sNewFolderName ) ; + + // Remove . \ / | : ? * " < > + $sNewFolderName = preg_replace( '/\\.|\\\\|\\/|\\||\\:|\\?|\\*|"|<|>|[[:cntrl:]]/', '_', $sNewFolderName ) ; + + return $sNewFolderName ; +} + +// Do a cleanup of the file name to avoid possible problems +function SanitizeFileName( $sNewFileName ) +{ + global $Config ; + + $sNewFileName = stripslashes( $sNewFileName ) ; + + // Replace dots in the name with underscores (only one dot can be there... security issue). + if ( $Config['ForceSingleExtension'] ) + $sNewFileName = preg_replace( '/\\.(?![^.]*$)/', '_', $sNewFileName ) ; + + // Remove \ / | : ? * " < > + $sNewFileName = preg_replace( '/\\\\|\\/|\\||\\:|\\?|\\*|"|<|>|[[:cntrl:]]/', '_', $sNewFileName ) ; + + return $sNewFileName ; +} + +// This is the function that sends the results of the uploading process. +function SendUploadResults( $errorNumber, $fileUrl = '', $fileName = '', $customMsg = '' ) +{ + // Minified version of the document.domain automatic fix script (#1919). + // The original script can be found at _dev/domain_fix_template.js + echo << +(function(){var d=document.domain;while (true){try{var A=window.parent.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:\.|$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})(); +EOF; + + if ($errorNumber && $errorNumber != 201) { + $fileUrl = ""; + $fileName = ""; + } + + $rpl = array( '\\' => '\\\\', '"' => '\\"' ) ; + echo 'window.parent.OnUploadCompleted(' . $errorNumber . ',"' . strtr( $fileUrl, $rpl ) . '","' . strtr( $fileName, $rpl ) . '", "' . strtr( $customMsg, $rpl ) . '") ;' ; + echo '' ; + exit ; +} + + +// DOL_CHANGE + +// This is the function that sends the results of the uploading process to CKE. +function SendCKEditorResults ($callback, $sFileUrl, $customMsg = '') +{ + echo ''; +} + + +?> diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/connectors/php/phpcompat.php b/htdocs/includes/fckeditor/editor/filemanagerdol/connectors/php/phpcompat.php new file mode 100755 index 00000000000..6fc89e59316 --- /dev/null +++ b/htdocs/includes/fckeditor/editor/filemanagerdol/connectors/php/phpcompat.php @@ -0,0 +1,17 @@ + diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/connectors/php/util.php b/htdocs/includes/fckeditor/editor/filemanagerdol/connectors/php/util.php new file mode 100755 index 00000000000..71a7a479a6b --- /dev/null +++ b/htdocs/includes/fckeditor/editor/filemanagerdol/connectors/php/util.php @@ -0,0 +1,220 @@ + $val ) + { + $lcaseHtmlExtensions[$key] = strtolower( $val ) ; + } + return in_array( $ext, $lcaseHtmlExtensions ) ; +} + +/** + * Detect HTML in the first KB to prevent against potential security issue with + * IE/Safari/Opera file type auto detection bug. + * Returns true if file contain insecure HTML code at the beginning. + * + * @param string $filePath absolute path to file + * @return boolean + */ +function DetectHtml( $filePath ) +{ + $fp = @fopen( $filePath, 'rb' ) ; + + //open_basedir restriction, see #1906 + if ( $fp === false || !flock( $fp, LOCK_SH ) ) + { + return -1 ; + } + + $chunk = fread( $fp, 1024 ) ; + flock( $fp, LOCK_UN ) ; + fclose( $fp ) ; + + $chunk = strtolower( $chunk ) ; + + if (!$chunk) + { + return false ; + } + + $chunk = trim( $chunk ) ; + + if ( preg_match( "/= 4.0.7 + if ( function_exists( 'version_compare' ) ) { + $sCurrentVersion = phpversion(); + if ( version_compare( $sCurrentVersion, "4.2.0" ) >= 0 ) { + $imageCheckExtensions[] = "tiff"; + $imageCheckExtensions[] = "tif"; + } + if ( version_compare( $sCurrentVersion, "4.3.0" ) >= 0 ) { + $imageCheckExtensions[] = "swc"; + } + if ( version_compare( $sCurrentVersion, "4.3.2" ) >= 0 ) { + $imageCheckExtensions[] = "jpc"; + $imageCheckExtensions[] = "jp2"; + $imageCheckExtensions[] = "jpx"; + $imageCheckExtensions[] = "jb2"; + $imageCheckExtensions[] = "xbm"; + $imageCheckExtensions[] = "wbmp"; + } + } + + if ( !in_array( $extension, $imageCheckExtensions ) ) { + return true; + } + + if ( @getimagesize( $filePath ) === false ) { + return false ; + } + + return true; +} + +?> diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/connectors/test.html b/htdocs/includes/fckeditor/editor/filemanagerdol/connectors/test.html new file mode 100755 index 00000000000..a394750bc6f --- /dev/null +++ b/htdocs/includes/fckeditor/editor/filemanagerdol/connectors/test.html @@ -0,0 +1,210 @@ + + + + + FCKeditor - Connectors Tests + + + + + + + + + + + +
+ + + + + + + + +
+ Connector:
+ +
+     + Current Folder
+
+     + Resource Type
+ +
+
+ + + + + + + + + + +
+ Get Folders +     + Get Folders and Files +     + Create Folder +     +
+ File Upload
+ + +
+
+
+ URL: +
+ +
+ + diff --git a/htdocs/includes/fckeditor/editor/filemanagerdol/connectors/uploadtest.html b/htdocs/includes/fckeditor/editor/filemanagerdol/connectors/uploadtest.html new file mode 100755 index 00000000000..9d7b97bd0ed --- /dev/null +++ b/htdocs/includes/fckeditor/editor/filemanagerdol/connectors/uploadtest.html @@ -0,0 +1,192 @@ + + + + FCKeditor - Uploaders Tests + + + + + + + + + + + +
+ + + + + + + + +
+ Select the "File Uploader" to use:
+ +
+ Resource Type
+ +
+ Current Folder:
+ +
       + Custom Uploader URL:
+ +
+
+ + + + + + +
+
+ Upload a new file:
+
+ + +
+
       + Uploaded File URL:
+ +
+
+ Post URL:   +
+ +
+ + diff --git a/htdocs/lib/doleditor.class.php b/htdocs/lib/doleditor.class.php index 37f34b9c544..de045cd9115 100644 --- a/htdocs/lib/doleditor.class.php +++ b/htdocs/lib/doleditor.class.php @@ -188,10 +188,11 @@ class DolEditor { print ','."\n"; // To use filemanager with old fckeditor (GPL) - print ' filebrowserBrowseUrl : \''.DOL_URL_ROOT.'/includes/fckeditor/editor/filemanager/browser/default/browser.html?Connector='.DOL_URL_ROOT.'/includes/fckeditor/editor/filemanager/connectors/php/connector.php\', - filebrowserUploadUrl : \''.DOL_URL_ROOT.'/includes/fckeditor/editor/filemanager/connectors/php/upload.php?Type=File\', - filebrowserImageBrowseUrl : \''.DOL_URL_ROOT.'/includes/fckeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector='.DOL_URL_ROOT.'/includes/fckeditor/editor/filemanager/connectors/php/connector.php\', - filebrowserImageUploadUrl : \''.DOL_URL_ROOT.'/includes/fckeditor/editor/filemanager/connectors/php/upload.php?Type=Image\','."\n"; + print ' filebrowserBrowseUrl : \''.DOL_URL_ROOT.'/includes/fckeditor/editor/filemanagerdol/browser/default/browser.html?Connector='.DOL_URL_ROOT.'/includes/fckeditor/editor/filemanagerdol/connectors/php/connector.php\','; + //print ' filebrowserUploadUrl : \''.DOL_URL_ROOT.'/includes/fckeditor/editor/filemanagerdol/connectors/php/upload.php?Type=File\','; + print ' filebrowserImageBrowseUrl : \''.DOL_URL_ROOT.'/includes/fckeditor/editor/filemanagerdol/browser/default/browser.html?Type=Image&Connector='.DOL_URL_ROOT.'/includes/fckeditor/editor/filemanagerdol/connectors/php/connector.php\','; + //print ' filebrowserImageUploadUrl : \''.DOL_URL_ROOT.'/includes/fckeditor/editor/filemanagerdol/connectors/php/upload.php?Type=Image\','; + print "\n"; // To use filemanager with ckfinder (Non free) and ckfinder directory is inside htdocs/includes /* print ' filebrowserBrowseUrl : \''.DOL_URL_ROOT.'/includes/ckfinder/ckfinder.html\', filebrowserImageBrowseUrl : \''.DOL_URL_ROOT.'/includes/ckfinder/ckfinder.html?Type=Images\',