mirror of
https://github.com/friendica/friendica
synced 2024-12-22 23:20:16 +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;
|
|
}
|
|
|