mirror of
https://github.com/friendica/friendica
synced 2024-12-23 01:20:16 +00:00
21 lines
505 B
PHP
21 lines
505 B
PHP
<?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;
|
|
}
|
|
|