EOD; $this->page_start(lang::p('redirect'), ':default:', 15, $js); $this->page_message(lang::p('redirect'), lang::p('wait_to_be_redirected', $location)); $this->page_end(); } function error($message) { $this->page_start(lang::p('error')); $this->page_message(lang::p('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 = 'BugStrike - ' . lang::p('administration_x', $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\tTracker Home"; echo "\n\t\tNavigation: "; echo "\n\t\t"; 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) { $this->page_start(lang::p('confirm')); $this->page_message(lang::p('confirm'), $message . '

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

\n\tBugStrike " . $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, $strong = true) { 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
" . (($strong) ? "$title" : $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) { if ($submit === ':save:') { $submit = " " . lang::p('submit') . " "; } else { $submit = " $submit "; } if ($reset === ':reset:') { $reset = " " . lang::p('reset') . " "; } else { $reset = (($reset) ? " $reset " : ''); } $output = "\n\t\t"; $output .= (($reset) ? "\n\t\t $extra\n\t" : ''); $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) ? "\n" : '') . "\n", $colspan); } function row_yesno($label, $name, $value, $colspan = 2) { $this->row_text($label, " " . lang::p('yes') . " " . lang::p('no'), $colspan); } } /*=====================================================================*\ || ################################################################### || # $HeadURL$ || # $Id$ || ################################################################### \*=====================================================================*/ ?>