/** * Returns CFs listing for some login * * @param string $login Existing user login * * @return string */ function cf_FieldShower($login) { $alltypes = cf_TypeGetAll(); $login = mysql_real_escape_string($login); $result = ''; if (!empty($alltypes)) { $rows = ''; foreach ($alltypes as $io => $eachtype) { $cells = wf_TableCell($eachtype['name'], '30%', 'row2'); $cells .= wf_TableCell(cf_FieldDisplay($eachtype['type'], cf_FieldGet($login, $eachtype['id'])), '', 'row3'); $rows .= wf_TableRow($cells); } $result = wf_TableBody($rows, '100%', 0, ''); } return $result; }
/** * Returns custom fields search form * * @return string */ function web_UserSearchCFForm() { $allcftypes = cf_TypeGetAll(); $cfsearchform = wf_tag('h3') . __('Additional profile fields') . wf_tag('h3', true); if (!empty($allcftypes)) { foreach ($allcftypes as $io => $eachtype) { $cfsearchform .= $eachtype['name'] . ' ' . cf_TypeGetSearchControl($eachtype['type'], $eachtype['id']); } } else { $cfsearchform = ''; } return $cfsearchform; }