Subversion Repositories Applications.papyrus

Compare Revisions

No changes between revisions

Ignore whitespace Rev 1074 → Rev 1075

/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/cfm/connector.cfm
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/cfm/connector.cfm
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/cfm/config.cfm
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/cfm/config.cfm
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/php/io.php
New file
0,0 → 1,97
<?php
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: io.php
* This is the File Manager Connector for ASP.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
*/
 
function GetUrlFromPath( $resourceType, $folderPath )
{
if ( $resourceType == '' )
return RemoveFromEnd( $GLOBALS["UserFilesPath"], '/' ) . $folderPath ;
else
return $GLOBALS["UserFilesPath"] . $resourceType . $folderPath ;
}
 
function RemoveExtension( $fileName )
{
return substr( $fileName, 0, strrpos( $fileName, '.' ) ) ;
}
 
function ServerMapFolder( $resourceType, $folderPath )
{
// Get the resource type directory.
$sResourceTypePath = $GLOBALS["UserFilesDirectory"] . $resourceType . '/' ;
 
// Ensure that the directory exists.
CreateServerFolder( $sResourceTypePath ) ;
 
// Return the resource type directory combined with the required path.
return $sResourceTypePath . RemoveFromStart( $folderPath, '/' ) ;
}
 
function GetParentFolder( $folderPath )
{
$sPattern = "-[/\\\\][^/\\\\]+[/\\\\]?$-" ;
return preg_replace( $sPattern, '', $folderPath ) ;
}
 
function CreateServerFolder( $folderPath )
{
$sParent = GetParentFolder( $folderPath ) ;
 
// Check if the parent exists, or create it.
if ( !file_exists( $sParent ) )
{
$sErrorMsg = CreateServerFolder( $sParent ) ;
if ( $sErrorMsg != '' )
return $sErrorMsg ;
}
 
if ( !file_exists( $folderPath ) )
{
// Turn off all error reporting.
error_reporting( 0 ) ;
// Enable error tracking to catch the error.
ini_set( 'track_errors', '1' ) ;
 
// To create the folder with 0777 permissions, we need to set umask to zero.
$oldumask = umask(0) ;
mkdir( $folderPath, 0777 ) ;
umask( $oldumask ) ;
 
$sErrorMsg = $php_errormsg ;
 
// Restore the configurations.
ini_restore( 'track_errors' ) ;
ini_restore( 'error_reporting' ) ;
 
return $sErrorMsg ;
}
else
return '' ;
}
 
function GetRootPath()
{
$sRealPath = realpath( './' ) ;
 
$sSelfPath = $_SERVER['PHP_SELF'] ;
$sSelfPath = substr( $sSelfPath, 0, strrpos( $sSelfPath, '/' ) ) ;
 
return substr( $sRealPath, 0, strlen( $sRealPath ) - strlen( $sSelfPath ) ) ;
}
?>
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/php/connector.php
New file
0,0 → 1,109
<?php
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: connector.php
* This is the File Manager Connector for PHP.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
*/
 
ob_start() ;
 
include('config.php') ;
include('util.php') ;
include('io.php') ;
include('basexml.php') ;
include('commands.php') ;
 
if ( !$Config['Enabled'] )
SendError( 1, 'This connector is disabled. Please check the "editor/filemanager/browser/default/connectors/php/config.php" file' ) ;
 
// Get the "UserFiles" path.
$GLOBALS["UserFilesPath"] = '' ;
 
if ( isset( $Config['UserFilesPath'] ) )
$GLOBALS["UserFilesPath"] = $Config['UserFilesPath'] ;
else if ( isset( $_GET['ServerPath'] ) )
$GLOBALS["UserFilesPath"] = $_GET['ServerPath'] ;
else
$GLOBALS["UserFilesPath"] = '/UserFiles/' ;
 
if ( ! ereg( '/$', $GLOBALS["UserFilesPath"] ) )
$GLOBALS["UserFilesPath"] .= '/' ;
 
if ( strlen( $Config['UserFilesAbsolutePath'] ) > 0 )
{
$GLOBALS["UserFilesDirectory"] = $Config['UserFilesAbsolutePath'] ;
 
if ( ! ereg( '/$', $GLOBALS["UserFilesDirectory"] ) )
$GLOBALS["UserFilesDirectory"] .= '/' ;
}
else
{
// Map the "UserFiles" path to a local directory.
$GLOBALS["UserFilesDirectory"] = GetRootPath() . $GLOBALS["UserFilesPath"] ;
}
 
DoResponse() ;
 
function DoResponse()
{
if ( !isset( $_GET['Command'] ) || !isset( $_GET['Type'] ) || !isset( $_GET['CurrentFolder'] ) )
return ;
 
// Get the main request informaiton.
$sCommand = $_GET['Command'] ;
$sResourceType = $_GET['Type'] ;
$sCurrentFolder = $_GET['CurrentFolder'] ;
 
// Check if it is an allowed type.
if ( !in_array( $sResourceType, array('File','Image','Flash','Media') ) )
return ;
 
// Check the current folder syntax (must begin and start with a slash).
if ( ! ereg( '/$', $sCurrentFolder ) ) $sCurrentFolder .= '/' ;
if ( strpos( $sCurrentFolder, '/' ) !== 0 ) $sCurrentFolder = '/' . $sCurrentFolder ;
// Check for invalid folder paths (..)
if ( strpos( $sCurrentFolder, '..' ) )
SendError( 102, "" ) ;
 
// File Upload doesn't have to Return XML, so it must be intercepted before anything.
if ( $sCommand == 'FileUpload' )
{
FileUpload( $sResourceType, $sCurrentFolder ) ;
return ;
}
 
CreateXmlHeader( $sCommand, $sResourceType, $sCurrentFolder ) ;
 
// Execute the required command.
switch ( $sCommand )
{
case 'GetFolders' :
GetFolders( $sResourceType, $sCurrentFolder ) ;
break ;
case 'GetFoldersAndFiles' :
GetFoldersAndFiles( $sResourceType, $sCurrentFolder ) ;
break ;
case 'CreateFolder' :
CreateFolder( $sResourceType, $sCurrentFolder ) ;
break ;
}
 
CreateXmlFooter() ;
 
exit ;
}
?>
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/php/basexml.php
New file
0,0 → 1,71
<?php
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: basexml.php
* These functions define the base of the XML response sent by the PHP
* connector.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
*/
 
function SetXmlHeaders()
{
ob_end_clean() ;
 
// Prevent the browser from caching the result.
// Date in the past
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT') ;
// always modified
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT') ;
// HTTP/1.1
header('Cache-Control: no-store, no-cache, must-revalidate') ;
header('Cache-Control: post-check=0, pre-check=0', false) ;
// HTTP/1.0
header('Pragma: no-cache') ;
 
// Set the response format.
header( 'Content-Type:text/xml; charset=utf-8' ) ;
}
 
function CreateXmlHeader( $command, $resourceType, $currentFolder )
{
SetXmlHeaders() ;
// Create the XML document header.
echo '<?xml version="1.0" encoding="utf-8" ?>' ;
 
// Create the main "Connector" node.
echo '<Connector command="' . $command . '" resourceType="' . $resourceType . '">' ;
// Add the current folder node.
echo '<CurrentFolder path="' . ConvertToXmlAttribute( $currentFolder ) . '" url="' . ConvertToXmlAttribute( GetUrlFromPath( $resourceType, $currentFolder ) ) . '" />' ;
}
 
function CreateXmlFooter()
{
echo '</Connector>' ;
}
 
function SendError( $number, $text )
{
SetXmlHeaders() ;
// Create the XML document header
echo '<?xml version="1.0" encoding="utf-8" ?>' ;
echo '<Connector><Error number="' . $number . '" text="' . htmlspecialchars( $text ) . '" /></Connector>' ;
exit ;
}
?>
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/php/util.php
New file
0,0 → 1,37
<?php
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: util.php
* This is the File Manager Connector for ASP.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
*/
 
function RemoveFromStart( $sourceString, $charToRemove )
{
$sPattern = '|^' . $charToRemove . '+|' ;
return preg_replace( $sPattern, '', $sourceString ) ;
}
 
function RemoveFromEnd( $sourceString, $charToRemove )
{
$sPattern = '|' . $charToRemove . '+$|' ;
return preg_replace( $sPattern, '', $sourceString ) ;
}
 
function ConvertToXmlAttribute( $value )
{
return utf8_encode( htmlspecialchars( $value ) ) ;
}
?>
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/php/commands.php
New file
0,0 → 1,218
<?php
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: commands.php
* This is the File Manager Connector for PHP.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
*/
 
function GetFolders( $resourceType, $currentFolder )
{
// Map the virtual path to the local server path.
$sServerDir = ServerMapFolder( $resourceType, $currentFolder ) ;
 
// Array that will hold the folders names.
$aFolders = array() ;
 
$oCurrentFolder = opendir( $sServerDir ) ;
 
while ( $sFile = readdir( $oCurrentFolder ) )
{
if ( $sFile != '.' && $sFile != '..' && is_dir( $sServerDir . $sFile ) )
$aFolders[] = '<Folder name="' . ConvertToXmlAttribute( $sFile ) . '" />' ;
}
 
closedir( $oCurrentFolder ) ;
 
// Open the "Folders" node.
echo "<Folders>" ;
natcasesort( $aFolders ) ;
foreach ( $aFolders as $sFolder )
echo $sFolder ;
 
// Close the "Folders" node.
echo "</Folders>" ;
}
 
function GetFoldersAndFiles( $resourceType, $currentFolder )
{
// Map the virtual path to the local server path.
$sServerDir = ServerMapFolder( $resourceType, $currentFolder ) ;
 
// Arrays that will hold the folders and files names.
$aFolders = array() ;
$aFiles = array() ;
 
$oCurrentFolder = opendir( $sServerDir ) ;
 
while ( $sFile = readdir( $oCurrentFolder ) )
{
if ( $sFile != '.' && $sFile != '..' )
{
if ( is_dir( $sServerDir . $sFile ) )
$aFolders[] = '<Folder name="' . ConvertToXmlAttribute( $sFile ) . '" />' ;
else
{
$iFileSize = filesize( $sServerDir . $sFile ) ;
if ( $iFileSize > 0 )
{
$iFileSize = round( $iFileSize / 1024 ) ;
if ( $iFileSize < 1 ) $iFileSize = 1 ;
}
 
$aFiles[] = '<File name="' . ConvertToXmlAttribute( $sFile ) . '" size="' . $iFileSize . '" />' ;
}
}
}
 
// Send the folders
natcasesort( $aFolders ) ;
echo '<Folders>' ;
 
foreach ( $aFolders as $sFolder )
echo $sFolder ;
 
echo '</Folders>' ;
 
// Send the files
natcasesort( $aFiles ) ;
echo '<Files>' ;
 
foreach ( $aFiles as $sFiles )
echo $sFiles ;
 
echo '</Files>' ;
}
 
function CreateFolder( $resourceType, $currentFolder )
{
$sErrorNumber = '0' ;
$sErrorMsg = '' ;
 
if ( isset( $_GET['NewFolderName'] ) )
{
$sNewFolderName = $_GET['NewFolderName'] ;
 
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 ) ;
 
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 '<Error number="' . $sErrorNumber . '" originalDescription="' . ConvertToXmlAttribute( $sErrorMsg ) . '" />' ;
}
 
function FileUpload( $resourceType, $currentFolder )
{
$sErrorNumber = '0' ;
$sFileName = '' ;
 
if ( isset( $_FILES['NewFile'] ) && !is_null( $_FILES['NewFile']['tmp_name'] ) )
{
global $Config ;
 
$oFile = $_FILES['NewFile'] ;
 
// Map the virtual path to the local server path.
$sServerDir = ServerMapFolder( $resourceType, $currentFolder ) ;
 
// Get the uploaded file name.
$sFileName = $oFile['name'] ;
// Replace dots in the name with underscores (only one dot can be there... security issue).
if ( $Config['ForceSingleExtension'] )
$sFileName = preg_replace( '/\\.(?![^.]*$)/', '_', $sFileName ) ;
 
$sOriginalFileName = $sFileName ;
 
// Get the extension.
$sExtension = substr( $sFileName, ( strrpos($sFileName, '.') + 1 ) ) ;
$sExtension = strtolower( $sExtension ) ;
 
$arAllowed = $Config['AllowedExtensions'][$resourceType] ;
$arDenied = $Config['DeniedExtensions'][$resourceType] ;
 
if ( ( count($arAllowed) == 0 || in_array( $sExtension, $arAllowed ) ) && ( count($arDenied) == 0 || !in_array( $sExtension, $arDenied ) ) )
{
$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 ) )
{
$oldumask = umask(0) ;
chmod( $sFilePath, 0777 ) ;
umask( $oldumask ) ;
}
 
break ;
}
}
}
else
$sErrorNumber = '202' ;
}
else
$sErrorNumber = '202' ;
 
echo '<script type="text/javascript">' ;
echo 'window.parent.frames["frmUpload"].OnUploadCompleted(' . $sErrorNumber . ',"' . str_replace( '"', '\\"', $sFileName ) . '") ;' ;
echo '</script>' ;
 
exit ;
}
?>
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/php/config.php
New file
0,0 → 1,51
<?php
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: config.php
* Configuration file for the File Manager Connector for PHP.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
*/
 
global $Config ;
 
// SECURITY: You must explicitelly enable this "connector". (Set it to "true").
$Config['Enabled'] = false ;
 
// Path to user files relative to the document root.
$Config['UserFilesPath'] = '/UserFiles/' ;
 
// Fill the following value it you prefer to specify the absolute path for the
// user files directory. Usefull 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'] = '' ;
 
// Due to security issues with Apache modules, it is reccomended to leave the
// following setting enabled.
$Config['ForceSingleExtension'] = true ;
 
$Config['AllowedExtensions']['File'] = array() ;
$Config['DeniedExtensions']['File'] = array('php','php2','php3','php4','php5','phtml','pwml','inc','asp','aspx','ascx','jsp','cfm','cfc','pl','bat','exe','com','dll','vbs','js','reg','cgi','htaccess') ;
 
$Config['AllowedExtensions']['Image'] = array('jpg','gif','jpeg','png') ;
$Config['DeniedExtensions']['Image'] = array() ;
 
$Config['AllowedExtensions']['Flash'] = array('swf','fla') ;
$Config['DeniedExtensions']['Flash'] = array() ;
 
$Config['AllowedExtensions']['Media'] = array('swf','fla','jpg','gif','jpeg','png','avi','mpg','mpeg') ;
$Config['DeniedExtensions']['Media'] = array() ;
 
?>
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/py/connector.py
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/py/connector.py
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/aspx/connector.aspx
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/aspx/connector.aspx
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/lasso/config.lasso
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/lasso/config.lasso
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/lasso/connector.lasso
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/lasso/connector.lasso
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/perl/commands.pl
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/perl/commands.pl
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/perl/connector.cgi
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/perl/connector.cgi
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/perl/io.pl
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/perl/io.pl
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/perl/upload_fck.pl
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/perl/upload_fck.pl
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/perl/basexml.pl
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/perl/basexml.pl
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/perl/util.pl
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/perl/util.pl
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/test.html
New file
0,0 → 1,177
<!--
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: test.html
* Test page for the File Browser connectors.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>FCKeditor - Connectors Tests</title>
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5" />
<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 ;
var sUrl = BuildBaseUrl( 'CreateFolder' ) ;
sUrl += '&NewFolderName=' + escape( 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="../../../../fckblank.html" name="eRunningFrame" width="100%"
height="100%"></iframe>
</td>
</tr>
</table>
</body>
</html>
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/asp/class_upload.asp
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/asp/class_upload.asp
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/asp/connector.asp
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/asp/connector.asp
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/asp/basexml.asp
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/asp/basexml.asp
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/asp/util.asp
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/asp/util.asp
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/asp/commands.asp
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/asp/commands.asp
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/asp/config.asp
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/asp/config.asp
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/asp/io.asp
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/asp/io.asp
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property