From 038e7c892376f51f81a2b9769a5a0b69cc17571a Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 5 Nov 2014 18:39:10 -0800 Subject: crude skeleton for location manager and the UI sucks but at least it's on a webpage and you don't have to do it by hand. --- mod/locs.php | 70 ++++++++++++++++++++++++++++++++++++------------------------ 1 file changed, 42 insertions(+), 28 deletions(-) (limited to 'mod/locs.php') diff --git a/mod/locs.php b/mod/locs.php index 95aa7a579..b707f6bd9 100644 --- a/mod/locs.php +++ b/mod/locs.php @@ -1,34 +1,6 @@ get_channel(); + + $r = q("select * from hubloc where hubloc_hash = '%s'", + dbesc($channel['channel_hash']) + ); + + if(! $r) { + notice( t('No locations found.') . EOL); + return; + } + + + for($x = 0; $x < count($r); $x ++) { + $r[$x]['primary'] = (($r[$x]['hubloc_flags'] & HUBLOC_FLAGS_PRIMARY) ? true : false); + $r[$x]['deleted'] = (($r[$x]['hubloc_flags'] & HUBLOC_FLAGS_DELETED) ? true : false); + } + + + + $o = replace_macros(get_markup_template('locmanage.tpl'), array( + '$header' => t('Manage Channel Locations'), + '$loc' => t('Location (address)'), + '$mkprm' => t('Primary Location'), + '$drop' => t('Drop location'), + '$submit' => t('Submit'), + '$hubs' => $r + )); + + return $o; } \ No newline at end of file -- cgit v1.2.3