includes/functions.php
changeset 1299 29601ba3c448
parent 1283 cdbc7f48ab72
child 1301 bd9e124f5904
equal deleted inserted replaced
1298:510187db2b32 1299:29601ba3c448
   596 	}
   596 	}
   597 	
   597 	
   598 	if ( !is_object($template) )
   598 	if ( !is_object($template) )
   599 	{
   599 	{
   600 		$template = new template_nodb();
   600 		$template = new template_nodb();
   601 		$template->load_theme('oxygen', 'bleu', false);
   601 		$template->load_theme('enanium', 'babygrand', false);
   602 		$template->assign_vars(array(
   602 		$template->assign_vars(array(
   603 				'SITE_NAME' => 'Enano',
   603 				'SITE_NAME' => 'Enano',
   604 				'SITE_DESC' => 'This site is experiencing a critical error and cannot load.',
   604 				'SITE_DESC' => 'This site is experiencing a critical error and cannot load.',
   605 				'COPYRIGHT' => 'Powered by Enano CMS - &copy; 2006-2008 Dan Fuhry. This program is Free Software; see the <a href="' . scriptPath . '/install.php?mode=license">GPL file</a> included with this package for details.',
   605 				'COPYRIGHT' => 'Powered by Enano CMS - &copy; 2006-2008 Dan Fuhry. This program is Free Software; see the <a href="' . scriptPath . '/install.php?mode=license">GPL file</a> included with this package for details.',
   606 				'PAGE_NAME' => htmlspecialchars($title)
   606 				'PAGE_NAME' => htmlspecialchars($title)
  1027 		// unbold
  1027 		// unbold
  1028 		echo "\x1B[0m";
  1028 		echo "\x1B[0m";
  1029 		echo "$p\n";
  1029 		echo "$p\n";
  1030 		exit(1);
  1030 		exit(1);
  1031 	}
  1031 	}
  1032 	$theme = ( defined('ENANO_CONFIG_FETCHED') ) ? getConfig('theme_default') : 'oxygen';
  1032 	$theme = ( defined('ENANO_CONFIG_FETCHED') ) ? getConfig('theme_default') : 'enanium';
  1033 	$style = ( defined('ENANO_CONFIG_FETCHED') ) ? '__foo__' : 'bleu';
  1033 	$style = ( defined('ENANO_CONFIG_FETCHED') ) ? '__foo__' : 'babygrand';
  1034 	
  1034 	
  1035 	$tpl = new template_nodb();
  1035 	$tpl = new template_nodb();
  1036 	$tpl->load_theme($theme, $style);
  1036 	$tpl->load_theme($theme, $style);
  1037 	$tpl->tpl_strings['SITE_NAME'] = 'Critical error';
  1037 	$tpl->tpl_strings['SITE_NAME'] = 'Critical error';
  1038 	$tpl->tpl_strings['SITE_DESC'] = 'This website is experiencing a serious error and cannot load.';
  1038 	$tpl->tpl_strings['SITE_DESC'] = 'This website is experiencing a serious error and cannot load.';
  1367 
  1367 
  1368 function enano_version($long = false, $no_nightly = false)
  1368 function enano_version($long = false, $no_nightly = false)
  1369 {
  1369 {
  1370 	if ( !defined('ENANO_CONFIG_FETCHED') )
  1370 	if ( !defined('ENANO_CONFIG_FETCHED') )
  1371 	{
  1371 	{
  1372 		return function_exists('installer_enano_version') ? installer_enano_version() : $GLOBALS['enano_version'];
  1372 		return function_exists('installer_enano_version') ? installer_enano_version() : $GLOBALS['version'];
  1373 	}
  1373 	}
  1374 	$r = getConfig('enano_version');
  1374 	$r = getConfig('enano_version');
  1375 	$rc = ( $long ) ? ' release candidate ' : 'RC';
  1375 	$rc = ( $long ) ? ' release candidate ' : 'RC';
  1376 	$b = ( $long ) ? ' beta ' : 'b';
  1376 	$b = ( $long ) ? ' beta ' : 'b';
  1377 	$a = ( $long ) ? ' alpha ' : 'a';
  1377 	$a = ( $long ) ? ' alpha ' : 'a';