blob: 186a50e7af4da7b1ca46506e60ba6475445a2960 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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;
}
|