aboutsummaryrefslogtreecommitdiff
path: root/mod/exporttest/index.php
blob: 923c4c2199be9803544b058921c9b1579fa19370 (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
<?php
	require_once("../../engine/start.php");
	
	global $CONFIG;
	
	$guid = get_input("guid");
	$action = get_input("action");
	$_SESSION['id'] = 2;
	
	// Get the user
	$owner_id = page_owner();
	
	if ($guid)
	{
		echo elgg_view("exporttest/outputxml", array("xml" => export($guid)));
	}
	else if ($action=='import')
	{
		$body = import(get_input('xml'));
		$body .= elgg_view("exporttest/main", array("owner_id" => $owner_id));
		page_draw("Import results",$body);
	}
	else
	{
		$body = elgg_view("exporttest/main", array("owner_id" => $owner_id));
		page_draw("Export a GUID",$body);
	}
?>