<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2006 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------+
| Modified by PHP-Fusion SF Group
| Copyright © 2007 by SF
| http://www.rus-phpfusion.com/
+----------------------------------------------------*/
/* gzip start header */
if ($settings['gzip_enabled'] == "1"){
if (strpos(' ' . $_SERVER['HTTP_ACCEPT_ENCODING'], 'x-gzip') !== false) {
$site_gzipper_encoding = 'x-gzip';
}
if (strpos(' ' . $_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false) {
$site_gzipper_encoding = 'gzip';
}
if (isset($site_gzipper_encoding)) {
ob_start();
}
}
/* gzip end header */
if (!defined("IN_FUSION")) { header("Location: index.php"); exit; }

require_once THEME."theme.php";

if ($settings['maintenance'] == "1" && !iADMIN) fallback(BASEDIR."maintenance.php");
if (iMEMBER) $result = dbquery("UPDATE ".$db_prefix."users SET user_lastvisit='".time()."', user_ip='".USER_IP."' WHERE user_id='".$userdata['user_id']."'");

echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
<html>
<head>";
if(!empty($title))$title=stripinput($title);
else $title='&nbsp;';
echo "<title>".$title.$settings['sitename']."</title>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=".$locale['charset']."\">
<meta http-equiv=\"Cache-Control\" content=\"no-cache\" />
<meta http-equiv=\"pragma\" content=\"no-cache\" />
<meta name=\"description\" content=\"".$settings['description']."\">
<meta name=\"keywords\" content=\"".$settings['keywords']."\">
<link rel=\"shortcut icon\" href='".BASEDIR."favicon.ico'>
<link rel=\"stylesheet\" href='".THEME."styles.css' type='text/css'>";
if ($settings['rss_news'] == "1"){
	echo "<link rel='alternate' type='application/rss+xml' title='RSS News' href='".BASEDIR."rss.php'>";
	}
if ($settings['rss_download'] == "1"){
 	echo "<link rel='alternate' type='application/rss+xml' title='RSS Downloads' href='".BASEDIR."rss_n.php'>";
 	}
echo "<script type='text/javascript' src='".INCLUDES."jscript.js'></script>
</head>";

echo "<body bgcolor='$body_bg' text='$body_text'>\n";

render_header("<img src='".BASEDIR.$settings['sitebanner']."' alt='".$settings['sitename']."' title='".$settings['sitename']."'>");
?>