--- 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 '<h3>Query list as requested on URI</h3><pre style="margin-left: 1em">';
- echo $db->sql_backtrace();
+ echo htmlspecialchars($db->sql_backtrace());
echo '</pre>';
}
@@ -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 = '<style type="text/css">div.pagenav { border-top: 1px solid #CCC; padding-top: 7px; margin-top: 10px; }</style>';
+
+ $this->fading_button = '<div style="background-image: url('.scriptPath.'/images/about-powered-enano-hover.png); background-repeat: no-repeat; width: 88px; height: 31px; margin: 0 auto 5px auto;">
+ <a href="http://enanocms.org/" onclick="window.open(this.href); return false;"><img style="border-width: 0;" alt=" " src="'.scriptPath.'/images/about-powered-enano.png" onmouseover="domOpacity(this, 100, 0, 500);" onmouseout="domOpacity(this, 0, 100, 500);" /></a>
+ </div>';
$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) )
{