Статистика по хостам'; $hosts = @mysql_query("select * from `counter` GROUP BY `ip`, `browser`;"); $total = mysql_num_rows($hosts); $hosts = @mysql_query("select * from `counter` GROUP BY `ip`, `browser` ORDER BY `counter`.`date` DESC LIMIT " . $start . "," . $kmess); while ($hos = mysql_fetch_array($hosts)) { $number = @mysql_query("select * from `counter` where `browser` = '" . $hos['browser'] . "';"); $perehod = mysql_num_rows($number); echo ceil(ceil($i / 2) - ($i / 2)) == 0 ? '
' : '
'; $vrp = $hos['date'] + $sdvig * 3600; $vr = date("H:i", $vrp); echo''.$hos['browser'].'
IP: '.$hos['ip'].' - '.$vr.' - Переходов: '.$perehod.'
'; ++$i; } echo '
Всего: ' . $total . '
'; if ($total > $kmess){ echo '' . pagenav('statistik.php?act=host&', $start, $total, $kmess) . ''; echo '
';} echo'
'; break; ////// Роботы /////// case 'robots': echo'
Статистика по Роботам
'; $host111 = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%http://%' OR `browser` LIKE '%Yandex%' OR `browser` LIKE '%google%' OR `browser` LIKE '%rambler%' GROUP BY `ip`, `browser`;"); $total = mysql_num_rows($host111); $host111 = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%http://%' OR `browser` LIKE '%Yandex%' OR `browser` LIKE '%google%' OR `browser` LIKE '%rambler%' 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=robots&', $start, $total, $kmess) . ''; echo '
';} echo'
'; break; /////////// Откуда идут //////// case 'referer': echo'
Откуда приходят
'; $hosts = @mysql_query("select * from `counter` GROUP BY `site`;"); $total = mysql_num_rows($hosts); $hosts = @mysql_query("select * from `counter` GROUP BY `site` ORDER BY `counter`.`date` DESC LIMIT " . $start . "," . $kmess); while ($hos = mysql_fetch_array($hosts)) { $number = @mysql_query("select * from `counter` where `site` = '" . $hos['site'] . "';"); $perehod = mysql_num_rows($number); $d = $i / 2; $d1 = ceil($d); $d2 = $d1 - $d; $d3 = ceil($d2); if ($d3 == 0) { $div = "
"; } else { $div = "
"; } $vrp = $hos['date'] + $sdvig * 3600; $vr = date("H:i", $vrp); if($hos['site'] !== "Не определено" && $hos['site'] !== $_SERVER['HTTP_HOST'] && $hos['site'] !== "www.".$_SERVER['HTTP_HOST']){ echo''.$div.''.$hos['site'].'
'.$vr.' - Переходов: '.$perehod.'
'; } ++$i; } echo '
Всего: ' . $total . '
'; if ($total > $kmess){ echo '' . pagenav('statistik.php?act=referer&', $start, $total, $kmess) . ''; echo '
';} echo'
'; break; ////// Страницы сайтов с которых приходят //////// case 'siteadr': echo'
Статистика по Страницам
'; $host111 = mysql_query("SELECT * FROM `counter` WHERE `ref` LIKE '%".$site."%' GROUP BY `ref`;"); $total = mysql_num_rows($host111); $host111 = mysql_query("SELECT * FROM `counter` WHERE `ref` LIKE '%".$site."%' GROUP BY `ref` ORDER BY `counter`.`date` DESC LIMIT " . $start . "," . $kmess); while ($arr = mysql_fetch_array($host111)){ $number = @mysql_query("select * from `counter` where `ref` = '" . $arr['ref'] . "';"); $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['ref'].'
Перех: '.$perehod.' | '.$vr.'
'; ++$i; } echo '
Всего: ' . $total . '
'; if ($total > $kmess){ echo '' . pagenav('statistik.php?act=siteadr&', $start, $total, $kmess) . ''; echo '
';} echo''; echo'
'; break; /////////// Популярные разделы //////// case 'pop': echo'
Популярные разделы
'; $hosts = @mysql_query("select * from `counter` GROUP BY `pop`;"); $total = mysql_num_rows($hosts); $hosts = @mysql_query("select * from `counter` GROUP BY `pop` ORDER BY `counter`.`date` DESC LIMIT " . $start . "," . $kmess); while ($hos = mysql_fetch_array($hosts)) { $number = @mysql_query("select * from `counter` where `pop` = '" . $hos['pop'] . "';"); $perehod = mysql_num_rows($number); echo ceil(ceil($i / 2) - ($i / 2)) == 0 ? '
' : '
'; $vrp = $hos['date'] + $sdvig * 3600; $vr = date("H:i", $vrp); if($hos['pop'] !== "/"){ echo'Заголовок: '.$hos['head'].'
Путь: '.$hos['pop'].'
'.$vr.' - Переходов: '.$perehod.'
'; }else{ echo'Главная
'.$vr.' - Переходов: '.$perehod.'
'; } ++$i; } echo '
Всего: ' . $total . '
'; if ($total > $kmess){ echo '' . pagenav('statistik.php?act=pop&', $start, $total, $kmess) . ''; echo '
';} echo'
'; break; ////// Телефоны /////// case 'phones': echo'
Статистика по Телефонам/Браузерам
'; $nokia = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%nokia%' GROUP BY `ip`, `browser`;"); $sie = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE 'SIE%' OR `browser` LIKE '%benq%' GROUP BY `ip`, `browser`;"); $sonieric = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%sony%' OR `browser` LIKE '%sonyeric%' GROUP BY `ip`, `browser`;"); $sec = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%sec%' OR `browser` LIKE '%samsung%' GROUP BY `ip`, `browser`;"); $lg = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%lg%' GROUP BY `browser`;"); $mot = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%mot%' OR `browser` LIKE '%motorol%' GROUP BY `ip`, `browser`;"); $nec = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%nec%' GROUP BY `ip`, `browser`;"); $philips = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%philips%' GROUP BY `ip`, `browser`;"); $pantech = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%pantech%' GROUP BY `ip`, `browser`;"); $sagem = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%sagem%' GROUP BY `ip`, `browser`;"); $fly = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%fly%' GROUP BY `browser`;"); $panasonic = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%panasonic%' GROUP BY `ip`, `browser`;"); $om = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%opera mini%' GROUP BY `ip`, `browser`;"); $komp = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%windows%' OR `browser` LIKE '%linux%' GROUP BY `ip`, `browser`;"); $nokia = mysql_num_rows($nokia); $sie = mysql_num_rows($sie); $sonieric = mysql_num_rows($sonieric); $sec = mysql_num_rows($sec); $lg = mysql_num_rows($lg); $mot = mysql_num_rows($mot); $nec = mysql_num_rows($nec); $philips = mysql_num_rows($philips); $sagem = mysql_num_rows($sagem); $fly = mysql_num_rows($fly); $panasonic = mysql_num_rows($panasonic); $om = mysql_num_rows($om); $komp = mysql_num_rows($komp); if($nokia !== 0){ echo''; } if($sie !== 0){ echo''; } if($sonieric !== 0){ echo''; } if($sec !== 0){ echo''; } if($lg !== 0){ echo''; } if($mot !== 0){ echo''; } if($nec !== 0){ echo''; } if($philips !== 0){ echo''; } if($sagem !== 0){ echo''; } if($fly !== 0){ echo''; } if($panasonic !== 0){ echo''; } if($om !== 0){ echo''; } if($komp !== 0){ echo''; } echo '
------------
'; echo'
'; break; ////// Nokia /////// case 'nokia': echo'
Статистика по телефонам Nokia
'; $host111 = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%nokia%' GROUP BY `ip`, `browser`;"); $total = mysql_num_rows($host111); $host111 = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%nokia%' 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=nokia&', $start, $total, $kmess) . ''; echo '
';} echo''; echo'
'; break; ////// Siemens /////// case 'sie': echo'
Статистика по телефонам Siemens
'; $host111 = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE 'SIE%' OR `browser` LIKE '%benq%' GROUP BY `ip`, `browser`;"); $total = mysql_num_rows($host111); $host111 = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE 'SIE%' OR `browser` LIKE '%benq%' 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=sie&', $start, $total, $kmess) . ''; echo '
';} echo''; echo'
'; break; ////// SonyEricsson /////// case 'se': echo'
Статистика по телефонам Sony Ericsson
'; $host111 = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%sony%' OR `browser` LIKE '%sonyeric%' GROUP BY `ip`, `browser`;"); $total = mysql_num_rows($host111); $host111 = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%sony%' OR `browser` LIKE '%sonyeric%' 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=se&', $start, $total, $kmess) . ''; echo '
';} echo''; echo'
'; break; ////// Samsung /////// case 'sec': echo'
Статистика по телефонам Samsung
'; $host111 = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%sec%' OR `browser` LIKE '%samsung%' GROUP BY `ip`, `browser`;"); $total = mysql_num_rows($host111); $host111 = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%sec%' OR `browser` LIKE '%samsung%' 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=sec&', $start, $total, $kmess) . ''; echo '
';} echo''; echo'
'; break; ////// LG /////// case 'lg': echo'
Статистика по телефонам LG
'; $host111 = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%lg%' GROUP BY `ip`, `browser`;"); $total = mysql_num_rows($host111); $host111 = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%lg%' 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=lg&', $start, $total, $kmess) . ''; echo '
';} echo''; echo'
'; break; ////// Motorola /////// case 'mot': echo'
Статистика по телефонам Motorola
'; $host111 = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%mot%' OR `browser` LIKE '%motorol%' GROUP BY `ip`, `browser`;"); $total = mysql_num_rows($host111); $host111 = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%mot%' OR `browser` LIKE '%motorol%' 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=mot&', $start, $total, $kmess) . ''; echo '
';} echo''; echo'
'; break; ////// NEC /////// case 'nec': echo'
Статистика по телефонам NEC
'; $host111 = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%nec%' GROUP BY `ip`, `browser`;"); $total = mysql_num_rows($host111); $host111 = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%nec%' 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=nec&', $start, $total, $kmess) . ''; echo '
';} echo''; echo'
'; break; ////// philips /////// case 'philips': echo'
Статистика по телефонам Philips
'; $host111 = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%philips%' GROUP BY `ip`, `browser`;"); $total = mysql_num_rows($host111); $host111 = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%philips%' 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=philips&', $start, $total, $kmess) . ''; echo '
';} echo''; echo'
'; break; ////// SAGEM /////// case 'sagem': echo'
Статистика по телефонам SAGEM
'; $host111 = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%sagem%' GROUP BY `ip`, `browser`;"); $total = mysql_num_rows($host111); $host111 = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%sagem%' 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=sagem&', $start, $total, $kmess) . ''; echo '
';} echo''; echo'
'; break; ////// ФЛЮ /////// case 'fly': echo'
Статистика по телефонам Fly
'; $host111 = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%fly%' GROUP BY `ip`, `browser`;"); $total = mysql_num_rows($host111); $host111 = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%fly%' 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=fly&', $start, $total, $kmess) . ''; echo '
';} echo''; echo'
'; break; ////// Panasonic /////// case 'panasonic': echo'
Статистика по телефонам Panasonic
'; $host111 = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%panasonic%' GROUP BY `ip`, `browser`;"); $total = mysql_num_rows($host111); $host111 = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%panasonic%' 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=panasonic&', $start, $total, $kmess) . ''; echo '
';} echo''; echo'
'; break; ////// Опера мини /////// case 'om': echo'
Статистика по Opera Mini
'; $host111 = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%opera mini%' GROUP BY `ip`, `browser`;"); $total = mysql_num_rows($host111); $host111 = mysql_query("SELECT * FROM `counter` WHERE `browser` LIKE '%opera mini%' 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=om&', $start, $total, $kmess) . ''; echo '
';} echo''; echo'
'; break; ////// Компьютеры /////// case 'komp': 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'); ?>