]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
kleine fixes in den firewalllogs
authormaniacikarus <maniacikarus@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Wed, 28 Mar 2007 17:33:12 +0000 (17:33 +0000)
committermaniacikarus <maniacikarus@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Wed, 28 Mar 2007 17:33:12 +0000 (17:33 +0000)
neues feature in der dhcp.cgi

git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@469 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8

html/cgi-bin/dhcp.cgi
html/cgi-bin/logs.cgi/firewalllogip.dat
html/cgi-bin/logs.cgi/firewalllogport.dat

index 364c5d7dbcc697d6ab855cbf8882efecf936ae88..87134a4690ed2674ee616829ae86312a0ffcb4d9 100644 (file)
@@ -22,8 +22,8 @@
 use strict;
 
 # enable only the following on debugging purpose
-#use warnings;
-#use CGI::Carp 'fatalsToBrowser';
+use warnings;
+use CGI::Carp 'fatalsToBrowser';
 
 require '/var/ipfire/general-functions.pl';
 require "${General::swroot}/lang.pl";
@@ -539,7 +539,7 @@ print <<END
     <td width='25%' class='boldbase'><b><font color='${lc_itf}'>$Lang::tr{"$lc_itf interface"}</font></b></td>
     <td class='base'>$Lang::tr{'enabled'}
     <input type='checkbox' name='ENABLE_${itf}' $checked{'ENABLE'}{'on'} /></td>
-    <td width='25%' class='base'>$Lang::tr{'ip address'}/$Lang::tr{'netmask'}:</td><td><b>$netsettings{"${itf}_ADDRESS"}/$netsettings{"${itf}_NETMASK"}</b></td>
+    <td width='25%' class='base'>$Lang::tr{'ip address'}<br />$Lang::tr{'netmask'}:</td><td><b>$netsettings{"${itf}_ADDRESS"}<br />$netsettings{"${itf}_NETMASK"}</b></td>
 </tr><tr>
     <td width='25%' class='base'>$Lang::tr{'start address'}&nbsp;<img src='/blob.gif' alt='*' /></td>
     <td width='25%'><input type='text' name='START_ADDR_${itf}' value='$dhcpsettings{"START_ADDR_${itf}"}' /></td>
@@ -1011,6 +1011,32 @@ END
 
 &Header::closebox();
 
+&Header::openbox('100%', 'left', $Lang::tr{'arp table entries'});
+my @ip = qx(/sbin/ip neigh show | awk '{print \$1}');
+my @mac = qx(/sbin/ip neigh show | awk '{print \$5}');
+
+print <<END
+<hr />
+<table width='100%'>
+<tr>
+<td width='40%'><b>$Lang::tr{'ip address'}</b></td><td width='40%'><b>$Lang::tr{'mac address'}</b></td><td width='20%'>Optionen</td>
+</tr>
+END
+;
+my $i=0;
+
+foreach my $ip(@ip)
+{
+ print"<tr><form method='post' action='$ENV{'SCRIPT_NAME'}'><td><input type='hidden' name='FIX_ADDR' value='$ip' />$ip</td>";
+ print"<td><input type='hidden' name='FIX_MAC' value='@mac[$i]' />@mac[$i]</td>";
+ print"<td><input type='hidden' name='ACTION' value='$Lang::tr{'add'}2' /><input type='submit' name='SUBMIT' value='$buttontext' /></td></form></tr>";
+}
+
+
+print"</table>";
+
+&Header::closebox();
+
 
 foreach my $itf (@ITFs) {
     if ($dhcpsettings{"ENABLE_${itf}"} eq 'on') {
index e121657537f8f4fdecb2d0bb983b44081c616b87..cc4420f14d906ac6c15824c2621a39e3a473ff70 100644 (file)
@@ -374,7 +374,7 @@ else{
 
 my @data = (\@ips,\@numb);
 use GD::Graph::colour qw( :files );
-GD::Graph::colour::read_rgb( "/srv/web/ipfire/html/themes/ipfie/include/colours.txt" );
+GD::Graph::colour::read_rgb( "/srv/web/ipfire/html/themes/ipfire/include/colours.txt" );
 
 if ($showpie != 2 && $pienumber <= 50 && $pienumber != 0) {
         my $mygraph = GD::Graph::pie->new(500, 350);
index a96e47d8984f5dc203c7b87ead0500f5163f1ba3..3727d2efab2430b4dff3a900a1c2a4e9fdb27d8b 100644 (file)
@@ -374,7 +374,7 @@ else{
 
 my @data = (\@ports,\@numb);
 use GD::Graph::colour qw( :files );
-GD::Graph::colour::read_rgb( "/srv/web/ipfire/html/themes/ipfie/include/colours.txt" );
+GD::Graph::colour::read_rgb( "/srv/web/ipfire/html/themes/ipfire/include/colours.txt" );
 
 if ($showpie != 2 && $pienumber <= 50 && $pienumber != 0) {
         my $mygraph = GD::Graph::pie->new(500, 350);