EOD; $this->page_start(phrase('redirect'), ':default:', 15, $js); $this->page_message(phrase('redirect'), phrase('wait_to_be_redirected', $location)); $this->page_end(); } function error($message) { $this->page_start(phrase('error')); $this->page_message(phrase('Error'), $message); $this->page_end(); exit; } // ################################################################### // ########################### PAGE CONTROL ########################## // ################################################################### function page_start($actiontitle, $pageclass = ':default:', $pagemargin = 15, $extra = '', $onload = false, $margin = 0, $dotpath = '.') { $title = 'BugStrike - ' . phrase('administration_x', $actiontitle); echo "\r"; echo "\r"; echo "\r\t$title"; echo "\r\t"; echo "\r\t" . (($extra) ? "\r$extra" : ''); if (!defined('HIDE_SETUP')) { echo "\r\t"; } echo "\r\r\r"; echo "
\r\r\r"; } function page_code($code) { echo "\r\r$code\r\r"; } 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(phrase('confirm')); $this->page_message(phrase('confirm'), $message . '

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

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

"; if (!defined('HIDE_SETUP')) { echo "\r\r
\r$copyright"; } else { echo "\r\r"; } echo "\r\r\r"; exit; } // ################################################################### // ##################### TABLE SKELETON RENDERING #################### // ################################################################### function table_start($break = true, $width = '90%') { if ($break) { echo '
'; } echo "\r\r"; } function table_head($title, $colspan = 2, $strong = true) { echo "\r\t\r\r"; } function table_column_head($columnarray) { if (is_array($columnarray)) { $render = "\r"; foreach ($columnarray AS $header) { $render .= "\t\r"; } $render .= "\r"; echo $render; } } function table_end() { echo "\r
" . (($strong) ? "$title" : $title) . "
$header
\r"; } // ################################################################### // ########################## FORM CREATION ########################## // ################################################################### function form_start($action, $do, $enctype = false, $name = 'inputform', $submitmethod = 'post') { echo "\r\r
\r"; $this->form_hidden_field('do', $do); } function form_hidden_field($name, $value) { echo "\r"; } function form_end() { echo "
\r\r"; } // ################################################################### // ####################### TABLE ROW RENDERING ####################### // ################################################################### function row_span($text, $class = ':swap:', $align = 'left', $colspan = 2) { global $bugsys; if ($class === ':swap:') { $bugsys->funt->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 "\r\t$text\r"; } 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 "\r\tfunct->bgcolour}\" align=\"$align\">$value"; } } echo "\r\r"; } 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(); } else { $row_class = 'alt2'; } } else { $row_class = $class; } echo ""; echo "\r\tfunct->bgcolour}\">$label"; echo "\r\tfunct->bgcolour}\">$value"; if ($colspan > 2) { echo "\r\tfunct->bgcolour}\" colspan=\"" . $colspan - 2 . "\"> "; } echo "\r\r"; } 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 = " " . phrase('submit') . " "; } else { $submit = " $submit "; } if ($reset === ':reset:') { $reset = " " . phrase('reset') . " "; } else { $reset = (($reset) ? " $reset " : ''); } $output = "\r\t\t"; $output .= (($reset) ? "\r\t\t $extra\r\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[] = "\r\t"; } function row_list($label, $name, $is_jump = true, $colspan = 2) { global $listitem; foreach ($listitem AS $option) { $optionlist .= $option; } $listitem = ''; $this->row_text($label, "\r" . (($is_jump) ? "\r" : '') . "\r", $colspan); } function row_yesno($label, $name, $value, $colspan = 2) { $this->row_text($label, " " . phrase('yes') . " " . phrase('no'), $colspan); } } /*=====================================================================*\ || ################################################################### || # $HeadURL$ || # $Id$ || ################################################################### \*=====================================================================*/ ?>