Просмотр файла template/gzip_foot.php

Размер файла: 0.99Kb
<?php
// mod by Golem http://veplog.ru

if($config_gzip=="1"){
//echo'<br><font color="#FF0000">[Gzip ON]</font>';
$Contents = ob_get_contents();
$gzib_file = strlen($Contents);


if($support_gzip){
$gzib_file_out = strlen(compress_output_gzip($Contents));
} else {
if ($support_deflate) {
$gzib_file_out = strlen(compress_output_deflate($Contents));
} else {
$gzib_file_out = strlen($Contents);
}}

$gzib_pro=round(100-(100/($gzib_file/$gzib_file_out)),1);
if($gzib_pro > 0 && $gzib_pro < 100){
echo 'Cжатие: '.$gzib_pro.'%<br>';}

}else{
$gzib_file=ob_get_length();
$gzib_file_out=$gzib_file;
}


if($config_rekfoot==1){include_once BASEDIR."local/datamain/add_foot_all.dat";}

if(!isset($_SESSION['traffic']) || $_SESSION['traffic']==""){$_SESSION['traffic']=0;}
if(!isset($_SESSION['traffic2']) || $_SESSION['traffic2']==""){$_SESSION['traffic2']=0;}

$_SESSION['traffic']=$_SESSION['traffic']+$gzib_file_out;
$_SESSION['traffic2']=$_SESSION['traffic2']+$gzib_file;

?>