2003-10-13 01:17:36 -04:00
|
|
|
|
2003-05-22 08:12:53 -04:00
|
|
|
<ul id="adminmenu">
|
2003-05-28 03:54:49 -04:00
|
|
|
<?php
|
2003-12-10 19:22:36 -05:00
|
|
|
$menu = file('./menu.txt');
|
2003-05-28 03:54:49 -04:00
|
|
|
$continue = true;
|
|
|
|
foreach ($menu as $item) {
|
|
|
|
$class = '';
|
|
|
|
$item = trim($item);
|
|
|
|
if ('***' == $item) $continue = false;
|
|
|
|
if ($continue) {
|
|
|
|
$item = explode("\t", $item);
|
|
|
|
// 0 = user level, 1 = file, 2 = name
|
2003-12-07 22:46:42 -05:00
|
|
|
$self = str_replace('/wp-admin/', '', $PHP_SELF);
|
2004-02-13 10:36:28 -05:00
|
|
|
if ((substr($self, -20) == substr($item[1], -20) && empty($parent_file)) || ($parent_file && ($item[1] == $parent_file))) $class = ' class="current"';
|
2004-02-05 09:28:02 -05:00
|
|
|
if ($user_level >= $item[0]) {
|
2004-03-01 01:13:32 -05:00
|
|
|
if (('upload.php' == $item[1] && get_settings('use_fileupload') && ($user_level >= get_settings('fileupload_minlevel'))
|
|
|
|
&& (in_array($user_login, explode(' ', $allowed_users)) || (trim(get_settings('fileupload_allowedusers'))==''))) || 'upload.php' != $item[1])
|
2004-02-05 09:28:02 -05:00
|
|
|
echo "\n\t<li><a href='{$item[1]}'$class>{$item[2]}</a></li>";
|
|
|
|
}
|
2003-05-22 08:12:53 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|
2004-02-26 11:15:48 -05:00
|
|
|
<li><a href="<?php echo get_settings('siteurl') . '/' . get_settings('blogfilename'); ?>" title="View your site">View site</a></li>
|
|
|
|
<li class="last"><a href="<?php echo get_settings('siteurl')
|
|
|
|
?>/wp-login.php?action=logout" title="Logout of this account">Logout (<?php echo stripslashes($user_nickname) ?>)</a></li>
|
2003-05-22 08:12:53 -04:00
|
|
|
</ul>
|