'; } return "" . $temp . ""; } function verifyparam_groupid($paramid) { global $settings, $errors; $groupid = ""; if ($settings['enablegroups'] == '1') { $groupid = verifyparam($paramid, "/^\d{0,8}$/", ""); if ($groupid) { $group = group_by_id($groupid); if (!$group) { $errors[] = getlocal("page.group.no_such"); $groupid = ""; } } } return $groupid; } function get_groups_list() { global $settings; $result = array(); if ($settings['enablegroups'] == '1') { $link = connect(); $allgroups = get_all_groups($link); close_connection($link); $result[] = array('groupid' => '', 'vclocalname' => getlocal("page.gen_button.default_group")); foreach ($allgroups as $g) { $result[] = $g; } } return $result; } function get_image_locales_map($localesdir) { $imageLocales = array(); $allLocales = get_available_locales(); foreach ($allLocales as $curr) { $imagesDir = "$localesdir/$curr/button"; if ($handle = @opendir($imagesDir)) { while (false !== ($file = readdir($handle))) { if (preg_match("/^(\w+)_on.gif$/", $file, $matches) && is_file("$imagesDir/" . $matches[1] . "_off.gif")) { $image = $matches[1]; if (!isset($imageLocales[$image])) { $imageLocales[$image] = array(); } $imageLocales[$image][] = $curr; } } closedir($handle); } } return $imageLocales; } ?>