Platform  3.1
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
viewxml.php
Go to the documentation of this file.
1 <?php
2 /*
3  * @author Anakeen
4  * @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
5  * @package FDL
6 */
7 /**
8  * Generated Header (not documented yet)
9  *
10  * @author Anakeen 2000
11  * @version $Id: viewxml.php,v 1.4 2005/06/28 08:37:46 eric Exp $
12  * @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
13  * @package FDL
14  * @subpackage
15  */
16 /**
17  */
18 // ---------------------------------------------------------------
19 // $Id: viewxml.php,v 1.4 2005/06/28 08:37:46 eric Exp $
20 // $Source: /home/cvsroot/anakeen/freedom/freedom/Action/Fdl/viewxml.php,v $
21 // ---------------------------------------------------------------
22 
23 include_once ("FDL/Class.Doc.php");
24 // -----------------------------------
25 function viewxml(&$action)
26 {
27  // -----------------------------------
28 
29  // Get all the params
30  $docid = GetHttpVars("id"); // dccument to export
31  $dbaccess = $action->GetParam("FREEDOM_DB");
32 
34  $xml = $doc->toxml(true, $docid);
35  //$doc->fromxml($xml);
36  //$xml=$doc->viewdtd();
37 
38  $export_file = uniqid(getTmpDir() . "/xml");
39  $export_file.= ".xml";
40  $fp = fopen($export_file, "w");
41 
42  fwrite($fp, $xml);
43  fclose($fp);
44  //http_DownloadFile($export_file,chop($doc->title).".xml","text/dtd");
45  http_DownloadFile($export_file, str_replace(" ", "_", chop($doc->title)) . ".xml", "text/xml");
46 
47  unlink($export_file);
48  exit;
49 }
50 ?>
← centre documentaire © anakeen - published under CC License - Dynacase