1
0
Fork 0
friendica_2020-09-1_sharedH.../view/contact_selectors.php
Mike Macgirvin 1ea69ae275 bizzy
2010-07-06 05:07:28 -07:00

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;
}