CMS  Version 3.9
export.inc
Go to the documentation of this file.
1 <?php
2 Fakoli::using("component");
3 
4 Fakoli::assertRole("admin");
5 
6 $file = $_REQUEST["export_file"];
7 if (!$file)
8 {
9  $file = codify($config["sitename"]."_".date("Ymd")).".xml";
10 }
11 
12 header("Pragma: private");
13 header("Content-Disposition: attachment;filename=\"" . $file . "\"");
14 header("Content-Type: text/xml");
15 
17 
18 $form = new SerializationForm("Export");
19 
20 $components = $form->getSelected();
21 trace("*** $components", 3);
22 
23 echo $form->mgr->export($components);
24 ?>
static using()
Import the datamodels, views and manifest for the specified component(s).
Definition: core.inc:116
static assertRole($role, $redirect="", $message="")
Assert that the user has one of the specified roles.
Definition: core.inc:297
SerializationForm implements the custom form used in the Fakoli admin section import and export pages...
SerializationManager handles import/export of DataItems via an XML file.
$form
Definition: export.inc:7
$components
Definition: export.inc:20
$mgr
Definition: export.inc:16
$file
Definition: export.inc:6
global $config
Definition: import.inc:4