Размер файла: 7.19Kb
<?php
header("Content-Type: text/html; charset=utf-8");
error_reporting(0);
ob_start('ob_gzhandler');
session_name("sid");
session_start();
include "nm.php";
////////////////////////////////////
// Автор: Swen //
// E-mail: [email protected] //
// ICQ: 437-565-058 //
//---------------------------------//
// Statistics_of_visitings-v_2 //
// http://wapsoft.net.ru //
// 24.01.2008 //
////////////////////////////////////
if($_SESSION['admin_name']=="")
{ header("Location: http://wapsoft.net.ru"); exit(); }
else
{
if($admin_name!=$_SESSION['admin_name'] && $admin_password!=$_SESSION['admin_password'])
{ header("Location: http://wapsoft.net.ru"); exit(); }}
//////////////////////////////////////////////////////////////////////////////
$Dt=date("dm");
//// //// ////
echo' <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">';
echo' <html>';
echo' <head>';
echo' <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
echo" <title>$nazw</title>";
echo' <link rel="stylesheet" href="still.css" type="text/css">';
echo' </head>';
echo' <body>';
echo"<div style=\"border: 0px solid #222222 ; background: #33CC11 ; padding: 2px\">";
echo"<div style=\"border: 2px solid #33CC00 ; background: #00CCFF ; padding: 2px\">";
echo"<span class=\"red\">";
echo 'Статистика';
echo"</span>";
echo"</div>";
echo"<div style=\"border: 2px solid #33CC00 ; background: #00CCFF ; padding: 2px\">";
echo '<a href="run.php?set=1">Сегодня</a>';
$Dt=date("dm");
$tot=mysql_query("select count(*) from stat WHERE dt='".mysql_escape_string($Dt)."' ;");
$total=mysql_fetch_array($tot);
echo"<span class=\"red\">";
echo"[".$total['count(*)']."]<br>";
echo"</span>";
////////////////////////////////////
// Автор: Swen //
// E-mail: [email protected] //
// ICQ: 437-565-058 //
//---------------------------------//
// Statistics_of_visitings-v_2 //
// http://wapsoft.net.ru //
// 24.01.2008 //
////////////////////////////////////
echo '<a href="run.php?set=2">Неделю</a>';
$est=date("d");
$tot=mysql_query("select count(*) from stat WHERE nd!='0' ;");
$total=mysql_fetch_array($tot);
echo"<span class=\"red\">";
echo"[".$total['count(*)']."]<br>";
echo"</span>";
echo '<a href="run.php?set=3">Месяц</a>';
$Ms=date("my");
$tot=mysql_query("select count(*) from stat WHERE ms='".mysql_escape_string($Ms)."' ;");
$total=mysql_fetch_array($tot);
echo"<span class=\"red\">";
echo"[".$total['count(*)']."]<br>";
echo"</span>";
//
echo '<a href="run.php?set=4">Общая</a>';
$tot=mysql_query("select count(*) from stat ;");
$total=mysql_fetch_array($tot);
echo"<span class=\"red\">";
echo"[".$total['count(*)']."]<br>";
echo"</span>";
echo"</div>";
//
$opst=mysql_query("select count(*) from stat_oper ;");
$ops=mysql_fetch_array($opst);
$op=$ops['count(*)'];
//if($ops['lit']=="")
//$op=0;
$bann=mysql_query("select count(*) from stat WHERE userban='1' ;");
if($bann) while($b=mysql_fetch_array($bann))
$bnd=$b['count(*)'];
$list_user=mysql_query("select count(*) from stat WHERE user!='' ;");
$hus=mysql_fetch_array($list_user);
$usreg=$hus['count(*)'];
$reyting_str=mysql_query("select count(*) from statstr ;");
$reyting=mysql_fetch_array($reyting_str);
$rey=$reyting['count(*)'];
////////////////////////////////////
// Автор: Swen //
// E-mail: [email protected] //
// ICQ: 437-565-058 //
//---------------------------------//
// Statistics_of_visitings-v_2 //
// http://wapsoft.net.ru //
// 24.01.2008 //
////////////////////////////////////
echo" <div style=\"border: 2px solid #33CC00 ; background: #00CCFF ; padding: 1px\">";
echo"<a href='operst.php'>Операторы</a>";
echo"<span class=\"red\">";
echo"[$op]<br>";
echo"</span>";
echo "<a href='banlist.php'>Банлист</a>";
echo"<span class=\"red\">";
echo"[$bnd]<br>";
echo"</span>";
echo "<a href=userlist.php>Зареганых</a>";
echo"<span class=\"red\">";
echo"[$usreg]<br>";
echo"</span>";
echo "<a href=statstr.php>Рейтинг</a>";
echo"<span class=\"red\">";
echo"[$rey]<br>";
echo"</span>";
echo '<a href="delstat.php">Очистить БД</a>';
echo"</div>";
$tot=mysql_query("select * from chet WHERE ch='1' ;");
$total=mysql_fetch_array($tot);
$xost=$total['xost'];
if($total['xost']=="") $xost=0;
$tot=mysql_query("select * from chet WHERE ch='1' ;");
$total=mysql_fetch_array($tot);
$xit=$total['xit'];
if($total['xit']=="") $xit=0;
$tot=mysql_query("select * from chet WHERE ch='1' ;");
$total=mysql_fetch_array($tot);
$vxost=$total['vxost'];
if($total['vxost']=="") $vxost=0;
$tot=mysql_query("select * from chet WHERE ch='1' ;");
$total=mysql_fetch_array($tot);
$vxit=$total['vxit'];
if($total['vxit']=="") $vxit=0;
////////////////////////////////////
// Автор: Swen //
// E-mail: [email protected] //
// ICQ: 437-565-058 //
//---------------------------------//
// Statistics_of_visitings-v_2 //
// http://wapsoft.net.ru //
// 24.01.2008 //
////////////////////////////////////
$wine = 300;
//$j=getenv("HTTP_USER_AGENT");
//$z=getenv("REMOTE_ADDR");
$sql_update = "DELETE FROM onlin WHERE `unix`+$wine < ".time(). " OR `ip` = '$z.$j'";
$result_update = mysql_query($sql_update);
$sql_sel = "SELECT `id` FROM onlin";
$result_sel = mysql_query($sql_sel);
$onli = mysql_num_rows($result_sel);
echo"<div style=\"border: 2px solid #33CC00 ; background: #00CCFF ; padding: 1px\">";
echo"<span class=\"cp\">"; echo "Хосты сегодня: "; echo"</span>"; echo"<span class=\"yellow\">"; echo"[$xost]<br>"; echo"</span>";
echo"<span class=\"cp\">"; echo "Хосты всего: "; echo"</span>"; echo"<span class=\"yellow\">"; echo"[$vxost]<br>"; echo"</span>";
echo"<span class=\"cp\">"; echo "Хиты сегодня: "; echo"</span>"; echo"<span class=\"yellow\">"; echo"[$xit]<br>"; echo"</span>";
echo"<span class=\"cp\">"; echo "Хиты всего: "; echo"</span>"; echo"<span class=\"yellow\">"; echo"[$vxit]<br>"; echo"</span>";
echo"<span class=\"cp\">"; echo "Онлайн юзеров: "; echo"</span>"; echo"<span class=\"yellow\">"; echo"[$onli]<br>"; echo"</span>";
echo"</div>";
echo"<div style=\"border: 2px solid #33CC00 ; background: #00CCFF ; padding: 2px\">";
$Contents = ob_get_contents();
$gzib_file = strlen($Contents);
$gzib_file_out = strlen(gzcompress($Contents,9));
if(!$vy){echo'<small>© by Swen</small><br>';}else{echo'$kp';}
$gzib_pro=round(100-(100/($gzib_file/$gzib_file_out)),1);
echo ' <small>Cжатие: '.$gzib_pro.'%</small>';
echo"</div>";
echo"</div>";
echo' </body>';
echo' </html>';
////////////////////////////////////
// Автор: Swen //
// E-mail: [email protected] //
// ICQ: 437-565-058 //
//---------------------------------//
// Statistics_of_visitings-v_2 //
// http://wapsoft.net.ru //
// 24.01.2008 //
////////////////////////////////////
?>