From: nbk Date: Mon, 14 May 2007 22:26:57 +0000 (+0000) Subject: Delete trailing whitespace. X-Git-Url: https://git.entuzijast.net/?a=commitdiff_plain;h=a3f43bc4f56ab90ddb0fdacbb63329d601d7b4b7;p=freeradius-dialup-admin.git Delete trailing whitespace. --- diff --git a/bin/clearsession b/bin/clearsession index f7436ff..35060d7 100755 --- a/bin/clearsession +++ b/bin/clearsession @@ -32,7 +32,7 @@ if ($nastype eq 'cisco' && $type eq 'telnet'){ my $session = Net::Telnet::Cisco->new(Host => $host); $session->login($login, $passwd); - if ($port >= 20000){ + if ($port >= 20000){ my @output = $session->cmd("sh caller user $username"); foreach $line (@output){ if ($line =~ /User: $username, line (Vi\d+),/){ diff --git a/bin/log_badlogins b/bin/log_badlogins index f0d3130..402b28b 100755 --- a/bin/log_badlogins +++ b/bin/log_badlogins @@ -9,7 +9,7 @@ # # Defaults: # radius.log: none -# admin.conf: /usr/local/dialup_admin/conf/admin.conf +# admin.conf: /usr/local/dialup_admin/conf/admin.conf # all: no. Go to the end of the file. Don't read it all. use Date::Manip qw(ParseDate UnixDate); @@ -120,7 +120,7 @@ seek LOG, 0, 2 if ($all_file eq 'no'); for(;;){ while(){ if ($verbose > 1) { print STDOUT "DEBUG: Reading $file\n" } - $do=0; + $do=0; chomp; next if ($regexp ne '' && !/$regexp/); if ($_ ne ''){ diff --git a/bin/showmodem b/bin/showmodem index 08c73e5..5804057 100755 --- a/bin/showmodem +++ b/bin/showmodem @@ -53,7 +53,7 @@ if ($snmp_type = 'net') { "v90", "v27ter", ); - + @Protocol = ( "error", "normal", @@ -66,7 +66,7 @@ if ($snmp_type = 'net') { "ara20", "unknown", ); -#DEBUG#print "$snmpwalkcmd enterprises.9.2.9.2.1.18 | grep $user\n"; +#DEBUG#print "$snmpwalkcmd enterprises.9.2.9.2.1.18 | grep $user\n"; $modem=`$snmpwalkcmd enterprises.9.2.9.2.1.18 | grep $user`; if($modem=~/enterprises\.9\.2\.9\.2\.1\.18\.(\d+) =/){ $modem=$1; @@ -74,32 +74,32 @@ if($modem=~/enterprises\.9\.2\.9\.2\.1\.18\.(\d+) =/){ $port=$modem%120-1; $modem="$slot.$port"; -#DEBUG#print "$snmpgetcmd enterprises.9.9.47.1.3.1.1.9.$modem\n"; +#DEBUG#print "$snmpgetcmd enterprises.9.9.47.1.3.1.1.9.$modem\n"; $duration=`$snmpgetcmd enterprises.9.9.47.1.3.1.1.9.$modem` or die "No MIB\n"; $duration=~/\) (.*)\./; $duration=$1; -#DEBUG#print "$snmpgetcmd enterprises.9.9.47.1.3.1.1.12.$modem\n"; +#DEBUG#print "$snmpgetcmd enterprises.9.9.47.1.3.1.1.12.$modem\n"; $modulation=`$snmpgetcmd enterprises.9.9.47.1.3.1.1.12.$modem` or die "No MIB\n"; $modulation=~/ \= (\d+)/; $modulation=$ModulationScheme[$1]; -#DEBUG#print "$snmpgetcmd enterprises.9.9.47.1.3.1.1.13.$modem\n"; +#DEBUG#print "$snmpgetcmd enterprises.9.9.47.1.3.1.1.13.$modem\n"; $protocol=`$snmpgetcmd enterprises.9.9.47.1.3.1.1.13.$modem` or die "No MIB\n"; $protocol=~/ \= (\d+)/; $protocol=$Protocol[$1]; -#DEBUG#print "$snmpgetcmd enterprises.9.9.47.1.3.1.1.14.$modem\n"; +#DEBUG#print "$snmpgetcmd enterprises.9.9.47.1.3.1.1.14.$modem\n"; $txrate=`$snmpgetcmd enterprises.9.9.47.1.3.1.1.14.$modem` or die "No MIB\n"; $txrate=~/Gauge32\: (\d+)/; $txrate=$1; -#DEBUG#print "$snmpgetcmd enterprises.9.9.47.1.3.1.1.15.$modem\n"; +#DEBUG#print "$snmpgetcmd enterprises.9.9.47.1.3.1.1.15.$modem\n"; $rxrate=`$snmpgetcmd enterprises.9.9.47.1.3.1.1.15.$modem` or die "No MIB\n"; $rxrate=~/Gauge32\: (\d+)/; $rxrate=$1; -#DEBUG#print "$snmpgetcmd enterprises.9.9.47.1.3.1.1.17.$modem\n"; +#DEBUG#print "$snmpgetcmd enterprises.9.9.47.1.3.1.1.17.$modem\n"; $rxsignal=`$snmpgetcmd enterprises.9.9.47.1.3.1.1.17.$modem` or die "No MIB\n"; # $rxsignal=~ s/INTEGER\://; $rxsignal=~/ \= (.*)\n/; diff --git a/bin/sqlrelay_query b/bin/sqlrelay_query index 65e96b5..20704e7 100755 --- a/bin/sqlrelay_query +++ b/bin/sqlrelay_query @@ -8,7 +8,7 @@ $passwd=shift; while(<>){ chomp; `$sqlrelay '$host' '$port' '$socket' '$user' '$passwd' '$_'`; - $exit = $? >> 8; + $exit = $? >> 8; if ($exit != 0){ exit $exit; } diff --git a/htdocs/accounting.php3 b/htdocs/accounting.php3 index 0c6a357..46cd26e 100644 --- a/htdocs/accounting.php3 +++ b/htdocs/accounting.php3 @@ -59,7 +59,7 @@ class Qi { $this->item=$item; $this->operator=$operator; } - + function show() { global $operators; global $items; $nam = $this->item; @@ -87,7 +87,7 @@ EOM; EOM; } - + function get($designator) { global ${"item_of_$designator"}; global ${"value_of_$designator"}; global ${"operator_of_$designator"}; @@ -96,7 +96,7 @@ EOM; $this->operator=${"operator_of_$designator"}; $this->item=${"item_of_$designator"}; } - } + } function query(){ global $operators; global $items; @@ -175,14 +175,14 @@ $offset=0; while (${"item_of_w$number"}) { if(${"delete_w$number"}==1) {$offset=1;$number++;} else { - $designator=$number-$offset; + $designator=$number-$offset; ${"w$designator"} = new Qi("w$designator","",""); ${"w$designator"}->get("w$number"); ${"w$designator"}->show(); $number++; } } -if($add==1) { +if($add==1) { ${"w$number"} = new Qi("w$number","$item_name","$operators[0]"); ${"w$number"}->show(); } diff --git a/htdocs/buttons.php3 b/htdocs/buttons.php3 index 6a16eef..5f29500 100644 --- a/htdocs/buttons.php3 +++ b/htdocs/buttons.php3 @@ -8,7 +8,7 @@ if ($auth_user){ include("../html/buttons/default/buttons.html.php3"); } } -else{ +else{ if (is_file("../html/buttons/default/buttons.html.php3")) include("../html/buttons/default/buttons.html.php3"); } diff --git a/htdocs/clear_opensessions.php3 b/htdocs/clear_opensessions.php3 index 62d0d1a..9900ac7 100644 --- a/htdocs/clear_opensessions.php3 +++ b/htdocs/clear_opensessions.php3 @@ -64,7 +64,7 @@ print << EOM; - + if ($drop_conns == 1){ $method = 'snmp'; $nastype = 'cisco'; diff --git a/htdocs/find.php3 b/htdocs/find.php3 index f83ac7e..0c363c6 100644 --- a/htdocs/find.php3 +++ b/htdocs/find.php3 @@ -100,7 +100,7 @@ RADIUS Attribute > @@ -98,7 +98,7 @@ if ($do_changes == 1){ Group Members (Check to Delete) - $member\n"; diff --git a/htdocs/group_new.php3 b/htdocs/group_new.php3 index 2c63a80..ed953e6 100644 --- a/htdocs/group_new.php3 +++ b/htdocs/group_new.php3 @@ -62,7 +62,7 @@ if ($config[general_lib_type] == 'sql' && $config[sql_use_operators] == 'true'){ - + EOM; foreach($show_attrs as $key => $desc){ $name = $attrmap["$key"]; diff --git a/htdocs/login_time_create.php3 b/htdocs/login_time_create.php3 index 6461a7d..11d06c5 100644 --- a/htdocs/login_time_create.php3 +++ b/htdocs/login_time_create.php3 @@ -144,7 +144,7 @@ foreach ($rules as $rule){ $rulestr = "$rule"; else $rulestr .= ",$rule"; -} +} if ($update == 1 && $val != '') echo << @@ -247,7 +247,7 @@ if (!empty($rules)){ echo "\n"; } else - echo "No rules available
\n"; + echo "No rules available
\n"; ?>
diff --git a/htdocs/nas_admin.php3 b/htdocs/nas_admin.php3 index c4b3cfc..622b2dd 100644 --- a/htdocs/nas_admin.php3 +++ b/htdocs/nas_admin.php3 @@ -185,7 +185,7 @@ else NAS List
- + No groups available\n"; else{ - echo "\n"; foreach ($existing_groups as $group => $count) echo "
- -NAS Name +NAS Name diff --git a/htdocs/password.php3 b/htdocs/password.php3 index 85f7381..1d2f664 100644 --- a/htdocs/password.php3 +++ b/htdocs/password.php3 @@ -16,7 +16,7 @@
- +
Password 
Password 
diff --git a/htdocs/stats.php3 b/htdocs/stats.php3 index ca48d91..65925b9 100644 --- a/htdocs/stats.php3 +++ b/htdocs/stats.php3 @@ -40,7 +40,7 @@ $days[0] = $after; $counter = $after_time + 86400; $i = 1; while($counter < $before_time){ - $days[$i++] = date($config[sql_date_format],$counter); + $days[$i++] = date($config[sql_date_format],$counter); $counter += 86400; } $days[$i] = $before; @@ -109,7 +109,7 @@ if ($link){ else $search = @da_sql_query($link,$config, "SELECT $res[1],$res[2],$res[3] FROM $config[sql_accounting_table] - $sql_val[user] AND acctstoptime >= '$day 00:00:00' + $sql_val[user] AND acctstoptime >= '$day 00:00:00' AND acctstoptime <= '$day 23:59:59' $s $sql_extra_query;"); if ($search){ $row = @da_sql_fetch_array($search,$config); diff --git a/htdocs/user_admin.php3 b/htdocs/user_admin.php3 index 3c4e7ff..e29f644 100644 --- a/htdocs/user_admin.php3 +++ b/htdocs/user_admin.php3 @@ -229,11 +229,11 @@ if ($link){ $remaining = $remaining - $lastlog_session_time; if ($remaining < 0) $remaining = 0; - $log_color = ($remaining) ? 'green' : 'red'; + $log_color = ($remaining) ? 'green' : 'red'; } $lastlog_session_time_jvs = 1000 * $lastlog_session_time; $lastlog_session_time = time2strclock($lastlog_session_time); - $lastlog_client_ip = $row['framedipaddress']; + $lastlog_client_ip = $row['framedipaddress']; $lastlog_server_name = @gethostbyaddr($lastlog_server_ip); $lastlog_client_name = @gethostbyaddr($lastlog_client_ip); $lastlog_callerid = $row['callingstationid']; @@ -265,7 +265,7 @@ if ($link){ $lastlog_server_ip = $row['nasipaddress']; $lastlog_server_port = $row['nasportid']; $lastlog_session_time = time2str($row['acctsessiontime']); - $lastlog_client_ip = $row['framedipaddress']; + $lastlog_client_ip = $row['framedipaddress']; $lastlog_server_name = ($lastlog_server_ip != '') ? @gethostbyaddr($lastlog_server_ip) : '-'; $lastlog_client_name = ($lastlog_client_ip != '') ? @gethostbyaddr($lastlog_client_ip) : '-'; $lastlog_callerid = $row['callingstationid']; diff --git a/htdocs/user_delete.php3 b/htdocs/user_delete.php3 index 6edd647..35f2128 100644 --- a/htdocs/user_delete.php3 +++ b/htdocs/user_delete.php3 @@ -58,7 +58,7 @@ print << EOM; - + if ($delete_user == 1){ if ($user_type != 'group'){ if (is_file("../lib/$config[general_lib_type]/delete_user.php3")) diff --git a/htdocs/user_edit.php3 b/htdocs/user_edit.php3 index edd044b..bdb32a9 100644 --- a/htdocs/user_edit.php3 +++ b/htdocs/user_edit.php3 @@ -57,7 +57,7 @@ else if ($user_type != 'group') include("../html/user_toolbar.html.php3"); else - include("../html/group_toolbar.html.php3"); + include("../html/group_toolbar.html.php3"); print << @@ -77,12 +77,12 @@ print << EOM; - + if ($change == 1){ if (is_file("../lib/$config[general_lib_type]/change_attrs.php3")) include("../lib/$config[general_lib_type]/change_attrs.php3"); if ($user_type != 'group'){ - if ($config[general_show_user_password] != 'no' && $passwd != '' + if ($config[general_show_user_password] != 'no' && $passwd != '' && is_file("../lib/$config[general_lib_type]/change_passwd.php3")) include("../lib/$config[general_lib_type]/change_passwd.php3"); if (is_file("../lib/$config[general_lib_type]/user_info.php3")) @@ -101,7 +101,7 @@ else if ($badusers == 1){ if (is_file("../lib/add_badusers.php3")) include("../lib/add_badusers.php3"); } - + ?>
> @@ -171,7 +171,7 @@ EOM; $vals[] = $default_vals["$key"][$i]; $ops[] = $default_vals["$key"][operator][$i]; } - } + } if ($add && $name == $add_attr){ $vals[] = $default_vals["$key"][0]; $ops[] = ($default_vals["$key"][operator][0] != '') ? $default_vals["$key"][operator][0] : '='; diff --git a/htdocs/user_info.php3 b/htdocs/user_info.php3 index f5868cb..18cb42b 100644 --- a/htdocs/user_info.php3 +++ b/htdocs/user_info.php3 @@ -49,7 +49,7 @@ if (is_file("../lib/$config[general_lib_type]/user_info.php3")) diff --git a/html/user_admin.html.php3 b/html/user_admin.html.php3 index 6309eed..e600369 100644 --- a/html/user_admin.html.php3 +++ b/html/user_admin.html.php3 @@ -13,8 +13,8 @@ if ($logged_now)
- + diff --git a/htdocs/user_new.php3 b/htdocs/user_new.php3 index b40c0eb..5ac54de 100644 --- a/htdocs/user_new.php3 +++ b/htdocs/user_new.php3 @@ -50,7 +50,7 @@ include("password_generator.jsc");
- +
- + ' . $tmp_file; $fp = popen("$comm","w"); if ($fp){ diff --git a/html/stats.html.php3 b/html/stats.html.php3 index ce1809e..a793531 100644 --- a/html/stats.html.php3 +++ b/html/stats.html.php3 @@ -61,7 +61,7 @@ EOM;
- statistics for + statistics for