eneral Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ************************************************************************/ // Workaround for "current" Apache 2 + PHP module which seems to not // cope with private cache control setting (from phpBB2) if (strpos($_SERVER['SERVER_SOFTWARE'], 'Apache/2') !== 0) header('Cache-Control: no-cache, pre-check=0, post-check=0, max-age=0'); else header('Cache-Control: private, pre-check=0, post-check=0, max-age=0'); header('Expires: '.gmdate('D, d M Y H:i:s').' GMT'); header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); // Load the main template $fp = fopen('include/template/main.tpl', 'r'); $tpl_main = trim(fread($fp, filesize('include/template/main.tpl'))); fclose($fp); // START SUBST - {pun_content_direction} $tpl_main = str_replace('{pun_content_direction}', $lang_common['lang_direction'], $tpl_main); // END SUBST - {pun_content_direction} // START SUBST - {pun_char_encoding} $tpl_main = str_replace('{pun_char_encoding}', $lang_common['lang_encoding'], $tpl_main); // END SUBST - {pun_char_encoding} // START SUBST - {pun_head} ob_start(); if (isset($destination)) print ''."\n"; else { if ((isset($form_name) && isset($focus_element)) || isset($validate_form)) { // Output javascript(s) // With a quick and dirty hack to not disable submit buttons if user agent is Opera (since Opera // refused to re-enable the button if we submit and then go back to this page) ?> <?php print $page_title ?> '.htmlspecialchars($cur_user['username']).'.
'.$lang_common['Last visit'].': '.format_time($cookie['last_timeout']); if (isset($cur_user['status']) > 0) { $result_header = $db->query('SELECT COUNT(id) FROM '.$db->prefix.'reports WHERE zapped IS NULL') or error('Unable to fetch reports info', __FILE__, __LINE__, $db->error()); if ($db->result($result_header, 0)) $tpl_temp .= '
There are new reports'; if ($options['maintenance'] == '1') $tpl_temp .= '
Maintenance mode is enabled!'; } $tpl_main = str_replace('{pun_status}', $tpl_temp, $tpl_main); // END SUBST - {pun_status} // START SUBST - {pun_main} ob_start(); define('PUN_HEADER', 1);