View file footer.php

File size: 1.52Kb
<?
// считаем сжатие
$Contents = ob_get_contents();
$gzib_file = strlen($Contents);
if ($Content_Encoding['deflate'])
$gzib_file_out = strlen(gzdeflate($Contents,9));
elseif($Content_Encoding['gzip'])
$gzib_file_out = strlen(gzencode($Contents,9));
else
$gzib_file_out = strlen($Contents);
$compress=round(100-(100/($gzib_file/$gzib_file_out)),1);
list($msec, $sec) = explode(chr(32), microtime());
$tgen=round(($sec + $msec) - $headtime, 3);

if ($_SESSION['wap']=="xml")
{
$string=str_replace("&wap=wml","",$QUERY_STRING);
$string=str_replace("wap=wml","",$string);
$string=str_replace("&wap=xml","",$string);
$string=str_replace("wap=xml","",$string);
$string=str_replace("&","&amp;",$string);
include 'counter.php';
if (!empty($string))echo "<div class=\"contur\"><div class=\"header\"><center>[ HTML | <a href=\"$PHP_SELF?wap=wml\">WML</a> ]<br/>";
else echo "<div class=\"contur\"><div class=\"header\"><center>[ HTML | <a href=\"$PHP_SELF?wap=wml\">WML</a> ]<br/>";
echo "Cжатие: ".$compress."%";
print "</center></div></div></body></html>";

}else{
$string=str_replace("&wap=wml","",$QUERY_STRING);
$string=str_replace("wap=wml","",$string);
$string=str_replace("&wap=xml","",$string);
$string=str_replace("wap=xml","",$string);
$string=str_replace("&","&amp;",$string);
include 'counter.php';
if (!empty($string))echo "[ WML | <a href=\"$PHP_SELF?$string&amp;wap=xml\">HTML</a> ]<br/>";
else echo "[ WML | <a href=\"$PHP_SELF?wap=xml\">HTML</a> ]<br/>";
echo "Cжатие: ".$compress."%";
echo "</small></p></card></wml>";
}
?>