Всего: ' . $total . '
';
if ($total > $kmess){
echo '' . pagenav('statistik.php?act=om&', $start, $total, $kmess) . '';
echo '
';
$host111 = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%windows%' OR `browser` LIKE '%linux%' GROUP BY `ip`, `browser`;");
$total = mysql_num_rows($host111);
$host111 = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%windows%' OR `browser` LIKE '%linux%' GROUP BY `ip`, `browser` ORDER BY `counter`.`date` DESC LIMIT " . $start . "," . $kmess);
while ($arr = mysql_fetch_array($host111)){
$number = @mysql_query("select * from `counter` where `browser` = '" . $arr['browser'] . "';");
$perehod = mysql_num_rows($number);
$vrp = $arr['date'] + $sdvig * 3600;
$vr = date("H:i", $vrp);
echo ceil(ceil($i / 2) - ($i / 2)) == 0 ? '
' : '
';
echo''.$arr['browser'].'
IP: '.$arr['ip'].' | Перех: '.$perehod.' | '.$vr.'
';
++$i;
} echo '
Всего: ' . $total . '
';
if ($total > $kmess){
echo '' . pagenav('statistik.php?act=komp&', $start, $total, $kmess) . '';
echo '
';}
echo'';
echo'
';
break;
////// Переходы из поисковиков ///////
case 'searchengine':
///////// Ищем в базе //////////////
echo'
Переходы из поисковиков
';
$yandex = mysql_query("SELECT * FROM `counter` WHERE `ref` LIKE '%yandex.ru%' GROUP BY `ref`;");
$rambler = mysql_query("SELECT * FROM `counter` WHERE `ref` LIKE '%rambler.ru%' GROUP BY `ref`;");
$google = mysql_query("SELECT * FROM `counter` WHERE `ref` LIKE '%google.%' GROUP BY `ref`;");
$mail = mysql_query("SELECT * FROM `counter` WHERE `ref` LIKE '%mail.ru%' GROUP BY `ref`;");
$gogo = mysql_query("SELECT * FROM `counter` WHERE `ref` LIKE '%gogo.ru%' GROUP BY `ref`;");
$yahoo = mysql_query("SELECT * FROM `counter` WHERE `ref` LIKE '%yahoo.%' GROUP BY `ref`;");
$bing = mysql_query("SELECT * FROM `counter` WHERE `ref` LIKE '%bing.%' GROUP BY `ref`;");
$nigma = mysql_query("SELECT * FROM `counter` WHERE `ref` LIKE '%nigma.%' GROUP BY `ref`;");
//////// Считаем ////////////
$cntyandex = mysql_num_rows($yandex);
$cntrambler = mysql_num_rows($rambler);
$cntgoogle = mysql_num_rows($google);
$cntmail = mysql_num_rows($mail);
$cntgogo = mysql_num_rows($gogo);
$cntyahoo = mysql_num_rows($yahoo);
$cntbing = mysql_num_rows($bing);
$cntnigma = mysql_num_rows($nigma);
/////// Если есть, выводим ////////
if($cntyandex !== 0){
echo''; }
if($cntrambler !== 0){
echo''; }
if($cntgoogle !== 0){
echo''; }
if($cntmail !== 0){
echo''; }
if($cntgogo !== 0){
echo''; }
if($cntyahoo !== 0){
echo''; }
if($cntbing !== 0){
echo''; }
if($cntnigma !== 0){
echo''; }
echo '
!!! Если пусто, значит не было переходов.
';
echo'
';
break;
////// Яндекс запросы ///////
case 'yandex':
echo'
Статистика по Яндексу
';
$host111 = mysql_query("SELECT * FROM `counter` WHERE `ref` LIKE '%yandex.ru%' GROUP BY `ref`;");
$total = mysql_num_rows($host111);
$host111 = mysql_query("SELECT * FROM `counter` WHERE `ref` LIKE '%yandex.ru%' GROUP BY `ref` ORDER BY `counter`.`date` DESC LIMIT " . $start . "," . $kmess);
while ($arr = mysql_fetch_array($host111)){
$vrp = $arr['date'] + $sdvig * 3600;
$vr = date("H:i", $vrp);
$zapros = urldecode($arr['ref']);
$zapros = preg_replace("|(.*)&query=|","",$zapros);
$zapros = preg_replace("|(.*)&text=|","",$zapros);
$zapros = preg_replace("|(.*)?query=|","",$zapros);
$zapros = preg_replace("|(.*)?text=|","",$zapros);
$zapros = preg_replace("|&clid=(.*)|","",$zapros);
$zapros = preg_replace("|&msp=(.*)|","",$zapros);
$zapros = preg_replace("|&stpar2(.*)|","",$zapros);
$zapros = preg_replace("|&stpar2(.*)|","",$zapros);
$zapros = preg_replace("|&rpt=(.*)|","",$zapros);
$zapros = preg_replace("|&stype=(.*)|","",$zapros);
$zapros = preg_replace("|&numdoc=(.*)|","",$zapros);
$zapros = preg_replace("|&s=(.*)|","",$zapros);
$zapros = preg_replace("|&from=(.*)|","",$zapros);
$zapros = preg_replace("|&lr=(.*)|","",$zapros);
echo ceil(ceil($i / 2) - ($i / 2)) == 0 ? '
' : '
';
echo''.$arr['browser'].'
IP:
'.$arr['ip'].' | Время:
'.$vr.' | Запрос:
'.$zapros.'';
++$i;
} echo '
Всего: ' . $total . '
';
if ($total > $kmess){
echo '' . pagenav('statistik.php?act=yandex&', $start, $total, $kmess) . '';
echo '
';}
echo'';
echo'
';
break;
////// Рамблер запросы ///////
case 'rambler':
echo'
Статистика по Рамблеру
';
$host111 = mysql_query("SELECT * FROM `counter` WHERE `ref` LIKE '%rambler.ru%' GROUP BY `ref`;");
$total = mysql_num_rows($host111);
$host111 = mysql_query("SELECT * FROM `counter` WHERE `ref` LIKE '%rambler.ru%' GROUP BY `ref` ORDER BY `counter`.`date` DESC LIMIT " . $start . "," . $kmess);
while ($arr = mysql_fetch_array($host111)){
$vrp = $arr['date'] + $sdvig * 3600;
$vr = date("H:i", $vrp);
$zapros = urldecode($arr['ref']);
$zapros = preg_replace("|(.*)&words=|","",$zapros);
$zapros = preg_replace("|(.*)?query=|","",$zapros);
$zapros = preg_replace("|(.*)&query=|","",$zapros);
$zapros = preg_replace("|&start=(.*)|","",$zapros);
$zapros = preg_replace("|&page=(.*)|","",$zapros);
$zapros = preg_replace("|&old_q=(.*)|","",$zapros);
if (mb_check_encoding($zapros, 'UTF-8'))
{ } elseif (mb_check_encoding($zapros, 'windows-1251'))
{ $zapros = iconv("windows-1251", "UTF-8", $zapros);
} elseif (mb_check_encoding($zapros, 'KOI8-R'))
{ $zapros = iconv("KOI8-R", "UTF-8", $zapros); }else{ }
echo ceil(ceil($i / 2) - ($i / 2)) == 0 ? '
' : '
';
echo''.$arr['browser'].'
IP:
'.$arr['ip'].' | Время:
'.$vr.' | Запрос:
'.$zapros.'';
++$i;
} echo '
Всего: ' . $total . '
';
if ($total > $kmess){
echo '' . pagenav('statistik.php?act=rambler&', $start, $total, $kmess) . '';
echo '
';}
echo'';
echo'
';
break;
////// Google запросы ///////
case 'google':
echo'
Статистика по Гуглу
';
$host111 = mysql_query("SELECT * FROM `counter` WHERE `ref` LIKE '%google.%' GROUP BY `ref`;");
$total = mysql_num_rows($host111);
$host111 = mysql_query("SELECT * FROM `counter` WHERE `ref` LIKE '%google.%' GROUP BY `ref` ORDER BY `counter`.`date` DESC LIMIT " . $start . "," . $kmess);
while ($arr = mysql_fetch_array($host111)){
$vrp = $arr['date'] + $sdvig * 3600;
$vr = date("H:i", $vrp);
$zapros = urldecode($arr['ref']);
$zapros = preg_replace("|(.*)?q=|","",$zapros);
$zapros = preg_replace("|(.*)&q=|","",$zapros);
$zapros = preg_replace("|(.*)&q=|","",$zapros);
$zapros = preg_replace("|&hl=(.*)|","",$zapros);
$zapros = preg_replace("|&btnG=(.*)|","",$zapros);
$zapros = preg_replace("|&channel=(.*)|","",$zapros);
$zapros = preg_replace("|&sourceid=(.*)|","",$zapros);
if (mb_check_encoding($zapros, 'UTF-8'))
{ } elseif (mb_check_encoding($zapros, 'windows-1251'))
{ $zapros = iconv("windows-1251", "UTF-8", $zapros);
} elseif (mb_check_encoding($zapros, 'KOI8-R'))
{ $zapros = iconv("KOI8-R", "UTF-8", $zapros); }
echo ceil(ceil($i / 2) - ($i / 2)) == 0 ? '
' : '
';
echo''.$arr['browser'].'
IP:
'.$arr['ip'].' | Время:
'.$vr.' | Запрос:
'.$zapros.'';
++$i;
} echo '
Всего: ' . $total . '
';
if ($total > $kmess){
echo '' . pagenav('statistik.php?act=google&', $start, $total, $kmess) . '';
echo '
';}
echo'';
echo'
';
break;
////// mail.ru запросы ///////
case 'mail':
echo'
Статистика по Майлу
';
$host111 = mysql_query("SELECT * FROM `counter` WHERE `ref` LIKE '%mail.ru%' GROUP BY `ref`;");
$total = mysql_num_rows($host111);
$host111 = mysql_query("SELECT * FROM `counter` WHERE `ref` LIKE '%mail.ru%' GROUP BY `ref` ORDER BY `counter`.`date` DESC LIMIT " . $start . "," . $kmess);
while ($arr = mysql_fetch_array($host111)){
$vrp = $arr['date'] + $sdvig * 3600;
$vr = date("H:i", $vrp);
$zapros = urldecode($arr['ref']);
$zapros = preg_replace("|(.*)&q=|","",$zapros);
$zapros = preg_replace("|(.*)&q=|","",$zapros);
$zapros = preg_replace("|(.*)?q=|","",$zapros);
$zapros = preg_replace("|&no_morph=(.*)|","",$zapros);
if (mb_check_encoding($zapros, 'UTF-8'))
{ } elseif (mb_check_encoding($zapros, 'windows-1251'))
{ $zapros = iconv("windows-1251", "UTF-8", $zapros);
} elseif (mb_check_encoding($zapros, 'KOI8-R'))
{ $zapros = iconv("KOI8-R", "UTF-8", $zapros); }
echo ceil(ceil($i / 2) - ($i / 2)) == 0 ? '
' : '
';
echo''.$arr['browser'].'
IP:
'.$arr['ip'].' | Время:
'.$vr.' | Запрос:
'.$zapros.'';
++$i;
} echo '
Всего: ' . $total . '
';
if ($total > $kmess){
echo '' . pagenav('statistik.php?act=mail&', $start, $total, $kmess) . '';
echo '
';}
echo'';
echo'
';
break;
////// gogo.ru запросы ///////
case 'gogo':
echo'
Статистика по GOGO
';
$host111 = mysql_query("SELECT * FROM `counter` WHERE `ref` LIKE '%gogo.ru%' GROUP BY `ref`;");
$total = mysql_num_rows($host111);
$host111 = mysql_query("SELECT * FROM `counter` WHERE `ref` LIKE '%gogo.ru%' GROUP BY `ref` ORDER BY `counter`.`date` DESC LIMIT " . $start . "," . $kmess);
while ($arr = mysql_fetch_array($host111)){
$vrp = $arr['date'] + $sdvig * 3600;
$vr = date("H:i", $vrp);
$zapros = urldecode($arr['ref']);
if (mb_check_encoding($zapros, 'UTF-8'))
{ } elseif (mb_check_encoding($zapros, 'windows-1251'))
{ $zapros = iconv("windows-1251", "UTF-8", $zapros);
} elseif (mb_check_encoding($zapros, 'KOI8-R'))
{ $zapros = iconv("KOI8-R", "UTF-8", $zapros); }
echo ceil(ceil($i / 2) - ($i / 2)) == 0 ? '
' : '
';
echo''.$arr['browser'].'
IP:
'.$arr['ip'].' | Время:
'.$vr.' | Запрос:
'.$zapros.'';
++$i;
} echo '
Всего: ' . $total . '
';
if ($total > $kmess){
echo '' . pagenav('statistik.php?act=gogo&', $start, $total, $kmess) . '';
echo '
';}
echo'';
echo'
';
break;
////// Yahoo запросы ///////
case 'yahoo':
echo'
Статистика по Yahoo
';
$host111 = mysql_query("SELECT * FROM `counter` WHERE `ref` LIKE '%yahoo.%' GROUP BY `ref`;");
$total = mysql_num_rows($host111);
$host111 = mysql_query("SELECT * FROM `counter` WHERE `ref` LIKE '%yahoo.%' GROUP BY `ref` ORDER BY `counter`.`date` DESC LIMIT " . $start . "," . $kmess);
while ($arr = mysql_fetch_array($host111)){
$vrp = $arr['date'] + $sdvig * 3600;
$vr = date("H:i", $vrp);
$zapros = urldecode($arr['ref']);
if (mb_check_encoding($zapros, 'UTF-8'))
{ } elseif (mb_check_encoding($zapros, 'windows-1251'))
{ $zapros = iconv("windows-1251", "UTF-8", $zapros);
} elseif (mb_check_encoding($zapros, 'KOI8-R'))
{ $zapros = iconv("KOI8-R", "UTF-8", $zapros); }
echo ceil(ceil($i / 2) - ($i / 2)) == 0 ? '
' : '
';
echo''.$arr['browser'].'
IP:
'.$arr['ip'].' | Время:
'.$vr.' | Запрос:
'.$zapros.'';
++$i;
} echo '
Всего: ' . $total . '
';
if ($total > $kmess){
echo '' . pagenav('statistik.php?act=bing&', $start, $total, $kmess) . '';
echo '
';}
echo'';
echo'
';
break;
////// Bing запросы ///////
case 'bing':
echo'
Статистика по Bing
';
$host111 = mysql_query("SELECT * FROM `counter` WHERE `ref` LIKE '%bing.%' GROUP BY `ref`;");
$total = mysql_num_rows($host111);
$host111 = mysql_query("SELECT * FROM `counter` WHERE `ref` LIKE '%bing.%' GROUP BY `ref` ORDER BY `counter`.`date` DESC LIMIT " . $start . "," . $kmess);
while ($arr = mysql_fetch_array($host111)){
$vrp = $arr['date'] + $sdvig * 3600;
$vr = date("H:i", $vrp);
$zapros = urldecode($arr['ref']);
$zapros = preg_replace("|(.*)&q=|","",$zapros);
$zapros = preg_replace("|(.*)&Q=|","",$zapros);
$zapros = preg_replace("|(.*)?q=|","",$zapros);
$zapros = preg_replace("|(.*)&q=|","",$zapros);
$zapros = preg_replace("|&D=(.*)|","",$zapros);
$zapros = preg_replace("|&first=(.*)|","",$zapros);
if (mb_check_encoding($zapros, 'UTF-8'))
{ } elseif (mb_check_encoding($zapros, 'windows-1251'))
{ $zapros = iconv("windows-1251", "UTF-8", $zapros);
} elseif (mb_check_encoding($zapros, 'KOI8-R'))
{ $zapros = iconv("KOI8-R", "UTF-8", $zapros); }
echo ceil(ceil($i / 2) - ($i / 2)) == 0 ? '
' : '
';
echo''.$arr['browser'].'
IP:
'.$arr['ip'].' | Время:
'.$vr.' | Запрос:
'.$zapros.'';
++$i;
} echo '
Всего: ' . $total . '
';
if ($total > $kmess){
echo '' . pagenav('statistik.php?act=bing&', $start, $total, $kmess) . '';
echo '
';}
echo'';
echo'
';
break;
////// Nigma запросы ///////
case 'nigma':
echo'
Статистика по Nigma
';
$host111 = mysql_query("SELECT * FROM `counter` WHERE `ref` LIKE '%nigma.%' GROUP BY `ref`;");
$total = mysql_num_rows($host111);
$host111 = mysql_query("SELECT * FROM `counter` WHERE `ref` LIKE '%nigma.%' GROUP BY `ref` ORDER BY `counter`.`date` DESC LIMIT " . $start . "," . $kmess);
while ($arr = mysql_fetch_array($host111)){
$vrp = $arr['date'] + $sdvig * 3600;
$vr = date("H:i", $vrp);
$zapros = urldecode($arr['ref']);
//$zapros = preg_replace("|(.*)&s=|","",$zapros);
$zapros = preg_replace("|(.*)&s=|","",$zapros);
$zapros = preg_replace("|(.*)php?s=|","",$zapros);
$zapros = preg_replace("|&gl=(.*)|","",$zapros);
if (mb_check_encoding($zapros, 'UTF-8'))
{ } elseif (mb_check_encoding($zapros, 'windows-1251'))
{ $zapros = iconv("windows-1251", "UTF-8", $zapros);
} elseif (mb_check_encoding($zapros, 'KOI8-R'))
{ $zapros = iconv("KOI8-R", "UTF-8", $zapros); }
echo ceil(ceil($i / 2) - ($i / 2)) == 0 ? '
' : '
';
echo''.$arr['browser'].'
IP:
'.$arr['ip'].' | Время:
'.$vr.' | Запрос:
'.$zapros.'';
++$i;
} echo '
Всего: ' . $total . '
';
if ($total > $kmess){
echo '' . pagenav('statistik.php?act=nigma&', $start, $total, $kmess) . '';
echo '
';}
echo'';
echo'
';
break;
////// Операционные системы ///////
case 'os':
///////// Ищем в базе //////////////
echo'
Операционные системы
';
$winxp = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%Windows NT 5.1%' GROUP BY `ip`, `browser`;");
$vista = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%Windows NT 6.0%' GROUP BY `ip`, `browser`;");
$seven = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%Windows NT 6.1%' GROUP BY `ip`, `browser`;");
$linux = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%linux%' GROUP BY `ip`, `browser`;");
$symbian91 = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%SymbianOS/9.1;%' GROUP BY `ip`, `browser`;");
$symbian92 = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%SymbianOS/9.2;%' GROUP BY `ip`, `browser`;");
$symbian93 = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%SymbianOS/9.3;%' GROUP BY `ip`, `browser`;");
$symbian94 = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%SymbianOS/9.4;%' GROUP BY `ip`, `browser`;");
$symbianother = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%Symbian OS;%' GROUP BY `ip`, `browser`;");
//////// Считаем ////////////
$winxp = mysql_num_rows($winxp);
$vista = mysql_num_rows($vista);
$seven = mysql_num_rows($seven);
$linux = mysql_num_rows($linux);
$symbian91 = mysql_num_rows($symbian91);
$symbian92 = mysql_num_rows($symbian92);
$symbian93 = mysql_num_rows($symbian93);
$symbian94 = mysql_num_rows($symbian94);
$symbianother = mysql_num_rows($symbianother);
/////// Если есть, выводим ////////
if($winxp !== 0){
echo''; }
if($vista !== 0){
echo''; }
if($seven !== 0){
echo''; }
if($linux !== 0){
echo''; }
if($symbian91 !== 0){
echo''; }
if($symbian92 !== 0){
echo''; }
if($symbian93 !== 0){
echo''; }
if($symbian94 !== 0){
echo''; }
if($symbianother !== 0){
echo''; }
echo '
---------------------------
';
echo'
';
break;
default:
echo '
Просмотр Статистики
';
echo'
-----------
';
break;
}
require_once ('../incfiles/end.php');
?>