aboutsummaryrefslogtreecommitdiffstats
path: root/view/contact_selectors.php
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-07-01 16:48:07 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-07-01 16:48:07 -0700
commit6348e70daa113e8b3203de8fbc919d08c90d972e (patch)
tree1bc3dd3bc85fe6136411086785cf6753960e22f9 /view/contact_selectors.php
downloadvolse-hubzilla-6348e70daa113e8b3203de8fbc919d08c90d972e.tar.gz
volse-hubzilla-6348e70daa113e8b3203de8fbc919d08c90d972e.tar.bz2
volse-hubzilla-6348e70daa113e8b3203de8fbc919d08c90d972e.zip
Initial checkin
Diffstat (limited to 'view/contact_selectors.php')
-rw-r--r--view/contact_selectors.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/view/contact_selectors.php b/view/contact_selectors.php
new file mode 100644
index 000000000..186a50e7a
--- /dev/null
+++ b/view/contact_selectors.php
@@ -0,0 +1,21 @@
+<?php
+
+
+function select_contact_profile($current) {
+
+ $o = '';
+ $o .= "<select id=\"contact_profile_selector\" name=\"profile_id\" />";
+
+ $r = q("SELECT `id` FROM `profile` WHERE `uid` = %d",
+ intval($_SESSION['uid']));
+
+ if(count($r)) {
+ foreach($r as $rr) {
+ $selected = (($rr['profile-name'] == $current) ? " selected=\"selected\" " : "");
+ $o .= "<option value=\"{$rr['profile-name']}\" $selected >{$rr['profile-name']}</option>";
+ }
+ }
+ $o .= "</select>";
+ return $o;
+}
+