jablonka.czprosek.czf

getonlineclouds

Subversion Repositories:
[/] [getonlineclouds.pl] - Diff between revs 1 and 2

Show entire file Ignore whitespace

Rev 1 Rev 2
Line 1... Line 1...
#!/usr/bin/perl #!/usr/bin/perl
# #
# Petr Simandl, www.simandl.cz # Petr Simandl, www.simandl.cz
# #
   
  $date = `date`;
print "Content-type: text/html\n\n"; print "Content-type: text/html\n\n";
   
print "<HTML><HEAD><META HTTP-EQUIV=Pragma CONTENT=no-cache></HEAD><BODY>\n"; print "<HTML><HEAD><META HTTP-EQUIV=Pragma CONTENT=no-cache></HEAD><BODY>\n";
   
print "Porovnani obsahu wiki <a href=\"http://czfree.net/wiki/Registrovane_cloudy\">Registrovane_cloudy</a> print "Porovnani obsahu wiki <a href=\"http://czfree.net/wiki/Registrovane_cloudy\">Registrovane_cloudy</a>
s aktualnima <a href=\"/cgi-bin/route.cgi\">routama</a>"; s aktualnima <a href=\"/cgi-bin/route.cgi\">routama</a> : $date";
   
print "<pre>"; print "<pre>";
   
$date = `date`;  
@gl_cloudy=`wget -q -O - http://czfree.net/wiki/Registrovane_cloudy`; @gl_cloudy=`wget -q -O - http://czfree.net/wiki/Registrovane_cloudy`;
@gl_routy=`ip ro ls | grep ^10 `; @gl_routy=`ip ro ls | grep ^10 `;
   
@ol_ips=(); $gl_pocetonline = 0;
@ol_=(); $gl_pocetzastupcu = 0;
  $gl_pocethlasu = 0;
  $gl_pocetofflinehlasu = 0;
   
foreach $gl_line (@gl_cloudy) foreach $gl_line (@gl_cloudy)
{ {
if ($gl_line =~ /^\<td\> AS6/) if ($gl_line =~ /^\<td\> AS6/)
{#print "$gl_pole[4] $gl_pole[5]\n"; {#print "$gl_pole[4] $gl_pole[5]\n";
Line 32... Line 34...
$gl_rozsah = $gl_pole[1]; $gl_rozsah = $gl_pole[1];
$gl_rozsah =~ s/ //g; $gl_rozsah =~ s/ //g;
@gl_rozsah=split("a",$gl_rozsah); @gl_rozsah=split("a",$gl_rozsah);
   
$gl_zastupce = $gl_pole[2]; $gl_zastupce = $gl_pole[2];
  $gl_zastupce =~ s/ //g;
$gl_udaje = $gl_pole[3]; $gl_udaje = $gl_pole[3];
$gl_online = $gl_pole[4]; $gl_online = $gl_pole[4];
  $gl_online =~ s/\n//g;
  $gl_online =~ s/ //g;
  $gl_hlas = $gl_pole[5];
  $gl_hlas =~ s/\n//g;
  $gl_hlas =~ s/ //g;
$gl_pritomno = 0; $gl_pritomno = 0;
$gl_podobne = ""; $gl_podobne = "";
   
  if ("$gl_hlas" eq "ano") {$gl_pocethlasu += 1};
  if ("$gl_online" eq "ano") {$gl_pocetonline += 1};
  if ("$gl_zastupce" ne "ne") {$gl_pocetzastupcu += 1};
   
print "<a href=\"http://ripe.czfree.net/index.php?action=object.search&paramvalue=$gl_rozsah\">$gl_as</a> ma mit @gl_rozsah a nalezeno: "; print "<a href=\"http://ripe.czfree.net/index.php?action=object.search&paramvalue=$gl_rozsah\">$gl_as</a> ma mit @gl_rozsah a nalezeno: ";
   
foreach $gl_routa (@gl_rozsah) foreach $gl_routa (@gl_rozsah)
{ {
Line 59... Line 71...
} }
} }
} }
} }
if ($gl_pritomno == 0) if ($gl_pritomno == 0)
{ print "nic<blink>!</blink>\t"; { print "nic\t";
} }
if ($gl_podobne) if ($gl_podobne)
{ {
print "\tpodobne routy: $gl_podobne "; print "\tpodobne routy: $gl_podobne ";
} }
print " \n"; if (("$gl_hlas" eq "ano") && ($gl_pritomno == 0) && !($gl_podobne))
  {
  print " <blink>!</blink>$gl_zastupce<blink>!</blink> $gl_online $gl_hlas \n";
  $gl_pocetofflinehlasu += 1;
  } else {
  print " $gl_zastupce $gl_online $gl_hlas \n";
  }
} }
} }
   
  print "Shrnuti wiki:\n";
  print "Pocet zastupcu : $gl_pocetzastupcu\n";
  print "Pocet online : $gl_pocetonline\n";
  print "Pocet zastupcu s hlasovacim pravem : $gl_pocethlasu\n";
  print "Pocet zastupcu kteri prave ted maji sit offline : $gl_pocetofflinehlasu\n";
print "</pre></body></html>"; print "</pre></body></html>";
   

Powered by WebSVN 2.2.1