~alexharrington/xibo/pyclient-1.1.0a22

« back to all changes in this revision

Viewing changes to server/3rdparty/fckeditor/editor/filemanager/connectors/php/upload.php

  • Committer: Dan Garner
  • Date: 2008-12-14 14:42:52 UTC
  • mto: (1.1.80 Xibo)
  • mto: This revision was merged to the branch mainline in revision 2.
  • Revision ID: mail@dangarner.co.uk-20081214144252-8dosaegtfwvv0dsl
Moved 3rd Party libraries to their own folder.
Updated jQuery to the latest revision and now use jQuery UI instead of individual plugins.

Tabs are not currently working

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?php
2
 
/*
3
 
 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
4
 
 * Copyright (C) 2003-2007 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 Uploader" for PHP.
23
 
 */
24
 
 
25
 
require('./config.php') ;
26
 
require('./util.php') ;
27
 
require('./io.php') ;
28
 
require('./commands.php') ;
29
 
require('./phpcompat.php') ;
30
 
 
31
 
function SendError( $number, $text )
32
 
{
33
 
        SendUploadResults( $number, '', '', $text ) ;
34
 
}
35
 
 
36
 
 
37
 
// Check if this uploader has been enabled.
38
 
if ( !$Config['Enabled'] )
39
 
        SendUploadResults( '1', '', '', 'This file uploader is disabled. Please check the "editor/filemanager/connectors/php/config.php" file' ) ;
40
 
 
41
 
$sCommand = 'QuickUpload' ;
42
 
 
43
 
// The file type (from the QueryString, by default 'File').
44
 
$sType = isset( $_GET['Type'] ) ? $_GET['Type'] : 'File' ;
45
 
 
46
 
$sCurrentFolder = GetCurrentFolder() ; 
47
 
 
48
 
// Is enabled the upload?
49
 
if ( ! IsAllowedCommand( $sCommand ) ) 
50
 
        SendUploadResults( '1', '', '', 'The ""' . $sCommand . '"" command isn\'t allowed' ) ;
51
 
 
52
 
// Check if it is an allowed type.
53
 
if ( !IsAllowedType( $sType ) )
54
 
    SendUploadResults( 1, '', '', 'Invalid type specified' ) ;
55
 
 
56
 
 
57
 
FileUpload( $sType, $sCurrentFolder, $sCommand )
58
 
 
 
1
<?php
 
2
/*
 
3
 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
 
4
 * Copyright (C) 2003-2007 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 Uploader" for PHP.
 
23
 */
 
24
 
 
25
require('./config.php') ;
 
26
require('./util.php') ;
 
27
require('./io.php') ;
 
28
require('./commands.php') ;
 
29
require('./phpcompat.php') ;
 
30
 
 
31
function SendError( $number, $text )
 
32
{
 
33
        SendUploadResults( $number, '', '', $text ) ;
 
34
}
 
35
 
 
36
 
 
37
// Check if this uploader has been enabled.
 
38
if ( !$Config['Enabled'] )
 
39
        SendUploadResults( '1', '', '', 'This file uploader is disabled. Please check the "editor/filemanager/connectors/php/config.php" file' ) ;
 
40
 
 
41
$sCommand = 'QuickUpload' ;
 
42
 
 
43
// The file type (from the QueryString, by default 'File').
 
44
$sType = isset( $_GET['Type'] ) ? $_GET['Type'] : 'File' ;
 
45
 
 
46
$sCurrentFolder = GetCurrentFolder() ; 
 
47
 
 
48
// Is enabled the upload?
 
49
if ( ! IsAllowedCommand( $sCommand ) ) 
 
50
        SendUploadResults( '1', '', '', 'The ""' . $sCommand . '"" command isn\'t allowed' ) ;
 
51
 
 
52
// Check if it is an allowed type.
 
53
if ( !IsAllowedType( $sType ) )
 
54
    SendUploadResults( 1, '', '', 'Invalid type specified' ) ;
 
55
 
 
56
 
 
57
FileUpload( $sType, $sCurrentFolder, $sCommand )
 
58
 
59
59
?>
 
 
b'\\ No newline at end of file'