includes/template.php
changeset 244 09f8a9a03ccf
parent 243 a7d0f2711df1
child 248 ed13b72b13cc
equal deleted inserted replaced
243:a7d0f2711df1 244:09f8a9a03ccf
  1923     $slink = defined('IN_ENANO_INSTALL') ? scriptPath.'/install.php?mode=css' : makeUrlNS('Special', 'CSS');
  1923     $slink = defined('IN_ENANO_INSTALL') ? scriptPath.'/install.php?mode=css' : makeUrlNS('Special', 'CSS');
  1924     
  1924     
  1925     $title = ( is_object($paths) ) ? $paths->page : 'Critical error';
  1925     $title = ( is_object($paths) ) ? $paths->page : 'Critical error';
  1926     
  1926     
  1927     $headers = '<style type="text/css">div.pagenav { border-top: 1px solid #CCC; padding-top: 7px; margin-top: 10px; }</style>';
  1927     $headers = '<style type="text/css">div.pagenav { border-top: 1px solid #CCC; padding-top: 7px; margin-top: 10px; }</style>';
       
  1928     
       
  1929     $js_dynamic = '';
  1928     if ( defined('IN_ENANO_INSTALL') )
  1930     if ( defined('IN_ENANO_INSTALL') )
  1929     {
  1931     {
  1930       $headers .= '<script type="text/javascript" src="install.php?mode=langjs"></script>';
  1932       $js_dynamic .= '<script type="text/javascript" src="install.php?mode=langjs"></script>';
  1931     }
  1933     }
       
  1934     $js_dynamic .= '<script type="text/javascript">var title="'. $title .'"; var scriptPath="'.scriptPath.'"; var ENANO_SID=""; var AES_BITS='.AES_BITS.'; var AES_BLOCKSIZE=' . AES_BLOCKSIZE . '; var pagepass=\'\'; var ENANO_LANG_ID = 1;</script>';
  1932     
  1935     
  1933     // The rewritten template engine will process all required vars during the load_template stage instead of (cough) re-processing everything each time around.
  1936     // The rewritten template engine will process all required vars during the load_template stage instead of (cough) re-processing everything each time around.
  1934     $tpl_strings = Array(
  1937     $tpl_strings = Array(
  1935       'PAGE_NAME'=>$this_page,
  1938       'PAGE_NAME'=>$this_page,
  1936       'PAGE_URLNAME'=>'Null',
  1939       'PAGE_URLNAME'=>'Null',
  1952       'LOGOUT_LINK'=>'',
  1955       'LOGOUT_LINK'=>'',
  1953       'THEME_LINK'=>'',
  1956       'THEME_LINK'=>'',
  1954       'TEMPLATE_DIR'=>scriptPath.'/themes/'.$this->theme,
  1957       'TEMPLATE_DIR'=>scriptPath.'/themes/'.$this->theme,
  1955       'THEME_ID'=>$this->theme,
  1958       'THEME_ID'=>$this->theme,
  1956       'STYLE_ID'=>$this->style,
  1959       'STYLE_ID'=>$this->style,
  1957       'JS_DYNAMIC_VARS'=>'<script type="text/javascript">var title="'. $title .'"; var scriptPath="'.scriptPath.'"; var ENANO_SID=""; var AES_BITS='.AES_BITS.'; var AES_BLOCKSIZE=' . AES_BLOCKSIZE . '; var pagepass=\'\'; var ENANO_LANG_ID = \'0\';</script>',
  1960       'JS_DYNAMIC_VARS'=>$js_dynamic,
  1958       'SIDEBAR_RIGHT'=>'',
  1961       'SIDEBAR_RIGHT'=>'',
  1959       );
  1962       );
  1960     $this->tpl_strings = array_merge($tpl_strings, $this->tpl_strings);
  1963     $this->tpl_strings = array_merge($tpl_strings, $this->tpl_strings);
  1961     
  1964     
  1962     $sidebar = ( gettype($sideinfo) == 'string' ) ? $sideinfo : '';
  1965     $sidebar = ( gettype($sideinfo) == 'string' ) ? $sideinfo : '';