~ubuntu-branches/ubuntu/natty/moin/natty-updates

« back to all changes in this revision

Viewing changes to wiki/htdocs/applets/FCKeditor/editor/filemanager/browser/default/connectors/php/basexml.php

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2008-06-22 21:17:13 UTC
  • mto: This revision was merged to the branch mainline in revision 18.
  • Revision ID: james.westby@ubuntu.com-20080622211713-inlv5k4eifxckelr
ImportĀ upstreamĀ versionĀ 1.7.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php 
 
2
/*
 
3
 * FCKeditor - The text editor for internet
 
4
 * Copyright (C) 2003-2005 Frederico Caldeira Knabben
 
5
 * 
 
6
 * Licensed under the terms of the GNU Lesser General Public License:
 
7
 *              http://www.opensource.org/licenses/lgpl-license.php
 
8
 * 
 
9
 * For further information visit:
 
10
 *              http://www.fckeditor.net/
 
11
 * 
 
12
 * "Support Open Source software. What about a donation today?"
 
13
 * 
 
14
 * File Name: basexml.php
 
15
 *      This is the File Manager Connector for ASP.
 
16
 * 
 
17
 * File Authors:
 
18
 *              Frederico Caldeira Knabben (fredck@fckeditor.net)
 
19
 */
 
20
 
 
21
function SetXmlHeaders()
 
22
{
 
23
        // Prevent the browser from caching the result.
 
24
        // Date in the past
 
25
        header('Expires: Mon, 26 Jul 1997 05:00:00 GMT') ;
 
26
        // always modified
 
27
        header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT') ;
 
28
        // HTTP/1.1
 
29
        header('Cache-Control: no-store, no-cache, must-revalidate') ;
 
30
        header('Cache-Control: post-check=0, pre-check=0', false) ;
 
31
        // HTTP/1.0
 
32
        header('Pragma: no-cache') ;
 
33
 
 
34
        // Set the response format.
 
35
        header( 'Content-Type:text/xml; charset=utf-8' ) ;
 
36
}
 
37
 
 
38
function CreateXmlHeader( $command, $resourceType, $currentFolder )
 
39
{
 
40
        SetXmlHeaders() ;
 
41
        
 
42
        // Create the XML document header.
 
43
        echo '<?xml version="1.0" encoding="utf-8" ?>' ;
 
44
 
 
45
        // Create the main "Connector" node.
 
46
        echo '<Connector command="' . $command . '" resourceType="' . $resourceType . '">' ;
 
47
        
 
48
        // Add the current folder node.
 
49
        echo '<CurrentFolder path="' . ConvertToXmlAttribute( $currentFolder ) . '" url="' . ConvertToXmlAttribute( GetUrlFromPath( $resourceType, $currentFolder ) ) . '" />' ;
 
50
}
 
51
 
 
52
function CreateXmlFooter()
 
53
{
 
54
        echo '</Connector>' ;
 
55
}
 
56
 
 
57
function SendError( $number, $text )
 
58
{
 
59
        SetXmlHeaders() ;
 
60
        
 
61
        // Create the XML document header
 
62
        echo '<?xml version="1.0" encoding="utf-8" ?>' ;
 
63
        
 
64
        echo '<Connector><Error number="' . $number . '" text="' . htmlspecialchars( $text ) . '" /></Connector>' ;
 
65
        
 
66
        exit ;
 
67
}
 
68
?>
 
 
b'\\ No newline at end of file'