X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=html%2Fhtml%2Fthemes%2Fmaniac%2Finclude%2Ffunctions.pl;h=0bb1d6e70d625dbb67b03ef2a3b0007d29ae51f6;hb=769185b58ec52fcc9eaedab5df42b1b25057d0c7;hp=3759bbb252bb78bc9cb94034f2a45f8e20681e2c;hpb=eea1d2d7e167120d7af02fa27876bea164af7374;p=ipfire-2.x.git diff --git a/html/html/themes/maniac/include/functions.pl b/html/html/themes/maniac/include/functions.pl index 3759bbb252..0bb1d6e70d 100644 --- a/html/html/themes/maniac/include/functions.pl +++ b/html/html/themes/maniac/include/functions.pl @@ -177,66 +177,53 @@ END ; if ($settings{'SPEED'} ne 'off') { print < - - var http_request = false; - - function LoadInetInfo(url) { - - http_request = false; - - if (window.XMLHttpRequest) { // Mozilla, Safari,... - http_request = new XMLHttpRequest(); - if (http_request.overrideMimeType) { - http_request.overrideMimeType('text/xml'); - // zu dieser Zeile siehe weiter unten - } - } else if (window.ActiveXObject) { // IE - try { - http_request = new ActiveXObject("Msxml2.XMLHTTP"); - } catch (e) { - try { - http_request = new ActiveXObject("Microsoft.XMLHTTP"); - } catch (e) {} - } - } - - if (!http_request) { - alert('Ende :( Kann keine XMLHTTP-Instanz erzeugen'); - return false; - } - http_request.onreadystatechange = DisplayInetInfo; - http_request.open('GET', url, true); - http_request.send(null); - - } - - function DisplayInetInfo() { - if (http_request.readyState == 4) { - var xmldoc = http_request.responseXML; - var root1_node = xmldoc.getElementsByTagName('rx_kbs').item(0); - var root2_node = xmldoc.getElementsByTagName('tx_kbs').item(0); - var root3_node = xmldoc.getElementsByTagName('rxb').item(0); - var root4_node = xmldoc.getElementsByTagName('txb').item(0); - - document.forms['speed'].txkb.value = root1_node.firstChild.data; - document.forms['speed'].rxkb.value = root2_node.firstChild.data; - - // document.getElementsByTagName("input")[0].style.color = "#00FF00"; - url = "/cgi-bin/speed.cgi?rxb_last=" + root3_node.firstChild.data + "&txb_last=" + root4_node.firstChild.data; - - window.setTimeout("LoadInetInfo(url)", 3000); - } - - } - + + - + END ; } else { -print "";} +print "\n";} print < @@ -344,9 +331,14 @@ END } sub closepage () { - my $status = &connectionstatus(); - $uptime = `/usr/bin/uptime`; - + my $status = &connectionstatus(); + my $uptime = `/usr/bin/uptime|cut -d \" \" -f 4-`; + $uptime =~ s/year(s|)/$Lang::tr{'year'}/; + $uptime =~ s/month(s|)/$Lang::tr{'month'}/; + $uptime =~ s/day(s|)/$Lang::tr{'day'}/; + $uptime =~ s/user(s|)/$Lang::tr{'user'}/; + $uptime =~ s/load average/$Lang::tr{'uptime load average'}/; + print < @@ -359,22 +351,20 @@ END &showsubsection($menu); &showsubsubsection($menu); - print < - - -
-