Index: /FCKeditor/branches/developers/alfonsoml/editor/filemanager/browser/default/browser.html
===================================================================
--- /FCKeditor/branches/developers/alfonsoml/editor/filemanager/browser/default/browser.html	(revision 285)
+++ /FCKeditor/branches/developers/alfonsoml/editor/filemanager/browser/default/browser.html	(revision 286)
@@ -135,4 +135,10 @@
 		return 'default.icon' ;
 }
+
+function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg )
+{
+	window.frames['frmUpload'].OnUploadCompleted( errorNumber, fileName ) ;
+}
+
 		</script>
 	</head>
Index: Keditor/branches/developers/alfonsoml/editor/filemanager/browser/default/connectors/test.html
===================================================================
--- /FCKeditor/branches/developers/alfonsoml/editor/filemanager/browser/default/connectors/test.html	(revision 285)
+++ 	(revision )
@@ -1,180 +1,0 @@
-<!--
- * FCKeditor - The text editor for Internet - http://www.fckeditor.net
- * Copyright (C) 2003-2007 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 ==
- *
- * Test page for the File Browser connectors.
--->
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-	<title>FCKeditor - Connectors Tests</title>
-	<script type="text/javascript">
-
-function BuildBaseUrl( command )
-{
-	var sUrl =
-		document.getElementById('cmbConnector').value +
-		'?Command=' + command +
-		'&Type=' + document.getElementById('cmbType').value +
-		'&CurrentFolder=' + document.getElementById('txtFolder').value ;
-
-	return sUrl ;
-}
-
-function SetFrameUrl( url )
-{
-	if ( document.all )
-		eRunningFrame.document.location = url ;
-	else
-		document.getElementById('eRunningFrame').src = url ;
-
-	document.getElementById('eUrl').innerHTML = url ;
-}
-
-function GetFolders()
-{
-	SetFrameUrl( BuildBaseUrl( 'GetFolders' ) ) ;
-	return false ;
-}
-
-function GetFoldersAndFiles()
-{
-	SetFrameUrl( BuildBaseUrl( 'GetFoldersAndFiles' ) ) ;
-	return false ;
-}
-
-function CreateFolder()
-{
-	var sFolder = prompt( 'Type the folder name:', 'Test Folder' ) ;
-
-	if ( ! sFolder )
-		return false ;
-
-	var sUrl = BuildBaseUrl( 'CreateFolder' ) ;
-	sUrl += '&NewFolderName=' + encodeURIComponent( sFolder ) ;
-
-	SetFrameUrl( sUrl ) ;
-	return false ;
-}
-
-function OnUploadCompleted( errorNumber, fileName )
-{
-	switch ( errorNumber )
-	{
-		case 0 :
-			alert( 'File uploaded with no errors' ) ;
-			break ;
-		case 201 :
-			GetFoldersAndFiles() ;
-			alert( 'A file with the same name is already available. The uploaded file has been renamed to "' + fileName + '"' ) ;
-			break ;
-		case 202 :
-			alert( 'Invalid file' ) ;
-			break ;
-		default :
-			alert( 'Error on file upload. Error number: ' + errorNumber ) ;
-			break ;
-	}
-}
-
-this.frames.frmUpload = this ;
-
-function SetAction()
-{
-	var sUrl = BuildBaseUrl( 'FileUpload' ) ;
-	document.getElementById('eUrl').innerHTML = sUrl ;
-	document.getElementById('frmUpload').action = sUrl ;
-}
-
-	</script>
-</head>
-<body>
-	<table height="100%" cellspacing="0" cellpadding="0" width="100%" border="0">
-		<tr>
-			<td>
-				<table cellspacing="0" cellpadding="0" border="0">
-					<tr>
-						<td>
-							Connector:<br />
-							<select id="cmbConnector" name="cmbConnector">
-								<option value="asp/connector.asp" selected="selected">ASP</option>
-								<option value="aspx/connector.aspx">ASP.Net</option>
-								<option value="cfm/connector.cfm">ColdFusion</option>
-								<option value="lasso/connector.lasso">Lasso</option>
-								<option value="perl/connector.cgi">Perl</option>
-								<option value="php/connector.php">PHP</option>
-								<option value="py/connector.py">Python</option>
-							</select>
-						</td>
-						<td>
-							&nbsp;&nbsp;&nbsp;</td>
-						<td>
-							Current Folder<br />
-							<input id="txtFolder" type="text" value="/" name="txtFolder" /></td>
-						<td>
-							&nbsp;&nbsp;&nbsp;</td>
-						<td>
-							Resource Type<br />
-							<select id="cmbType" name="cmbType">
-								<option value="File" selected="selected">File</option>
-								<option value="Image">Image</option>
-								<option value="Flash">Flash</option>
-								<option value="Media">Media</option>
-								<option value="Invalid">Invalid Type (for testing)</option>
-							</select>
-						</td>
-					</tr>
-				</table>
-				<br />
-				<table cellspacing="0" cellpadding="0" border="0">
-					<tr>
-						<td valign="top">
-							<a href="#" onclick="GetFolders();">Get Folders</a></td>
-						<td>
-							&nbsp;&nbsp;&nbsp;</td>
-						<td valign="top">
-							<a href="#" onclick="GetFoldersAndFiles();">Get Folders and Files</a></td>
-						<td>
-							&nbsp;&nbsp;&nbsp;</td>
-						<td valign="top">
-							<a href="#" onclick="CreateFolder();">Create Folder</a></td>
-						<td>
-							&nbsp;&nbsp;&nbsp;</td>
-						<td valign="top">
-							<form id="frmUpload" action="" target="eRunningFrame" method="post" enctype="multipart/form-data">
-								File Upload<br />
-								<input id="txtFileUpload" type="file" name="NewFile" />
-								<input type="submit" value="Upload" onclick="SetAction();" />
-							</form>
-						</td>
-					</tr>
-				</table>
-				<br />
-				URL: <span id="eUrl"></span>
-			</td>
-		</tr>
-		<tr>
-			<td height="100%" valign="top">
-				<iframe id="eRunningFrame" src="javascript:void(0)" name="eRunningFrame" width="100%"
-					height="100%"></iframe>
-			</td>
-		</tr>
-	</table>
-</body>
-</html>
Index: /FCKeditor/branches/developers/alfonsoml/editor/filemanager/browser/default/frmupload.html
===================================================================
--- /FCKeditor/branches/developers/alfonsoml/editor/filemanager/browser/default/frmupload.html	(revision 285)
+++ /FCKeditor/branches/developers/alfonsoml/editor/filemanager/browser/default/frmupload.html	(revision 286)
@@ -57,5 +57,5 @@
 	window.parent.frames['frmUploadWorker'].location = 'javascript:void(0)' ;
 
-	// Reset the upload form (On IE we must do a little trick to avout problems).
+	// Reset the upload form (On IE we must do a little trick to avoid problems).
 	if ( document.all )
 		document.getElementById('NewFile').outerHTML = '<input id="NewFile" name="NewFile" style="WIDTH: 100%" type="file">' ;
Index: /FCKeditor/branches/developers/alfonsoml/editor/filemanager/connectors/asp/basexml.asp
===================================================================
--- /FCKeditor/branches/developers/alfonsoml/editor/filemanager/connectors/asp/basexml.asp	(revision 286)
+++ /FCKeditor/branches/developers/alfonsoml/editor/filemanager/connectors/asp/basexml.asp	(revision 286)
@@ -0,0 +1,62 @@
+﻿<!--
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2003-2007 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 ==
+ *
+ * This file include the functions that create the base XML output.
+-->
+<%
+
+Sub SetXmlHeaders()
+	' Cleans the response buffer.
+	Response.Clear()
+
+	' Prevent the browser from caching the result.
+	Response.CacheControl = "no-cache"
+
+	' Set the response format.
+	Response.CharSet		= "UTF-8"
+	Response.ContentType	= "text/xml"
+End Sub
+
+Sub CreateXmlHeader( command, resourceType, currentFolder )
+	' Create the XML document header.
+	Response.Write "<?xml version=""1.0"" encoding=""utf-8"" ?>"
+
+	' Create the main "Connector" node.
+	Response.Write "<Connector command=""" & command & """ resourceType=""" & resourceType & """>"
+
+	' Add the current folder node.
+	Response.Write "<CurrentFolder path=""" & ConvertToXmlAttribute( currentFolder ) & """ url=""" & ConvertToXmlAttribute( GetUrlFromPath( resourceType, currentFolder) ) & """ />"
+End Sub
+
+Sub CreateXmlFooter()
+	Response.Write "</Connector>"
+End Sub
+
+Sub SendError( number, text )
+	SetXmlHeaders
+
+	' Create the XML document header.
+	Response.Write "<?xml version=""1.0"" encoding=""utf-8"" ?>"
+
+	Response.Write "<Connector><Error number=""" & number & """ text=""" & Server.HTMLEncode( text ) & """ /></Connector>"
+
+	Response.End
+End Sub
+%>
Index: /FCKeditor/branches/developers/alfonsoml/editor/filemanager/connectors/asp/class_upload.asp
===================================================================
--- /FCKeditor/branches/developers/alfonsoml/editor/filemanager/connectors/asp/class_upload.asp	(revision 286)
+++ /FCKeditor/branches/developers/alfonsoml/editor/filemanager/connectors/asp/class_upload.asp	(revision 286)
@@ -0,0 +1,234 @@
+﻿<!--
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2003-2007 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 ==
+ *
+ * These are the classes used to handle ASP upload without using third
+ * part components (OCX/DLL).
+-->
+<%
+'**********************************************
+' File:		NetRube_Upload.asp
+' Version:	NetRube Upload Class Version 2.1 Build 20050228
+' Author:	NetRube
+' Email:	NetRube@126.com
+' Date:		02/28/2005
+' Comments:	The code for the Upload.
+'			This can free usage, but please
+'			not to delete this copyright information.
+'			If you have a modification version,
+'			Please send out a duplicate to me.
+'**********************************************
+' 文件名:	NetRube_Upload.asp
+' 版本:		NetRube Upload Class Version 2.1 Build 20050228
+' 作者:		NetRube(网络乡巴佬)
+' 电子邮件:	NetRube@126.com
+' 日期:		2005年02月28日
+' 声明:		文件上传类
+'			本上传类可以自由使用，但请保留此版权声明信息
+'			如果您对本上传类进行修改增强，
+'			请发送一份给俺。
+'**********************************************
+
+Class NetRube_Upload
+
+	Public	File, Form
+	Private oSourceData
+	Private nMaxSize, nErr, sAllowed, sDenied
+
+	Private Sub Class_Initialize
+		nErr		= 0
+		nMaxSize	= 1048576
+
+		Set File			= Server.CreateObject("Scripting.Dictionary")
+		File.CompareMode	= 1
+		Set Form			= Server.CreateObject("Scripting.Dictionary")
+		Form.CompareMode	= 1
+
+		Set oSourceData		= Server.CreateObject("ADODB.Stream")
+		oSourceData.Type	= 1
+		oSourceData.Mode	= 3
+		oSourceData.Open
+	End Sub
+
+	Private Sub Class_Terminate
+		Form.RemoveAll
+		Set Form = Nothing
+		File.RemoveAll
+		Set File = Nothing
+
+		oSourceData.Close
+		Set oSourceData = Nothing
+	End Sub
+
+	Public Property Get Version
+		Version = "NetRube Upload Class Version 1.0 Build 20041218"
+	End Property
+
+	Public Property Get ErrNum
+		ErrNum	= nErr
+	End Property
+
+	Public Property Let MaxSize(nSize)
+		nMaxSize	= nSize
+	End Property
+
+	Public Property Let Allowed(sExt)
+		sAllowed	= sExt
+	End Property
+
+	Public Property Let Denied(sExt)
+		sDenied	= sExt
+	End Property
+
+	Public Sub GetData
+		Dim aCType
+		aCType = Split(Request.ServerVariables("HTTP_CONTENT_TYPE"), ";")
+		If aCType(0) <> "multipart/form-data" Then
+			nErr = 1
+			Exit Sub
+		End If
+
+		Dim nTotalSize
+		nTotalSize	= Request.TotalBytes
+		If nTotalSize < 1 Then
+			nErr = 2
+			Exit Sub
+		End If
+		If nMaxSize > 0 And nTotalSize > nMaxSize Then
+			nErr = 3
+			Exit Sub
+		End If
+
+		oSourceData.Write Request.BinaryRead(nTotalSize)
+		oSourceData.Position = 0
+
+		Dim oTotalData, oFormStream, sFormHeader, sFormName, bCrLf, nBoundLen, nFormStart, nFormEnd, nPosStart, nPosEnd, sBoundary
+
+		oTotalData	= oSourceData.Read
+		bCrLf		= ChrB(13) & ChrB(10)
+		sBoundary	= MidB(oTotalData, 1, InStrB(1, oTotalData, bCrLf) - 1)
+		nBoundLen	= LenB(sBoundary) + 2
+		nFormStart	= nBoundLen
+
+		Set oFormStream = Server.CreateObject("ADODB.Stream")
+
+		Do While (nFormStart + 2) < nTotalSize
+			nFormEnd	= InStrB(nFormStart, oTotalData, bCrLf & bCrLf) + 3
+
+			With oFormStream
+				.Type	= 1
+				.Mode	= 3
+				.Open
+				oSourceData.Position = nFormStart
+				oSourceData.CopyTo oFormStream, nFormEnd - nFormStart
+				.Position	= 0
+				.Type		= 2
+				.CharSet	= "UTF-8"
+				sFormHeader	= .ReadText
+				.Close
+			End With
+
+			nFormStart	= InStrB(nFormEnd, oTotalData, sBoundary) - 1
+			nPosStart	= InStr(22, sFormHeader, " name=", 1) + 7
+			nPosEnd		= InStr(nPosStart, sFormHeader, """")
+			sFormName	= Mid(sFormHeader, nPosStart, nPosEnd - nPosStart)
+
+			If InStr(45, sFormHeader, " filename=", 1) > 0 Then
+				Set File(sFormName)			= New NetRube_FileInfo
+				File(sFormName).FormName	= sFormName
+				File(sFormName).Start		= nFormEnd
+				File(sFormName).Size		= nFormStart - nFormEnd - 2
+				nPosStart					= InStr(nPosEnd, sFormHeader, " filename=", 1) + 11
+				nPosEnd						= InStr(nPosStart, sFormHeader, """")
+				File(sFormName).ClientPath	= Mid(sFormHeader, nPosStart, nPosEnd - nPosStart)
+				File(sFormName).Name		= Mid(File(sFormName).ClientPath, InStrRev(File(sFormName).ClientPath, "\") + 1)
+				File(sFormName).Ext			= LCase(Mid(File(sFormName).Name, InStrRev(File(sFormName).Name, ".") + 1))
+				nPosStart					= InStr(nPosEnd, sFormHeader, "Content-Type: ", 1) + 14
+				nPosEnd						= InStr(nPosStart, sFormHeader, vbCr)
+				File(sFormName).MIME		= Mid(sFormHeader, nPosStart, nPosEnd - nPosStart)
+			Else
+				With oFormStream
+					.Type	= 1
+					.Mode	= 3
+					.Open
+					oSourceData.Position = nPosEnd
+					oSourceData.CopyTo oFormStream, nFormStart - nFormEnd - 2
+					.Position	= 0
+					.Type		= 2
+					.CharSet	= "UTF-8"
+					Form(sFormName)	= .ReadText
+					.Close
+				End With
+			End If
+
+			nFormStart	= nFormStart + nBoundLen
+		Loop
+
+		oTotalData = ""
+		Set oFormStream = Nothing
+	End Sub
+
+	Public Sub SaveAs(sItem, sFileName)
+		If File(sItem).Size < 1 Then
+			nErr = 2
+			Exit Sub
+		End If
+
+		If Not IsAllowed(File(sItem).Ext) Then
+			nErr = 4
+			Exit Sub
+		End If
+
+		Dim oFileStream
+		Set oFileStream = Server.CreateObject("ADODB.Stream")
+		With oFileStream
+			.Type		= 1
+			.Mode		= 3
+			.Open
+			oSourceData.Position = File(sItem).Start
+			oSourceData.CopyTo oFileStream, File(sItem).Size
+			.Position	= 0
+			.SaveToFile sFileName, 2
+			.Close
+		End With
+		Set oFileStream = Nothing
+	End Sub
+
+	Private Function IsAllowed(sExt)
+		Dim oRE
+		Set oRE	= New RegExp
+		oRE.IgnoreCase	= True
+		oRE.Global		= True
+
+		If sDenied = "" Then
+			oRE.Pattern	= sAllowed
+			IsAllowed	= (sAllowed = "") Or oRE.Test(sExt)
+		Else
+			oRE.Pattern	= sDenied
+			IsAllowed	= Not oRE.Test(sExt)
+		End If
+
+		Set oRE	= Nothing
+	End Function
+End Class
+
+Class NetRube_FileInfo
+	Dim FormName, ClientPath, Path, Name, Ext, Content, Size, MIME, Start
+End Class
+%>
Index: /FCKeditor/branches/developers/alfonsoml/editor/filemanager/connectors/asp/commands.asp
===================================================================
--- /FCKeditor/branches/developers/alfonsoml/editor/filemanager/connectors/asp/commands.asp	(revision 286)
+++ /FCKeditor/branches/developers/alfonsoml/editor/filemanager/connectors/asp/commands.asp	(revision 286)
@@ -0,0 +1,181 @@
+﻿<!--
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2003-2007 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 ==
+ *
+ * This file include the functions that handle the Command requests
+ * in the ASP Connector.
+-->
+<%
+Sub GetFolders( resourceType, currentFolder )
+	' Map the virtual path to the local server path.
+	Dim sServerDir
+	sServerDir = ServerMapFolder( resourceType, currentFolder )
+
+	' Open the "Folders" node.
+	Response.Write "<Folders>"
+
+	Dim oFSO, oCurrentFolder, oFolders, oFolder
+	Set oFSO = Server.CreateObject( "Scripting.FileSystemObject" )
+	Set oCurrentFolder = oFSO.GetFolder( sServerDir )
+	Set oFolders = oCurrentFolder.SubFolders
+
+	For Each oFolder in oFolders
+		Response.Write "<Folder name=""" & ConvertToXmlAttribute( oFolder.name ) & """ />"
+	Next
+
+	Set oFSO = Nothing
+
+	' Close the "Folders" node.
+	Response.Write "</Folders>"
+End Sub
+
+Sub GetFoldersAndFiles( resourceType, currentFolder )
+	' Map the virtual path to the local server path.
+	Dim sServerDir
+	sServerDir = ServerMapFolder( resourceType, currentFolder )
+
+	Dim oFSO, oCurrentFolder, oFolders, oFolder, oFiles, oFile
+	Set oFSO = Server.CreateObject( "Scripting.FileSystemObject" )
+	Set oCurrentFolder = oFSO.GetFolder( sServerDir )
+	Set oFolders	= oCurrentFolder.SubFolders
+	Set oFiles		= oCurrentFolder.Files
+
+	' Open the "Folders" node.
+	Response.Write "<Folders>"
+
+	For Each oFolder in oFolders
+		Response.Write "<Folder name=""" & ConvertToXmlAttribute( oFolder.name ) & """ />"
+	Next
+
+	' Close the "Folders" node.
+	Response.Write "</Folders>"
+
+	' Open the "Files" node.
+	Response.Write "<Files>"
+
+	For Each oFile in oFiles
+		Dim iFileSize
+		iFileSize = Round( oFile.size / 1024 )
+		If ( iFileSize < 1 AND oFile.size <> 0 ) Then iFileSize = 1
+
+		Response.Write "<File name=""" & ConvertToXmlAttribute( oFile.name ) & """ size=""" & iFileSize & """ />"
+	Next
+
+	' Close the "Files" node.
+	Response.Write "</Files>"
+End Sub
+
+Sub CreateFolder( resourceType, currentFolder )
+	Dim sErrorNumber
+
+	Dim sNewFolderName
+	sNewFolderName = Request.QueryString( "NewFolderName" )
+
+	If ( sNewFolderName = "" OR InStr( 1, sNewFolderName, ".." ) > 0  ) Then
+		sErrorNumber = "102"
+	Else
+		' Map the virtual path to the local server path of the current folder.
+		Dim sServerDir
+		sServerDir = ServerMapFolder( resourceType, currentFolder & "/" & sNewFolderName )
+
+		On Error Resume Next
+
+		CreateServerFolder sServerDir
+
+		Dim iErrNumber, sErrDescription
+		iErrNumber		= err.number
+		sErrDescription	= err.Description
+
+		On Error Goto 0
+
+		Select Case iErrNumber
+			Case 0
+				sErrorNumber = "0"
+			Case 52
+				sErrorNumber = "102"	' Invalid Folder Name.
+			Case 70
+				sErrorNumber = "103"	' Security Error.
+			Case 76
+				sErrorNumber = "102"	' Path too long.
+			Case Else
+				sErrorNumber = "110"
+		End Select
+	End If
+
+	' Create the "Error" node.
+	Response.Write "<Error number=""" & sErrorNumber & """ originalNumber=""" & iErrNumber & """ originalDescription=""" & ConvertToXmlAttribute( sErrDescription ) & """ />"
+End Sub
+
+Sub FileUpload( resourceType, currentFolder )
+	Dim oUploader
+	Set oUploader = New NetRube_Upload
+	oUploader.MaxSize	= 0
+	oUploader.Allowed	= ConfigAllowedExtensions.Item( resourceType )
+	oUploader.Denied	= ConfigDeniedExtensions.Item( resourceType )
+	oUploader.GetData
+
+	Dim sErrorNumber
+	sErrorNumber = "0"
+
+	Dim sFileName, sOriginalFileName, sExtension
+	sFileName = ""
+
+	If oUploader.ErrNum > 1 Then
+		sErrorNumber = "202"
+	Else
+		' Map the virtual path to the local server path.
+		Dim sServerDir
+		sServerDir = ServerMapFolder( resourceType, currentFolder )
+
+		Dim oFSO
+		Set oFSO = Server.CreateObject( "Scripting.FileSystemObject" )
+
+		' Get the uploaded file name.
+		sFileName	= oUploader.File( "NewFile" ).Name
+		sExtension	= oUploader.File( "NewFile" ).Ext
+		sOriginalFileName = sFileName
+
+		Dim iCounter
+		iCounter = 0
+
+		Do While ( True )
+			Dim sFilePath
+			sFilePath = sServerDir & sFileName
+
+			If ( oFSO.FileExists( sFilePath ) ) Then
+				iCounter = iCounter + 1
+				sFileName = RemoveExtension( sOriginalFileName ) & "(" & iCounter & ")." & sExtension
+				sErrorNumber = "201"
+			Else
+				oUploader.SaveAs "NewFile", sFilePath
+				If oUploader.ErrNum > 0 Then sErrorNumber = "202"
+				Exit Do
+			End If
+		Loop
+	End If
+
+	Set oUploader	= Nothing
+
+	dim sFileUrl
+	sFileUrl = GetResourceTypePath( resourceType ) & sFileName
+
+	SendUploadResults sErrorNumber, sFileUrl, sFileName, ""
+End Sub
+
+%>
Index: /FCKeditor/branches/developers/alfonsoml/editor/filemanager/connectors/asp/config.asp
===================================================================
--- /FCKeditor/branches/developers/alfonsoml/editor/filemanager/connectors/asp/config.asp	(revision 286)
+++ /FCKeditor/branches/developers/alfonsoml/editor/filemanager/connectors/asp/config.asp	(revision 286)
@@ -0,0 +1,68 @@
+﻿<!--
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2003-2007 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 ==
+ *
+ * Configuration file for the File Manager Connector for ASP.
+-->
+<%
+
+' SECURITY: You must explicitelly enable this "connector" (set it to "True").
+' WARNING: don't just set "ConfigIsEnabled = true", you must be sure that only 
+'		authenticated users can access this file or use some kind of session checking.
+Dim ConfigIsEnabled
+ConfigIsEnabled = False
+
+' Path to user files relative to the document root.
+' It can be overriden on a file type basis using the ConfigFileTypesPath below.
+Dim ConfigUserFilesPath
+ConfigUserFilesPath = "/userfiles/"
+
+ConfigIsEnabled = true
+ConfigUserFilesPath = "/docs/"
+
+' What the user can do with this connector
+dim ConfigAllowedCommands
+ConfigAllowedCommands = "FileUpload|GetFolders|GetFoldersAndFiles|CreateFolder"
+
+' Allowed and Denied extensions configurations.
+dim ConfigAllowedTypes
+ConfigAllowedTypes = "File|Image|Flash|Media"
+
+Dim ConfigAllowedExtensions, ConfigDeniedExtensions, ConfigFileTypesPath
+Set ConfigAllowedExtensions	= CreateObject( "Scripting.Dictionary" )
+Set ConfigDeniedExtensions	= CreateObject( "Scripting.Dictionary" )
+Set ConfigFileTypesPath	= CreateObject( "Scripting.Dictionary" )
+
+ConfigAllowedExtensions.Add	"File", ""
+ConfigDeniedExtensions.Add	"File", "html|htm|php|php2|php3|php4|php5|phtml|pwml|inc|asp|aspx|ascx|jsp|cfm|cfc|pl|bat|exe|com|dll|vbs|js|reg|cgi|htaccess|asis"
+ConfigFileTypesPath.Add "File", ConfigUserFilesPath & "file/"
+
+ConfigAllowedExtensions.Add	"Image", "jpg|gif|jpeg|png|bmp"
+ConfigDeniedExtensions.Add	"Image", ""
+ConfigFileTypesPath.Add "Image", ConfigUserFilesPath & "image/"
+
+ConfigAllowedExtensions.Add	"Flash", "swf|fla"
+ConfigDeniedExtensions.Add	"Flash", ""
+ConfigFileTypesPath.Add "Flash", ConfigUserFilesPath & "flash/"
+
+ConfigAllowedExtensions.Add	"Media", "swf|fla|jpg|gif|jpeg|png|avi|mpg|mpeg|mp(1-4)|wma|wmv|wav|mid|midi|rmi|rm|ram|rmvb|mov|qt"
+ConfigDeniedExtensions.Add	"Media", ""
+ConfigFileTypesPath.Add "Media", ConfigUserFilesPath & "media/"
+
+%>
Index: /FCKeditor/branches/developers/alfonsoml/editor/filemanager/connectors/asp/connector.asp
===================================================================
--- /FCKeditor/branches/developers/alfonsoml/editor/filemanager/connectors/asp/connector.asp	(revision 286)
+++ /FCKeditor/branches/developers/alfonsoml/editor/filemanager/connectors/asp/connector.asp	(revision 286)
@@ -0,0 +1,96 @@
+﻿<%@ CodePage=65001 Language="VBScript"%>
+<%
+Option Explicit
+Response.Buffer = True
+%>
+<!--
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2003-2007 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 ==
+ *
+ * This is the File Manager Connector for ASP.
+-->
+<!--#include file="config.asp"-->
+<!--#include file="util.asp"-->
+<!--#include file="io.asp"-->
+<!--#include file="basexml.asp"-->
+<!--#include file="commands.asp"-->
+<!--#include file="class_upload.asp"-->
+<%
+
+If ( ConfigIsEnabled = False ) Then
+	SendError 1, "This connector is disabled. Please check the ""editor/filemanager/connectors/asp/config.asp"" file"
+End If
+
+DoResponse
+
+Sub DoResponse()
+	Dim sCommand, sResourceType, sCurrentFolder
+
+	' Get the main request information.
+	sCommand = Request.QueryString("Command")
+	if ( Not IsAllowedCommand( sCommand ) ) then
+		SendError 1, "The """ & sCommand & """ command isn't allowed"
+	end if
+
+	sResourceType = Request.QueryString("Type")
+	If ( sResourceType = "" ) Then Exit Sub
+
+	sCurrentFolder = Request.QueryString("CurrentFolder")
+	If ( sCurrentFolder = "" ) Then Exit Sub
+
+	' Check if it is an allower resource type.
+	if ( Not IsAllowedType( sResourceType ) ) Then 
+		SendError 1, "The """ & sResourceType & """ resource type isn't allowed"
+	end if
+
+	' Check the current folder syntax (must begin and start with a slash).
+	If ( Right( sCurrentFolder, 1 ) <> "/" ) Then sCurrentFolder = sCurrentFolder & "/"
+	If ( Left( sCurrentFolder, 1 ) <> "/" ) Then sCurrentFolder = "/" & sCurrentFolder
+
+	' Check for invalid folder paths (..)
+	If ( InStr( 1, sCurrentFolder, ".." ) <> 0 OR InStr( 1, sResourceType, ".." ) <> 0 ) Then
+		SendError 102, ""
+	End If
+
+	' File Upload doesn't have to Return XML, so it must be intercepted before anything.
+	If ( sCommand = "FileUpload" ) Then
+		FileUpload sResourceType, sCurrentFolder
+		Exit Sub
+	End If
+
+	SetXmlHeaders
+
+	CreateXmlHeader sCommand, sResourceType, sCurrentFolder
+
+	' Execute the required command.
+	Select Case sCommand
+		Case "GetFolders"
+			GetFolders sResourceType, sCurrentFolder
+		Case "GetFoldersAndFiles"
+			GetFoldersAndFiles sResourceType, sCurrentFolder
+		Case "CreateFolder"
+			CreateFolder sResourceType, sCurrentFolder
+	End Select
+
+	CreateXmlFooter
+
+	Response.End
+End Sub
+
+%>
Index: /FCKeditor/branches/developers/alfonsoml/editor/filemanager/connectors/asp/io.asp
===================================================================
--- /FCKeditor/branches/developers/alfonsoml/editor/filemanager/connectors/asp/io.asp	(revision 286)
+++ /FCKeditor/branches/developers/alfonsoml/editor/filemanager/connectors/asp/io.asp	(revision 286)
@@ -0,0 +1,152 @@
+﻿<!--
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2003-2007 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 ==
+ *
+ * This file include IO specific functions used by the ASP Connector.
+-->
+<%
+function CombinePaths( sBasePath, sFolder)
+	CombinePaths =  RemoveFromEnd( sBasePath, "/" ) & "/" & RemoveFromStart( sFolder, "/" )
+end function
+
+Function GetResourceTypePath( resourceType )
+	GetResourceTypePath = ConfigFileTypesPath.Item( resourceType )
+end Function
+
+Function GetUrlFromPath( resourceType, folderPath )
+	GetUrlFromPath = CombinePaths( GetResourceTypePath( resourceType ), folderPath )
+End Function
+
+Function RemoveExtension( fileName )
+	RemoveExtension = Left( fileName, InStrRev( fileName, "." ) - 1 )
+End Function
+
+Function ServerMapFolder( resourceType, folderPath )
+	' Map the "UserFiles" path to a local directory.
+	Dim sResourceTypePath
+	sResourceTypePath = Server.MapPath( GetResourceTypePath( resourceType ) )
+
+	' Ensure that the directory exists.
+	CreateServerFolder sResourceTypePath
+
+	' Return the resource type directory combined with the required path.
+	ServerMapFolder = CombinePaths( sResourceTypePath, folderPath )
+End Function
+
+Sub CreateServerFolder( folderPath )
+	Dim oFSO
+	Set oFSO = Server.CreateObject( "Scripting.FileSystemObject" )
+
+	Dim sParent
+	sParent = oFSO.GetParentFolderName( folderPath )
+
+	' Check if the parent exists, or create it.
+	If ( NOT oFSO.FolderExists( sParent ) ) Then CreateServerFolder( sParent )
+
+	If ( oFSO.FolderExists( folderPath ) = False ) Then
+		On Error resume next
+		oFSO.CreateFolder( folderPath )
+
+		if err.number<>0 then
+		dim sErrorNumber
+		Dim iErrNumber, sErrDescription
+		iErrNumber		= err.number
+		sErrDescription	= err.Description
+
+		On Error Goto 0
+
+		Select Case iErrNumber
+			Case 52
+				sErrorNumber = "102"	' Invalid Folder Name.
+			Case 70
+				sErrorNumber = "103"	' Security Error.
+			Case 76
+				sErrorNumber = "102"	' Path too long.
+			Case Else
+				sErrorNumber = "110"
+			End Select
+
+			SendError sErrorNumber, "CreateServerFolder(" & folderPath & ") : " & sErrDescription
+		end if
+
+	End If
+
+	Set oFSO = Nothing
+End Sub
+
+Function IsAllowedExt( extension, resourceType )
+	Dim oRE
+	Set oRE	= New RegExp
+	oRE.IgnoreCase	= True
+	oRE.Global		= True
+
+	Dim sAllowed, sDenied
+	sAllowed	= ConfigAllowedExtensions.Item( resourceType )
+	sDenied		= ConfigDeniedExtensions.Item( resourceType )
+
+	IsAllowedExt = True
+
+	If sDenied <> "" Then
+		oRE.Pattern	= sDenied
+		IsAllowedExt	= Not oRE.Test( extension )
+	End If
+
+	If IsAllowedExt And sAllowed <> "" Then
+		oRE.Pattern		= sAllowed
+		IsAllowedExt	= oRE.Test( extension )
+	End If
+
+	Set oRE	= Nothing
+End Function
+
+Function IsAllowedType( resourceType )
+	Dim oRE
+	Set oRE	= New RegExp
+	oRE.IgnoreCase	= True
+	oRE.Global		= True
+	oRE.Pattern		= "^(" & ConfigAllowedTypes & ")$"
+
+	IsAllowedType = oRE.Test( resourceType )
+
+	Set oRE	= Nothing
+End Function
+
+Function IsAllowedCommand( sCommand )
+	Dim oRE
+	Set oRE	= New RegExp
+	oRE.IgnoreCase	= True
+	oRE.Global		= True
+	oRE.Pattern		= "^(" & ConfigAllowedCommands & ")$"
+
+	IsAllowedCommand = oRE.Test( sCommand )
+
+	Set oRE	= Nothing
+End Function
+
+
+' This is the function that sends the results of the uploading process.
+Sub SendUploadResults( errorNumber, fileUrl, fileName, customMsg )
+	Response.Clear
+	Response.Write "<script type=""text/javascript"">"
+	Response.Write "window.parent.OnUploadCompleted(" & errorNumber & ",""" & Replace( fileUrl, """", "\""" ) & """,""" & Replace( fileName, """", "\""" ) & """,""" & Replace( customMsg , """", "\""" ) & """) ;"
+	Response.Write "</script>"
+	Response.End
+End Sub
+
+%>
Index: /FCKeditor/branches/developers/alfonsoml/editor/filemanager/connectors/asp/upload.asp
===================================================================
--- /FCKeditor/branches/developers/alfonsoml/editor/filemanager/connectors/asp/upload.asp	(revision 286)
+++ /FCKeditor/branches/developers/alfonsoml/editor/filemanager/connectors/asp/upload.asp	(revision 286)
@@ -0,0 +1,69 @@
+﻿<%@ CodePage=65001 Language="VBScript"%>
+<%
+Option Explicit
+Response.Buffer = True
+%>
+<!--
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2003-2007 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 ==
+ *
+ * This is the "File Uploader" for ASP.
+-->
+<!--#include file="config.asp"-->
+<!--#include file="util.asp"-->
+<!--#include file="io.asp"-->
+<!--#include file="commands.asp"-->
+<!--#include file="class_upload.asp"-->
+<%
+
+' Check if this uploader has been enabled.
+If ( ConfigIsEnabled = False ) Then
+	SendUploadResults "1", "", "", "This file uploader is disabled. Please check the ""editor/filemanager/connectors/asp/config.asp"" file"
+End If
+
+	Dim sCommand, sResourceType, sCurrentFolder
+
+	sCommand = "FileUpload"
+	if ( Not IsAllowedCommand( sCommand ) ) then
+		SendError 1, "The """ & sCommand & """ command isn't allowed"
+	end if
+
+	sResourceType = Request.QueryString("Type")
+	If ( sResourceType = "" ) Then sResourceType = "File"
+
+	sCurrentFolder = Request.QueryString("CurrentFolder")
+	If ( sCurrentFolder = "" ) Then sCurrentFolder = "/"
+
+	' Check if it is an allower resource type.
+	if ( Not IsAllowedType( sResourceType ) ) Then
+		SendUploadResults "1", "", "", "The " & sResourceType & " resource type isn't allowed"
+	end if
+
+	' Check the current folder syntax (must begin and start with a slash).
+	If ( Right( sCurrentFolder, 1 ) <> "/" ) Then sCurrentFolder = sCurrentFolder & "/"
+	If ( Left( sCurrentFolder, 1 ) <> "/" ) Then sCurrentFolder = "/" & sCurrentFolder
+
+	' Check for invalid folder paths (..)
+	If ( InStr( 1, sCurrentFolder, ".." ) <> 0 OR InStr( 1, sResourceType, ".." ) <> 0 ) Then
+		SendUploadResults "102", "", "", "Invalid path"
+	End If
+
+	FileUpload sResourceType, sCurrentFolder
+
+%>
Index: /FCKeditor/branches/developers/alfonsoml/editor/filemanager/connectors/asp/util.asp
===================================================================
--- /FCKeditor/branches/developers/alfonsoml/editor/filemanager/connectors/asp/util.asp	(revision 286)
+++ /FCKeditor/branches/developers/alfonsoml/editor/filemanager/connectors/asp/util.asp	(revision 286)
@@ -0,0 +1,55 @@
+﻿<!--
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2003-2007 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 ==
+ *
+ * This file include generic functions used by the ASP Connector.
+-->
+<%
+Function RemoveFromStart( sourceString, charToRemove )
+	Dim oRegex
+	Set oRegex = New RegExp
+	oRegex.Pattern = "^" & charToRemove & "+"
+
+	RemoveFromStart = oRegex.Replace( sourceString, "" )
+End Function
+
+Function RemoveFromEnd( sourceString, charToRemove )
+	Dim oRegex
+	Set oRegex = New RegExp
+	oRegex.Pattern = charToRemove & "+$"
+
+	RemoveFromEnd = oRegex.Replace( sourceString, "" )
+End Function
+
+Function ConvertToXmlAttribute( value )
+	ConvertToXmlAttribute = Replace( value, "&", "&amp;" )
+End Function
+
+Function InArray( value, sourceArray )
+	Dim i
+	For i = 0 to UBound( sourceArray )
+		If sourceArray(i) = value Then
+			InArray = True
+			Exit Function
+		End If
+	Next
+	InArray = False
+End Function
+
+%>
Index: /FCKeditor/branches/developers/alfonsoml/editor/filemanager/connectors/test.html
===================================================================
--- /FCKeditor/branches/developers/alfonsoml/editor/filemanager/connectors/test.html	(revision 286)
+++ /FCKeditor/branches/developers/alfonsoml/editor/filemanager/connectors/test.html	(revision 286)
@@ -0,0 +1,180 @@
+<!--
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2003-2007 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 ==
+ *
+ * Test page for the File Browser connectors.
+-->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<title>FCKeditor - Connectors Tests</title>
+	<script type="text/javascript">
+
+function BuildBaseUrl( command )
+{
+	var sUrl =
+		document.getElementById('cmbConnector').value +
+		'?Command=' + command +
+		'&Type=' + document.getElementById('cmbType').value +
+		'&CurrentFolder=' + document.getElementById('txtFolder').value ;
+
+	return sUrl ;
+}
+
+function SetFrameUrl( url )
+{
+	if ( document.all )
+		eRunningFrame.document.location = url ;
+	else
+		document.getElementById('eRunningFrame').src = url ;
+
+	document.getElementById('eUrl').innerHTML = url ;
+}
+
+function GetFolders()
+{
+	SetFrameUrl( BuildBaseUrl( 'GetFolders' ) ) ;
+	return false ;
+}
+
+function GetFoldersAndFiles()
+{
+	SetFrameUrl( BuildBaseUrl( 'GetFoldersAndFiles' ) ) ;
+	return false ;
+}
+
+function CreateFolder()
+{
+	var sFolder = prompt( 'Type the folder name:', 'Test Folder' ) ;
+
+	if ( ! sFolder )
+		return false ;
+
+	var sUrl = BuildBaseUrl( 'CreateFolder' ) ;
+	sUrl += '&NewFolderName=' + encodeURIComponent( sFolder ) ;
+
+	SetFrameUrl( sUrl ) ;
+	return false ;
+}
+
+function OnUploadCompleted( errorNumber, fileName )
+{
+	switch ( errorNumber )
+	{
+		case 0 :
+			alert( 'File uploaded with no errors' ) ;
+			break ;
+		case 201 :
+			GetFoldersAndFiles() ;
+			alert( 'A file with the same name is already available. The uploaded file has been renamed to "' + fileName + '"' ) ;
+			break ;
+		case 202 :
+			alert( 'Invalid file' ) ;
+			break ;
+		default :
+			alert( 'Error on file upload. Error number: ' + errorNumber ) ;
+			break ;
+	}
+}
+
+this.frames.frmUpload = this ;
+
+function SetAction()
+{
+	var sUrl = BuildBaseUrl( 'FileUpload' ) ;
+	document.getElementById('eUrl').innerHTML = sUrl ;
+	document.getElementById('frmUpload').action = sUrl ;
+}
+
+	</script>
+</head>
+<body>
+	<table height="100%" cellspacing="0" cellpadding="0" width="100%" border="0">
+		<tr>
+			<td>
+				<table cellspacing="0" cellpadding="0" border="0">
+					<tr>
+						<td>
+							Connector:<br />
+							<select id="cmbConnector" name="cmbConnector">
+								<option value="asp/connector.asp" selected="selected">ASP</option>
+								<option value="aspx/connector.aspx">ASP.Net</option>
+								<option value="cfm/connector.cfm">ColdFusion</option>
+								<option value="lasso/connector.lasso">Lasso</option>
+								<option value="perl/connector.cgi">Perl</option>
+								<option value="php/connector.php">PHP</option>
+								<option value="py/connector.py">Python</option>
+							</select>
+						</td>
+						<td>
+							&nbsp;&nbsp;&nbsp;</td>
+						<td>
+							Current Folder<br />
+							<input id="txtFolder" type="text" value="/" name="txtFolder" /></td>
+						<td>
+							&nbsp;&nbsp;&nbsp;</td>
+						<td>
+							Resource Type<br />
+							<select id="cmbType" name="cmbType">
+								<option value="File" selected="selected">File</option>
+								<option value="Image">Image</option>
+								<option value="Flash">Flash</option>
+								<option value="Media">Media</option>
+								<option value="Invalid">Invalid Type (for testing)</option>
+							</select>
+						</td>
+					</tr>
+				</table>
+				<br />
+				<table cellspacing="0" cellpadding="0" border="0">
+					<tr>
+						<td valign="top">
+							<a href="#" onclick="GetFolders();">Get Folders</a></td>
+						<td>
+							&nbsp;&nbsp;&nbsp;</td>
+						<td valign="top">
+							<a href="#" onclick="GetFoldersAndFiles();">Get Folders and Files</a></td>
+						<td>
+							&nbsp;&nbsp;&nbsp;</td>
+						<td valign="top">
+							<a href="#" onclick="CreateFolder();">Create Folder</a></td>
+						<td>
+							&nbsp;&nbsp;&nbsp;</td>
+						<td valign="top">
+							<form id="frmUpload" action="" target="eRunningFrame" method="post" enctype="multipart/form-data">
+								File Upload<br />
+								<input id="txtFileUpload" type="file" name="NewFile" />
+								<input type="submit" value="Upload" onclick="SetAction();" />
+							</form>
+						</td>
+					</tr>
+				</table>
+				<br />
+				URL: <span id="eUrl"></span>
+			</td>
+		</tr>
+		<tr>
+			<td height="100%" valign="top">
+				<iframe id="eRunningFrame" src="javascript:void(0)" name="eRunningFrame" width="100%"
+					height="100%"></iframe>
+			</td>
+		</tr>
+	</table>
+</body>
+</html>
Index: /FCKeditor/branches/developers/alfonsoml/fckconfig.js
===================================================================
--- /FCKeditor/branches/developers/alfonsoml/fckconfig.js	(revision 285)
+++ /FCKeditor/branches/developers/alfonsoml/fckconfig.js	(revision 286)
@@ -28,5 +28,6 @@
 FCKConfig.DisableEnterKeyHandler = false ;
 
-FCKConfig.CustomConfigurationsPath = '/fckeditor.config.js' ;
+FCKConfig.CustomConfigurationsPath = '' ;
+FCKConfig.CustomConfigurationsPath = '/FCKplugins/fckeditor.config.js' ;
 
 FCKConfig.EditorAreaCSS = FCKConfig.BasePath + 'css/fck_editorarea.css' ;
@@ -170,4 +171,6 @@
 FCKConfig.BodyClass = '' ;
 
+FCKConfig.DefaultLinkTarget = '' ;
+
 // The option switches between trying to keep the html structure or do the changes so the content looks like it was in Word
 FCKConfig.CleanWordKeepsStructure = false ;
@@ -185,6 +188,6 @@
 // @Packager.Remove.Start
 // The development version (SVN) uses the PHP connector by default.
-_FileBrowserLanguage	= 'php' ;
-_QuickUploadLanguage	= 'php' ;
+_FileBrowserLanguage	= 'asp' ;
+_QuickUploadLanguage	= 'asp' ;
 // @Packager.Remove.End
 
@@ -194,30 +197,30 @@
 
 FCKConfig.LinkBrowser = true ;
-FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ;
+FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=../../connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ;
 FCKConfig.LinkBrowserWindowWidth	= FCKConfig.ScreenWidth * 0.7 ;		// 70%
 FCKConfig.LinkBrowserWindowHeight	= FCKConfig.ScreenHeight * 0.7 ;	// 70%
 
 FCKConfig.ImageBrowser = true ;
-FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ;
+FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=../../connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ;
 FCKConfig.ImageBrowserWindowWidth  = FCKConfig.ScreenWidth * 0.7 ;	// 70% ;
 FCKConfig.ImageBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ;	// 70% ;
 
 FCKConfig.FlashBrowser = true ;
-FCKConfig.FlashBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ;
+FCKConfig.FlashBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Flash&Connector=../../connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ;
 FCKConfig.FlashBrowserWindowWidth  = FCKConfig.ScreenWidth * 0.7 ;	//70% ;
 FCKConfig.FlashBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ;	//70% ;
 
 FCKConfig.LinkUpload = true ;
-FCKConfig.LinkUploadURL = FCKConfig.BasePath + 'filemanager/upload/' + _QuickUploadLanguage + '/upload.' + _QuickUploadLanguage ;
+FCKConfig.LinkUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadLanguage ;
 FCKConfig.LinkUploadAllowedExtensions	= "" ;			// empty for all
 FCKConfig.LinkUploadDeniedExtensions	= ".(html|htm|php|php2|php3|php4|php5|phtml|pwml|inc|asp|aspx|ascx|jsp|cfm|cfc|pl|bat|exe|com|dll|vbs|js|reg|cgi|htaccess|asis)$" ;	// empty for no one
 
 FCKConfig.ImageUpload = true ;
-FCKConfig.ImageUploadURL = FCKConfig.BasePath + 'filemanager/upload/' + _QuickUploadLanguage + '/upload.' + _QuickUploadLanguage + '?Type=Image' ;
+FCKConfig.ImageUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadLanguage + '?Type=Image' ;
 FCKConfig.ImageUploadAllowedExtensions	= ".(jpg|gif|jpeg|png|bmp)$" ;		// empty for all
 FCKConfig.ImageUploadDeniedExtensions	= "" ;							// empty for no one
 
 FCKConfig.FlashUpload = true ;
-FCKConfig.FlashUploadURL = FCKConfig.BasePath + 'filemanager/upload/' + _QuickUploadLanguage + '/upload.' + _QuickUploadLanguage + '?Type=Flash' ;
+FCKConfig.FlashUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadLanguage + '?Type=Flash' ;
 FCKConfig.FlashUploadAllowedExtensions	= ".(swf|fla)$" ;		// empty for all
 FCKConfig.FlashUploadDeniedExtensions	= "" ;					// empty for no one
