]> git.mxchange.org Git - friendica.git/blob - view/contact_selectors.php
icon changes
[friendica.git] / view / contact_selectors.php
1 <?php
2
3
4 function select_contact_profile($current) {
5
6         $o = '';
7         $o .= "<select id=\"contact_profile_selector\" name=\"profile_id\" />";
8
9         $r = q("SELECT `id` FROM `profile` WHERE `uid` = %d",
10                         intval($_SESSION['uid']));
11
12         if(count($r)) {
13                 foreach($r as $rr) {
14                         $selected = (($rr['profile-name'] == $current) ? " selected=\"selected\" " : "");
15                         $o .= "<option value=\"{$rr['profile-name']}\" $selected >{$rr['profile-name']}</option>";
16                 }
17         }
18         $o .= "</select>";
19         return $o;
20 }
21