\r\n"; $r = q("SELECT * FROM `group` WHERE `uid` = %d ORDER BY `name` ASC", $_SESSION['uid'] ); if(count($r)) { foreach($r as $rr) { if((is_array($preselected)) && in_array($rr['name'], $preselected)) $selected = " selected=\"selected\" "; else $selected = ''; $o .= "\r\n"; } } $o .= "\r\n"; return $o; } function contact_select($selname,$selclass,$preselected = false) { $o = ''; $o .= "\r\n"; $r = q("SELECT `id`, `name` FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 ORDER BY `name` ASC ", $_SESSION['uid'] ); if(count($r)) { foreach($r as $rr) { if((is_array($preselected)) && in_array($rr['id'], $preselected)) $selected = " selected=\"selected\" "; else $selected = ''; $o .= "\r\n"; } } $o .= "\r\n"; return $o; } function populate_acl() { $o = ''; $o .= "