mirror of
https://github.com/friendica/friendica
synced 2024-11-17 23:43:40 +00:00
21 lines
519 B
PHP
21 lines
519 B
PHP
<?php
|
|
|
|
|
|
function contact_profile_assign($current) {
|
|
|
|
$o = '';
|
|
$o .= "<select id=\"contact_profile_selector\" name=\"profile_assign\" />";
|
|
|
|
$r = q("SELECT `profile-name` 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;
|
|
}
|
|
|