home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2007 April / PCpro_2007_04.ISO / files / dsl / NVinst.exe / Scripts / HTTP / DefaultHost / NetSearch / stats.php < prev    next >
Encoding:
PHP Script  |  2007-02-10  |  2.6 KB  |  71 lines

  1. <?php
  2.     setlocale(LC_ALL,"ru_RU.CP1251");
  3.         $DIR="..\\..\\..\\";//─Φ≡σΩ≥ε≡Φ , πΣσ φα⌡εΣ ≥±  Γ±σ φ≤µφ√σ ⌠αΘδ√, \NetView\Scripts
  4.     $SIZEUNITSTR="╠┴";
  5.     $mode=""; $invtitle=""; $modestr=""; $modestrprefix=""; $basesizestr="";
  6.     if (isset($_GET['mode'])) $mode=$_GET['mode'];
  7.     if ($mode=="invisible"){
  8.         $invtitle=" (±Ω≡√≥√Θ ≡σµΦ∞)";
  9.         $modestr="mode=invisible";
  10.         $modestrprefix="?";
  11.     }
  12.  
  13.     function num_format($num){
  14.         return number_format($num,0,',',' ');
  15.     }
  16. ?>
  17. <head>
  18.     <title>╤≥α≥Φ±≥ΦΩα τα∩≡ε±εΓ<?php print $invtitle;?></title>
  19.     <link rel='stylesheet' type='text/css' href='styles.css'>
  20. </head>
  21. <html>
  22. <table align='center' border=1 cellpadding=1 cellspacing=0 width='100%'>
  23.     <tr class='caption'><td>#<td width=90>─α≥α<td>IP<td>╒ε±≥<td>╟α∩≡ε±<td>╥Φ∩<td>╨ατ∞σ≡<td>╒ε±≥√<td>╨στ≤δⁿ≥α≥εΓ<td>╤σΩ≤φΣ<td width=85>╘αΘδεΓ Γ ßατσ
  24. <?php
  25.     list($microtime,$time)=explode(" ",microtime());
  26.     $str=file($DIR."log.txt");
  27.     for ($i=0; $i<sizeof($str); $i++){
  28.         list($counter,$date,$ip,$host,$query,$type,$minsize,$maxsize,$hosts,$resnum,$duration,$basefiles,$basesize)=explode("|",$str[$i]);
  29.         switch ($type){
  30.             case "files": $typename="╘αΘδ√"; break;
  31.             case "dirs": $typename="─Φ≡σΩ≥ε≡ΦΦ"; break;
  32.             default: $typename="┬±σ"; break;
  33.         }
  34.         if ($minsize>0)
  35.             if ($maxsize>0)
  36.                 $sizestr=$minsize."-".$maxsize." ".$SIZEUNITSTR;
  37.             else $sizestr="> ".$minsize." ".$SIZEUNITSTR;
  38.         else
  39.             if ($maxsize>0)
  40.                 $sizestr="< ".$maxsize." ".$SIZEUNITSTR;
  41.             else $sizestr="╦■ßεΘ";
  42.         $basefilesstr=num_format($basefiles);
  43.         $resnumstr=num_format($resnum);
  44.         if ($basesize>0)
  45.             $basesizestr=" (<b>".num_format($basesize)." ".$SIZEUNITSTR."</b>)";
  46.         if ($hosts=="") $hostsstr="*";
  47.         else $hostsstr=$hosts;
  48.         $day=substr($date,8,2);
  49.         if ($day%2==1) $class="selected";
  50.         else $class="row";
  51.         print "<tr class='$class'>";
  52.         print "<td>$counter";
  53.         print "<td>$date";
  54.         print "<td>Hidden";//$ip
  55.         print "<td>Hidden";//$host
  56.         print "<td><a href='index.php?$modestr&query=$query&type=$type&minsize=$minsize&maxsize=$maxsize&hosts=$hosts'>$query</a>";
  57.         print "<td>$typename";
  58.         print "<td>$sizestr";
  59.         print "<td>$hostsstr";
  60.         print "<td>$resnumstr";
  61.         print "<td>$duration";
  62.         print "<td>$basefilesstr$basesizestr";
  63.     }
  64.     print "</table>";
  65.  
  66.     list($end_microtime,$end_time)=explode(" ",microtime());
  67.     $duration = (float)$end_time - (float)$time + (float)$end_microtime - (float)$microtime;
  68.     printf ("<div class='smalltext' align='center'>┬≡σ∞  Γ√∩εδφσφΦ : <b>%.2f ±σΩ.</b></div>",$duration);
  69. ?>
  70. <div class='text'><a href='index.php<?php print $modestrprefix.$modestr;?>'>═αταΣ</a></div>
  71.