~alexharrington/xibo/pyclient-1.1.0a22

« back to all changes in this revision

Viewing changes to server/3rdparty/fckeditor/editor/filemanager/connectors/perl/basexml.pl

  • Committer: Alex Harrington
  • Date: 2009-03-02 17:27:19 UTC
  • mto: This revision was merged to the branch mainline in revision 15.
  • Revision ID: alex@longhill.org.uk-20090302172719-7qigtqo1mjydo4b3
[core] Created folder to hold code used for central services to Xibo instances

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#####
2
 
#  FCKeditor - The text editor for Internet - http://www.fckeditor.net
3
 
#  Copyright (C) 2003-2007 Frederico Caldeira Knabben
4
 
#
5
 
#  == BEGIN LICENSE ==
6
 
#
7
 
#  Licensed under the terms of any of the following licenses at your
8
 
#  choice:
9
 
#
10
 
#   - GNU General Public License Version 2 or later (the "GPL")
11
 
#     http://www.gnu.org/licenses/gpl.html
12
 
#
13
 
#   - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
14
 
#     http://www.gnu.org/licenses/lgpl.html
15
 
#
16
 
#   - Mozilla Public License Version 1.1 or later (the "MPL")
17
 
#     http://www.mozilla.org/MPL/MPL-1.1.html
18
 
#
19
 
#  == END LICENSE ==
20
 
#
21
 
#  This is the File Manager Connector for Perl.
22
 
#####
23
 
 
24
 
sub CreateXmlHeader
25
 
{
26
 
        local($command,$resourceType,$currentFolder) = @_;
27
 
 
28
 
        # Create the XML document header.
29
 
        print '<?xml version="1.0" encoding="utf-8" ?>';
30
 
 
31
 
        # Create the main "Connector" node.
32
 
        print '<Connector command="' . $command . '" resourceType="' . $resourceType . '">';
33
 
 
34
 
        # Add the current folder node.
35
 
        print '<CurrentFolder path="' . ConvertToXmlAttribute($currentFolder) . '" url="' . ConvertToXmlAttribute(GetUrlFromPath($resourceType,$currentFolder)) . '" />';
36
 
}
37
 
 
38
 
sub CreateXmlFooter
39
 
{
40
 
        print '</Connector>';
41
 
}
42
 
 
43
 
sub SendError
44
 
{
45
 
        local( $number, $text ) = @_;
46
 
 
47
 
        print << "_HTML_HEAD_";
48
 
Content-Type:text/xml; charset=utf-8
49
 
Pragma: no-cache
50
 
Cache-Control: no-cache
51
 
Expires: Thu, 01 Dec 1994 16:00:00 GMT
52
 
 
53
 
_HTML_HEAD_
54
 
 
55
 
        # Create the XML document header
56
 
        print '<?xml version="1.0" encoding="utf-8" ?>' ;
57
 
 
58
 
        print '<Connector><Error number="' . $number . '" text="' . &specialchar_cnv( $text ) . '" /></Connector>' ;
59
 
 
60
 
        exit ;
61
 
}
62
 
 
63
 
1;
 
1
#####
 
2
#  FCKeditor - The text editor for Internet - http://www.fckeditor.net
 
3
#  Copyright (C) 2003-2007 Frederico Caldeira Knabben
 
4
#
 
5
#  == BEGIN LICENSE ==
 
6
#
 
7
#  Licensed under the terms of any of the following licenses at your
 
8
#  choice:
 
9
#
 
10
#   - GNU General Public License Version 2 or later (the "GPL")
 
11
#     http://www.gnu.org/licenses/gpl.html
 
12
#
 
13
#   - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
 
14
#     http://www.gnu.org/licenses/lgpl.html
 
15
#
 
16
#   - Mozilla Public License Version 1.1 or later (the "MPL")
 
17
#     http://www.mozilla.org/MPL/MPL-1.1.html
 
18
#
 
19
#  == END LICENSE ==
 
20
#
 
21
#  This is the File Manager Connector for Perl.
 
22
#####
 
23
 
 
24
sub CreateXmlHeader
 
25
{
 
26
        local($command,$resourceType,$currentFolder) = @_;
 
27
 
 
28
        # Create the XML document header.
 
29
        print '<?xml version="1.0" encoding="utf-8" ?>';
 
30
 
 
31
        # Create the main "Connector" node.
 
32
        print '<Connector command="' . $command . '" resourceType="' . $resourceType . '">';
 
33
 
 
34
        # Add the current folder node.
 
35
        print '<CurrentFolder path="' . ConvertToXmlAttribute($currentFolder) . '" url="' . ConvertToXmlAttribute(GetUrlFromPath($resourceType,$currentFolder)) . '" />';
 
36
}
 
37
 
 
38
sub CreateXmlFooter
 
39
{
 
40
        print '</Connector>';
 
41
}
 
42
 
 
43
sub SendError
 
44
{
 
45
        local( $number, $text ) = @_;
 
46
 
 
47
        print << "_HTML_HEAD_";
 
48
Content-Type:text/xml; charset=utf-8
 
49
Pragma: no-cache
 
50
Cache-Control: no-cache
 
51
Expires: Thu, 01 Dec 1994 16:00:00 GMT
 
52
 
 
53
_HTML_HEAD_
 
54
 
 
55
        # Create the XML document header
 
56
        print '<?xml version="1.0" encoding="utf-8" ?>' ;
 
57
 
 
58
        print '<Connector><Error number="' . $number . '" text="' . &specialchar_cnv( $text ) . '" /></Connector>' ;
 
59
 
 
60
        exit ;
 
61
}
 
62
 
 
63
1;