]> git.entuzijast.net Git - freeradius-dialup-admin.git/commitdiff
Delete trailing whitespace.
authornbk <nbk>
Mon, 14 May 2007 22:26:57 +0000 (22:26 +0000)
committernbk <nbk>
Mon, 14 May 2007 22:26:57 +0000 (22:26 +0000)
42 files changed:
bin/clearsession
bin/log_badlogins
bin/showmodem
bin/sqlrelay_query
htdocs/accounting.php3
htdocs/buttons.php3
htdocs/clear_opensessions.php3
htdocs/find.php3
htdocs/group_admin.php3
htdocs/group_new.php3
htdocs/login_time_create.php3
htdocs/nas_admin.php3
htdocs/password.php3
htdocs/stats.php3
htdocs/user_admin.php3
htdocs/user_delete.php3
htdocs/user_edit.php3
htdocs/user_info.php3
htdocs/user_new.php3
htdocs/user_test.php3
html/stats.html.php3
html/user_admin.html.php3
html/user_admin_userinfo.html.php3
lib/ldap/change_attrs.php3
lib/ldap/change_info.php3
lib/ldap/functions.php3
lib/operators.php3
lib/sql/change_attrs.php3
lib/sql/change_info.php3
lib/sql/change_passwd.php3
lib/sql/create_user.php3
lib/sql/defaults.php3
lib/sql/drivers/dbx/functions.php3
lib/sql/drivers/oracle/functions.php3
lib/sql/drivers/pg/functions.php3
lib/sql/drivers/sqlrelay/functions.php3
lib/sql/find.php3
lib/sql/functions.php3
lib/sql/group_admin.php3
lib/sql/group_info.php3
lib/sql/nas_list.php3
lib/sql/user_info.php3

index f7436ff9fa8e47d866dad8e79e0459755967ae4b..35060d70efa3aaf1fe7ca743907161b10fb07efd 100755 (executable)
@@ -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+),/){
index f0d3130d35c49011f31b7209c0293d8ba027be40..402b28be91491e2cb532c99402011f8d6363f572 100755 (executable)
@@ -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(<LOG>){
                if ($verbose > 1) { print STDOUT "DEBUG: Reading $file\n" }
-               $do=0;  
+               $do=0;
                chomp;
                next if ($regexp ne '' && !/$regexp/);
                if ($_ ne ''){
index 08c73e5bd5f6b707ba09d7e58c0a2aaa0f5b8c49..58040578ba0667858e8732751cb16563ba048432 100755 (executable)
@@ -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/;
index 65e96b55c424ee674db5f762383f59da1303c6aa..20704e7f7dd9dcc3f4c30d58a4acc75c0abea0a8 100755 (executable)
@@ -8,7 +8,7 @@ $passwd=shift;
 while(<>){
        chomp;
        `$sqlrelay '$host' '$port' '$socket' '$user' '$passwd' '$_'`;
-       $exit = $? >> 8;       
+       $exit = $? >> 8;
        if ($exit != 0){
                exit $exit;
        }
index 0c6a3578da33c5812ffbcc08fb321763de63bf67..46cd26ed75db0cac46a23e586ac49bbe2086f685 100644 (file)
@@ -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;
        </td></tr>
 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();
        }
index 6a16eefb13aec1321aa9bf900f71083c540f800c..5f295003fe926a566f73ff7c5f58457e4aea040b 100644 (file)
@@ -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");
 }
index 62d0d1aa5dff0bc9f34bea926681def743f623e5..9900ac70fafaef396b905f033268f770c8375cdc 100644 (file)
@@ -64,7 +64,7 @@ print <<<EOM
        <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
        <tr><td>
 EOM;
+
 if ($drop_conns == 1){
        $method = 'snmp';
        $nastype = 'cisco';
index f83ac7e81d252ff44da17d98c8ef711eac82b2d8..0c363c6d9db1dee405f6ba3083dbfef0b9c46cf5 100644 (file)
@@ -100,7 +100,7 @@ RADIUS Attribute
 <select name="radius_attr" editable>
 EOM;
        foreach($show_attrs as $key => $desc)
-               echo "<option $selected[$key] value=\"$key\">$desc\n";          
+               echo "<option $selected[$key] value=\"$key\">$desc\n";
        echo <<<EOM
 </select>
 </td>
index 41bb7e85dd87af72e2d7bf25ce190f68626dacbd..49e7a17fbba8a3c1564c3bb3419b565419450db5 100644 (file)
@@ -86,8 +86,8 @@ if ($do_changes == 1){
                include("../lib/$config[general_lib_type]/group_info.php3");
 }
 ?>
-       
-   
+
+
    <form method=post>
       <input type=hidden name=login value=<?php echo $login ?>>
       <input type=hidden name=do_changes value=0>
@@ -98,7 +98,7 @@ if ($do_changes == 1){
 Group Members (Check to Delete)
 </td>
 <td>
-<select name=del_members[] multiple size=5> 
+<select name=del_members[] multiple size=5>
 <?php
 foreach ($group_members as $member){
        echo "<option value=\"$member\">$member\n";
index 2c63a8067920be93f8c2ad295f114f15836c71ef..ed953e6fceeccfbbde299609265516300bede79e 100644 (file)
@@ -62,7 +62,7 @@ if ($config[general_lib_type] == 'sql' && $config[sql_use_operators] == 'true'){
 <tr bgcolor="black" valign=top><td colspan=2>
        <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
        <tr><td>
-   
+
 <?php
 if (is_file("../lib/$config[general_lib_type]/group_info.php3"))
        include("../lib/$config[general_lib_type]/group_info.php3");
@@ -94,7 +94,7 @@ EOM;
                if (!isset($existing_groups))
                        echo "<b>No groups available</b>\n";
                else{
-                       echo "<select name=\"existing_groups\">\n";     
+                       echo "<select name=\"existing_groups\">\n";
                        foreach ($existing_groups as $group => $count)
                                echo "<option value=\"$group\">$group\n";
                        echo "</select>\n";
@@ -116,7 +116,7 @@ EOM;
                <textarea name=members cols="15" wrap="PHYSICAL" rows=5></textarea>
                </td>
        </tr>
-               
+
 EOM;
        foreach($show_attrs as $key => $desc){
                $name = $attrmap["$key"];
index 6461a7debb35e39a97b8a9f5eef785063e6fb426..11d06c51c97d5ebd0df943f274e61ee2d9886c5e 100644 (file)
@@ -144,7 +144,7 @@ foreach ($rules as $rule){
                $rulestr = "$rule";
        else
                $rulestr .= ",$rule";
-} 
+}
 if ($update == 1 && $val != '')
        echo <<<EOM
 <script language="JavaScript1.1" type="text/javascript">
@@ -247,7 +247,7 @@ if (!empty($rules)){
        echo "</select>\n";
 }
 else
-       echo "<i>No rules available</i><br>\n"; 
+       echo "<i>No rules available</i><br>\n";
 ?>
 </td></tr>
 <tr><td colspan=5 align=center><?php echo $err_msg ?></td></tr>
index c4b3cfcd4e8306d8df423bdceccc35c3ad049db1..622b2dd207e0ec970568e332b7f569b14ef4b172 100644 (file)
@@ -185,7 +185,7 @@ else
 NAS List
 </td>
 <td>
-<select name=selected_nas size=5 OnChange="this.form.select_nas.value=1;this.form.submit()"> 
+<select name=selected_nas size=5 OnChange="this.form.select_nas.value=1;this.form.submit()">
 <?php
 foreach ($my_nas_list as $member){
        $name = $member[name];
@@ -200,7 +200,7 @@ $array = $my_nas_list[$selected_nas];
 echo <<<EOM
 <tr>
 <td align=right bgcolor="#d0ddb0">
-NAS Name 
+NAS Name
 </td>
 <td>
 <input type=text name=nasname size=40 value="$array[name]" $readonly>
index 85f73811ed4f24ceec4c7a0ff214d9760b776b24..1d2f6647c23b56edf2b1ea6f07a45ca1109d5fb6 100644 (file)
@@ -16,7 +16,7 @@
        <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
        <tr><td>
        <table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
-       <tr><td align=center bgcolor="#d0ddb0">Password</td><td><input type="password" name="passwd" value="">&nbsp;<input type="submit" class=button value="check"></td></tr>  
+       <tr><td align=center bgcolor="#d0ddb0">Password</td><td><input type="password" name="passwd" value="">&nbsp;<input type="submit" class=button value="check"></td></tr>
        </table>
        </table>
 </table>
index ca48d91709d653a6874d98de98454411bb0f15cb..65925b90b3187d6fb37094f027305949cc416029 100644 (file)
@@ -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);
index 3c4e7ff99b5918c34fde8969de61bbbe3e27ca24..e29f6444b443420541f56f20cff1e32c107421ba 100644 (file)
@@ -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'];
index 6edd6478691616e8ae37e7631263edbf521415de..35f21283378d5957ccd34387ff33bc3c089212d5 100644 (file)
@@ -58,7 +58,7 @@ print <<<EOM
        <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
        <tr><td>
 EOM;
-   
+
 if ($delete_user == 1){
        if ($user_type != 'group'){
                if (is_file("../lib/$config[general_lib_type]/delete_user.php3"))
index edd044bd6b0c26204cfd9c4e8bb2a8a369adb8f7..bdb32a9c914b3dee0dab0ed602998efeb15a68be 100644 (file)
@@ -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 <<<EOM
 </table>
@@ -77,12 +77,12 @@ print <<<EOM
        <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
        <tr><td>
 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");
 }
-       
+
 ?>
    <form name="edituser" method=post>
       <input type=hidden name=login value=<?php print $login ?>>
@@ -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] : '=';
index f5868cb9ca75b09fb0abaa356057723dc06214b8..18cb42b9cfb8442285e3853fce1b2ccc991b7813 100644 (file)
@@ -49,7 +49,7 @@ if (is_file("../lib/$config[general_lib_type]/user_info.php3"))
 <tr bgcolor="black" valign=top><td colspan=2>
        <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
        <tr><td>
-   
+
    <form method=post>
       <input type=hidden name=login value="<?php echo $login?>">
       <input type=hidden name=change value="0">
index b40c0eb1c6de227ee6bea47554bdb6ebebfe0de6..5ac54de1a2517ae3a66d440c9c29900c50025265 100644 (file)
@@ -50,7 +50,7 @@ include("password_generator.jsc");
 <tr bgcolor="black" valign=top><td colspan=2>
        <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
        <tr><td>
-   
+
 <?php
 if ($create == 1){
        if (is_file("../lib/$config[general_lib_type]/user_info.php3"))
index 60c351995feb34196ba65017f79e764958d77c71..9630521f6cce3511a3e2b41abd99aac9cf5b5b70 100644 (file)
@@ -70,7 +70,7 @@ if ($test_user == 1){
        $req=file($config[general_auth_request_file]);
        if ($config[general_ld_library_path] != '')
                putenv("LD_LIBRARY_PATH=$config[general_ld_library_path]");
-       $comm = $config[general_radclient_bin] . " $server:$port" . ' auth ' . $config[general_radius_server_secret] 
+       $comm = $config[general_radclient_bin] . " $server:$port" . ' auth ' . $config[general_radius_server_secret]
                . ' >' . $tmp_file;
        $fp = popen("$comm","w");
        if ($fp){
index ce1809e6c42d1be5792fb1077e25ca2a2ee237bd..a7935311be9ae55a8e1c6927df24c7bc064c37d3 100644 (file)
@@ -61,7 +61,7 @@ EOM;
        <tr>
                <td colspan=2>
                <center>
-               statistics for 
+               statistics for
 <?php
 if ($login == '')
        echo <<<EOM
@@ -84,7 +84,7 @@ EOM;
        <tr>    <td colspan=2><hr size=1 noshade>
                </td>
                </tr>
-               
+
        </table>
        </td>
        </tr>
index 6309eeda3692c95ae16755fc78379ab5ec917ada..e6003693beed5f25451bf2578a5a57e113bbcce8 100644 (file)
@@ -13,8 +13,8 @@ if ($logged_now)
 <!--
        var start;
        var our_time;
-       
-       function startcounter() 
+
+       function startcounter()
        {
                var start_date = new Date();
                start = start_date.getTime();
@@ -26,21 +26,21 @@ if ($logged_now)
        {
                var now_date = new Date();
                var diff = now_date.getTime() - start + our_time;
-                       
+
                var hours = parseInt(diff / 3600000);
                if(isNaN(hours)) hours = 0;
-                       
+
                var minutes = parseInt((diff % 3600000) / 60000);
                if(isNaN(minutes)) minutes = 0;
-                       
+
                var seconds = parseInt(((diff % 3600000) % 60000) / 1000);
                if(isNaN(seconds)) seconds = 0;
-                       
+
                var timeValue = " " ;
                timeValue += ((hours < 10) ? "0" : "") + hours;
                timeValue += ((minutes < 10) ? ":0" : ":") + minutes;
                timeValue += ((seconds < 10) ? ":0" : ":") + seconds;
-               
+
                document.online.status.value = timeValue;
                setTimeout("showcounter()", 1000);
        }
@@ -92,7 +92,7 @@ if ($logged_now){
        </td></tr>
        <tr><td align=center bgcolor="#d0ddb0">
        Connection Duration
-       </td><td>       
+       </td><td>
        <input type="text" name="status" size=10 value="$lastlog_session_time">
        </form>
        </td></tr>
@@ -207,7 +207,7 @@ lign=top>
        <tr><td align=center bgcolor="#d0ddb0">Average Upload</td><td>
        $avg_input</td></tr></td></tr>
        <tr><td align=center bgcolor="#d0ddb0">Average Download</td><td>
-       $avg_output</td></tr></td></tr> 
+       $avg_output</td></tr></td></tr>
        </table>
        </table>
 </table>
index c2a533b5b26d8a481734aa0cbf84ad055a126004..b2e0a874b7c2d9860532504ab959141d2ef2934b 100644 (file)
@@ -2,7 +2,7 @@
 echo <<<EOM
        <tr><td align=center bgcolor="#d0ddb0">
        Server
-       </td><td>       
+       </td><td>
        <b>$lastlog_server_name</b> ($lastlog_server_ip)
        </td></tr>
        <tr><td align=center bgcolor="#d0ddb0">
index 60b2f57ac67bff1637524a5c15e17b0cca5f6ec8..1ac4f1a42656702a915cc8d26bf493902cf400c7 100644 (file)
@@ -15,7 +15,7 @@ require_once('../lib/ldap/functions.php3');
                                $i = 0;
                                $j = -1;
                                $name = $attrmap["$key"] . $i;
-               
+
                                while (isset($$name)){
                                        $val = $$name;
                                        $i++;
@@ -36,7 +36,7 @@ require_once('../lib/ldap/functions.php3');
 //     if values is the same as the default or if the value is null and the ldap attribute exists
 //     then delete them
 //
-                                       if ((check_defaults($val,'',$default_vals["$key"]) || $val == '') && 
+                                       if ((check_defaults($val,'',$default_vals["$key"]) || $val == '') &&
                                                isset($item_vals["$key"][$j]))
                                                $del[$attrmap["$key"]][] = $item_vals["$key"][$j];
 //
index 4e375041eb45128b11ac91c89272231a44c287a7..492ab14813280e04b0166e56f0ec3b0e1e20f6d4 100644 (file)
@@ -23,7 +23,7 @@ require_once('../lib/ldap/functions.php3');
                        $mod['givenname'] = ($decode_normal) ? encode_string($mod['givenname'],$k) : $mod['givenname'];
                                $mod['sn'] = $sn;
                                $mod['sn'] = ($decode_normal) ? encode_string($mod['sn'],$k) : $mod['sn'];
-                               
+
                        }
                        if ($Fmail != '' && $Fmail != '-' && $Fmail != $mail)
                                $mod['mail'] = $Fmail;
index e09f699616f494ec3e6732b8d96e49a43fbee31a..72592dd0a4f540dc9411cceafee945937683cb7c 100644 (file)
@@ -123,7 +123,7 @@ function check_user_passwd($dn,$passwd,$config)
                return FALSE;
 
        return FALSE;
-}      
+}
 
 function closedb($ds,$config)
 {
index 95525cbddbd303113ab65b91e18763e16c200456..20cb6e0e03eb96b5ac2f1bb4e1d9bb5182d74715 100644 (file)
@@ -22,7 +22,7 @@ $op_nexst = '!*';
 function check_operator($op,$type)
 {
        switch($op){
-               case '=': 
+               case '=':
                case ':=':
                case '+=':
                        return 0;
index a71e7062dd0b716ff4a8650f2d91ce264ea61721..04f99f657d31960f69f1822914801a057f727bdd 100644 (file)
@@ -76,7 +76,7 @@ if ($link){
                                if (!$res || !@da_sql_affected_rows($link,$res,$config))
                                        echo "<b>Delete failed for attribute $key: " . da_sql_error($link,$config) . "</b><br>\n";
                        }
-       //      if value is null or equals the default value then don't add it 
+       //      if value is null or equals the default value then don't add it
                        else if ($val == '' || check_defaults($val,$op_val,$default_vals["$key"]))
                                continue;
        //      if value differs from the sql value then update
index 5485b3fb8aeb0801f39b021b48a114c6559ee390..c519a1f565de03d8ee6e341784af2d428914ee21 100644 (file)
@@ -50,7 +50,7 @@ if ($link){
        }
        else
                echo "<b>Cannot use the user info table. Check the sql_use_user_info_table directive in admin.conf</b><br>\n";
-       
+
 }
 else
        echo "<b>Could not connect to SQL database</b><br>\n";
index 35fa1dc25a0fd676d00eb04720b6eb8848ad34e3..e80a8275928661f6459e89b0ea86d19b8df51b7c 100644 (file)
@@ -31,7 +31,7 @@ if ($link){
                                "UPDATE $config[sql_check_table] SET value = '$passwd' $text3 WHERE
                                attribute = '$config[sql_password_attribute]' AND username = '$login';");
                                if (!$res || !@da_sql_affected_rows($link,$res,$config))
-                                       echo "<b>Error while changing password: " . da_sql_error($link,$config) . "</b><br>\n"; 
+                                       echo "<b>Error while changing password: " . da_sql_error($link,$config) . "</b><br>\n";
                        }
                        else{
                                $res = @da_sql_query($link,$config,
index 1f3e876d83c9472b64d31051456010f1db3e3a9d..6896081336bef40fa0eabec1f175de4df3bc3f0c 100644 (file)
@@ -37,7 +37,7 @@ if ($link){
                                        $Fou = da_sql_escape_string($Fou);
                                        $Fhomephone = da_sql_escape_string($Fhomephone);
                                        $Fworkphone = da_sql_escape_string($Fworkphone);
-                                       $Fmobile = da_sql_escape_string($Fmobile);      
+                                       $Fmobile = da_sql_escape_string($Fmobile);
                                        $res = @da_sql_query($link,$config,
                                        "INSERT INTO $config[sql_user_info_table]
                                        (username,name,mail,department,homephone,workphone,mobile) VALUES
index 8ade8a165e10f544d3134800ddca5b011ce43c50..21ea439f47ab588844896b3a1ca071e9fc1afebf 100644 (file)
@@ -39,7 +39,7 @@ if ($login != '' && $user_type != 'group'){
                                foreach ($member_groups as $group)
                                        $in .= "'$group',";
                                $in = substr($in,0,-1);
-                               $in .= ')';     
+                               $in .= ')';
                                $res = @da_sql_query($link,$config,
                                "SELECT attribute,value $op FROM $config[sql_groupcheck_table]
                                WHERE groupname IN $in;");
index a968fd82a992318530364189afc0d907b57ad457..11890d0571d95d8d1a51daf5230173d8f173fcf6 100644 (file)
@@ -114,7 +114,7 @@ function da_sql_affected_rows($link,$result,$config)
 
 function da_sql_list_fields($table,$link,$config)
 {
-       $res = @dbx_query($link,"SELECT * FROM ".$table." LIMIT 1 ;"); 
+       $res = @dbx_query($link,"SELECT * FROM ".$table." LIMIT 1 ;");
        if ($res){
                $fields[num] = $res->cols;
        }
index 1fabc3dd66dfe198b430228ac904d121a786bdef..194266fc3f3b03cd277d76b74561bc79751d4749 100644 (file)
@@ -84,13 +84,13 @@ function da_sql_query($link,$config,$query)
 function da_sql_num_rows($statement,$config)
 {
        // Unfortunately we need to fetch the statement as ocirowcount doesn't work on SELECTs
-       $rows = OCIFetchStatement($statement,$res); 
+       $rows = OCIFetchStatement($statement,$res);
 
         if ($config[sql_debug] == 'true'){
                 print "<b>DEBUG(SQL,OCI DRIVER): Query Result: Num rows:: " . $rows . "</b><br>\n";
         }
        // Unfortunately we need to re-execute because the statement cursor is reset after OCIFetchStatement :-(
-       OCIExecute($statement); 
+       OCIExecute($statement);
         return $rows;
 }
 
index 68ad17c83be44fca2087c4736007931fd0b8f4c5..4f856531ecc399e5851539b4f4e594a9e8aeef51 100644 (file)
@@ -141,7 +141,7 @@ function da_sql_num_fields($fields,$config)
 function da_sql_field_name($fields,$num,$config)
 {
        if ($fields){
-               $row = @pg_fetch_row($fields[res],$num);        
+               $row = @pg_fetch_row($fields[res],$num);
                if ($row)
                        return $row[0];
        }
index 8c5fd9d7be30e6367b98dbb022b643e190d84e62..9f7645150597b3a0f20ff40ec56146645e5c20eb 100644 (file)
@@ -8,7 +8,7 @@ function da_sql_limit($limit,$point,$config)
                        return '';
                case 2:
                        return "LIMIT $limit";
-       }       
+       }
 }
 
 function da_sql_host_connect($server,$config)
index 9bbd8b1b04434e0077ad57304bca2c39ae00ad15..d5b280a7d080cdbf2a2f3f4f3b8883aa5590cc87 100644 (file)
@@ -15,7 +15,7 @@ if ($link){
                $max = 10;
        if ($max > 500)
                $max = 10;
-       if (($search_IN == 'name' || $search_IN == 'department' || $search_IN == 'username') && 
+       if (($search_IN == 'name' || $search_IN == 'department' || $search_IN == 'username') &&
                        $config[sql_use_user_info_table] == 'true'){
                $res = @da_sql_query($link,$config,
                "SELECT " . da_sql_limit($max,0,$config) . " username FROM $config[sql_user_info_table] WHERE
index 7d6b61353a155f2c73f9faa0c4308d1b9eccd46d..d7178c02497dcdaaec4979b5a3fb8707c4199ad8 100644 (file)
@@ -24,7 +24,7 @@ function get_user_info($link,$user,$config)
                        $row = @da_sql_fetch_array($res,$config);
                        if ($row)
                                return $row[name];
-               }       
+               }
        }
 }
 
index 6eecd6569595f876a503e85284a9db324f3370d6..c5492ce39cfee955efe1c23981c138c769c85175 100644 (file)
@@ -27,7 +27,7 @@ if ($link){
                                if ($res){
                                        if (@da_sql_num_rows($res,$config))
                                                echo "<b>User $new_member already is a member of the group</b><br>\n";
-                                       else{   
+                                       else{
                                                $res = @da_sql_query($link,$config,
                                                "INSERT INTO $config[sql_usergroup_table] (groupname,username)
                                                VALUES ('$login','$new_member');");
index 58d2261026184624e67a5a081c4fb7b79700f476..edb450dccce77b9a1ff126c17dd8c4184e2f52ac 100644 (file)
@@ -81,7 +81,7 @@ if ($link){
                                        $member = $row[username];
                                        $group_members[] = "$member";
                                }
-                       }       
+                       }
                        else
                                echo "<b>Database query failed partially: " . da_sql_error($link,$config) . "</b><br>\n";
                        if (isset($tmp)){
index a7aa4289060790ad4c31d1ec3a425cbdf36f251d..aee4f0885f3b1d58e88ecdf84df015b4f84bd5b7 100644 (file)
@@ -22,10 +22,10 @@ if ($config[sql_nas_table] != ''){
                        $NAS_ARR = split(',',$mappings[$auth_user][nasdb]);
                        $extra = 'WHERE nasname IN (';
                        foreach ($NAS_ARR as $nas)
-                               $extra .= "'$nasname',";        
+                               $extra .= "'$nasname',";
                        unset($NAS_ARR);
                        $extra = rtrim($extra,",");
-                       $extra .= ')';  
+                       $extra .= ')';
                }
                $search = @da_sql_query($link,$config,
                "SELECT * FROM $config[sql_nas_table] $extra;");
index 4c56a297c892b9ab54024c1dcb3c26e9cea5666d..0be95879fc93f171d755a066000c4ac5a438f80a 100644 (file)
@@ -78,7 +78,7 @@ if ($link){
                                                $user_exists = 'yes';
                                                $user_info = 1;
                                        }
-                                       if (($row = @da_sql_fetch_array($res,$config))){        
+                                       if (($row = @da_sql_fetch_array($res,$config))){
                                                $cn = ($row[name] != '') ? $row[name] : '-';
                                                $telephonenumber = ($row[workphone] != '') ? $row[workphone] : '-';
                                                $homephone = ($row[homephone] != '') ? $row[homephone] : '-';
@@ -86,7 +86,7 @@ if ($link){
                                                $mail = ($row[mail] != '') ? $row[mail] : '-';
                                                $mobile = ($row[mobile] != '') ? $row[mobile] : '-';
                                        }
-                               }                       
+                               }
                                else
                                        echo "<b>Database query failed partially: " . da_sql_error($link,$config) . "</b><br>\n";
                        }