]> git.entuzijast.net Git - freeradius-dialup-admin.git/commitdiff
* Add support for the Expiration attribute. Add it in the sql attribute map, in user_...
authorkkalev <kkalev>
Tue, 20 Aug 2002 11:58:34 +0000 (11:58 +0000)
committerkkalev <kkalev>
Tue, 20 Aug 2002 11:58:34 +0000 (11:58 +0000)
  check for it in user_admin
* Add a few more keys in the userinfo and badusers tables.
* Fix a problem with lib/sql/defaults.php3 where the first character in the default value when using
  operators was set to the opeator

Changelog
conf/sql.attrmap
conf/user_edit.attrs
htdocs/user_admin.php3
lib/sql/defaults.php3
sql/badusers.sql
sql/userinfo.sql

index d7753f67c241bc7263752b926ee18abd3f9c55e0..6f776cc034ae5ebcd98329faf2efb461a1b35250 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -1,6 +1,11 @@
 Ver 1.55:
 * Update the FAQ about missing attributes from the user/group edit pages and add a few comments
   in the configuration files
+* Add support for the Expiration attribute. Add it in the sql attribute map, in user_edit.attrs and
+  check for it in user_admin
+* Add a few more keys in the userinfo and badusers tables.
+* Fix a problem with lib/sql/defaults.php3 where the first character in the default value when using
+  operators was set to the opeator
 Ver 1.54:
 * Add attributes for the sql group tables in admin.conf. Now SQL group support should really work!
 Ver 1.53:
index 908638c0f55ac5d4c64bab0f3136ef78a5d037b0..e7d1470c17475b191f8a9c77ab774f231745d20b 100644 (file)
@@ -14,6 +14,7 @@ checkItem     Dialup-Access                   none
 checkItem      Max-Daily-Session               Max-Daily-Session
 checkItem      Max-Weekly-Session              Max-Weekly-Session
 checkItem      Login-Time                      Login-Time
+chechItem      Expiration                      Expiration
 
 replyItem      Service-Type                    Service-Type
 replyItem      Framed-Protocol                 Framed-Protocol
index 1306580f67990193a935f3ff81c604a1682e09f5..63117eb7f1eada6dc88a4c714383bfbad7d29449 100644 (file)
@@ -38,3 +38,4 @@ Dialup-Lock-Msg                       <a href="help/lock_message_help.html" target=lm_help onclick=w
 #Max-Daily-Session             Daily Limit (secs)
 #Max-Weekly-Session            Weekly Limit (secs)
 #Login-Time                    User Login Period <a href="help/login_time_help.html" target=lt_help onclick=window.open("help/login_time_help.html","lt_help","width=600,height=370,toolbar=no,scrollbars=no,resizable=yes") title="Login-Time Help Page"><font color="blue">(UUCP Format)</font></a>
+#Expiration                    <a href="help/expiration_help.html" target=lt_help onclick=window.open("help/expiration_help.html","lt_help","width=600,height=180,toolbar=no,scrollbars=no,resizable=yes") title="Expiration Help Page"><font color="blue">User Expiration Date</font></a>
index 4784af571fb06f98fcc5af42de003a587b06eaae..3420623532501d54812d6727b9f04857672bc41f 100644 (file)
@@ -231,4 +231,15 @@ EON;
 else
        $descr = '-';
 
+$expiration = $default_vals['Expiration'];
+if ($item_vals['Expiration'][0] != '')
+       $expiration = $item_vals['Expiration'][0];
+if ($expiration != ''){
+       $expiration = strtotime($expiration);
+       if ($expiration != -1 && $expiration < time())
+               $descr = <<<EOM
+<font color=red><b>User Account has expired</b></font>
+EOM;
+}
+
 require('../html/user_admin.html.php3');
index 1e4debcffee16dce3b05e79d0672bd8d6c50ff79..4a2f0799454914d1b943b3445488804b2ef75e35 100644 (file)
@@ -62,11 +62,11 @@ if ($login != ''){
                                        echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
                                foreach($attrmap as $key => $val){
                                        if (isset($tmp[$val])){
-                                               if ($tmp[$val][0] != '')
-                                                       $default_vals["$key"] = $tmp[$val][0];
                                                if ($use_op)
                                                        if ($tmp[$val][operator][0] != '')
                                                                $default_vals["$key"][operator] = $tmp[$val][operator][0];
+                                               if ($tmp[$val][0] != '')
+                                                       $default_vals["$key"] = $tmp[$val][0];
                                        }
                                }
                        }
index 09aa8c0898cd1dc7a3adcfc5b3224a8889681b45..9dc9689e5a8002ebdf96fd02aaec99eec2b9f2f9 100644 (file)
@@ -6,5 +6,7 @@ CREATE TABLE badusers (
   UserName varchar(30),
   Date datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
   Reason varchar(200),
-  PRIMARY KEY (id)
+  PRIMARY KEY (id),
+  KEY UserName (UserName),
+  KEY Date (Date)
 );
index 243a4f5cf31ac70ecd47e47a52b4fff7f2b70dde..aacb4d2fd36e6fb7dfc39580d22a0bb03740cd55 100644 (file)
@@ -10,5 +10,7 @@ CREATE TABLE userinfo (
   WorkPhone varchar(200),
   HomePhone varchar(200),
   Mobile varchar(200),
-  PRIMARY KEY (id)
+  PRIMARY KEY (id),
+  KEY UserName (UserName),
+  KEY Departmet (Department)
 );