aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Update_cards.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-08-23 21:26:09 -0700
committerzotlabs <mike@macgirvin.com>2017-08-23 21:26:09 -0700
commit4450170790de3999dc9c6f8876074e76edee8241 (patch)
tree556fccb00499add4268566956541692db68606f2 /Zotlabs/Module/Update_cards.php
parent66b032823b4fd941f613b0194bb8412b216cc748 (diff)
downloadvolse-hubzilla-4450170790de3999dc9c6f8876074e76edee8241.tar.gz
volse-hubzilla-4450170790de3999dc9c6f8876074e76edee8241.tar.bz2
volse-hubzilla-4450170790de3999dc9c6f8876074e76edee8241.zip
partial support (unfinished) for ajax loading cards with liveupdate; page still functions even though this isn't finished
Diffstat (limited to 'Zotlabs/Module/Update_cards.php')
-rw-r--r--Zotlabs/Module/Update_cards.php39
1 files changed, 39 insertions, 0 deletions
diff --git a/Zotlabs/Module/Update_cards.php b/Zotlabs/Module/Update_cards.php
new file mode 100644
index 000000000..bb87357e8
--- /dev/null
+++ b/Zotlabs/Module/Update_cards.php
@@ -0,0 +1,39 @@
+<?php
+
+namespace Zotlabs\Module;
+
+/**
+ * Module: update_profile
+ * Purpose: AJAX synchronisation of profile page
+ *
+ */
+
+
+class Update_cards extends \Zotlabs\Web\Controller {
+
+function get() {
+
+ $profile_uid = intval($_GET['p']);
+ $load = (((argc() > 1) && (argv(1) == 'load')) ? 1 : 0);
+
+ header("Content-type: text/html");
+ echo "<!DOCTYPE html><html><body><section></section></body></html>\r\n";
+
+ killme();
+
+
+ $mod = new Cards();
+
+ $text = $mod->get($profile_uid,$load);
+
+ /**
+ * reportedly some versions of MSIE don't handle tabs in XMLHttpRequest documents very well
+ */
+
+ echo str_replace("\t",' ',$text);
+ echo (($_GET['msie'] == 1) ? '</div>' : '</section>');
+ echo "</body></html>\r\n";
+ killme();
+
+}
+}