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
16
$mgr
=
new
SerializationManager
();
17
18
$form
=
new
SerializationForm
(
"Export"
);
19
20
$components
=
$form
->getSelected();
21
trace(
"*** $components"
, 3);
22
23
echo
$form
->mgr->export(
$components
);
24
?>
Fakoli\using
static using()
Import the datamodels, views and manifest for the specified component(s).
Definition:
core.inc:116
Fakoli\assertRole
static assertRole($role, $redirect="", $message="")
Assert that the user has one of the specified roles.
Definition:
core.inc:297
SerializationForm
SerializationForm implements the custom form used in the Fakoli admin section import and export pages...
Definition:
serialization_manager.inc:322
SerializationManager
SerializationManager handles import/export of DataItems via an XML file.
Definition:
serialization_manager.inc:48
$form
$form
Definition:
export.inc:7
$components
$components
Definition:
export.inc:20
$mgr
$mgr
Definition:
export.inc:16
$file
$file
Definition:
export.inc:6
$config
global $config
Definition:
import.inc:4
code
cms.sonjara.com
cms
components
component
handlers
export.inc
Generated on Tue Mar 23 2021 15:36:12 for CMS by
1.9.1