View file wmzcounter/megabs.php

File size: 13.95Kb
<?php

###################################################################
##                                                               ##
## Модуль "VD counter" является многофункциональным счетчиком    ##
## посетителей сайта.                                            ##
## Автор: Администратор www.wmzshop.ru                           ##
## Страница автора: http://www.wmzshop.ru                        ##
## В случае проблем с установкой  (или другие вопросы), можете   ##
## обратиться по E-mail: [email protected] или ICQ: 221484848     ##
##                                                               ##
##                                                               ##
##                                                               ##
##                                                               ##
###################################################################

###################################################################
##                                                               ##
## ВНИМАНИЕ Любая модернизация файлов приведет к                 ##
## неработоспособности скрипта. Изменения в файлах               ##
## возможны лишь с согласия автора.                              ##
##                                                               ##
###################################################################


?>
<html>

<head>
  <title>Статистика ОС, JavaScript и Браузеров</title>
  <META HTTP-EQUIV="content-type" CONTENT="TEXT/HTML; CHARSET=windows-1251">
</head>

<body>
 <img src=http://<?php echo"$HTTP_HOST" ?>/wmzcounter/countimg/logo.gif width=760 height=150 border=0>  <hr>
<?php
$tm=6000;



       if (!empty($supermes) && !empty($yearpost))
     {
     $year=$yearpost;
     $mes=$mespost;
     $day="";
      include"inc/calendar.inc";
       $macho.="$year/$mes/";
    chdir($macho);
      for ($days=1; $days<32; $days++)
      {
       if ($days<=9)
      {
      $zero=0;
      $days=$zero.$days;
      }

      @$Windows=file($days.".Windows");
      @$Windowssum=$Windowssum+$Windows[0];

     @$Mac=file($days.".Mac");
      @$Macsum=$Macsum+$Mac[0];

   @$Linux=file($days.".Linux");
      @$Linuxsum=$Linuxsum+$Linux[0];

   @$FreeBSD=file($days.".FreeBSD");
      @$FreeBSDsum=$FreeBSDsum+$FreeBSD[0];

   @$SunOS=file($days.".SunOS");
      @$SunOSsum=$SunOSsum+$SunOS[0];

      @$IRIX=file($days.".IRIX");
      @$IRIXsum=$IRIXsum+$IRIX[0];

 @$BeOS=file($days.".BeOS");
      @$BeOSsum=$BeOSsum+$BeOS[0];

  @$OS2=file($days.".OS2");
      @$OS2sum=$OS2sum+$OS2[0];

            @$AIX=file($days.".AIX");
      @$AIXsum=$AIXsum+$AIX[0];

 @$sother=file($days.".sother");
      @$sothersum=$sothersum+$sother[0];

    @$bother=file($days.".bother");
      @$bothersum=$bothersum+$bother[0];

    @$Bot=file($days.".Bot");
      @$Botsum=$Botsum+$Bot[0];

 @$Konqueror=file($days.".Konqueror");
      @$Konquerorsum=$Konquerorsum+$Konqueror[0];

   @$WebTV=file($days.".WebTV");
      @$WebTVsum=$WebTVsum+$WebTV[0];

  @$Opera=file($days.".Opera");
      @$Operasum=$Operasum+$Opera[0];

@$Lynx=file($days.".Lynx");
      @$Lynxsum=$Lynxsum+$Lynx[0];

   @$MSIE=file($days.".MSIE");
      @$MSIEsum=$MSIEsum+$MSIE[0];

   @$Netscape=file($days.".Netscape");
      @$Netscapesum=$Netscapesum+$Netscape[0];

    @$jsoff=file($days.".jsoff");
      @$jsoffsum=$jsoffsum+$jsoff[0];

   @$json=file($days.".json");
      @$jsonsum=$jsonsum+$json[0];


      }


       @$Windows[0]=$Windowssum;
       @$Mac[0]=$Macsum;
       @$Linux[0]=$Linuxsum;
       @$FreeBSD[0]=$FreeBSDsum;
       @$SunOS[0]=$SunOSsum;
       @$IRIX[0]=$IRIXsum;
       @$BeOS[0]=$BeOSsum;
       @$OS2[0]=$OS2sum;
       @$AIX[0]=$AIXsum;
       @$sother[0]=$sothersum;

       @$jsoff[0]=$jsoffsum;
       @$json[0]=$jsonsum;

       @$Netscape[0]=$Netscapesum;
       @$MSIE[0]=$MSIEsum;
       @$Lynx[0]=$Lynxsum;
       @$Opera[0]=$Operasum;
       @$WebTV[0]=$WebTVsum;
       @$Konqueror[0]=$Konquerorsum;
       @$Bot[0]=$Botsum;
       @$bother[0]=$bothersum;

     }
     else
     {

      if (!empty($yearpost) && !empty($mespost) && !empty($daypost))
      {
      $year=$yearpost;
      $mes=$mespost;
      $day=$daypost;


    $nissan=getcwd();
    $macho.="$year/$mes/";
    chdir($macho);


    @$Windows=file($day.".Windows");
    @$Mac=file($day.".Mac");
 @$Linux=file($day.".Linux");
 @$FreeBSD=file($day.".FreeBSD");
@$SunOS=file($day.".SunOS");
@$IRIX=file($day.".IRIX");
 @$BeOS=file($day.".BeOS");
@$OS2=file($day.".OS2");
@$AIX=file($day.".AIX");
 @$sother=file($day.".sother");

  //Javacript
  @$jsoff=file($day.".jsoff");
  @$json=file($day.".json");





      //Браузеры
   @$Netscape=file($day.".Netscape");
   @$MSIE=file($day.".MSIE");
  @$Lynx=file($day.".Lynx");
  @$Opera=file($day.".Opera");
  @$WebTV=file($day.".WebTV");
  @$Konqueror=file($day.".Konqueror");
   @$Bot=file($day.".Bot");
    @$bother=file($day.".bother");

    }  }

  //Блок обнуления в случае отсутствия файла базы данных  для Браузеров

if (empty($Netscape[0]))
{
$Netscape[0]="0";
}
 if (empty($MSIE[0]))
{
$MSIE[0]="0";
}
if (empty($Lynx[0]))
{
$Lynx[0]="0";
}
if (empty($Opera[0]))
{
$Opera[0]="0";
}
if (empty($WebTV[0]))
{
$WebTV[0]="0";
}
if (empty($Konqueror[0]))
{
$Konqueror[0]="0";
}
if (empty($Bot[0]))
{
$Bot[0]="0";
}

if (empty($bother[0]))
{
$bother[0]="0";
}







 //Блок обнуления в случае отсутствия файла базы данных  для ОС

if (empty($Windows[0]))
{
$Windows[0]="0";
}
if (empty($Mac[0]))
{
$Mac[0]="0";
}
if (empty($Linux[0]))
{
$Linux[0]="0";
}
if (empty($FreeBSD[0]))
{
$FreeBSD[0]="0";
}
if (empty($SunOS[0]))
{
$SunOS[0]="0";
}
if (empty($IRIX[0]))
{
$IRIX[0]="0";
}
if (empty($BeOS[0]))
{
$BeOS[0]="0";
}
if (empty($OS2[0]))
{
$OS2[0]="0";
}
if (empty($AIX[0]))
{
$AIX[0]="0";
}
if (empty($sother[0]))
{
$sother[0]="0";
}

  //Блок обнуления в случае отсутствия файла базы данных  для JavaScript
  if (empty($jsoff[0]))
{
$jsoff[0]="0";
}
  if (empty($json[0]))
{
$json[0]="0";
}

if (!empty($supermes))
{
$day="";
$mes="";
}

 @$fp = fsockopen ("$HTTP_HOST", 80, $errno, $errstr, 1);
   if (!$fp) {
   echo "<br>Технические проблемы.<br>
   Попробуйте запустить скрипт ещё раз через некоторое время.
   <br><hr>
   Дизайн и программирование<br>&copy; <a href=www.wmzshop.ru>www.wmzshop.ru </a>";
   exit;
   }
   else
   {
   fputs ($fp, "GET / HTTP/1.0\r\nHost: $HTTP_HOST\r\n\r\n");
   while (!feof($fp)) {
   @$data.= fgets ($fp,128);
   }
   fclose ($fp);
   if(eregi("www.wmzshop.ru",$data))
   {

 echo "Статистика ОС отображается в хостах за $day.$mest$mes.$year<br><br>";
//Windows
if (!empty($Windows[0]))
{
$Windowsimg="<img src=countimg/host.gif width=$Windows[0] height=5 alt='Хосты' border=1>";
}
else
{
$Windowsimg="";
}
echo "<table width=$tm border=0>
<tr>
<td width=120>
Windows
</td>
<td width=30>
$Windows[0]
</td>
<td width=%100>
$Windowsimg
</td>
</tr>
</table>";


//Mac
if (!empty($Mac[0]))
{
$Macimg="<img src=countimg/host.gif width=$Mac[0] height=5 alt='Хосты' border=1>";
}
else
{
$Macimg="";
}
echo "<table width=$tm border=0>
<tr>
<td width=120>
Mac
</td>
<td width=30>
$Mac[0]
</td>
<td width=%100>
$Macimg
</td>
</tr>
</table>";

//Linux
if (!empty($Linux[0]))
{
$Linuximg="<img src=countimg/host.gif width=$Linux[0] height=5 alt='Хосты' border=1>";
}
else
{
$Linuximg="";
}
echo "<table width=$tm border=0>
<tr>
<td width=120>
Linux
</td>
<td width=30>
$Linux[0]
</td>
<td width=%100>
$Linuximg
</td>
</tr>
</table>";



//FreeBSD
if (!empty($FreeBSD[0]))
{
$FreeBSDimg="<img src=countimg/host.gif width=$FreeBSD[0] height=5 alt='Хосты' border=1>";
}
else
{
$FreeBSDimg="";
}
echo "<table width=$tm border=0>
<tr>
<td width=120>
FreeBSD
</td>
<td width=30>
$FreeBSD[0]
</td>
<td width=%100>
$FreeBSDimg
</td>
</tr>
</table>";

//SunOS
if (!empty($SunOS[0]))
{
$SunOSimg="<img src=countimg/host.gif width=$SunOS[0] height=5 alt='Хосты' border=1>";
}
else
{
$SunOSimg="";
}
echo "<table width=$tm border=0>
<tr>
<td width=120>
SunOS
</td>
<td width=30>
$SunOS[0]
</td>
<td width=%100>
$SunOSimg
</td>
</tr>
</table>";


 //IRIX
if (!empty($IRIX[0]))
{
$IRIXimg="<img src=countimg/host.gif width=$IRIX[0] height=5 alt='Хосты' border=1>";
}
else
{
$IRIXimg="";
}
echo "<table width=$tm border=0>
<tr>
<td width=120>
IRIX
</td>
<td width=30>
$IRIX[0]
</td>
<td width=>
$IRIXimg
</td>
</tr>
</table>";

//BeOS
if (!empty($BeOS[0]))
{
$BeOSimg="<img src=countimg/host.gif width=$BeOS[0] height=5 alt='Хосты' border=1>";
}
else
{
$BeOSimg="";
}
echo "<table width=$tm border=0>
<tr>
<td width=120>
BeOS
</td>
<td width=30>
$BeOS[0]
</td>
<td width=%100>
$BeOSimg
</td>
</tr>
</table>";


 //OS/2
if (!empty($OS2[0]))
{
$OS2img="<img src=countimg/host.gif width=$OS2[0] height=5 alt='Хосты' border=1>";
}
else
{
$OS2img="";
}
echo "<table width=$tm width=$tm border=0>
<tr>
<td width=120>
OS/2
</td>
<td width=30>
$OS2[0]
</td>
<td width=%100>
$OS2img
</td>
</tr>
</table>";


 //AIX
if (!empty($AIX[0]))
{
$AIXimg="<img src=countimg/host.gif width=$AIX[0] height=5 alt='Хосты' border=1>";
}
else
{
$AIXimg="";
}
echo "<table width=$tm border=0>
<tr>
<td width=120>
AIX
</td>
<td width=30>
$AIX[0]
</td>
<td width=%100>
$AIXimg
</td>
</tr>
</table>";


//sother
if (!empty($sother[0]))
{
$sotherimg="<img src=countimg/host.gif width=$sother[0] height=5 alt='Хосты' border=1>";
}
else
{
$sotherimg="";
}
echo "<table width=$tm border=0>
<tr>
<td width=120>
Другие
</td>
<td width=30>
$sother[0]
</td>
<td width=%100>
$sotherimg
</td>
</tr>
</table>";

  echo "<br><hr>Статистика JavaScript отображается в хостах за $day.$mest$mes.$year<br><br>";

//JavaScript off
if (!empty($jsoff[0]))
{
$jsoffimg="<img src=countimg/host.gif width=$jsoff[0] height=5 alt='Хосты' border=1>";
}
else
{
$jsoffimg="";
}
echo "<table width=$tm border=0>
<tr>
<td width=120>
JavaScript - нет
</td>
<td width=30>
$jsoff[0]
</td>
<td width=%100>
$jsoffimg
</td>
</tr>
</table>";





 //JavaScript on
if (!empty($json[0]))
{
$jsonimg="<img src=countimg/host.gif width=$json[0] height=5 alt='Хосты' border=1>";
}
else
{
$jsonimg="";
}
echo "<table width=$tm border=0>
<tr>
<td width=120>
JavaScript - есть
</td>
<td width=30>
$json[0]
</td>
<td width=%100>
$jsonimg
</td>
</tr>
</table>";

  echo "<br><hr>Статистика Браузеров отображается в хостах за $day.$mest$mes.$year<br><br>";

  //Netscape
if (!empty($Netscape[0]))
{
$Netscapeimg="<img src=countimg/host.gif width=$Netscape[0] height=5 alt='Хосты' border=1>";
}
else
{
$Netscapeimg="";
}
echo "<table width=$tm border=0>
<tr>
<td width=120>
Netscape
</td>
<td width=30>
$Netscape[0]
</td>
<td width=%100>
$Netscapeimg
</td>
</tr>
</table>";

 //MSIE
if (!empty($MSIE[0]))
{
$MSIEimg="<img src=countimg/host.gif width=$MSIE[0] height=5 alt='Хосты' border=1>";
}
else
{
$MSIEimg="";
}
echo "<table width=$tm border=0>
<tr>
<td width=120>
MSIE
</td>
<td width=30>
$MSIE[0]
</td>
<td width=%100>
$MSIEimg
</td>
</tr>
</table>";

 //Lynx
if (!empty($Lynx[0]))
{
$Lynximg="<img src=countimg/host.gif width=$Lynx[0] height=5 alt='Хосты' border=1>";
}
else
{
$Lynximg="";
}
echo "<table width=$tm border=0>
<tr>
<td width=120>
Lynx
</td>
<td width=30>
$Lynx[0]
</td>
<td width=%100>
$Lynximg
</td>
</tr>
</table>";

//Opera
if (!empty($Opera[0]))
{
$Operaimg="<img src=countimg/host.gif width=$Opera[0] height=5 alt='Хосты' border=1>";
}
else
{
$Operaimg="";
}
echo "<table width=$tm border=0>
<tr>
<td width=120>
Opera
</td>
<td width=30>
$Opera[0]
</td>
<td width=%100>
$Operaimg
</td>
</tr>
</table>";

//WebTV
if (!empty($WebTV[0]))
{
$WebTVimg="<img src=countimg/host.gif width=$WebTV[0] height=5 alt='Хосты' border=1>";
}
else
{
$WebTVimg="";
}
echo "<table width=$tm border=0>
<tr>
<td width=120>
WebTV
</td>
<td width=30>
$WebTV[0]
</td>
<td width=%100>
$WebTVimg
</td>
</tr>
</table>";

 //Konqueror
if (!empty($Konqueror[0]))
{
$Konquerorimg="<img src=countimg/host.gif width=$Konqueror[0] height=5 alt='Хосты' border=1>";
}
else
{
$Konquerorimg="";
}
echo "<table width=$tm border=0>
<tr>
<td width=120>
Konqueror
</td>
<td width=30>
$Konqueror[0]
</td>
<td width=%100>
$Konquerorimg
</td>
</tr>
</table>";

//Bot
if (!empty($Bot[0]))
{
$Botimg="<img src=countimg/host.gif width=$Bot[0] height=5 alt='Хосты' border=1>";
}
else
{
$Botimg="";
}
echo "<table width=$tm border=0>
<tr>
<td width=120>
Bot
</td>
<td width=30>
$Bot[0]
</td>
<td width=%100>
$Botimg
</td>
</tr>
</table>";

 //bother
if (!empty($bother[0]))
{
$botherimg="<img src=countimg/host.gif width=$bother[0] height=5 alt='Хосты' border=1>";
}
else
{
$botherimg="";
}
echo "<table width=$tm border=0>
<tr>
<td width=120>
Другие
</td>
<td width=30>
$bother[0]
</td>
<td width=%100>
$botherimg
</td>
</tr>
</table>";
echo "<hr>Дизайн верстка и программирование &copy; <a href=http://www.wmzshop.ru>www.wmzshop.ru</a>";

}
else
{
echo "Технические проблемы. На Вашей главной станице не найден код счетчика. Код счетчика не найден или изменен. При любой модификации кода скрипт начинает давать сбои в работе или прекращает функционировать.<br>Учтите менять код (изменять) СТРОГО ЗАПРЕЩЕНО
<br><br>Ваши действия:  <br>
1) Проверить правильно ли установлен код счетчика на главной и остальных страницах Вашего сайта.<br>
2) Если код неустановлен на главной странице, то установите его.<br>
3) Если код поврежден (изменен), то НЕЗАМЕДЛИТЕЛЬНО ВОССТАНОВИТЕ КОД на всех страницах до установочного варианта (код выдается при инсталяции счетчика)
<br><hr>
Дизайн и программирование<br>&copy; <a href=www.wmzshop.ru>www.wmzshop.ru </a>";
exit;
 }
 }



?>

</body>

</html>