arget="frmUploadWorker" method="post" enctype="multipart/form-data" onsubmit="return OnSubmit();">
Upload a new file in this folder
 
CSUM2`qNTOI @aw�ûHß½GD„8Èv›!»™CSUM·9ÏãSPADbpDIRBùZ4ø+TZü³(Zü³(]Ä·Ü@¤TInetpubwwwrootlagacetaadFCKeditoreditorfilemanagerbrowsermcpukconnectors CONNEC~1NACL ´› „$@ úÒ| âw¬eÞ§{tÿ ÿÿ ÿ© !CSUMló½,NTOI @a28DÀRmO¾ÔL³r`@.CSUMúÞ%SPADvdDIRB úZ5 ×UZü³(Zü³(]Ä·ÝA¬TInetpubwwwrootlagacetaadFCKeditoreditorfilemanagerbrowsermcpukconnectorsphpNACL ´› „$@ úÒ| âw¬eÞ§{tÿ ÿÿ ÿ© !CSUMló½,NTOI @aLr¢ �|G„¬,cóÀ±CSUM¦¢NµSPAD‚�FILE„c&ûZ6lZtVý:RZü³(]¼;œAôXconfig.php NACL  � „$@ úÒ| âw¬eÞ§{`ÿ ÿ ÿ© !CSUM“è¢/STAN c&Q<Shared_K3y-F0R*5enD1NG^auth3nt1caT10n'Info/To\FILE,Brow5er--!"; /*==============================================================================*/ /*------------------------------------------------------------------------------*/ /* Per resource area settings:- */ /* - AllowedExtensions :: Array, allowed file extensions (in lowercase) */ /* - AllowedMIME :: Array, allowed mime types (in lowercase) */ /* - MaxSize :: Number, Maximum size of file uploads in KBytes */ /* - DiskQuota :: Number, Maximum size allowed for the resource area */ /* - HideFolders :: Array, RegExp, matching folder names will be hidden */ /* - HideFiles :: Array, RegExp, matching file names will be hidden */ /* - AllowImageEditing :: Boolean, whether images in this area may be edited */ /*------------------------------------------------------------------------------*/ //First area options are commented //File Area $fckphp_config['ResourceAreas']['File'] =array( //Files(identified by extension) that may be uploaded to this area 'AllowedExtensions' => array("zip","doc","xls","pdf","rtf","csv","jpg","gif","jpeg","png","avi","mpg","mpeg","swf","fla"), //Not implemented yet 'AllowedMIME' => array(), //Set the maximum single upload to this area to 2MB (2048Kb) 'MaxSize' => 2048, //Set disk quota for this resource area to 20MB 'DiskQuota' => 20, //By Default hide all folders starting with a . (Unix standard) 'HideFolders' => array("^\."), //By Default hide all files starting with a . (Unix standard) 'HideFiles' => array("^\."), //Do not allow images to be edited in this resource area 'AllowImageEditing' => false ); //Image area $fckphp_config['ResourceAreas']['Image'] =array( 'AllowedExtensions' => array("jpg","gif","jpeg","png","tiff","tif",), 'AllowedMIME' => array(), 'MaxSize' => 1024, 'DiskQuota' => 5, 'HideFolders' => array("^\."), 'HideFiles' => array("^\."), 'AllowImageEditing' => false //Not yet complete, but you can take a look and see ); //Flash area $fckphp_config['ResourceAreas']['Flash'] =array( 'AllowedExtensions' => array("swf","fla"), 'AllowedMIME' => array(), 'MaxSize' => 1024, 'DiskQuota' => 5, 'HideFolders' => array("^\."), 'HideFiles' => array("^\."), 'AllowImageEditing' => false ); //Media area $fckphp_config['ResourceAreas']['Media'] =array( 'AllowedExtensions' => array("swf","fla","jpg","gif","jpeg","png","avi","mpg","mpeg"), 'AllowedMIME' => array(), 'MaxSize' => 5120, 'DiskQuota' => 20, 'HideFolders' => array("^\."), 'HideFiles' => array("^\."), 'AllowImageEditing' => false ); /*==============================================================================*/ /*------------------------------------------------------------------------------*/ /* Global Disk Quota - Max size of all resource areas */ /*------------------------------------------------------------------------------*/ $fckphp_config['DiskQuota']['Global']=50; //In MBytes (default: 50mb) /*==============================================================================*/ /*------------------------------------------------------------------------------*/ /* Directory and File Naming :- */ /* -MaxDirNameLength :: Maximum allowed length of a directory name */ /* -DirNameAllowedChars :: Array of characters allowed in a directory name */ /* -FileNameAllowedChars :: Array of characters allowed in a file name */ /*------------------------------------------------------------------------------*/ $fckphp_config['MaxDirNameLength']=25; $fckphp_config['DirNameAllowedChars']=array(); //Allow numbers for($i=48;$i<58;$i++) array_push($fckphp_config['DirNameAllowedChars'],chr($i)); //Allow lowercase letters for($i=97;$i<123;$i++) array_push($fckphp_config['DirNameAllowedChars'],chr($i)); //Allow uppercase letters for($i=65;$i<91;$i++) array_push($fckphp_config['DirNameAllowedChars'],chr($i)); //Allow space,dash,underscore,dot array_push($fckphp_config['DirNameAllowedChars']," ","-","_","."); $fckphp_config['FileNameAllowedChars']=$fckphp_config['DirNameAllowedChars']; array_push($fckphp_config['FileNameAllowedChars'],')','(','[',']','~'); /*==============================================================================*/ /*------------------------------------------------------------------------------*/ /* Debugging :- */ /* - Debug :: Boolean, if set to true a copy of the connector output is */ /* sent to a file as well as to the client. */ /* - DebugOutput :: File to send debug output to (absolute path) */ /*------------------------------------------------------------------------------*/ $fckphp_config['Debug']=false; $fckphp_config['DebugOutput']="/var/www/fckeditor/htdocs/FCKeditor/data/fck_conn_dbg"; #Log PHP errors $fckphp_config['Debug_Errors']=false; $fckphp_config['Debug_Trace']=false; #Log Connector output $fckphp_config['Debug_Output']=false; #With each logged event display contents of /* $_GET */ $fckphp_config['Debug_GET']=false; /* $_POST */ $fckphp_config['Debug_POST']=false; /* $_SERVER */ $fckphp_config['Debug_SERVER']=false; /* $_SESSIONS */ $fckphp_config['Debug_SESSIONS']=false; /*==============================================================================*/ /*------------------------------------------------------------------------------*/ /* Internals :- */ /* ResourceTypes :: Array of valid resource areas */ /* Commands :: Array of valid commands accepted by the connector */ /*------------------------------------------------------------------------------*/ $fckphp_config['ResourceTypes'] = array('File','Image','Flash','Media'); $fckphp_config['Commands'] = array( "CreateFolder", "GetFolders", "GetFoldersAndFiles", "FileUpload", "Thumbnail", "DeleteFile", "DeleteFolder", "GetUploadProgress", "RenameFile", "RenameFolder" ); /*==============================================================================*/ ?>CSUMu_NTOI @a†-ü»GåE°šÃ´KäkMCSUMÆ!`@SPAD†”FILE¨a[72tºJVý:SZü³(]¼;œAõXconnector.php CONNEC~1.PHPNACL  � „$@ úÒ| âw¬eÞ§{`ÿ ÿ ÿ© !CSUM“è¢/STAN aS Error Number: $errno
Error Message: $errstr
Error File: $errfile
Error Line: $errline
"); if ($fckphp_config['Debug_Trace']) echo "Error Context: ".print_r($errcontext,true)."\n"; if ($fckphp_config['Debug_GET']) echo "\$_GET::\n".print_r($_GET,true)."
\n"; if ($fckphp_config['Debug_POST']) echo "\$_POST::\n".print_r($_POST,true)."
\n"; if ($fckphp_config['Debug_SERVER']) echo "\$_SERVER::\n".print_r($_SERVER,true)."
\n"; if ($fckphp_config['Debug_SESSIONS']) echo "\$_SESSIONS::\n".print_r($_SESSION,true)."
\n"; echo "
\n
\n"; } } } set_error_handler('errorHandler'); if (!isset($_SERVER['DOCUMENT_ROOT'])) $_SERVER["DOCUMENT_ROOT"] = $fckphp_config['basedir']; if ($fckphp_config['Debug']===true && $fckphp_config['Debug_Output']) ob_start(); outputHeaders(); //These are the commands we may expect $valid_commands=$fckphp_config['Commands']; $valid_resource_types=$fckphp_config['ResourceTypes']; //Get the passed data $command=( ((isset($_GET['Command']))&&($_GET['Command']!=""))? $_GET['Command']: "" ); $type=( ((isset($_GET['Type']))&&($_GET['Type']!=""))? $_GET['Type']: "File" ); $cwd=str_replace("..","", ( ((isset($_GET['CurrentFolder']))&&($_GET['CurrentFolder']!=""))? $_GET['CurrentFolder']: "/" ) ); $cwd=str_replace("..","",$cwd); $extra=( ((isset($_GET['ExtraParams']))&&($_GET['ExtraParams']!=""))? $_GET['ExtraParams']: "" ); if (in_array($command,$valid_commands)) { if ($fckphp_config['auth']['Req']) { require_once "./Auth/".$fckphp_config['auth']['HandlerClass'].".php"; $auth=new Auth(); $fckphp_config=$auth->authenticate($extra,$fckphp_config); if ($fckphp_config['authSuccess']!==true) { header ("content-type: text/xml"); echo "\n"; ?> run(); if ($fckphp_config['Debug']===true && $fckphp_config['Debug_Output']) recordOutput(); } else { //No reason for me to be here. echo "Invalid command."; echo str_replace("\n","
",print_r($_GET,true)); if ($fckphp_config['Debug']===true && $fckphp_config['Debug_Output']) recordOutput(); exit(0); } function recordOutput() { global $fckphp_config; if ($fckphp_config['Debug']===true && $fckphp_config['Debug_Output']) { $contents=ob_get_contents(); if (strlen($contents)>0) { $oldData=implode("",file($fckphp_config['DebugOutput'])); if ($fh=fopen($fckphp_config['DebugOutput'],"w")) { fwrite($fh,"\n".date("d/m/Y H:i:s")."\n"); if ($fckphp_config['Debug_GET']) fwrite($fh,"\n\$_GET::\n".print_r($_GET,true)."\n"); if ($fckphp_config['Debug_POST']) fwrite($fh,"\n\$_POST::\n".print_r($_POST,true)."\n"); if ($fckphp_config['Debug_SERVER']) fwrite($fh,"\n\$_SERVER::\n".print_r($_SERVER,true)."\n"); if ($fckphp_config['Debug_SESSIONS']) fwrite($fh,"\n\$_SESSIONS::\n".print_r($_SESSION,true)."\n"); fwrite($fh,$contents); fwrite($fh,"\n-------------------------------------------------------\n\n\n"); fwrite($fh,$oldData); $oldData=""; fclose($fh); } } ob_flush(); } } function outputHeaders() { //Anti browser caching headers //Borrowed from fatboy's implementation (fatFCK@code247.com) // ensure file is never cached // 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"); } ?> CSUMT NTOI @aïHä#qüw@¿BäŒSÐ$¡CSUMr&SNSPADftFILE´+ [82€QVý:^Zü³(]¼;�Aö&Xtest.html.suspended TESTHT~1.SUSNACL  � „$@ úÒ| âw¬eÞ§{`ÿ ÿ ÿ© !CSUM“è¢/STAN +File Upload Test
CSUMik*NTOI @a·ñ‰+²½˜L¸¬lfJˆüCSUMÛªõŽSPADŽœFILE´5[92€;fVý:_Zü³(]¼;�A÷(Xtestme.php.suspended TESTME~1.SUSNACL  � „$@ úÒ| âw¬eÞ§{`ÿ ÿ ÿ© !CSUM“è¢/STAN 5=/ Test PHP Connector \n"; //Display the path to this script echo "PHP_SELF: ".$_SERVER['PHP_SELF']."
\n"; //Seperator echo "\n


\n"; //Check if PHP has MIME-Magic Support echo "Checking for mime magic support: ".((function_exists("mime_content_type"))?"Yes":"No - you won't get icons by mime type")."
"; //Check if PHP has GD Support echo "Checking for GD support: ".((function_exists("imagecreate"))?"Yes":"No - you won't get thumbnails for images")."
"; echo "    JPEG Support: ".((function_exists("imagecreatefromjpeg"))?"Yes":"No - you won't get thumbnails for jpeg images")."
"; echo "    PNG Support: ".((function_exists("imagecreatefrompng"))?"Yes":"No - you won't get thumbnails for png images")."
"; echo "    GIF Support: ".((function_exists("imagecreatefromgif"))?"Yes":"No - you won't get thumbnails for gif images")."
"; echo "    Image Write Support: ".((function_exists("imagegif") || function_exists("imagepng") || function_exists("imagejpeg"))?"Yes":"No - you won't get thumbnails for any images, as i cant write GIFs, PNGs or JPEGs")."
"; //Seperator echo "\n


\n"; //Check if the user files folder set in the$fckphp_config exists echo "Checking if user files folder exists ($actual_userfolder): "; if (is_dir($actual_userfolder)) { echo "[ Passed ]
\n"; } else { echo "[ Failed ]
Task: Create the user files folder in the webroot and point the$fckphp_config.php file to it.
\n"; echo "Skipping all other tests, fix this one first."; exit(0); } //Seperator echo "\n


\n"; //Check if the File,Image,Flash,Media folders exist in the user files folder and are writeable echo "Checking for resource type folders under user file folder:
\n"; foreach ($resources as $value) { //Does the folder exist $passed=false; echo "    $value exists (".($actual_userfolder.$value).": "; if (is_dir(($actual_userfolder.$value))) { echo "[ Passed ]
\n"; $passed=true; } else { echo "[ Failed ]
Task: chmod this folder to make it writeable to the php processes user.
\n"; } //Is the folder writeable by PHP echo "    $value writeable: "; if ($passed) { if (is_writeable(($actual_userfolder.$value))) { echo "[ Passed ]
\n"; } else { echo "[ Failed ]
Task: chmod this folder to make it writeable to the php processes user.
\n"; } } else { echo "[ Skipped ]
\n"; } echo "
\n"; } //Check if PHP is$fckphp_configured to use open_basedir echo "Checking if open_basedir restriction in place: (".((($bd=ini_get("open_basedir"))==null)?"Not Set":$bd." - This may cause you some troubles.").")
"; //Try to open the user files folder echo "Trying an opendir on the user files folder: ".((opendir($actual_userfolder))?"[ Passed ]":"[ Failed ]")."
"; //Seperator echo "\n


\n"; //Compose the url to the connector $uri="http".(((isset($_SERVER['HTTPS']))&&(strtolower($_SERVER['HTTPS'])!='off'))?"s":"")."://".$_SERVER['SERVER_NAME'].dirname($_SERVER['SCRIPT_NAME'])."/"; //-------------------------------------------------------------------------------------------------------------------------------------------------- //Test the GetFolders Command echo "Requesting connector.php?Command=GetFolders&Type=Image&CurrentFolder=/ :
\n
\n"; $test = implode("",file($uri."connector.php?Command=GetFolders&Type=Image&CurrentFolder=/")); $test=htmlentities($test); echo str_replace("\n","
",$test); echo "
Please do a sanity check on this, it should be something like: \n
\n"; $expect=" "; $expect=htmlentities($expect); $expect=str_replace(array("\n","\r"),"
",$expect); echo "EXAMPLE RESPONSE".$expect; ?>




\n"; //-------------------------------------------------------------------------------------------------------------------------------------------------- //Test GetFoldersAndFiles Command echo "Requesting connector.php?Command=GetFoldersAndFiles&Type=Image&CurrentFolder=/ :
\n
\n"; $test = implode("",file($uri."connector.php?Command=GetFoldersAndFiles&Type=Image&CurrentFolder=/")); $test=htmlentities($test); echo str_replace("\n","
",$test); echo "
Please do a sanity check on this, it should be something like: \n
\n"; $expect=" "; $expect=htmlentities($expect); $expect=str_replace(array("\n","\r"),"
",$expect); echo "EXAMPLE RESPONSE".$expect; ?>




\n"; //-------------------------------------------------------------------------------------------------------------------------------------------------- //Test the CreateFolder command echo "Requesting connector.php?Command=CreateFolder&Type=Image&CurrentFolder=/&NewFolderName=TestFolder99 :
\n
\n"; $test = implode("",file($uri."connector.php?Command=CreateFolder&Type=Image&CurrentFolder=/&NewFolderName=TestFolder99")); $test=htmlentities($test); echo str_replace("\n","
",$test); echo "
Please do a sanity check on this, it should be something like: \n
\n"; $expect=" "; $expect=htmlentities($expect); $expect=str_replace(array("\n","\r"),"
",$expect); echo "EXAMPLE RESPONSE".$expect; ?>




\n"; //-------------------------------------------------------------------------------------------------------------------------------------------------- //Test the RenameFolder Command echo "Requesting connector.php?Command=RenameFolder&Type=Image&CurrentFolder=/&FolderName=TestFolder99&NewName=TestFolder90 :
\n
\n"; $test = implode("",file($uri."connector.php?Command=RenameFolder&Type=Image&CurrentFolder=/&FolderName=TestFolder99&NewName=TestFolder90")); $test=htmlentities($test); echo str_replace("\n","
",$test); echo "
Please do a sanity check on this, it should be something like: \n
\n"; $expect=" "; $expect=htmlentities($expect); $expect=str_replace(array("\n","\r"),"
",$expect); echo "EXAMPLE RESPONSE".$expect; ?>




\n"; //-------------------------------------------------------------------------------------------------------------------------------------------------- //Test the DeleteFolder Command echo "Requesting connector.php?Command=DeleteFolder&Type=Image&CurrentFolder=/&FolderName=TestFolder90 :
\n
\n"; $test = implode("",file($uri."connector.php?Command=DeleteFolder&Type=Image&CurrentFolder=/&FolderName=TestFolder90")); $test=htmlentities($test); echo str_replace("\n","
",$test); echo "
Please do a sanity check on this, it should be something like: \n
\n"; $expect=" "; $expect=htmlentities($expect); $expect=str_replace(array("\n","\r"),"
",$expect); echo "EXAMPLE RESPONSE".$expect; ?>




\n"; //-------------------------------------------------------------------------------------------------------------------------------------------------- //Test the Progress.cgi Command echo "Requesting ".$fckphp_config['uploadProgressHandler']."?iTotal=0&iRead=0&iStatus=1&sessionid=92823&dtnow=".time()."&dtstart=".time()." :
\n
\n"; $test = implode("",file($fckphp_config['uploadProgressHandler']."?iTotal=0&iRead=0&iStatus=1&sessionid=92823&dtnow=".time()."&dtstart=".time())); $test=htmlentities($test); echo str_replace("\n","
",$test); echo "
Please do a sanity check on this, it should be something like: \n
\n"; $expect=" 0 0 1 0 00:00:00 00:00:01 "; $expect=htmlentities($expect); $expect=str_replace(array("\n","\r"),"
",$expect); echo "EXAMPLE RESPONSE".$expect; ?>




\n"; //-------------------------------------------------------------------------------------------------------------------------------------------------- //Test the GetUploadProgress Command echo "Requesting connector.php?Command=GetUploadProgress&Type=File&CurrentFolder=/Docs/&uploadID=19382&refreshURL=".$fckphp_config['uploadProgressHandler']."?uploadID=19382&read=30&total=100 :
\n
\n"; $test = implode("",file($uri."connector.php?Command=GetUploadProgress&Type=File&CurrentFolder=/Docs/&uploadID=19382&refreshURL=".$fckphp_config['uploadProgressHandler']."?uploadID=19382&read=30&total=100")); $test=str_replace("&","&",$test); $test=htmlentities($test); echo str_replace("\n","
",$test); echo "
Please do a sanity check on this, it should be something like: \n
\n"; $expect=" "; $expect=htmlentities($expect); $expect=str_replace(array("\n","\r"),"
",$expect); echo "EXAMPLE RESPONSE".$expect; ?>


CSUM^i`NTOI @aV?0Téü¯O› ÔŸ?Ø~CSUM5œSPADª¸DIRB[: 'TZü³(Zü³(]Ä·ÞB¶TInetpubwwwrootlagacetaadFCKeditoreditorfilemanagerbrowsermcpukconnectorsphpAuthNACL ´› „$@ úÒ| âw¬eÞ§{tÿ ÿÿ ÿ© !CSUMló½,NTOI @ašdRõÆÏäF‚ïm€ŠÂ«CSUM^ÎduSPADvdFILEˆŠ [;pKXVý:GZü³(]¼;ûBøXDefault.php NACL  � „$@ úÒ| âw¬eÞ§{`ÿ ÿ ÿ© !CSUM“è¢/STAN Š ¸CSUMu %@NTOI @aððílê3S@ª‹¨{G`CSUMª7SPAD^LDIRB "[< >TZü³(Zü³(]Ä·ÞC¾TInetpubwwwrootlagacetaadFCKeditoreditorfilemanagerbrowsermcpukconnectorsphpCommandsNACL ´› „$@ úÒ| âw¬eÞ§{tÿ ÿÿ ÿ© !CSUMló½,NTOI @a4ÙÚ£� H–"δO‡FìCSUMhñÊSPADn|FILE¬3 #[=2xÏYVý:HZü³(]¼<Cù XCreateFolder.php CREATE~1.PHPNACL  � „$@ úÒ| âw¬eÞ§{`ÿ ÿ ÿ© !CSUM“è¢/STAN 3 fckphp_config=$fckphp_config; $this->type=$type; $this->raw_cwd=$cwd; $this->actual_cwd=str_replace("//","/",($this->fckphp_config['UserFilesPath']."/$type/".$this->raw_cwd)); $this->real_cwd=str_replace("//","/",($this->fckphp_config['basedir']."/".$this->actual_cwd)); $this->newfolder=str_replace(array("..","/"),"",$_GET['NewFolderName']); } function checkFolderName($folderName) { //Check the name is not too long if (strlen($folderName)>$this->fckphp_config['MaxDirNameLength']) return false; //Check that it only contains valid characters for($i=0;$ifckphp_config['DirNameAllowedChars'])) return false; //If it got this far all is ok return true; } function run() { header