blob: f3010d971a864ffd4fc6d20fee3cce9ada963223 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
<?php
/**
* Elgg export test
*
* @package ElggDevTools
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
* @author Marcus Povey <marcus@marcus-povey.co.uk>
* @copyright Curverider Ltd 2008
* @link http://elgg.com/
*/
require_once("../../engine/start.php");
global $CONFIG;
$guid = get_input("guid");
$action = get_input("action");
// Get the user
$owner_id = page_owner();
if ($guid)
{
echo elgg_view_layout("one_column", elgg_view("exporttest/outputxml", array("xml" => export($guid))));
}
else if ($action=='import')
{
$area1 = print_r(import(get_input('xml')), true);
$area1 .= elgg_view("exporttest/main", array("owner_id" => $owner_id));
$body = elgg_view_layout("one_column", $area1);
page_draw("Import results",$body);
}
else
{
$body = elgg_view_layout("one_column", elgg_view("exporttest/main", array("owner_id" => $owner_id)));
page_draw("Export a GUID",$body);
}
?>
|