diff -r 5bcdee999015 -r e0ec986c0af3 includes/template.php --- a/includes/template.php Sun Nov 18 18:44:55 2007 -0500 +++ b/includes/template.php Wed Nov 21 15:10:57 2007 -0500 @@ -822,7 +822,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 '
'; } @@ -1803,7 +1803,7 @@ $this->sidebar_extra = ''; $this->sidebar_widgets = ''; $this->toolbar_menu = ''; - $this->additional_headers = ''; + $this->additional_headers = ''; $this->theme_list = Array(Array( 'theme_id'=>'oxygen', @@ -1829,6 +1829,10 @@ if ( $auto_init ) $this->init_vars(); } + function add_header($html) + { + $this->additional_headers .= "\n\n\n " . $html; + } function init_vars() { global $sideinfo; @@ -1875,7 +1879,7 @@ 'ADMIN_SID_QUES'=>$asq, 'ADMIN_SID_AMP'=>$asa, 'ADMIN_SID_AMP_HTML'=>'', - 'ADDITIONAL_HEADERS'=>'', + 'ADDITIONAL_HEADERS'=>$this->additional_headers, 'SIDEBAR_EXTRA'=>'', 'COPYRIGHT'=>'Enano and all of its code, graphics, and more code is copyright © 2006 Dan Fuhry.
This program is Free Software; see the file "GPL" included with this package for details.', 'TOOLBAR_EXTRAS'=>'', @@ -1923,11 +1927,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) { @@ -1940,7 +1948,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) ) {