<?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/
+----------------------------------------------------*/
if (!defined("IN_FUSION")) { header("Location: index.php"); exit; }

render_footer(false);

echo "</body>\n</html>\n";

if (iADMIN) {
	$result = dbquery("DELETE FROM ".$db_prefix."flood_control WHERE flood_timestamp < '".(time()-360)."'");
	$result = dbquery("DELETE FROM ".$db_prefix."thread_notify WHERE notify_datestamp < '".(time()-1209600)."'");
	//$result = dbquery("DELETE FROM ".$db_prefix."vcode WHERE vcode_datestamp < '".(time()-360)."'");
	$result = dbquery("DELETE FROM ".$db_prefix."new_users WHERE user_datestamp < '".(time()-86400)."'");
}

mysql_close();

ob_end_flush();
/* gzip start footer */
if (isset($site_gzipper_encoding)) {
$site_gzipper_in = ob_get_contents();
$site_gzipper_inlenn = strlen($site_gzipper_in);
$site_gzipper_out = gzencode($site_gzipper_in, 3);
$site_gzipper_lenn = strlen($site_gzipper_out);
$pcs_of_total = $site_gzipper_inlenn / 100;
$percent = ceil ($site_gzipper_lenn / $pcs_of_total);
$percent = 100 - $percent;

$site_gzipper_in = str_replace('<!-- site gzipper -->', 'Original size:'.ceil(strlen($site_gzipper_in)/1024).' κα.<br>GZipped size: '.ceil($site_gzipper_lenn/1024).' κα.<br>Compression:'.$percent.'%</span>', $site_gzipper_in);
$site_gzipper_out = gzencode($site_gzipper_in, 2);
ob_clean();
header('Content-Encoding: '.$site_gzipper_encoding);
echo $site_gzipper_out;
}
/* gzip end footer */
?>