diff -r 53ba55d33abb -r 8acd77a6c19d includes/template.php --- a/includes/template.php Wed Nov 21 20:45:50 2007 -0500 +++ b/includes/template.php Wed Nov 21 21:03:48 2007 -0500 @@ -851,7 +851,7 @@ if(isset($_GET['sqldbg']) && $session->get_permissions('mod_misc')) { echo '

Query list as requested on URI

';
-        echo $db->sql_backtrace();
+        echo htmlspecialchars($db->sql_backtrace());
         echo '
'; } @@ -1856,7 +1856,7 @@ */ class template_nodb { - var $tpl_strings, $tpl_bool, $theme, $style, $no_headers, $additional_headers, $sidebar_extra, $sidebar_widgets, $toolbar_menu, $theme_list; + var $fading_button, $tpl_strings, $tpl_bool, $theme, $style, $no_headers, $additional_headers, $sidebar_extra, $sidebar_widgets, $toolbar_menu, $theme_list; function __construct() { $this->tpl_bool = Array(); @@ -1864,7 +1864,11 @@ $this->sidebar_extra = ''; $this->sidebar_widgets = ''; $this->toolbar_menu = ''; - $this->additional_headers = ''; + $this->additional_headers = ''; + + $this->fading_button = '
+  +
'; $this->theme_list = Array(Array( 'theme_id'=>'oxygen', @@ -1890,6 +1894,10 @@ if ( $auto_init ) $this->init_vars(); } + function add_header($html) + { + $this->additional_headers .= "\n\n\n " . $html; + } function init_vars() { global $sideinfo; @@ -1946,7 +1954,7 @@ 'ADMIN_SID_QUES'=>$asq, 'ADMIN_SID_AMP'=>$asa, 'ADMIN_SID_AMP_HTML'=>'', - 'ADDITIONAL_HEADERS'=>$headers, + 'ADDITIONAL_HEADERS'=>$this->additional_headers, 'SIDEBAR_EXTRA'=>'', 'COPYRIGHT'=>$lang->get('meta_enano_copyright'), 'TOOLBAR_EXTRAS'=>'', @@ -1994,11 +2002,15 @@ $this->tpl_bool['right_sidebar'] = $this->tpl_bool['sidebar_right']; // backward compatibility $this->tpl_bool['stupid_mode'] = true; } - function header() + function header($simple = false) { - if(!$this->no_headers) echo $this->process_template('header.tpl'); + $filename = ( $simple ) ? 'simple-header.tpl' : 'header.tpl'; + if ( !$this->no_headers ) + { + echo $this->process_template($filename); + } } - function footer() + function footer($simple = false) { global $db, $session, $paths, $template, $plugins; // Common objects if(!$this->no_headers) { @@ -2011,7 +2023,8 @@ else $nq = $db->num_queries; if($nq == 0) $nq = 'N/A'; $dbg = 'Time: '.$f.'s | Queries: '.$nq; - $t = $this->process_template('footer.tpl'); + $filename = ( $simple ) ? 'simple-footer.tpl' : 'footer.tpl'; + $t = $this->process_template($filename); $t = str_replace('[[Stats]]', $dbg, $t); if ( is_object($db) ) {