includes/functions.php
changeset 574 df78a7fb91fd
parent 573 43e7254afdb4
child 575 9c1ab9c74662
equal deleted inserted replaced
573:43e7254afdb4 574:df78a7fb91fd
   355   
   355   
   356   if ( !is_object($template) )
   356   if ( !is_object($template) )
   357   {
   357   {
   358     $template = new template_nodb();
   358     $template = new template_nodb();
   359     $template->load_theme('oxygen', 'bleu', false);
   359     $template->load_theme('oxygen', 'bleu', false);
   360     $template->tpl_strings['SITE_NAME'] = 'Enano';
   360     $template->assign_vars(array(
   361     $template->tpl_strings['SITE_DESC'] = 'This site is experiencing a critical error and cannot load.';
   361         'SITE_NAME' => 'Enano',
   362     $template->tpl_strings['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.';
   362         'SITE_DESC' => 'This site is experiencing a critical error and cannot load.',
   363     $template->tpl_strings['PAGE_NAME'] = htmlspecialchars($title);
   363         '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.',
       
   364         'PAGE_NAME' => htmlspecialchars($title)
       
   365       ));
   364   }
   366   }
   365 
   367 
   366   $template->add_header('<meta http-equiv="refresh" content="' . $timeout . '; url=' . str_replace('"', '\\"', $url) . '" />');
   368   $template->add_header('<meta http-equiv="refresh" content="' . $timeout . '; url=' . str_replace('"', '\\"', $url) . '" />');
   367   $template->add_header('<script type="text/javascript">
   369   $template->add_header('<script type="text/javascript">
   368       function __r() {
   370       function __r() {
   374     ');
   376     ');
   375   
   377   
   376   if ( get_class($template) == 'template_nodb' )
   378   if ( get_class($template) == 'template_nodb' )
   377     $template->init_vars();
   379     $template->init_vars();
   378 
   380 
   379   $template->tpl_strings['PAGE_NAME'] = $title;
   381   $template->assign_vars(array('PAGE_NAME' => $title));
   380   $template->header(true);
   382   $template->header(true);
   381   echo '<p>' . $message . '</p>';
   383   echo '<p>' . $message . '</p>';
   382   $subst = array(
   384   $subst = array(
   383       'timeout' => $timeout,
   385       'timeout' => $timeout,
   384       'redirect_url' => str_replace('"', '\\"', $url)
   386       'redirect_url' => str_replace('"', '\\"', $url)