View file public_html/pages/referer.php

File size: 2.98Kb
<?php
#-----------------------------------------------------#
#          ********* WAP-MOTORS *********             #
#             Made by   :  VANTUZ                     #
#               E-mail  :  [email protected]         #
#                 Site  :  http://pizdec.ru           #
#             WAP-Site  :  http://visavi.net          #
#                  ICQ  :  36-44-66                   #
#  Вы не имеете право вносить изменения в код скрипта #
#-----------------------------------------------------#	
require_once"../template/start.php";
require_once"../template/regglobals.php";
require_once"../template/config.php";
require_once"../template/functions.php";
require_once"../template/antidos.php";
require_once"../template/cookies.php";
require_once"../template/gzip.php";
require_once"../template/header.php";
require_once"../template/referer.php";
include_once"../themes/$config_themes/index.php";
	
echo'<img src="../images/img/motors.gif" alt=""> <b>Кто-откуда</b><br><br>';

$reffile = file(BASEDIR."local/referer.dat");

foreach($reffile as $refvalue){
$data = explode("|",$refvalue);
if($data[0]!=""){
$arrsite[]=$data[0];
$arralltime[$data[0]]=$data[1];
$arrallip[$data[0]]=$data[2];
}}

$countvalues =  array_count_values ($arrsite);

arsort($countvalues);

$newkey = array_keys($countvalues);
$newvalues = array_values($countvalues);

$total = count($countvalues);  

$start = (int)$_GET['start'];
if($start < 0 || $start > $total){$start = 0;}
if ($total < $start + $config_showref){ $end = $total; }
else {$end = $start + $config_showref; }
for ($i = $start; $i < $end; $i++){


echo '<img src="../images/img/online.gif" alt=""> '.($i+1).'. <b><a href="http://'.$newkey[$i].'">'.$newkey[$i].'</a></b> ('.date_fixed($arralltime[$newkey[$i]]).')<br>';
echo 'Переходов: '. $newvalues[$i].'<br>Последний IP: '. $arrallip[$newkey[$i]].'<hr>';
}

    
if ($start != 0) {echo '<a href="referer.php?start='.($start - $config_showref).'&amp;'.SID.'">&lt;-Назад</a>';}else{echo'&lt;-Назад';}
echo ' | ';
if ($total > $start + $config_showref) {echo ' <a href="referer.php?start='.($start + $config_showref).'&amp;'.SID.'">Далее-&gt;</a>';}else{echo'Далее-&gt;';} 


if($total>0){

$ba=ceil($total/$config_showref);
$ba2=$ba*$config_showref-$config_showref;

echo '<br><hr>Страницы:';
$asd=$start-($config_showref*3);
$asd2=$start+($config_showref*4);

if($asd<$total && $asd>0){echo ' <a href="referer.php?start=0&amp;'.SID.'">1</a> ... ';}

for($i=$asd; $i<$asd2;){

if($i<$total && $i>=0){
$ii=floor(1+$i/$config_showref);

if ($start==$i) {
echo ' <b>('.$ii.')</b>';
} else {
echo ' <a href="referer.php?start='.$i.'&amp;'.SID.'">'.$ii.'</a>';
}}


$i=$i+$config_showref;}
if($asd2<$total){echo ' ... <a href="referer.php?start='.$ba2.'&amp;'.SID.'">'.$ba.'</a>';}
}


echo'<br><br><img src="../images/img/homepage.gif" alt=""> <a href="../index.php?'.SID.'">На главную</a>';
include_once "../themes/$config_themes/foot.php";
?>