From 7a9f00d7da76941374e79fa0c30306a9b134008b Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 29 Apr 2006 21:19:35 +0000 Subject: [PATCH] r773: Switch to using ISSO.Priner instead of includes/adminfunctions.php --- admin/global.php | 37 +++- includes/adminfunctions.php | 414 ------------------------------------ 2 files changed, 35 insertions(+), 416 deletions(-) delete mode 100755 includes/adminfunctions.php diff --git a/admin/global.php b/admin/global.php index 99680fd..bad4fac 100755 --- a/admin/global.php +++ b/admin/global.php @@ -59,8 +59,10 @@ $globalnav = array( // ################################################################### // continue loading -require_once('./includes/adminfunctions.php'); -$admin = new Admin_Print_Class(); +$bugsys->load('printer', 'admin', true); +$admin->set('realm', $lang->string('Administration')); +$admin->set('page_start_hook', 'nav_hook'); +$admin->css_link('admin.css'); // ################################################################### @@ -116,6 +118,37 @@ if (!$_COOKIE[COOKIE_PREFIX . 'adminsession']) admin_login(); } +// ################################################################### +// TEMPORARY NAVIGATION SYSTEM + +function nav_hook() +{ + global $globalnav, $bugsys; + + $location = parse_url($_SERVER['SCRIPT_URL']); + $location['path'] = preg_quote(end(explode('/', $location['path']))); + $location['path'] = ((!$location['path']) ? 'index.php' : $location['path']); + + echo "
\n"; + echo "\n\t
"; + echo "\n\t" . $bugsys->lang->string('Tracker Home') . ""; + echo "\n\t\t" . $bugsys->lang->string('Navigation') . ": "; + echo "\n\t\tlang->string('Go') . " \" class=\"button\" />"; + echo "\n\t
"; + echo "\n
"; +} + /*=====================================================================*\ || ################################################################### || # $HeadURL$ diff --git a/includes/adminfunctions.php b/includes/adminfunctions.php deleted file mode 100755 index 41f4cf9..0000000 --- a/includes/adminfunctions.php +++ /dev/null @@ -1,414 +0,0 @@ - - - -EOD; - - $this->page_start($bugsys->lang->string('Redirect'), ':default:', 15, $js); - - $this->page_message($bugsys->lang->string('Redirect'), sprintf($bugsys->lang->string('Please wait to be redirected. If you are not redirected in a few seconds, click here.'), $location)); - - $this->page_end(); - } - - function error($message) - { - global $bugsys; - - $this->page_start($bugsys->lang->string('Error')); - $this->page_message($bugsys->lang->string('Error'), $message); - $this->page_end(); - - exit; - } - - // ################################################################### - // ########################### PAGE CONTROL ########################## - // ################################################################### - function page_start($actiontitle, $pageclass = ':default:', $pagemargin = 15, $extra = '', $onload = false, $margin = 0, $dotpath = '.', $override = false) - { - global $bugsys; - - if (constant('DONE_HEADER') AND !$override) - { - return; - } - - $title = sprintf($bugsys->lang->string('Bugdar - Administration - %1$s'), $actiontitle); - - 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') AND $bugsys->userinfo['adminsession']) - { - global $globalnav; - - $location = parse_url($_SERVER['SCRIPT_URL']); - $location['path'] = preg_quote(end(explode('/', $location['path']))); - $location['path'] = ((!$location['path']) ? 'index.php' : $location['path']); - - echo "
\n"; - echo "\n\t
"; - echo "\n\t" . $bugsys->lang->string('Tracker Home') . ""; - echo "\n\t\t" . $bugsys->lang->string('Navigation') . ": "; - echo "\n\t\tlang->string('Go') . " \" class=\"button\" />"; - echo "\n\t
"; - echo "\n
"; - } - - echo "
\n\n\n"; - - if (!defined('DONE_HEADER')) - { - define('DONE_HEADER', 1); - } - } - - function page_code($code) - { - echo "\n\n$code\n\n"; - } - - function page_message($title, $message) - { - $this->table_start(true, '75%'); - $this->table_head($title, 1); - $this->row_span("
$message
", ':swap:', 'left', 1); - $this->table_end(); - } - - function page_confirm($message, $location) - { - global $bugsys; - - $this->page_start($bugsys->lang->string('Confirm')); - - $this->page_message($bugsys->lang->string('Confirm'), $message . '

'); - - $this->page_end(); - } - - function page_end() - { - global $bugsys; - - $copyright = "\n
\n

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

"; - - if (!defined('HIDE_SETUP')) - { - echo "\n\n
\n$copyright"; - } - else - { - echo "\n\n"; - } - - echo "\n\n\n"; - - exit; - } - - // ################################################################### - // ##################### TABLE SKELETON RENDERING #################### - // ################################################################### - function table_start($break = true, $width = '90%') - { - if ($break) - { - echo '
'; - } - - echo "\n\n"; - } - - function table_head($title, $colspan = 2, $help = null) - { - global $edoc; - $title = ($help ? "$title" : $title); - $help = ($help ? "Help" : ''); - echo "\n\t\n\n"; - } - - function table_column_head($columnarray) - { - if (is_array($columnarray)) - { - $render = "\n"; - - foreach ($columnarray AS $header) - { - $render .= "\t\n"; - } - - $render .= "\n"; - - echo $render; - } - } - - function table_end() - { - echo "\n
$help$title
$header
\n"; - } - - // ################################################################### - // ########################## FORM CREATION ########################## - // ################################################################### - function form_start($action, $do, $enctype = false, $name = 'inputform', $submitmethod = 'post') - { - echo "\n\n
\n"; - $this->form_hidden_field('do', $do); - } - - function form_hidden_field($name, $value) - { - echo "\n"; - } - - function form_end() - { - echo "
\n\n"; - } - - // ################################################################### - // ####################### TABLE ROW RENDERING ####################### - // ################################################################### - function row_span($text, $class = ':swap:', $align = 'left', $colspan = 2) - { - global $bugsys; - if ($class === ':swap:') - { - $bugsys->funct->exec_swap_bg(); - $row_class = $bugsys->funct->bgcolour; - $is_style_element = false; - } - else - { - if (preg_match('#:style:(.*?)#i', $class)) - { - $is_style_element = true; - $style = str_replace(':style:', '', $class); - } - else - { - $row_class = $class; - $is_style_element = false; - } - } - - echo "\n\t$text\n"; - } - - function row_multi_item($row_array) - { - global $bugsys; - $bugsys->funct->exec_swap_bg(); - - foreach ($row_array AS $item => $align) - { - $row_data["$align"][] = $item; - } - - echo ""; - - foreach ($row_data AS $align_key => $item_array) - { - if ($align_key == 'c') - { - $align = 'center'; - } - else if ($align_key == 'l') - { - $align = 'left'; - } - else if ($align_key == 'r') - { - $align = 'right'; - } - - foreach ($item_array AS $value) - { - echo "\n\tfunct->bgcolour}\" align=\"$align\">$value"; - } - } - - echo "\n\n"; - } - - function row_text($label, $value = ' ', $valign = 'top', $colspan = 2, $class = -1) - { - global $bugsys, $IS_SETTINGS; - - if ($class == -1) - { - if (!$IS_SETTINGS) - { - $bugsys->funct->exec_swap_bg(); - $row_class = $bugsys->funct->bgcolour; - } - else - { - $row_class = 'alt2'; - } - } - else - { - $row_class = $class; - } - - echo ""; - echo "\n\t$label"; - echo "\n\t$value"; - - if ($colspan > 2) - { - echo "\n\t "; - } - - echo "\n\n"; - } - - function row_input($label, $name, $value = '', $colspan = 2, $size = 35, $length = false, $password = false, $lalign = 'top') - { - $this->row_text($label, "", $lalign, $colspan); - } - - function row_textarea($label, $name, $value = '', $colspan = 2, $rows = 7, $cols = 50, $code = false, $style = '') - { - $this->row_text($label, "", 'top', $colspan); - } - - function row_tfoot($data, $colspan = 2) - { - echo $this->row_span($data, 'tfoot', 'center'); - } - - function row_submit($extra = false, $submit = ':save:', $reset = ':reset:', $colspan = 2) - { - global $bugsys; - - if ($submit === ':save:') - { - $submit = " " . $bugsys->lang->string('Submit') . " "; - } - else - { - $submit = " $submit "; - } - - if ($reset === ':reset:') - { - $reset = " " . $bugsys->lang->string('Reset') . " "; - } - else - { - $reset = (($reset) ? " $reset " : ''); - } - - $output = "\n\t\t"; - $output .= (($reset) ? "\n\t\t $extra\n\t" : $extra); - $this->row_tfoot($output); - } - - function row_upload($label, $name, $colspan = 2) - { - $this->row_text($label, "", 'top', $colspan); - } - - function list_item($name, $value, $selected = false) - { - global $listitem; - - $listitem[] = "\n\t"; - } - - function row_list($label, $name, $is_jump = false, $colspan = 2) - { - global $listitem; - - foreach ($listitem AS $option) - { - $optionlist .= $option; - } - - $listitem = ''; - - $this->row_text($label, "\n" . (($is_jump) ? "\nlang->string('Go') . " \" accesskey=\"g\" />" : '') . "\n", $colspan); - } - - function row_yesno($label, $name, $value, $colspan = 2) - { - global $bugsys; - - $this->row_text($label, " " . $bugsys->lang->string('Yes') . " " . $bugsys->lang->string('No'), $colspan); - } -} - -/*=====================================================================*\ -|| ################################################################### -|| # $HeadURL$ -|| # $Id$ -|| ################################################################### -\*=====================================================================*/ -?> \ No newline at end of file -- 2.43.5