[ Index ]
 

Code source de FCKeditor 2.4

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/editor/filemanager/browser/default/connectors/php/ -> basexml.php (source)

   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   * File Name: basexml.php
  23   *     These functions define the base of the XML response sent by the PHP
  24   *     connector.
  25   * 
  26   * File Authors:
  27   *         Frederico Caldeira Knabben (www.fckeditor.net)
  28   */
  29  
  30  function SetXmlHeaders()
  31  {
  32      ob_end_clean() ;
  33  
  34      // Prevent the browser from caching the result.
  35      // Date in the past
  36      header('Expires: Mon, 26 Jul 1997 05:00:00 GMT') ;
  37      // always modified
  38      header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT') ;
  39      // HTTP/1.1
  40      header('Cache-Control: no-store, no-cache, must-revalidate') ;
  41      header('Cache-Control: post-check=0, pre-check=0', false) ;
  42      // HTTP/1.0
  43      header('Pragma: no-cache') ;
  44  
  45      // Set the response format.
  46      header( 'Content-Type:text/xml; charset=utf-8' ) ;
  47  }
  48  
  49  function CreateXmlHeader( $command, $resourceType, $currentFolder )
  50  {
  51      SetXmlHeaders() ;
  52      
  53      // Create the XML document header.
  54      echo '<?xml version="1.0" encoding="utf-8" ?>' ;
  55  
  56      // Create the main "Connector" node.
  57      echo '<Connector command="' . $command . '" resourceType="' . $resourceType . '">' ;
  58      
  59      // Add the current folder node.
  60      echo '<CurrentFolder path="' . ConvertToXmlAttribute( $currentFolder ) . '" url="' . ConvertToXmlAttribute( GetUrlFromPath( $resourceType, $currentFolder ) ) . '" />' ;
  61  }
  62  
  63  function CreateXmlFooter()
  64  {
  65      echo '</Connector>' ;
  66  }
  67  
  68  function SendError( $number, $text )
  69  {
  70      SetXmlHeaders() ;
  71      
  72      // Create the XML document header
  73      echo '<?xml version="1.0" encoding="utf-8" ?>' ;
  74      
  75      echo '<Connector><Error number="' . $number . '" text="' . htmlspecialchars( $text ) . '" /></Connector>' ;
  76      
  77      exit ;
  78  }
  79  ?>


Généré le : Sun Feb 25 15:28:05 2007 par Balluche grâce à PHPXref 0.7