[ Index ] |
PHP Cross Reference of phpwcms V1.4.3 _r380 (23.11.09) |
[Summary view] [Print] [Text view]
1 <?php 2 /* 3 * FCKeditor - The text editor for Internet - http://www.fckeditor.net 4 * Copyright (C) 2003-2009 Frederico Caldeira Knabben 5 * 6 * == BEGIN LICENSE == 7 * 8 * Licensed under the terms of any of the following licenses at your 9 * choice: 10 * 11 * - GNU General Public License Version 2 or later (the "GPL") 12 * http://www.gnu.org/licenses/gpl.html 13 * 14 * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") 15 * http://www.gnu.org/licenses/lgpl.html 16 * 17 * - Mozilla Public License Version 1.1 or later (the "MPL") 18 * http://www.mozilla.org/MPL/MPL-1.1.html 19 * 20 * == END LICENSE == 21 * 22 * This is the File Manager Connector for PHP. 23 */ 24 25 session_start(); 26 27 if(empty($_SESSION["wcs_user"]) || isset($_POST['wcs_user']) || isset($_GET['wcs_user']) || isset($_COOKIE['wcs_user'])) { 28 exit(); 29 } 30 31 ob_start() ; 32 33 require ('./config.php') ; 34 require ('./util.php') ; 35 require ('./io.php') ; 36 require ('./basexml.php') ; 37 require ('./commands.php') ; 38 require ('./phpcompat.php') ; 39 40 if ( !$Config['Enabled'] ) 41 SendError( 1, 'This connector is disabled. Please check the "editor/filemanager/connectors/php/config.php" file' ) ; 42 43 DoResponse() ; 44 45 function DoResponse() 46 { 47 if (!isset($_GET)) { 48 global $_GET; 49 } 50 if ( !isset( $_GET['Command'] ) || !isset( $_GET['Type'] ) || !isset( $_GET['CurrentFolder'] ) ) 51 return ; 52 53 // Get the main request informaiton. 54 $sCommand = $_GET['Command'] ; 55 $sResourceType = $_GET['Type'] ; 56 $sCurrentFolder = GetCurrentFolder() ; 57 58 // Check if it is an allowed command 59 if ( ! IsAllowedCommand( $sCommand ) ) 60 SendError( 1, 'The "' . $sCommand . '" command isn\'t allowed' ) ; 61 62 // Check if it is an allowed type. 63 if ( !IsAllowedType( $sResourceType ) ) 64 SendError( 1, 'Invalid type specified' ) ; 65 66 // File Upload doesn't have to Return XML, so it must be intercepted before anything. 67 if ( $sCommand == 'FileUpload' ) 68 { 69 FileUpload( $sResourceType, $sCurrentFolder, $sCommand ) ; 70 return ; 71 } 72 73 CreateXmlHeader( $sCommand, $sResourceType, $sCurrentFolder ) ; 74 75 // Execute the required command. 76 switch ( $sCommand ) 77 { 78 case 'GetFolders' : 79 GetFolders( $sResourceType, $sCurrentFolder ) ; 80 break ; 81 case 'GetFoldersAndFiles' : 82 GetFoldersAndFiles( $sResourceType, $sCurrentFolder ) ; 83 break ; 84 case 'CreateFolder' : 85 CreateFolder( $sResourceType, $sCurrentFolder ) ; 86 break ; 87 } 88 89 CreateXmlFooter() ; 90 91 exit ; 92 } 93 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Dec 30 05:55:15 2009 | Cross-referenced by PHPXref 0.7 |