diff -r e3d7322305bf -r 5e1f1e916419 punbb/header.php --- a/punbb/header.php Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,295 +0,0 @@ -tpl_strings['PAGE_NAME'] = $page_title; -$template->add_header(''); - -// Special case - many Enano themes have indented paragraphs -$template->add_header(''); - -// Send no-cache headers -header('Expires: Thu, 21 Jul 1977 07:30:00 GMT'); // When yours truly first set eyes on this world! :) -header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); -header('Cache-Control: post-check=0, pre-check=0', false); -header('Pragma: no-cache'); // For HTTP/1.0 compability - -// Load the template -if (defined('PUN_ADMIN_CONSOLE')) -{ - $inner = '
-
- -
-
-
- - -
- - -
-
- - - - - - - -
-
'; - - $tpl_main = $template->getHeader() . $inner . $template->getFooter(); -} -else if (defined('PUN_HELP')) -{ - $tpl_main = file_get_contents(PUN_ROOT.'include/template/help.tpl'); -} -else -{ - // $tpl_main = file_get_contents(PUN_ROOT.'include/template/main.tpl'); - $inner = '
-
- -
-
-
- - -
- - -
-
- - - - - - - -
-
'; - - $tpl_main = $template->getHeader() . $inner . $template->getFooter(); - -} - - -// START SUBST - -while (preg_match('##', $tpl_main, $cur_include)) -{ - if (!file_exists(PUN_ROOT.'include/user/'.$cur_include[1].'.'.$cur_include[2])) - error('Unable to process user include '.htmlspecialchars($cur_include[0]).' from template main.tpl. There is no such file in folder /include/user/'); - - ob_start(); - include PUN_ROOT.'include/user/'.$cur_include[1].'.'.$cur_include[2]; - $tpl_temp = ob_get_contents(); - $tpl_main = str_replace($cur_include[0], $tpl_temp, $tpl_main); - ob_end_clean(); -} -// END SUBST - - -// START SUBST - -$tpl_main = str_replace('', $lang_common['lang_direction'], $tpl_main); -// END SUBST - - - -// START SUBST - -$tpl_main = str_replace('', $lang_common['lang_encoding'], $tpl_main); -// END SUBST - - -// START SUBST - -ob_start(); - -// Is this a page that we want search index spiders to index? -if (!defined('PUN_ALLOW_INDEX')) - echo ''."\n"; - -?> - -'."\n"; - -if (isset($required_fields)) -{ - // Output JavaScript to validate form (make sure required fields are filled out) - -?> - -'; - -$tpl_temp = trim(ob_get_contents()); -$tpl_main = str_replace('', $tpl_temp, $tpl_main); -ob_end_clean(); -// END SUBST - - - -// START SUBST - -if (isset($focus_element)) -{ - $tpl_main = str_replace('', '', $tpl_main); -} -// END SUBST - - - -// START SUBST - -$tpl_main = str_replace('', htmlspecialchars(basename($_SERVER['PHP_SELF'], '.php')), $tpl_main); -// END SUBST - - - -// START SUBST - -$tpl_main = str_replace('', '

'.pun_htmlspecialchars($pun_config['o_board_title']).'

', $tpl_main); -// END SUBST - - - -// START SUBST - -$tpl_main = str_replace('', '

'.$pun_config['o_board_desc'].'

', $tpl_main); -// END SUBST - - - -// START SUBST - -$tpl_main = str_replace('','
'."\n\t\t\t". generate_navlinks()."\n\t\t".'
', $tpl_main); -// END SUBST - - - -// START SUBST - -if ($pun_user['is_guest']) - $tpl_temp = '
'."\n\t\t\t".'

'.$lang_common['Not logged in'].'

'."\n\t\t".'
'; -else -{ - $tpl_temp = '
'."\n\t\t\t".'
    '."\n\t\t\t\t".'
  • '.$lang_common['Logged in as'].' '.pun_htmlspecialchars($pun_user['username']).'
  • '."\n\t\t\t\t".'
  • '.$lang_common['Last visit'].': '.format_time($pun_user['last_visit']).'
  • '; - - if ($pun_user['g_id'] >= USER_LEVEL_MEMBER) - { - $result_header = $pun_db->query('SELECT COUNT(id) FROM '.$pun_db->prefix.'reports WHERE zapped IS NULL') or error('Unable to fetch reports info', __FILE__, __LINE__, $pun_db->error()); - - if ($pun_db->result($result_header)) - $tpl_temp .= "\n\t\t\t\t".''; - - if ($pun_config['o_maintenance'] == '1') - $tpl_temp .= "\n\t\t\t\t".''; - } - - if (in_array(basename($_SERVER['PHP_SELF']), array('index.php', 'search.php'))) - $tpl_temp .= "\n\t\t\t".'
'."\n\t\t\t".''."\n\t\t\t".'
'."\n\t\t".'
'; - else - $tpl_temp .= "\n\t\t\t".''."\n\t\t\t".'
'."\n\t\t".''; -} - -$tpl_main = str_replace('', $tpl_temp, $tpl_main); -// END SUBST - - -// START SUBST - -if ($pun_config['o_announcement'] == '1') -{ - ob_start(); - -?> -
-

-
-
-
-
-
-
-', $tpl_temp, $tpl_main); - ob_end_clean(); -} -else - $tpl_main = str_replace('', '', $tpl_main); -// END SUBST - - -// START SUBST - -ob_start(); - - -define('PUN_HEADER', 1);