diff options
-rw-r--r-- | mod/exporttest/index.php | 21 | ||||
-rw-r--r-- | mod/exporttest/start.php | 15 | ||||
-rw-r--r-- | mod/exporttest/views/default/exporttest/main.php | 4 | ||||
-rw-r--r-- | mod/exporttest/views/default/exporttest/outputxml.php | 5 |
4 files changed, 45 insertions, 0 deletions
diff --git a/mod/exporttest/index.php b/mod/exporttest/index.php new file mode 100644 index 000000000..0a4aea8cd --- /dev/null +++ b/mod/exporttest/index.php @@ -0,0 +1,21 @@ +<?php + require_once("../../engine/start.php"); + + global $CONFIG; + + $guid = get_input("guid"); + $_SESSION['id'] = 2; + + // Get the user + $owner_id = page_owner(); + + if ($guid) + { + echo elgg_view("exporttest/outputxml", array("xml" => export($guid))); + } + else + { + $body = elgg_view("exporttest/main", array("owner_id" => $owner_id)); + page_draw("Export a GUID",$body); + } +?>
\ No newline at end of file diff --git a/mod/exporttest/start.php b/mod/exporttest/start.php new file mode 100644 index 000000000..d25e5c06d --- /dev/null +++ b/mod/exporttest/start.php @@ -0,0 +1,15 @@ +<?php + + function exporttest_init($event, $object_type, $object = null) { + + global $CONFIG; + + add_menu("Export GUID",$CONFIG->wwwroot . "mod/exporttest/",array( + menu_item("The GUID Exporter",$CONFIG->wwwroot."mod/exporttest/"), + )); + } + + + // Make sure test_init is called on initialisation + register_event_handler('init','system','exporttest_init'); +?>
\ No newline at end of file diff --git a/mod/exporttest/views/default/exporttest/main.php b/mod/exporttest/views/default/exporttest/main.php new file mode 100644 index 000000000..0d24df3fe --- /dev/null +++ b/mod/exporttest/views/default/exporttest/main.php @@ -0,0 +1,4 @@ +<form> + <input type="hidden" name="owner_id" value="<?php echo $vars['owner_id']; ?>" /> + GUID : <input type="text" value="" name="guid" /> <input type="submit" name="export" value="export" /> +</form>
\ No newline at end of file diff --git a/mod/exporttest/views/default/exporttest/outputxml.php b/mod/exporttest/views/default/exporttest/outputxml.php new file mode 100644 index 000000000..1442aa3f1 --- /dev/null +++ b/mod/exporttest/views/default/exporttest/outputxml.php @@ -0,0 +1,5 @@ +<?php + header("Content-type: text/xml"); + + echo $vars['xml']; +?>
\ No newline at end of file |