2004-04-11 10:15:10 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
if ($user_level <= 6) {
|
2004-04-25 04:03:32 +02:00
|
|
|
die(__("You have do not have sufficient permissions to edit the options for this blog."));
|
2004-04-11 10:15:10 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
//we need to iterate through the available option groups.
|
|
|
|
$option_groups = $wpdb->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 .= "<li><a class='current' title='{$option_group->group_desc}'>{$option_group->group_name}</a></li>\n";
|
|
|
|
} else {
|
|
|
|
$groups .= "<li><a href='options.php?option_group_id={$option_group->group_id}' title='{$option_group->group_desc}'>{$option_group->group_name}</a></li>\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-04-25 04:03:32 +02:00
|
|
|
$submenu = '
|
2004-04-11 10:15:10 +02:00
|
|
|
<ul id="adminmenu2">
|
2004-04-25 04:03:32 +02:00
|
|
|
<li><a href="options-general.php">' . __('General') . '</a></li>
|
|
|
|
<li><a href="options-writing.php">' . __('Writing') . '</a></li>
|
|
|
|
<li><a href="options-reading.php">' . __('Reading') . '</a></li>
|
|
|
|
<li><a href="options-discussion.php">' . __('Discussion') . '</a></li>
|
|
|
|
<li><a href="options-misc.php">' . __('Miscellaneous') . '</a></li>
|
2004-04-28 02:12:59 +02:00
|
|
|
<li><a href="options-permalink.php">' . __('Permalinks') . '</a></li>';
|
2004-04-11 10:15:10 +02:00
|
|
|
|
|
|
|
$sublines = split("\n", $submenu);
|
2004-04-19 10:09:27 +02:00
|
|
|
$_SERVER['REQUEST_URI'] = str_replace('?updated=true', '', $_SERVER['REQUEST_URI']);
|
2004-04-11 10:15:10 +02:00
|
|
|
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);
|
2004-04-15 09:53:45 +02:00
|
|
|
if (str_replace('/wp-admin/', '', $_SERVER["REQUEST_URI"]) == $url[1]) {
|
2004-04-11 10:15:10 +02:00
|
|
|
$subline = preg_replace('|href=".*?"|', '', $subline);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
echo $subline."\n";
|
|
|
|
}
|
2004-04-28 02:12:59 +02:00
|
|
|
echo $groups .
|
|
|
|
'</ul>';
|
2004-04-11 10:15:10 +02:00
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
|
|
<br clear="all" />
|
|
|
|
|
|
|
|
<?php if ($updated) : ?>
|
2004-04-25 04:03:32 +02:00
|
|
|
<div class="updated"><p><strong><?php _e('Options saved.') ?></strong></p></div>
|
2004-04-11 10:15:10 +02:00
|
|
|
<?php endif; ?>
|