From 2a42292f9e1c85596a353868033fba62998ee35e Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Wed, 11 May 2005 14:56:10 +0000 Subject: [PATCH] r105: Added some kind of navigation.. no idea if it works or not, though. --- admin/global.php | 24 +++++++++++ includes/adminfunctions.php | 84 ++++++++++++++++++++++--------------- 2 files changed, 74 insertions(+), 34 deletions(-) diff --git a/admin/global.php b/admin/global.php index e594b96..7224668 100755 --- a/admin/global.php +++ b/admin/global.php @@ -15,6 +15,30 @@ chdir('./../'); require_once('./includes/init.php'); require_once('./includes/functions.php'); +// ################################################################### +// admin navigation + +$globalnav = array( + 'Options' => array( + 'BugStrike Options' => 'options.php' + ), + + 'Bug Fields' => array( + 'Products / Versions / Components' => 'product.php', + 'Priorities' => 'priority.php', + 'Resolutions' => 'resolution.php', + 'Severities' => 'severity.php', + 'Statuses' => 'status.php' + ), + + 'User Management' => array( + 'Usergroups' => 'usergroup.php' + ) +); + +// ################################################################### +// continue loading + require_once('./includes/adminfunctions.php'); $admin = new Admin_Print_Class(); diff --git a/includes/adminfunctions.php b/includes/adminfunctions.php index 5544045..cdff5a5 100755 --- a/includes/adminfunctions.php +++ b/includes/adminfunctions.php @@ -62,23 +62,39 @@ EOD; { $title = 'BugStrike - ' . phrase('administration_x', $actiontitle); - echo "\r"; - echo "\r"; - echo "\r\t$title"; - echo "\r\t"; - echo "\r\t" . (($extra) ? "\r$extra" : ''); + echo "\n"; + echo "\n"; + echo "\n\t$title"; + echo "\n\t"; + echo "\n\t" . (($extra) ? "\n$extra" : ''); + echo "\n\n\n"; + if (!defined('HIDE_SETUP')) { - echo "\r\t"; + global $globalnav; + + echo "
\n"; + echo "\n\t
"; + + foreach ($globalnav AS $grouptitle => $links) + { + echo "\n\t\t"; + } + echo "\n\t
"; + echo "\n
"; } - echo "\r\r\r"; - - echo "
\r\r\r"; + + echo "
\n\n\n"; } function page_code($code) { - echo "\r\r$code\r\r"; + echo "\n\n$code\n\n"; } function page_message($title, $message) @@ -102,18 +118,18 @@ EOD; { global $bugsys; - $copyright = "\r
\r

\r\tBugStrike " . $bugsys->options['trackerversion'] . ", © 2002 - " . date('Y') . " Iris Studios, Inc.\r

"; + $copyright = "\n
\n

\n\tBugStrike " . $bugsys->options['trackerversion'] . ", © 2002 - " . date('Y') . " Iris Studios, Inc.\n

"; if (!defined('HIDE_SETUP')) { - echo "\r\r
\r$copyright"; + echo "\n\n
\n$copyright"; } else { - echo "\r\r"; + echo "\n\n"; } - echo "\r\r\r"; + echo "\n\n\n"; exit; } @@ -128,26 +144,26 @@ EOD; echo '
'; } - echo "\r\r"; + echo "\n
\n"; } function table_head($title, $colspan = 2, $strong = true) { - echo "\r\t\r\r"; + echo "\n\t\n\n"; } function table_column_head($columnarray) { if (is_array($columnarray)) { - $render = "\r"; + $render = "\n"; foreach ($columnarray AS $header) { - $render .= "\t\r"; + $render .= "\t\n"; } - $render .= "\r"; + $render .= "\n"; echo $render; } @@ -155,7 +171,7 @@ EOD; function table_end() { - echo "\r
" . (($strong) ? "$title" : $title) . "
" . (($strong) ? "$title" : $title) . "
$header$header
\r"; + echo "\n\n"; } // ################################################################### @@ -163,18 +179,18 @@ EOD; // ################################################################### function form_start($action, $do, $enctype = false, $name = 'inputform', $submitmethod = 'post') { - echo "\r\r
\r"; + echo "\n\n\n"; $this->form_hidden_field('do', $do); } function form_hidden_field($name, $value) { - echo "\r"; + echo "\n"; } function form_end() { - echo "
\r\r"; + echo "\n\n"; } // ################################################################### @@ -203,7 +219,7 @@ EOD; } } - echo "\r\t$text\r"; + echo "\n\t$text\n"; } function row_multi_item($row_array) @@ -235,11 +251,11 @@ EOD; foreach ($item_array AS $value) { - echo "\r\tfunct->bgcolour}\" align=\"$align\">$value"; + echo "\n\tfunct->bgcolour}\" align=\"$align\">$value"; } } - echo "\r\r"; + echo "\n\n"; } function row_text($label, $value = ' ', $valign = 'top', $colspan = 2, $class = -1) @@ -264,15 +280,15 @@ EOD; } echo ""; - echo "\r\t$label"; - echo "\r\t$value"; + echo "\n\t$label"; + echo "\n\t$value"; if ($colspan > 2) { - echo "\r\t "; + echo "\n\t "; } - echo "\r\r"; + echo "\n\n"; } function row_input($label, $name, $value = '', $colspan = 2, $size = 35, $length = false, $password = false, $lalign = 'top') @@ -310,8 +326,8 @@ EOD; $reset = (($reset) ? " $reset " : ''); } - $output = "\r\t\t"; - $output .= (($reset) ? "\r\t\t $extra\r\t" : ''); + $output = "\n\t\t"; + $output .= (($reset) ? "\n\t\t $extra\n\t" : ''); $this->row_tfoot($output); } @@ -324,7 +340,7 @@ EOD; { global $listitem; - $listitem[] = "\r\t"; + $listitem[] = "\n\t"; } function row_list($label, $name, $is_jump = true, $colspan = 2) @@ -338,7 +354,7 @@ EOD; $listitem = ''; - $this->row_text($label, "\r" . (($is_jump) ? "\r" : '') . "\r", $colspan); + $this->row_text($label, "\n" . (($is_jump) ? "\n" : '') . "\n", $colspan); } function row_yesno($label, $name, $value, $colspan = 2) -- 2.43.5