File size: 4.79Kb
<?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(); }}
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: 2px solid #33CC00 ; background: #00CCFF ; padding: 2px\">";
echo"<div style=\"border: 2px solid #33CC00 ; background: #00CCFF ; padding: 2px\">";
echo"<span class=\"red\">";
echo"Статистика по операторам:<br>";
echo"</span>";
echo "</div>";
$pnumber=10;
if($s == "")
$s=1; $begin=($s-1)*$pnumber;
$stat_oper=mysql_query("SELECT * from stat_oper ORDER BY nm ASC limit $begin, $pnumber ;");
$tot=mysql_query("select count(*) from stat_oper ;");
if($stat_oper && $tot)
{
while($exop = mysql_fetch_array($stat_oper))
{
echo' <div style="border: 2px solid #33CC00 ; background: #00CCFF ; padding: 2px">';
echo"<span class=\"yellow\">";
echo "".$exop['opername']." ";
echo"</span>";
echo "<b><small>(</small>";
echo"<span class=\"red\">";
echo $exop['count'] ;
echo"</span>";
echo"<small>)</small></b>";
echo "</div>";
}
////////////////////////////////////
// Автор: 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: 2px\">";
$total=mysql_fetch_array($tot);
$number = (int) ($total['count(*)']/$pnumber);
if($total['count(*)'] >= ($pnumber+1))
{
if((float) ($total['count(*)']/$pnumber)-$number !=0) $number++;
echo"<span class=\"red\">";
if($s == 1) echo"<<.Пред. |";
echo"</span>";
if($begin>0) {
echo "<a href=\"operst.php?s=".($s-1)."&set=$set\"><<.Пред.</a>";
echo"<span class=\"red\">|</span>"; }
if($total['count(*)']>$begin+$pnumber) {
echo"<span class=\"red\">|</span>";
echo "<a href=\"operst.php?s=".($s+1)."&set=$set\">След.>></a>"; }
echo"<span class=\"red\">";
if($number == $s) echo"| След.>>";
echo"</span>";
$all=ceil($total['count(*)'] / $pnumber); $i=1; $c=""; $tt=$s;
while($i<=$all){
if($i<=3 || $i==$tt- 1 || $i==$tt || $i==$tt+1 || $i>=$all-2)
{$ii="<a href=\"operst.php?s=".$i."&set=$set\">".$i."</a>";
if($i==$tt) { if($i!=$all){ $c.= "<b>$i</b>,";}
else{$c.= "<b>$i</b>";}
////////////////////////////////////
// Автор: Swen //
// E-mail: [email protected] //
// ICQ: 437-565-058 //
//---------------------------------//
// Statistics_of_visitings-v_2 //
// http://wapsoft.net.ru //
// 24.01.2008 //
////////////////////////////////////
}
else { if($i!=$all){ $c.= "$ii,";} else{$c.= "$ii";} }}
else{$c.= "."; } $i++; }
$c=preg_replace("/[,][.]+/", "...",$c);
echo"<span class=\"red\">";
echo "<br>$c";
echo"</span>";
echo"</div>";
echo"<div style=\"border: 2px solid #33CC00 ; background: #00CCFF ; padding: 2px\">";
echo"<span class=\"red\">";
echo"<b>Всего : ".$total['count(*)']."</b><br>";
echo"</span>"; } }
echo '<a href="./">Статистика</a><br>';
$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 //
////////////////////////////////////
?>