EOD; $this->page_start('Redirect', ':default:', 15, $js); $this->page_message('Redirect', 'Please wait to be redirected. If you are not redirected in a few seconds, click here.'); $this->page_end(); } function error($message) { $this->page_start('Error'); $this->page_message('Error', $message); $this->page_end(); exit; } // ################################################################### // ########################### PAGE CONTROL ########################## // ################################################################### function page_start($actiontitle, $pageclass = ':default:', $pagemargin = 15, $extra = '', $onload = false, $margin = 0, $dotpath = '.') { $title = '[#]app[#] - Administration - ' . $actiontitle; echo "\r"; echo "\r"; echo "\r\t$title"; echo "\r\t"; echo "\r\t" . iff($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('Confirm'); $this->page_message('Confirm', $message . '

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

\r\t[#]app[#] " . $env->options['trackerversion'] . ", © 2003 - " . 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
" . iff($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) { if ($class === ':swap:') { global $row_class; exec_swap_bg(); $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 $row_class; 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\t$value"; } } echo "\r\r"; } function row_text($label, $value = ' ', $valign = 'top', $colspan = 2, $class = -1) { global $IS_SETTINGS; if ($class == -1) { if (!$IS_SETTINGS) { global $row_class; exec_swap_bg(); } else { $row_class = 'alt2'; } } else { $row_class = $class; } echo ""; echo "\r\t$label"; echo "\r\t$value"; if ($colspan > 2) { echo "\r\t "; } 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 = " Save "; } else { $submit = " $submit "; } if ($reset === ':reset:') { $reset = " Reset "; } else { $reset = iff($reset, " $reset "); } $output = "\r\t\t"; $output .= iff($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" . iff($is_jump, "\r") . "\r", $colspan); } function row_yesno($label, $name, $value, $colspan = 2) { $this->row_text($label, " Yes No", $colspan); } } /*=====================================================================*\ || ################################################################### || # $HeadURL$ || # $Id$ || ################################################################### \*=====================================================================*/ ?>