$file, 'name' => l10n('module_name_' . strtolower($file)), 'description' => l10n('module_desc_' . strtolower($file))); } } } closedir($dir); uasort($modules, 'name_compare'); return $modules; } function get_html_groups_selection( $groups, $fieldname, $selecteds = array() ) { global $conf; if (count ($groups) == 0 ) { return ''; } $output = '
'; $id = 1; foreach ($groups as $group) { $output.= '' ."\n" ; } $output.= '
'; return $output; } function get_all_groups() { $query = ' SELECT id, name FROM '.GROUPS_TABLE.' ORDER BY name ASC ;'; $result = pwg_query($query); $groups = array(); while ($row = mysql_fetch_assoc($result)) { array_push($groups, $row); } uasort($groups, 'name_compare'); return $groups; } ?>