get_results("SELECT group_id, group_name, group_desc, group_longdesc FROM $tableoptiongroups ORDER BY group_id");
foreach ($option_groups as $option_group) {
if ($option_group->group_id == $option_group_id) {
$current_desc = $option_group->group_desc;
$current_long_desc = $option_group->group_longdesc;
$groups .= "
{$option_group->group_name}\n";
} else {
$groups .= "{$option_group->group_name}\n";
}
}
$submenu = '
';
$sublines = split("\n", $submenu);
$_SERVER['REQUEST_URI'] = str_replace('?updated=true', '', $_SERVER['REQUEST_URI']);
foreach ($sublines as $subline) {
preg_match('/href="([^"]+)"/', $subline, $url);
if (substr($_SERVER['REQUEST_URI'], -8) == substr($url[1], -8)) {
$subline = str_replace('a hr', 'a class="current" hr', $subline);
if (str_replace('/wp-admin/', '', $_SERVER["REQUEST_URI"]) == $url[1]) {
$subline = preg_replace('|href=".*?"|', '', $subline);
}
}
echo $subline."\n";
}
?>