X-Git-Url: http://git.ipfire.org/?p=ipfire-2.x.git;a=blobdiff_plain;f=html%2Fcgi-bin%2Fremote.cgi;h=c76f5129ea862454eeaf41547600475487cdbe2d;hp=d94d27d42563730b90b34f9bf2203cfcf56289ae;hb=8186b37230c7c73fc5f79411ab5890821c744a79;hpb=9288b110115900f87049bf378fd3f06c056306d8 diff --git a/html/cgi-bin/remote.cgi b/html/cgi-bin/remote.cgi index d94d27d425..c76f5129ea 100644 --- a/html/cgi-bin/remote.cgi +++ b/html/cgi-bin/remote.cgi @@ -2,7 +2,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007-2019 IPFire Team # +# Copyright (C) 2007-2020 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -28,7 +28,7 @@ use strict; use IO::Socket; require '/var/ipfire/general-functions.pl'; -require "${General::swroot}/geoip-functions.pl"; +require "${General::swroot}/location-functions.pl"; require "${General::swroot}/lang.pl"; require "${General::swroot}/header.pl"; @@ -40,7 +40,7 @@ my $errormessage=''; my $counter = 0; &General::readhash("${General::swroot}/main/settings", \%mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color); &Header::showhttpheaders(); @@ -185,7 +185,7 @@ print "\n"; &Header::openbox('100%', 'center', $Lang::tr{'ssh host keys'}); -print "\n"; +print "
\n"; print < @@ -213,7 +213,7 @@ print "\n
\n"; &Header::openbox('100%', 'center', $Lang::tr{'ssh active sessions'}); print < + \n"; } else { # list active logins... - - # Libloc database handle. - my $libloc_db_handle = &GeoIP::init(); - foreach my $line (@output) { my @arry = split(/\ +/, $line); @@ -291,15 +287,15 @@ sub printactivelogins() $remoteip =~ s/[()]//g; # display more information about that IP adress... - my $ccode = &GeoIP::lookup_country_code($libloc_db_handle, $remoteip); - my $flag_icon = &GeoIP::get_flag_icon($ccode); + my $ccode = &Location::Functions::lookup_country_code($remoteip); + my $flag_icon = &Location::Functions::get_flag_icon($ccode); # get rDNS... my $iaddr = inet_aton($remoteip); my $rdns = gethostbyaddr($iaddr, AF_INET); - if (!$rdns) { $rdns = $Lang::tr{'lookup failed'}; }; + if (!$rdns) { $rdns = $Lang::tr{'ptr lookup failed'}; }; - my $table_colour = ($id++ % 2) ? $color{'color22'} : $color{'color20'}; + my $table_colour = ($id++ % 2) ? $color{'color20'} : $color{'color22'}; print <
@@ -273,14 +273,10 @@ sub printactivelogins() if ( scalar(@output) == 0 ) { # no logins appeared - my $table_colour = ($id++ % 2) ? $color{'color22'} : $color{'color20'}; + my $table_colour = ($id++ % 2) ? $color{'color20'} : $color{'color22'}; print "
$Lang::tr{'ssh no active logins'}