Remove dialup admin
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 21 Jan 2013 19:35:07 +0000 (19:35 +0000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 21 Jan 2013 19:35:07 +0000 (19:35 +0000)
179 files changed:
debian/apache2.conf [deleted file]
debian/control
debian/freeradius-dialupadmin.README.Debian [deleted file]
debian/freeradius-dialupadmin.dirs [deleted file]
debian/freeradius-dialupadmin.docs [deleted file]
debian/freeradius-dialupadmin.examples [deleted file]
debian/freeradius-dialupadmin.install [deleted file]
debian/freeradius-dialupadmin.links [deleted file]
debian/rules
dialup_admin/Changelog [deleted file]
dialup_admin/Makefile [deleted file]
dialup_admin/README [deleted file]
dialup_admin/bin/Changelog.GuyFraser [deleted file]
dialup_admin/bin/backup_radacct [deleted file]
dialup_admin/bin/clean_radacct [deleted file]
dialup_admin/bin/clearsession [deleted file]
dialup_admin/bin/dialup_admin.cron [deleted file]
dialup_admin/bin/log_badlogins [deleted file]
dialup_admin/bin/monthly_tot_stats [deleted file]
dialup_admin/bin/showmodem [deleted file]
dialup_admin/bin/snmpfinger [deleted file]
dialup_admin/bin/sqlrelay_query [deleted file]
dialup_admin/bin/tot_stats [deleted file]
dialup_admin/bin/truncate_radacct [deleted file]
dialup_admin/conf/accounting.attrs [deleted file]
dialup_admin/conf/admin.conf [deleted file]
dialup_admin/conf/auth.request [deleted file]
dialup_admin/conf/captions.conf [deleted file]
dialup_admin/conf/config.php [deleted file]
dialup_admin/conf/default.vals [deleted file]
dialup_admin/conf/extra.ldap-attrmap [deleted file]
dialup_admin/conf/naslist.conf [deleted file]
dialup_admin/conf/sql.attrmap [deleted file]
dialup_admin/conf/sql.attrs [deleted file]
dialup_admin/conf/user_edit.attrs [deleted file]
dialup_admin/conf/username.mappings [deleted file]
dialup_admin/doc/AUTHORS [deleted file]
dialup_admin/doc/FAQ [deleted file]
dialup_admin/doc/HELP_WANTED [deleted file]
dialup_admin/doc/HOWTO [deleted file]
dialup_admin/doc/TODO [deleted file]
dialup_admin/htdocs/about.html [deleted file]
dialup_admin/htdocs/accounting.php [deleted file]
dialup_admin/htdocs/badusers.php [deleted file]
dialup_admin/htdocs/buttons.php [deleted file]
dialup_admin/htdocs/clear_opensessions.php [deleted file]
dialup_admin/htdocs/content.html [deleted file]
dialup_admin/htdocs/failed_logins.php [deleted file]
dialup_admin/htdocs/find.php [deleted file]
dialup_admin/htdocs/group_admin.php [deleted file]
dialup_admin/htdocs/group_new.php [deleted file]
dialup_admin/htdocs/help/auth_type_help.html [deleted file]
dialup_admin/htdocs/help/badusers_help.html [deleted file]
dialup_admin/htdocs/help/callback_id_help.html [deleted file]
dialup_admin/htdocs/help/callback_number_help.html [deleted file]
dialup_admin/htdocs/help/class_help.html [deleted file]
dialup_admin/htdocs/help/dialup_access_help.html [deleted file]
dialup_admin/htdocs/help/expiration_help.html [deleted file]
dialup_admin/htdocs/help/filter_id_help.html [deleted file]
dialup_admin/htdocs/help/framed_compression_help.html [deleted file]
dialup_admin/htdocs/help/framed_ip_address_help.html [deleted file]
dialup_admin/htdocs/help/framed_ip_netmask_help.html [deleted file]
dialup_admin/htdocs/help/framed_mtu_help.html [deleted file]
dialup_admin/htdocs/help/framed_protocol_help.html [deleted file]
dialup_admin/htdocs/help/help.php [deleted file]
dialup_admin/htdocs/help/idle_timeout_help.html [deleted file]
dialup_admin/htdocs/help/lock_message_help.html [deleted file]
dialup_admin/htdocs/help/login_time_help.html [deleted file]
dialup_admin/htdocs/help/nomadix/nomadix_bw_down_help.html [deleted file]
dialup_admin/htdocs/help/nomadix/nomadix_bw_up_help.html [deleted file]
dialup_admin/htdocs/help/nomadix/nomadix_config_url_help.html [deleted file]
dialup_admin/htdocs/help/nomadix/nomadix_endofsession_help.html [deleted file]
dialup_admin/htdocs/help/nomadix/nomadix_expiration_help.html [deleted file]
dialup_admin/htdocs/help/nomadix/nomadix_ip_upsell_help.html [deleted file]
dialup_admin/htdocs/help/nomadix/nomadix_logoff_url_help.html [deleted file]
dialup_admin/htdocs/help/nomadix/nomadix_maxbytesdown_help.html [deleted file]
dialup_admin/htdocs/help/nomadix/nomadix_maxbytesup_help.html [deleted file]
dialup_admin/htdocs/help/nomadix/nomadix_subnet_help.html [deleted file]
dialup_admin/htdocs/help/nomadix/nomadix_url_redirection_help.html [deleted file]
dialup_admin/htdocs/help/port_limit_help.html [deleted file]
dialup_admin/htdocs/help/reply_message_help.html [deleted file]
dialup_admin/htdocs/help/service_type_help.html [deleted file]
dialup_admin/htdocs/help/session_timeout_help.html [deleted file]
dialup_admin/htdocs/help/simultaneous_use_help.html [deleted file]
dialup_admin/htdocs/images/arrow.gif [deleted file]
dialup_admin/htdocs/images/bg.gif [deleted file]
dialup_admin/htdocs/images/black.gif [deleted file]
dialup_admin/htdocs/images/greenlines1.gif [deleted file]
dialup_admin/htdocs/images/logo2.gif [deleted file]
dialup_admin/htdocs/images/pixel.gif [deleted file]
dialup_admin/htdocs/images/title2.gif [deleted file]
dialup_admin/htdocs/index.html [deleted file]
dialup_admin/htdocs/login_time_create.php [deleted file]
dialup_admin/htdocs/nas_admin.php [deleted file]
dialup_admin/htdocs/password.php [deleted file]
dialup_admin/htdocs/password_generator.jsc [deleted file]
dialup_admin/htdocs/session_destroy.php [deleted file]
dialup_admin/htdocs/show_groups.php [deleted file]
dialup_admin/htdocs/stats.php [deleted file]
dialup_admin/htdocs/style.css [deleted file]
dialup_admin/htdocs/user_accounting.php [deleted file]
dialup_admin/htdocs/user_admin.php [deleted file]
dialup_admin/htdocs/user_delete.php [deleted file]
dialup_admin/htdocs/user_edit.php [deleted file]
dialup_admin/htdocs/user_finger.php [deleted file]
dialup_admin/htdocs/user_info.php [deleted file]
dialup_admin/htdocs/user_new.php [deleted file]
dialup_admin/htdocs/user_state.php [deleted file]
dialup_admin/htdocs/user_stats.php [deleted file]
dialup_admin/htdocs/user_test.php [deleted file]
dialup_admin/html/buttons/default/buttons.html.php [deleted file]
dialup_admin/html/group_toolbar.html.php [deleted file]
dialup_admin/html/stats.html.php [deleted file]
dialup_admin/html/user_admin.html.php [deleted file]
dialup_admin/html/user_admin_userinfo.html.php [deleted file]
dialup_admin/html/user_toolbar.html.php [deleted file]
dialup_admin/lib/acctshow.php [deleted file]
dialup_admin/lib/add_badusers.php [deleted file]
dialup_admin/lib/attrshow.php [deleted file]
dialup_admin/lib/crypt/clear.php [deleted file]
dialup_admin/lib/crypt/crypt.php [deleted file]
dialup_admin/lib/crypt/md5.php [deleted file]
dialup_admin/lib/defaults.php [deleted file]
dialup_admin/lib/functions.php [deleted file]
dialup_admin/lib/lang/default/utf8.php [deleted file]
dialup_admin/lib/lang/el/utf8.php [deleted file]
dialup_admin/lib/ldap/attrmap.php [deleted file]
dialup_admin/lib/ldap/change_attrs.php [deleted file]
dialup_admin/lib/ldap/change_info.php [deleted file]
dialup_admin/lib/ldap/change_passwd.php [deleted file]
dialup_admin/lib/ldap/create_user.php [deleted file]
dialup_admin/lib/ldap/defaults.php [deleted file]
dialup_admin/lib/ldap/delete_user.php [deleted file]
dialup_admin/lib/ldap/find.php [deleted file]
dialup_admin/lib/ldap/functions.php [deleted file]
dialup_admin/lib/ldap/password_check.php [deleted file]
dialup_admin/lib/ldap/personattrs.php [deleted file]
dialup_admin/lib/ldap/user_info.php [deleted file]
dialup_admin/lib/missing.php [deleted file]
dialup_admin/lib/operators.php [deleted file]
dialup_admin/lib/sql/attrmap.php [deleted file]
dialup_admin/lib/sql/change_attrs.php [deleted file]
dialup_admin/lib/sql/change_info.php [deleted file]
dialup_admin/lib/sql/change_passwd.php [deleted file]
dialup_admin/lib/sql/create_group.php [deleted file]
dialup_admin/lib/sql/create_user.php [deleted file]
dialup_admin/lib/sql/defaults.php [deleted file]
dialup_admin/lib/sql/delete_group.php [deleted file]
dialup_admin/lib/sql/delete_user.php [deleted file]
dialup_admin/lib/sql/drivers/dbx/functions.php [deleted file]
dialup_admin/lib/sql/drivers/mysql/functions.php [deleted file]
dialup_admin/lib/sql/drivers/oracle/functions.php [deleted file]
dialup_admin/lib/sql/drivers/pg/functions.php [deleted file]
dialup_admin/lib/sql/drivers/sqlrelay/functions.php [deleted file]
dialup_admin/lib/sql/find.php [deleted file]
dialup_admin/lib/sql/functions.php [deleted file]
dialup_admin/lib/sql/group_admin.php [deleted file]
dialup_admin/lib/sql/group_change.php [deleted file]
dialup_admin/lib/sql/group_info.php [deleted file]
dialup_admin/lib/sql/nas_list.php [deleted file]
dialup_admin/lib/sql/password_check.php [deleted file]
dialup_admin/lib/sql/user_info.php [deleted file]
dialup_admin/lib/xlat.php [deleted file]
dialup_admin/sql/mysql/badusers.sql [deleted file]
dialup_admin/sql/mysql/mtotacct.sql [deleted file]
dialup_admin/sql/mysql/totacct.sql [deleted file]
dialup_admin/sql/mysql/userinfo.sql [deleted file]
dialup_admin/sql/oracle/badusers.sql [deleted file]
dialup_admin/sql/oracle/mtotacct.sql [deleted file]
dialup_admin/sql/oracle/totacct.sql [deleted file]
dialup_admin/sql/oracle/userinfo.sql [deleted file]
dialup_admin/sql/postgresql/badusers.sql [deleted file]
dialup_admin/sql/postgresql/mtotacct.sql [deleted file]
dialup_admin/sql/postgresql/totacct.sql [deleted file]
dialup_admin/sql/postgresql/userinfo.sql [deleted file]
doc/README
redhat/freeradius.spec
suse/admin-httpd.conf [deleted file]
suse/freeradius.spec

diff --git a/debian/apache2.conf b/debian/apache2.conf
deleted file mode 100644 (file)
index 5f3480f..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-Alias /freeradius-dialupadmin /usr/share/freeradius-dialupadmin/htdocs
-
-<Directory /usr/share/freeradius-dialupadmin/htdocs>
-  Options Indexes FollowSymLinks
-
-  <IfModule mod_php4.c>
-    php_flag register_globals off
-  </IfModule>
-  <IfModule mod_php5.c>
-    php_flag register_globals off
-  </IfModule>
-
-</Directory>
-
-# You may prefer a simple URL like http://dialupadmin.example.com
-#<VirtualHost 1.2.3.4>
-#  DocumentRoot /usr/share/freeradius-dialupadmin/htdocs
-#  ServerName dialupadmin.example.com
-#</VirtualHost>
-
-# redirect to https when available 
-#
-#  Note: There are multiple ways to do this, and which one is suitable for
-#  your site's configuration depends. Consult the apache documentation if
-#  you're unsure, as this example might not work everywhere.
-#
-#<IfModule mod_rewrite.c>
-#  <IfModule mod_ssl.c>
-#    <Location /freeradius-dialupadmin>
-#      RewriteEngine on
-#      RewriteCond %{HTTPS} !^on$ [NC]
-#      RewriteRule . https://%{HTTP_HOST}%{REQUEST_URI}  [L]
-#    </Location>
-#  </IfModule>
-#</IfModule>
-
index 2152639..fde8d78 100644 (file)
@@ -124,14 +124,6 @@ Description: iODBC module for FreeRADIUS server
  The FreeRADIUS server can use iODBC to access databases to authenticate users
  and do accounting, and this module is necessary for that.
 
-Package: freeradius-dialupadmin
-Architecture: all
-Depends: php5 | libapache2-mod-php5 | php5-cgi, apache2-mpm-prefork | httpd, ${perl:Depends}
-Suggests: php5-mysql | php5-pgsql, php5-ldap, libdate-manip-perl
-Description: set of PHP scripts for administering a FreeRADIUS server
- These scripts provide a web-based interface for administering a FreeRADIUS
- server which stores authentication information in either SQL or LDAP.
-
 Package: freeradius-dbg
 Architecture: any
 Section: debug
diff --git a/debian/freeradius-dialupadmin.README.Debian b/debian/freeradius-dialupadmin.README.Debian
deleted file mode 100644 (file)
index d175c6e..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-Dialup Admin Debian README
-Configuration is in /etc/freeradius-dialupadmin/
-which is linked into the dialupadmin tree in
-/usr/share/freeradius-dialupadmin.
-
-To put this into production, add
-Include /etc/freeradius-dialupadmin/apache2.conf
-
-To the relevant section of your apache configuration.
-
-The scripts make use of .. to access the
-other paths, so symlinking into your webtree
-may not work.
diff --git a/debian/freeradius-dialupadmin.dirs b/debian/freeradius-dialupadmin.dirs
deleted file mode 100644 (file)
index 811a901..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-etc/freeradius-dialupadmin/
-usr/share/freeradius-dialupadmin/
diff --git a/debian/freeradius-dialupadmin.docs b/debian/freeradius-dialupadmin.docs
deleted file mode 100644 (file)
index 91b3a4f..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-dialup_admin/doc/AUTHORS
-dialup_admin/doc/FAQ
-dialup_admin/doc/HELP_WANTED
-dialup_admin/doc/HOWTO
-dialup_admin/doc/TODO
diff --git a/debian/freeradius-dialupadmin.examples b/debian/freeradius-dialupadmin.examples
deleted file mode 100644 (file)
index 5c627ca..0000000
+++ /dev/null
@@ -1 +0,0 @@
-dialup_admin/bin/dialup_admin.cron
diff --git a/debian/freeradius-dialupadmin.install b/debian/freeradius-dialupadmin.install
deleted file mode 100644 (file)
index e2de84b..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-etc/freeradius-dialupadmin
-usr/share/doc/freeradius-dialupadmin
-usr/share/freeradius-dialupadmin
diff --git a/debian/freeradius-dialupadmin.links b/debian/freeradius-dialupadmin.links
deleted file mode 100644 (file)
index 8c2e29e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-etc/freeradius-dialupadmin/ usr/share/freeradius-dialupadmin/conf
index 97370a5..6894ca4 100755 (executable)
@@ -127,26 +127,7 @@ ifeq (config.guess.dist,$(wildcard config.guess.dist))
 endif
        dh_clean 
 
-install: install-indep install-arch
-install-indep: build-indep-stamp
-       dh_testdir
-       dh_testroot
-       dh_installdirs -i
-
-       $(MAKE) -C dialup_admin DIALUP_PREFIX=/usr/share/freeradius-dialupadmin \
-                               DIALUP_DOCDIR=/usr/share/doc/freeradius-dialupadmin \
-                               DIALUP_CONFDIR=/etc/freeradius-dialupadmin \
-                               R=$(freeradius_dir) install
-
-       mv $(freeradius_dir)/usr/share/freeradius-dialupadmin/bin/dialup_admin.cron \
-              $(freeradius_dir)/usr/share/freeradius-dialupadmin/bin/freeradius-dialupadmin.cron
-       mv $(freeradius_dir)/usr/share/doc/freeradius-dialupadmin/Changelog \
-              $(freeradius_dir)/usr/share/doc/freeradius-dialupadmin/changelog
-
-       install -m0644 debian/apache2.conf $(freeradius_dir)/etc/freeradius-dialupadmin/
-
-       dh_install -i --sourcedir=$(freeradius_dir)
-       dh_installdocs -p freeradius-dialupadmin dialup_admin/README
+install: install-arch
 
 install-arch: build-arch-stamp
        dh_testdir
diff --git a/dialup_admin/Changelog b/dialup_admin/Changelog
deleted file mode 100644 (file)
index 6c4534f..0000000
+++ /dev/null
@@ -1,633 +0,0 @@
-Ver X.XX:
-* add comparison operators "!=" and "not like" to Accounting
-* replace ereg -> preg_match, ereg_replace -> preg_replace, split -> preg_split for PHP5.3 compatibility
-* fix LIMIT not working when using MySQL
-* add configuration item "timezone" to make PHP 5.1+ happy
-Ver 1.80:
-* Remove snmp_clearsession. It is replaced by clearsession which supports both snmp and telnet
-  methods of removing a user from an access server. Add corresponding configuration directives
-  general_sessionclear_method and nasXX_sessionclear_method
-* Create a new function da_sql_limit() and use that to pass LIMIT arguments to the database layer
-  since the syntax is different between db vendors
-* Rename the badusers date field to incidentdate to avoid reserved words in databases. Bug found by
-  Peter Nixon
-* Count online users correctly (through a separate query) in user_finger.
-* Use the correct max results variable in lib/*/find.php3
-* In time2strclock also show days if applicable
-* In lib/sql/attrmap.php3, only register variables once. Go through $show_attrs and set default attribute
-  mappings for any attribute that a mapping does not exist.
-* Change the order of OID's used in snmpfinger for cisco NASes
-Ver 1.78:
-* Add a snmp_clearsession which can disconnect a user by using the Cisco AAA Session MIB
-* Add a configuration directive general_sessionclear_bin
-* Add a session disconnect button in the 'clear open sessions' page
-* Also clear sessions from the sql extra servers in the 'clear open sessions' page
-* In bin/snmpfinger also accept @,. in the username
-* If we are stripping realms, then if needed strip them from the data returned by snmpfinger in
-  user_finger.php3
-* Add a header with the page encoding before sending any page (header added in config.php3)
-  This closes Bug #153
-* Fix a problem when reading username.mappings
-* If date calculation fails, abort
-* Add a backup_radacct script
-* Add an sqlrelay functions file. The user_admin page does not currently work. Looking into it.
-* Add sqlrelay support in the scripts. Add a sqlrelay_query script to run sqlrelay commands
-* Update password_check to work with all password attributes and use the configuration directives
-* Add more documentation for per user counter limit attributes (daily/weekly/monthly limits)
-* Make all counter limits default to none so that people don't get confused
-* In clear_opensessions depending on sql type use either IS NULL or = 0 in the DELETE statement.
-  We need to find a cleaner solution to this. This closes bug#175
-* Log somewhat more verbose error messages when the sql_command binary is not found in the bin scripts
-* Make nasXX_finger_type actually work since the place where nas information was stored was changed a
-  long time ago. Bug noted by Nick Bright
-* In user_finger only set LD_LIBRARY_PATH once, not each time we call snmpfinger
-* Add support for usrhiper in snmpfinger. Patch from Nick Bright
-* urlencode() all occurrences of the $login variable when used in url's. Bug noted by Dag Landau
-* Show the correct nas type in nas_admin. Bug noted by Nick Bright
-* Correctly calculate the nas ip in lib/sql/nas_list.php3. Add a check_ip() function in lib/functions.php3
-  Bug noted by Nick Bright
-* Correctly check nas validity in nas_admin.php3. Bug noted by Nick Bright
-* Don't use $num in stats.php3, change it to $stats_num
-Ver 1.75:
-* A LOT of security related fixes. Now dialupadmin should hopefully be secure enough to
-  be accessed by normal users (not administrators).
-* Move a few elements in the CSS file from the body tag. Suggestion by Gary McKinney
-* Update FAQ about using php with no sql support.
-* Allow the user to select between viewing FAQ,HOWTO or README in the help page.
-* Use $_SERVER instead of $HTTP_SERVER_VARS
-* Add a drop down menu with existing groups in group_new.php3
-* Check for sql in show_groups.php3
-* In lib/sql/group_info.php3 if $login is not set, find available groups and place them in
-  $existing_groups along with a count of users per group. Use the functionality in group_new.php3
-  and show_groups.php3
-* Update TODO
-* Add the style sheet in the content.html
-* Enlarge the width for the left frame
-* Make show_groups and the drop down menu in group_new work
-* Use lower cased row names in badusers page
-* Wrong foreach in show_groups and group_new.
-* Fix operator escaping in lib/sql/change_attrs.php3
-* In user_state also take into account any open sessions when calculating daily/weekly usage.
-  Add two more lines in the output stating the number of current open sessions and the time used.
-* Move a few header() calls after including config.php3 so that we have access to the relevant
-  variables.
-* Make pagesize 'all' work again. Bug found by apellido jr., wilfredo p.
-* Make 'Add NAS' function in the nas admin page more easily accessible
-* Fix a small bug in user_admin.php3 found by Joerg Staedele
-* Fix a small typo in the userinfo mysql schema. Found by Evert Meulie
-* Fix bug #136, bugs found by Pawel Foremski
-* Small type in login_time_create, close bug #141
-* In config.php3 remove whitespaces from $login. Don't remove '-'
-* Add lib/sql/group_change.php3 to add and delete a user from groups
-* Add a new directive sql_show_all_groups. If set to true then in user edit page we show all available
-  groups with the ones the user is a member of highlighted. The administrator can then directly
-  change user group membership by changing membership in this group list.
-* On group creation, if member list is empty report that, not that the group was created.
-* In the show groups page, note that we only show groups with members
-* In lib/sql/group_info.php3 only unset variables if we need to. In lib/sql/defaults.php3 don't run for groups
-  only for users
-* Fix Bug #167
-Ver 1.72:
-* Move the xlat function to a separate file in lib/xlat.php3
-* Add a lib/sql/nas_list.php3 to also get the nas list from sql (naslist.conf still works)
-* add realms nasdb and nasadmin in username.mappings. nasadmin is used to signify if the
-  user is allowed to use the nas_admin page. nasdb is used to shorten the nas list to only
-  a few specific entries. That way administrator responsible for a few access servers will
-  only be able to administer those access servers and not see the rest of the nas list.
-* Add username searching in the find page as suggested by joram agten
-* Don't use nas_list in nas_admin
-* Add postgresql specific sql schema by apellido jr., wilfredo p. Move each sql schema to a
-  separate directory (mysql and postgresql)
-* Change is_int to is_numeric. This closes Bug #90
-* Escape special characters in the sql password. This closes bug #96
-* Do an xlat for general_accounting_attrs_file and general_user_edit_attrs_file. That way we can
-  have different mappings for each administrator.
-* Use require_once instead of require when including xlat.php3
-* Add debug statements in sql connect functions
-* Add a missing.php3 file with functions that may be missing from the PHP version used. Include it
-  if a function is missing. Currently only array_change_key_case() is included
-* Set general_restrict_nasadmin_access to no by default. It causes confusion.
-* Set the general_username_mappings_file variable
-* Fix a small error in lib/sql/find.php3. This closes bug #103
-* Add a small note in the FAQ about checking for sql/ldap driver availability in PHP if the user get's
-  a blank white page back.
-
-Ver 1.70.3:
-* Test for unset variable, rather than empty variable in clean_radacct,
-  monthly_tot_stats and truncate_radacct.
-
-Ver 1.70.2:
-* Fix redirects in dialup-admin pages on servers with register_globals
-  turned off.
-* HTTP form fields will always fail is_int, use in_numeric instead.
-
-Ver 1.70.1:
-* Report correct data transfer statistics for users.
-* Lower-case sql column names to match creation scripts.
-* Fix creation of empty groups.
-* Put quote around usernames in HTML output.
-* Properly notice when we've got a blank password to SQL.
-
-Ver 1.70:
-* Add the /bin postgresql compatibility patch from Guy Fraser
-* Add ldap_userdn as a configuration directive. If set we use that for
-  user DN's (variables supported) instead of performing and ldap search for
-  each user. That can be somewhat faster.
-* Add a check_user_passwd() and a get_user_dn() functions in lib/ldap/functions.php3
-* Add general_restrict_badusers_access directive. If set to yes we only allow each administrator
-  access to their own entries in the badusers table
-* Add a username.mappings table. We are able to map each administrator username to additional queries
-  on the accounting and user settings tables.
-* Add an sql_accounting_extra_query directive. If set this query is included in all
-  queries to the accounting tables.
-  Combined with admin username mappings we are able to easily restrict access on specific accounting data
-  to each administrator.
-* Escape bad characters in the $login variable
-* Add a da_sql_escape_string function. We use that for every element we pass to sql queries in order to
-  protect ourselves from sql injection.
-* Use the ldap_userdn directive where applicable in the functions.php3 file
-* Add an sql_xlat function
-* Add a nas administration page for sql based clients
-* Fix small bugs in accounting.php3 and user_stats.php3. Add nas_admin.php3 to the buttons page
-* Add da_sql_escape_string for all relevant variables in lib/sql files
-* Keep the nas list in a separate array $nas_list. Update various pages to use that one now.
-* Make nas_list actually work
-* Also allow for '-' to exist in a nas name in bin/log_badlogins
-
-Ver 1.68:
-* Huge PostgreSQL compatibility patch by Guy Fraser <guy@incentre.net>
-* Also support the Crypt-Password attribute in lib/sql/password_check.php3. Patch by Guy Fraser <guy@incentre.net>
-* Small fix in user_finger.php3
-* Add the ability to erase rows from the badusers table
-* In log_badlogins for multiple logins if it is a mppp attempt, log it
-* Add a message when adding a user in the badusers table
-* Close sql connections in add_badusers.php3
-* Add a patch from Neil McCalden to not put spaces in the -p argument to the mysql binary.
-* Fix a bug in conf/config.php3. Patch from Neil McCalden
-* In log_badlogins add a newline after every sql query so that the resulting file can be editable
-* Add a force directive in log_badlogins. If uncommented it will force inserts even if there are
-  sql errors. That can help in case there is one sql query which stops the whole failed logins
-  logging system from working
-* Sort the servers list in failed_logins,user_stats,stats
-Ver 1.65:
-* Add a captions.conf file with a few configurable captions for now
-* Move the nas list to a separate file called naslist.conf
-* Add the ability to include configuration files in admin.conf
-* Add a page for clearing open sessions from the database called clear_opensessions.php3. Add it in the
-  user toolbar
-* Move the userinfo page of user_admin to a separate file so that it can be easily changed to
-  fit per installation needs
-* Add a conf/accounting.attrs allowing the customization of the attributes in the user_accounting,
-  user_finger and failed_logins pages
-* Add a directive to determine if the administrator will be able to change the user password from
-  the user edit page
-* Call mysql_escape_string before running the sql query
-* Use the sql_connect_timeout for the mysql driver
-* Add a help page for the badusers table
-* Also take the Session-Timeout in consideration when calcualting the remaining time in user_admin.php3
-* Add regex matching in log_badlogins and don't expect the callerid to always be in numeric format
-* Small html corrections in user_toolbar.html.php3
-* Add a HOWTO from Paris Stamatopoulos
-* create a doc directory and move the documentation files there
-* Add a note about the HOWTO in the README file
-* Add a few help pages for the nomadix radius attributes by Ulrich Walcher
-* Update the HOWTO with instructions about the ldap configuration directives and the scripts in the bin folder
-* Update the AUTHORS file
-* Check for the binaries used (mysql/snmpwalk) in the scripts in the bin folder before using them
-* Update the HOWTO file
-* Use the general_domain variable from the admin.conf file in log_badlogins instead of a new one
-* Add a sql_command directive in admin.conf containing the path to the mysql binary. That can be used by the
-  scripts in the bin folder instead of setting a variable in each script
-* Add a general_nas_type and a per nas type directive and pass that to snmpfinger. Updated snmpfinger to also
-  support lucent equipment apart from cisco
-* Update the HOWTO file with a few comments on the general_nas_type directive
-* Use the User-Password attribute instead of Password in user_test.php3
-Ver 1.63:
-* Do an eval on the attribute description strings in the user_edit page. That will allow the login-time creation
-  page to work properly.
-* Add a login-time creation page which will allow the administrator to create the login-time string through a gui
-  instead of writing it directly in UUCP format.
-* Call lib/{ldap,sql}/user_info in user_info before displaying any information about the user
-* Add a configuration directive general_charset. Add a language meta tag in all pages
-* Use sql_extra_servers directive when adding users in the badusers table. Add a da_sql_host_connect() function
-  to connect to a specific sql host
-* Fix a typo in lib/sql/attrmap.php3
-* Add an entry in the FAQ about the Dialup-Access attribute
-* Add an entry in the FAQ about duplicate personal attributes in the user_admin page
-* Only show the personal attributes in the New User page if we have ldap or we are using the userinfo table in sql
-* Add a per nas finger_type directive
-* Update the TODO file
-* Add an entry in the FAQ about adding .php3 handling
-* Add a few installation notes
-* Fix a problem with user_stats.php3
-* Update the README file with notes about the scripts present in the bin folder
-* Add a <?php tag instead of a <?. Bug noted by Isam Ishaq <isam@planet.edu>
-* Add support for regexp and like operators in accounting report generator
-* Limit the split() to 2 elements in lib/defaults.php3
-* Create a AcctUniqueId before adding a row in radacct in log_badlogins.
-* Use Max-Monthly-Session not Max-Weekly-Session for the monthly limit
-* When checking the weekly limit check first that $remaining is numeric before doing any comparisons
-* Add a usage_summary parameter in user_finger. If it is passed then we only output a text like:
-  "Online: <num> Free: <num>" which can be used in outside pages
-* Use $config[sql_usergroup_table] in show_groups.php3
-* Add a config directive general_stats_use_totacct. If set we use the totacct table in the stats page instead of
-  radacct
-* Small change in user_accounting.php3
-* Escape " in login_time create page before parsing the login-time string
-* Add Service-Type in user_edit.attrs
-* In user_finger page if $user is NULL then set it to &nbsp;
-* Add 3 more help pages from Stadler Karel <Karel.Stadler@psi.ch> for Service-Type,Framed-Protocol and Filter-ID
-* Make all scripts use the mysql binary instead of DBI  and make the sql password even if it is empty
-* Make log_badlogins work with usernames containing spaces
-* Only delete sessions which are not open in truncate_radacct. Bug noted by Evren Yurtesen <yurtesen@ispro.net.tr>
-* Add a user input tag in user_stats.php3
-* Change AcctStopTime = '0' with AcctStopTime IS NULL
-* Add a few more attribute help pages from Ulrich Walcher <uwalcher@bcore.de>
-* Also check for $server != '' in stats.php3. Bug noted by Ulrich Walcher <uwalcher@bcore.de>
-* Consider the account locked either if Dialup-Access == FALSE or if it is not set at all
-* Calculate weekly used time correctly (from Sunday 00:00:00)
-* Allow for defining the ldap_filter used when searching for a user. The filter supports dynamic variables
-  like %u (username) and %U (username provided though http auth)
-* Add a configuration directive counter_monthly_calculate_usage to calculate the monthly usage time. Calculate
-  it in user_admin if monthly_limit != 'none' or if this directive is set.
-  Based on a report by "apellido jr., wilfredo p"
-* Add more comments in the admin.conf file
-* Show correct calculation of the montlhy usage time.
-* Don't show an account as locked if Dialup-Access does not exist and the mapping corresponds to 'none' attribute
-* Make clean_radacct and truncate_radacct work correctly
-* Fix a small bug in bytes2str. It will now also show GBs if appropriate
-* Add an entry about the failed_logins page
-* Update the help page for the lock message attribute
-* Update the badusers page to also use the general_accounting_info_order directive
-Ver 1.62:
-* Remove one sql query from user_admin which was not needed.
-* Instead of a query like "LIKE 'YYYY-MM-DD%'" use "AcctStopTime >= 'YYYY-MM-DD 00:00:00 AND AcctStopTime
-  <= 'YYYY-MM-DD 23:59:59'" which will allow us to use sql indexes better.
-* Add a few comments in bin/clean_radacct
-* Add a new script bin/truncate_radacct which will delete all sessions from the radacct table which
-  are older than a configurable number of days
-* Fix a typo in sql.attrmap. Fix by Evren Yurtesen <eyurtese@turkuamk.fi>
-* Work even when register_globals if off. Suggestion from Evren Yurtesen <eyurtese@turkuamk.fi>
-  Also add an entry in the FAQ about that.
-* We don't need ORDER BY GroupName in show_groups.php3 since we have GROUP BY
-* Use CISCO-POP-MGMT-MIB in snmpfinger instead of CISCO-CALL-HISTORY-MIB. Thanks to
-  Evren Yurtesen <eyurtese@turkuamk.fi> for the suggestion.
-* Remember a few things in the user_test page. Also add another configuration file directive
-  general_radius_server_auth_proto specifying the default authentication protocol of the radius
-  server (pap or chap).
-* Replace single quotes with double quotes in log_badlogins
-* Add a missing <?php tag. Bug noted by Simon Burns <simon@ababa.org>
-* Add sql_use_http_credentials configuration directive to connect to the sql database using the http user
-  credentials (that way there can be more than one administrator usernames, each with different privileges
-  on the sql database).
-* Add more error messages when interacting with the SQL database
-* Add sql_connect_timeout and sql_extra_servers configuration directives to be used by the log_badlogins script
-* In log_badlogins create a separate sql input file for each sql server and append sql commands to it. If the
-  sql command succeeds we delete the corresponding input file. That way if an sql server is down we store the
-  accounting info in the input file and then send it all when it comes back up.
-* Add a directive sql_debug. Add debugging statements in the sql library
-* Add a directive ldap_debug. Add debugging statements in the ldap library
-* Add debug statements in the pg driver
-* In debug, output the sql queries in italic. Refer to enabling debugging in the FAQ
-* Don't include user_info.php3 in the user_test page.
-* Make things a little bit more simple in lib/ldap/change_attrs.php3
-* Fix a small bug in lib/ldap/create_user.php3. Unset the mod array before adding any values to it.
-* Fix a small problem with debugging
-* Do a write lock in radacct before truncating it in truncate_radacct
-* In user_new show a select box with all the available groups. Based on an idea by Karel Stadler (kstadler)
-* Add a column Admin in the badusers table which will contain the administrator username if that is available
-* Add two new tables totacct and mtotacct containing per user aggregated statistics for each day and month
-  respectively. Also add two corresponding scripts in the bin folder, tot_stats and monthly_tot_stats. Lastly,
-  create a new page, user_stats.php3 which will show the top users in connections or connections duration based
-  on the data in the totacct table.
-* Add a few comments in the tot_stats and monthly_tot_stats scripts
-* Add support for ! in usernames in log_badlogins
-* Call gethostbyaddr with an @ in front to suppress error messages
-* Also add support for @ in usernames in log_badlogins
-Ver 1.61:
-* Add a string encoder for greek
-* If general_decode_normal_attributes is set then encode attributes in lib/ldap/change_info. In the near future
-  language specific user attributes will be added in the change info and new user pages. Remove comments from
-  admin.conf about the change info page not working if this directive is used.
-* When spliting cn in lib/ldap/create_user.php3 limit the split to 2 new elements not 3.
-* Fix a few bugs in log_badlogins
-* Fix a parse error in failed_logins.php3
-* Fix a bug in lib/defaults.php3 which did not allow the default.vals file to be used correctly
-* Include password.php3 in lib/ldap/password_check.php3
-* When searching a user in ldap through the find page only try to find the users which have a uid attribute (username)
-* Allow selecting a specific access server in the failed logins page
-* In the user admin page use AcctStartTime not AcctStopTime when calculating usage for the last 7 days
-* Also show server:port in the user test page (so that it shows when used for server checks)
-* Now the create user page should work with sql
-* Make the default general_lib_type sql instead of ldap
-Ver 1.60:
-* Use require_once when including lib/functions.php3 in lib/sql
-* In the buttons toolbar Edit User should not be clickable.
-* Add an arrow gif in htdocs/images to be used in the buttons page when adding multiple finger pages
-* In snmpfinger also consider '-' as a valid character for a username
-* Add support for realm in username and allow for realm striping in the web pages and in log_badlogins
-* Add a few more comments in the admin.conf
-* Update the FAQ with an entry about the Online Users page not showing anything.
-* Update the FAQ with an entry about sessions.
-* Allow the user to add extra attributes in the test user page
-* Add a few comments in log_badlogins, support auth logs containing the password, work nice when the client
-  is localhost, add an option to scan the whole radius.log and add failed logins in the sql database (can be
-  used for initialization).
-* html fixes in accounting.php3
-* Fix a problem in user_accounting when NASIPAddress is not set.
-* Use CISCO-AAA-SESSION-MIB in snmpfinger
-* In lib/ldap/functions.php3 only ask for the cn attribute in ldap_search not the whole entry. That should make
-  user_finger a lot faster when the user database is in ldap
-* In lib/functions.php3 pass a second argument to date2timediv with the current time. user_finger calls that
-  function for each online user so we now don't need to do a lot of calls to time() but only one. That should make
-  user_finger somewhat faster.
-* Fix a small issue with the general_accounting_info_order
-* Fix a problem in failed_logins when NASIPAddress is not set.
-* Allow for multiple regular profile attributes in a user entry.
-* Allow for normal ldap user attributes to be utf8 encoded instead of ascii. Changing attribute values through
-  user_info will not work in that case.
-* Fix a small bug in lib/ldap/defaults.php3. We should not be using $i in a for() loop but a new variable
-* Add a comment in admin.conf about ldap server failover
-* Map a specific username to the directory manager if we are using ldap and http authentication
-Ver 1.59:
-* Small html fixes in user_edit.php3 and password.php3
-* Show number of failed logins in the last 7 days in the user admin page
-* Show date in the user/server test page
-* In config.php3 include a relative admin.conf file not an absolute
-* Add an entry in the FAQ about php magic quotes
-* Escape double quotes in attribute values in the user edit page
-* Fix a bug in lib/sql/change_passwd.php3 when not using operators.
-  Bug report from Sheldon Fougere <sfougere@solutioninc.com>
-* Add the caller id in the connection status attributes in the show user page
-* Allow for multiple default values. Also add a generic flag in ldap attrmap. If it exists then the
-  attribute is generic and user values *do not* overwrite default values. The operators in the generic
-  attribute can be used for that. The same is very difficult to implement for sql, so for now user
-  values overwrite default values in sql (user edit page).
-  A lot of code and a lot of files where changed so there may be bugs somewhere.
-* In the user edit page print a message under the User Password field about if it exists or not. Update
-  the user_info.php3 lib files to check for it.
-* In lib/ldap/defaults.php3 Dialup-Access should not be added in the default_vals. It is not inherited.
-* If we are editing a group show a comment that in the radiusd sql module the group tables are evaluated
-  after the user tables. As a result user values should in general overwrite default values.
-* Add support for the default_user_profile of the sql module in lib/sql/defaults.php3
-* In sql.attrmap User-Password should map to User-Password, not Password
-* If an sql attribute is not contained in sql, assume that it has the same name as in dialup_admin and that
-  it is a reply item. Add a comment for that in conf/sql.attrmap.
-* Change the way radius attributes are read from the sql database. The change should make things somewhat
-  faster. Create a reverse mapping from radius attributes to dialup_admin attributes.
-* Add a configuration directive called ldap_use_http_credentials. If it is set to yes then we try to
-  connect to the ldap server with the username/password given in http authentication, not those contained
-  in admin.conf. That way multiple admins with different permissions on the ldap tree can work on a single
-  dialup_admin.
-* With the same logic we allow for multiple buttons html pages. We now create a folder html/buttons which
-  by default contains a folder default. If the user logs in with http authentication then we try
-  to open the file html/buttons/<username>/buttons.html.php3. If we can't we open
-  html/buttons/default/buttons.html.php3. That way we can create muiltiple views of say the online users
-  page based on which admin requests the page.
-* Call config.php3 before outputing any html.
-* Add sessions in order to cache the various mappings. Add a corresponding configuration directive
-  general_use_session. Also add a session cache destroy page.
-* Also cache the admin.conf if use_session is set to 1 in config.php3
-* Fix a few bugs
-* Remove the auto password generator from the user edit page. It has no meaning since the password is not
-  shown
-* In lib/sql/defaults.php3 instead of doing a select for each group the user belongs to, do one select with
-  a where in () caluse.
-* Also cache the default.vals file.
-* Update documentation
-* Only connect and bind to the ldap server if we haven't done that before.
-* Remove previous change. It was causing problems
-* In the user test page ignore comments from the auth.request file
-* Add a new config directive, ldap_write_server. If it is set then when we update the directory we try to
-  connect to that one instead of the ldap_server. That way we can read from the fast read-only replicas and
-  write to a slower master.
-* Fix a few more bugs
-* Add a failed logins page, to show the most recent failed logins.
-* Fix a bug in the failed logins page
-* Change use of AcctStartTime with AcctStopTime in failed_logins.php3 to match that in user_admin
-* Fix a bug with failed logins in user_admin.
-* Add the failed logins page in the buttons page
-* Add a missing WHERE UserName = '$login' in the UPDATE statement in lib/sql/change_info.php3. Patch by
-  Eddie Bindt <eddieb@users.sourceforge.net>
-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
-* Add a user find page. User can be searched based on the full name, department or RADIUS attribute.
-  The radius attribute should be included in the _user_ profile, not in a group/regular/default profile.
-* Add support for the user ldap regular profile attribute in user_edit.attrs
-* Fix a stupid bug in accounting.php3. We should not use the show_attrs array.
-Ver 1.54:
-* Add attributes for the sql group tables in admin.conf. Now SQL group support should really work!
-Ver 1.53:
-* html fixes in show_groups.php3
-* When reporting sql errors also print the output of da_sql_error
-* When updating ldap user information don't do an update if the new attribute value
-  is '-' (default value)
-* Comment out Reply-Message in conf/user_edit.attrs since in sql it maps to the same attribute as
-  the lock message
-Ver 1.52:
-* Add Reply-Message in conf/user_edit.attrs so that it appears in the user/group edit pages
-* Allow the administrator to specify a group in the New User page. Update lib/sql/create_user.php3 to add
-  the user to the specified group
-* Call user_info.php3 and defaults.php3 in user_new.php3 after creating a user
-* Only run if $login is not NULL in lib/sql/defaults.php3
-* In group admin add a button to administer the selected user which will redirect the administrator to the
-  corresponding user_admin page
-* Add a show_groups.php3 to show all active user groups
-Ver 1.51:
-* Only call user_info.php3 in user_new.php3 when we are creating a user
-* Fix a bug with personal information attributes in user_new.php3
-Ver 1.50:
-* Add support for groups in SQL. Added several new files and modified a few more.
-* Default values in SQL are now extracted from the group membership. Added a lib/sql/defaults.php3 file.
-  As a result the default operator is not '=' anymore but whatever we find in the group check and reply tables.
-* In lib/sql/user_info.php3 set user_exists in more than one places.
-* Add support for the '=*' and '!*' operators
-* Added a HELP_WANTED file describing what are the major things missing which people could contribute.
-* Updated TODO
-* Added a help page for the Session Timeout and Idle Timeout attributes.
-* The new group page should only be available if the general library type is sql.
-* Fix a small bug in lib/sql/create_user.php3 where work and home phone were stored in the wrong fields.
-* Set personal information attributes in lib/sql/user_info.php3 to default values.
-* Add a page to change the user's personal information. Changed the user toolbar and added htdocs/user_info.php3
-  along with lib/{sql,ldap}/change_info.php3
-* Print a message if we can't connect to the ldap server in lib/ldap/user_info.php3
-* Use a textarea for new members in group_admin.php3 and group_new.php3. Update lib/sql/create_group.php3 and
-  lib/sql/group_admin.php3
-* Set a few more personal information attributes to defaults in lib/sql/user_info.php3
-* Fix a typo for department
-* Set personal information attributes to defaults in lib/ldap/user_info.php3
-* Have adddress and home address in user personal info
-* Set $user_info in lib/{ldap,sql}/user_info.php3 and only if the user exists and has personal info
-* Show language attributes only if general_prefered_lang is not 'en'
-Ver 1.30:
-* Add limit of results returned in accounting.php3
-* Fix a bug in time2strclock() in lib/functions.php3. Seconds ammount more than 9 would not show.
-  Bug noted by Timophey <bcloud@mail.ru>
-* Reaarange a few things in user_admin. Put Subscription Analysis first and 'Account Status' second. Make a
-  few things bold.
-* Change log_badlogins to use the mysql binary instead of the DBI module. That way we don't have any
-  dependencies and we don't need to bother with connection maintainance (dead mysql connections etc).
-* html fixes in user_finger.php3
-* Fix a bug in lib/add_badusers.php3 which did not allow inserts in the badusers table.
-* Make lib/ldap/password_check.php3 behave properly when it is passed a null password
-* Allow for daily/weekly/monthly limits to be set to none and show correct results in the show user page
-* Fix a small bug in user_admin.php3.
-* Pass the whole password as salt in da_encrypt() in password_check.php3
-* Refresh the online users page every 50 secs. Patch by Alexandre Strube <surak@barroco.com.br>
-* Check if the last logged in server and client ip are valid before calling gethostbyaddr
-* If the same attribute appears more than once in the user edit page then show a count of the number of
-  occurences next to the attribute name
-* Add a server argument to user_finger.php3. If it is set then the page will only show the logged in users
-  in that access server instead of all of them. Update the README with documentation for that fact.
-Ver 1.29:
-* Add general_ld_library_path directive and set LD_LIBRARY_PATH accordingly (used in snmpfinger and
-  radaclient).
-* Add general_finger_type directive to determine if we will use snmpfinger in user_finger.php3
-* Fix a bug in config.php3 when we have a directive containing ':'
-* Fix a bug in lib/ldap/change_attrs.php3 that did not allow changing more than one value of a 
-  multivalued attribute simultaneously.
-* Added selection of ordering in user_accounting.php3. Now it can be either ascending (older records
-  first) or descending (most recent records first). Added a corresponding configuration directive.
-* Added operator support in sql. The eq(=),set(:=) and add(+=) operators are supported. Added an
-  sql_use_operators configuration directive. Hope everything works.
-* Fixed a bug in sql/change_attrs which did not allow multi valued attributes in sql.
-* unset item_vals before adding info in ldap and sql user_info files.
-* Add support for the rest of the operators. Created the lib/operators.php3 file containing helper functions
-* Fix a small bug in log_badlogins. The nas domain should be a variable not hard coded.
-* Fix a bug in lib/sql/delete_user.php3. Call da_sql_query with the correct arguments
-Ver 1.28:
-* Make user_delete.php3 print something when a user is deleted
-* Cache nas hostname lookups in user_accounting
-Ver 1.27:
-* Allow for variable expansion in the configuration file. Something like:
-  general_base_dir: /usr/local/dialup_admin
-  general_default_file: %{general_base_dir}/conf/default.vals
-* Small changes in the README file
-* A few corrections in the sql drivers
-* Enlarged the textboxes in the user_edit page
-* Created a folder help
-* Added a help page for:
-   o Login-Time
-   o Simultaneous-Use
-   o Dialup-Access
-   o Framed-Compression
-   o Port-Limit
-   o Lock Message
-   o Framed-IP-Address
-Ver 1.26:
-* A few bugfixes for the general sql code (typo mistakes mostly)
-Ver 1.25:
-* Deleted a mysql_close from lib/mysql/create_user since we now have persistent sql connections
-* Removed the select_db() from accounting.php3 since it is not needed
-* A lot of html changes in accounting.php3
-* Changed the sql code to be modular. Now under lib we don't have a mysql directory but a sql directory
-  with a directory drivers which contains the database specific functions. As a result all calls to mysql*
-  functions where changed to call da_sql* functions. Right now mysql should work and postgresql *may* work
-  It is not tested though. Hopefully things will come back to being stable in a few days.
-* Added sql_port and sql_type configuration file directives
-Ver 1.20:
-* Fixed a bug in lib/ldap/change_attrs. When we modify an attribute do an ldap_mod_del($mod) and then a
-  ldap_mod_add($add_r)
-* In accounting.php3 show the attribute description instead of the attribute name.
-Ver 1.19:
-* In lib/ldap/check_password.php3 don't do a user search but use the already available user DN
-* Remove the language support from the get_user_info() functions. They are only used in the user_finger page
-* In user_state show weekly usage for the week starting from sunday 00:00, not for the last 7 days
-* Show upload/download when connected or for the last time the user connected
-* Fixed a few minor problems with the help and about pages
-Ver 1.18:
-* Fixed a small problem with total upload,download numbers in user_admin
-* Fixed a major problem in the accounting report generator when adding an attribute check. Now it
-  should be all OK.
-* Fixed a small bug in lib/mysql/functions.php3. Bug found be galileo@microsky.net
-Ver 1.17:
-* Fixed a few more problems in the mysql code
-* Updated README
-* the help page now prints the README file. It also has a common layout with the other pages
-* Changed the about page to have a common look with the other pages.
-Ver 1.16:
-* Fixed a few typing mistakes in mysql.attrmap
-* If the corresponding attribute name (in ldap or mysql) is 'none' then do not
-  edit/add it. Based on a bug report by galileo@microsky.net
-* Fixed a few errors in lib/attrshow.php3
-Ver 1.15:
-* Added user test page. It will use radclient to send a radius access-request
-  to the radius server and check the response. This page is also used to check
-  that the radius server is working fine. Added user_test.php3 and a few config
-  file parameters.
-* Support for multi valued attributes.
-* Changed cleartext encryption name from none to clear
-* Renamed the general_sql_row_limit configuration directive to sql_row_limit
-Ver 1.12:
-* Added an FAQ
-* Small changes in html code
-* Small changes in the README file
-* Fixed a small problem in delete_user from ldap
-* Removed the Base64 encode since it was causing problems
-Ver 1.11:
-* Changed all ldap_bind() to use the ldap bind DN and password. Should have been
-  the default behaviour
-* Do a Base64 encode in ldap/change_password.php3 before sending the password to
-  the ldap server
-* Added support for module messages in log_badlogins and user_accounting
-* Updated documentation
-Ver 1.10:
-* Added support for users in mysql database. All bugs are welcome. To activate
-  just use mysql as library_type
-* Added support for salt in crypt.php3
-* Added userinfo table to keep information for users (Name,Phone etc). Added two
-  corresponding values in admin.conf
-* Added mysql.attrmap for mysql support
-* Added TODO
-* Added persistent connections for mysql (mysql_pconnect())
-Ver 1.00:
-* Added password change facility in user_edit. Support for multiple
-  password encryption methods
-* Added user deletion page user_delete.php3 with corresponding ldap lib code
-* Moved the second user_info.php3 include in user_edit to the correct location. Also
-  used isset instead of == ''
-* Moved the action toolbar (show,edit,accounting...) into a separate html file
-* Added the nas model in user_finger.php3
-Ver 0.99.8:
-* Added the caller id in the finger facility
-* Changed the start date in the badusers file to 0000
-* Added the out of quota message in user_admin
-* fixed a few problems with the html code in user_admin.php3
-* calculate account status in user_admin for the last week only
-* Change font color to red if used time > corresponding limit (weekly or daily)
-* Added the user_stats.php3. It can be used by outside pages to get a quick
-  overview of the status of the user. It will return the following fields
-  separated by new lines:
-  account_status(active or inactive),lock message,weekly limit,daily limit,
-  weekly used,weekly connections,daily used,daily connections
-* fixed a bug in the subscription analysis in user_admin.php3
-* calculate weekly used from sunday 00:00:00 when the counters reset
-* added clean_radacct which will clean radacct entries which have been open
-  for more than a day. It will not do any harm even if it is incorrect since
-  when rlm_sql runs if the update operation fails then it will fall back to
-  insert (see sql.conf)
-* added log_badlogins. It will continuously read the radius.log file and log
-  to the radacct table all login incorrect and multiple logins with a
-  corresponding acctterminatecause. user_accounting.php3 is already prepared
-  for this (it will show those entries in red)
-* fix a small bug with null values in change_vals.php3 of the ldap lib
-Ver 0.99:
-* Added the badusers table
-* Added the default and regular profile from ldap for user_edit
-* Added the snmpfinger in the finger facility so that it will not
-  relly on the sql database.
-* Added the new user facility
-* Added support for the Lock Message facility
-* Various bug fixes and enhancements
-
-Ver 0.31:
-* Added the @ sign in the {mysql,ldap}_{open,close} functions so that
-  they don't show error messages
-* Changed double quotes with single quotes where applicable for performance
-  reasons
diff --git a/dialup_admin/Makefile b/dialup_admin/Makefile
deleted file mode 100644 (file)
index 6f20721..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-# Makefile
-#
-# Version:     $Id$
-#
-
-include ../Make.inc
-
-DIALUP_PREFIX := /usr/local/dialup_admin
-DIALUP_DOCDIR := $(DIALUP_PREFIX)/doc
-DIALUP_CONFDIR := $(DIALUP_PREFIX)/conf
-
-all:
-
-install:
-       install -d -m 0755 $(R)/$(DIALUP_PREFIX)
-       install -d -m 0755 $(R)/$(DIALUP_DOCDIR)
-       install -d -m 0755 $(R)/$(DIALUP_CONFDIR)
-       install -d -m 0755 $(R)/$(DIALUP_PREFIX)/bin
-       find doc Changelog README -name CVS -prune -o -type f -print0 | \
-         xargs -0 install -m 0644 -t $(R)/$(DIALUP_DOCDIR)
-       find conf -name CVS -prune -o -type f -print0 | \
-         xargs -0 install -m 0644 -t $(R)/$(DIALUP_CONFDIR)
-       find htdocs html lib sql -name CVS -prune -o -print | \
-         while read file; do \
-           if [ -d "$$file" ]; then \
-             install -d -m 0755 "$(R)/$(DIALUP_PREFIX)/$$file"; \
-           else \
-             install -m 0644 "$$file" "$(R)/$(DIALUP_PREFIX)/$$file"; \
-           fi; \
-         done
-       sed -e 's#/usr/local/dialup_admin#$(DIALUP_PREFIX)#' \
-           -e 's#/usr/local/radiusd#$(prefix)#' \
-           -e 's#general_raddb_dir: %{general_radiusd_base_dir}/etc/raddb#general_raddb_dir: $(raddbdir)#' \
-           -e 's#general_clients_conf: /usr/local/etc/raddb/clients.conf#general_clients_conf: $(raddbdir)/clients.conf#' \
-           -e 's#%{general_base_dir}/conf#$(DIALUP_CONFDIR)#' \
-           -e 's#/usr/local/bin#$(bindir)#' \
-           conf/admin.conf > $(R)/$(DIALUP_CONFDIR)/admin.conf
-       sed -e 's#../../README#$(DIALUP_DOCDIR)/README#' \
-           htdocs/help/help.php > $(R)/$(DIALUP_PREFIX)/htdocs/help/help.php
-       for binfile in backup_radacct clean_radacct clearsession log_badlogins monthly_tot_stats showmodem snmpfinger sqlrelay_query tot_stats truncate_radacct; do \
-         sed -e 's#/usr/local/bin/#${bindir}#' \
-             -e 's#/usr/local/dialup_admin/conf/#$(DIALUP_CONFDIR)/#' \
-             bin/$$binfile > $(R)/$(DIALUP_PREFIX)/bin/$$binfile ; \
-         chmod 0755 $(R)/$(DIALUP_PREFIX)/bin/$$binfile; \
-       done
-       sed -e 's#/usr/local/dialup_admin#$(DIALUP_PREFIX)#' \
-           bin/dialup_admin.cron > $(R)/$(DIALUP_PREFIX)/bin/dialup_admin.cron
-
-.PHONY: all install
diff --git a/dialup_admin/README b/dialup_admin/README
deleted file mode 100644 (file)
index fdcab0e..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-dialup_admin is a web based administration interface for the freeradius radius server.
-It is written in PHP4 (although the files have an extension of php for historical reasons).
-It is modular and right now it assumes that user information is stored in an ldap server
-or an sql database and accounting in an sql server.
-
-Extra documentation from Stadler Karel (<Karel.Stadler@psi.ch>):
-http://kstadler.ch/index.php?topgroupid=1&subgroupid=14&groupid=11
-
-There is also a nice HOWTO in the doc folder
-
-
-INSTALLATION:
-
-Put dialup_admin in /usr/local/dialupadmin
-Create a link from your htdocs directory to /usr/local/dialupadmin/htdocs
-Edit /usr/local/dialupadmin/conf/* files to match your needs
-
-
-There are also a few more things included:
-
-* sql/badusers.sql: It will create a table named badusers which can be used to hold the
-  history for badusers (date,action)
-* sql/userinfo.sql: It will create a table named userinfo which contains personal information
-  for users stored in the sql database. This can be used if a sql database is used to store user profiles
-  (not ldap).
-* bin/log_badlogins: It will constantly check the radiusd.log file and add all login-incorrect,
-  invalid-user, outside of allowed login time  and multiple-login cases to the radacct table with
-  acctstarttime=acctstoptime, acctsessiontime=0 and acctterminatecause containing the reason.
-  If the failing module sent back a module message then it will also appear in the terminate cause.
-  You will need to setup the $mysql and $tmpfile variables to suite your mysql installation and needs.
-  Perl module Date::Manip is needed by the script.
-* bin/clean_radacct: It will delete all entries in the radacct table with a starttime > 1 day and
-  stoptime = 0. It will not do an harm even if it deletes valid entries since radiusd will fall
-  back to insert if update fails.
-* bin/truncate_radacct: It will delete sessions from the radacct table which are older than a configurable
-  number of days
-* bin/tot_stats: Update the totacct table with aggregated daily accounting information for each user.
-  We keep a row per user for each day.
-* bin/monthly_tot_stats: Log in the mtotacct table aggregated accounting information for each user spaning
-  in one month period. If the current month has not ended it will log information up to the current month day
-
-
-
-
-The structure of the tree is:
-
-conf:: Contains various configuration files.
-conf::admin.conf=>
-       The main configuration file. The directives used should be easily
-       understood
-conf::config.php=>
-       Just a helper php4 for reading the admin.conf file.
-conf::default.vals=>
-       Contains the default values for check and reply items. If you also use the users
-       file except for the ldap/sql databases fill in the default values you have inserted
-       for the users.Else comment them out.
-conf::sql.attrs=>
-       Contains inmformation about the sql attributes. This is used by the accounting
-       report generator (accounting.php).
-conf::user_edit.attrs=>
-       Contains the attributes that user_edit.php will show. Just uncomment those
-       which you want to be displayed.
-conf::extra.ldap-attrmap=>
-       Contains a few items not included in ldap.attrmap which are used only by dialup_admin
-       Things like User-Password and Dialup-Lock-Msg. Use none for attributes that are not known
-       by the radius or ldap server.
-conf::sql.attrmap=>
-       Contains the Attribute map for the sql database. Use none for attributes that are not known by
-       the radius server.
-conf::auth.request=>
-       Contains value pairs sent in the test packets which are sent from the test user/server pages.
-
-htdocs:: Contains the basic php files
-htdocs::index.html=>
-       The main index file. Just contains the frames tags
-htdocs::content.html=>
-       Change this file to include the greeting of your choise
-htdocs::buttons.php=>
-       This will open the corresponding buttons html file in the html/buttons folder
-htdocs::style.css=>
-       CSS style file. Change it to match your preferences
-htdocs:: user_state.php =>
-       It can be used by outside pages to get a quick
-       overview of the status of a user. It will return the following fields
-       separated by new lines:
-       account_status(active or inactive),lock message,weekly limit,daily limit,
-       weekly used,weekly connections,daily used,daily connections,
-       active sessions number,active sessions time
-htdocs:: user_finger.php =>
-       It will finger the nas(es) and show the logged in users. If an argument server is passed then
-       it will only show users for the specific access server.
-       If an argument usage_summary is passed then it will only show a line like:
-       "Online: <num> Free: <num>" which can be used by other pages
-htdocs::failed_logins.php =>
-       It will show all the failed logins as logged in the radacct table by the log_badlogins script
-
-html:: Contains the html code for a few pages 
-html::user_admin.html.php =>
-       html code for the user_admin page
-html::stats.html.php =>
-       html code for the stats page
-html::user_toolbar.html.php =>
-       the user toolbar (show,edit,accounting...) which appears in almost all pages
-html::group_toolbar.html.php =>
-       the toolbar shown in the group manipulation pages
-html::/buttons
-       contains a folder default which contains a buttons.html.php file. When a user is connecting
-       with http authentication we first try to open the file in the folder <username>. If that fails
-       we open the file in the default folder. That way each admin can have a different view of the buttons
-       bar (for example see different finger pages).
-
-lib::  Contains the library items
-lib::ldap=>
-       The ldap files
-lib::lang=>
-       Allow for multiple languages to be supported
-lib::crypt=>
-       Allow for multiple encryption schemes (for user passwords)
-lib::sql=>
-       Contains the sql library files. There is also a directory drivers
-       which contains functions for various sql databases (mysql and
-       postgresql for the time being).
-
-The rest: The rest are the php4 files. Normally, you should not need to change anything in them.
diff --git a/dialup_admin/bin/Changelog.GuyFraser b/dialup_admin/bin/Changelog.GuyFraser
deleted file mode 100644 (file)
index bb6e1f2..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-Fri Dec 19 2003
----------------
-Fixed a couple bugs.
-Tested against current CVS, and all programs appear to work.
-
-Wed Dec 17 2003
----------------
-Added configurable entries to admin.conf.
-TODO: Write a proper config file parser to get recursive entries from config
-file.
-
-Tue Dec 16 2003
----------------
-
-File                   Compatiblity    Change
------------------------        --------------- ---------------------------------------
-clean_radacct          MySQL/PG        Added PG compatability
-log_badlogins          MySQL/PG        Added PG compatability
-       "                               Added routine to determine ip from the 
-       "                               FreeRadius clients.conf file.
-monthly_tot_stats      MySQL/PG        Added PG compatability
-showmodem              UCD/NET         Made compatabile with Net/UCD SNMP
-       "                               Cleaned up output formatting.
-snmpfinger             UCD/NET         Made compatabile with Net/UCD SNMP
-tot_stats              MySQL/PG        Added PG compatability
-       "                               Added a delete request.
-truncate_radacct       MySQL/PG        Added PG compatability
-
-These utilities have been updated to work with NET-SNMP, and have been modified 
-to work with PostgreSQL.
-
-The argument order and options for NET-SNMP have changed from UCD-SNMP's 
-requirements. Since most current Unix type systems are using the newer 
-NET-SNMP, I have included the changes for everyones benefit.
-
-I have also modified some scripts :
-
-log_badlogins - I changed it to use the data from the FreeRadius clients.conf 
-       file to determine the IP address of each NAS. I did this because in my 
-       case, and likely that of many others, the shortname from the radius log 
-       file is not shortname.domain.com, where domain.com is defined in 
-       admin.conf.
-
-showmodem - I cleaned up the output presentation.
-
-Path to admin.conf, set to /usr/local/dialup_admin/conf/ for all scripts.
-
-Guy Fraser
-Network Administrator
-The Internet Centre
-Edmonton, Alberta, Canada.
diff --git a/dialup_admin/bin/backup_radacct b/dialup_admin/bin/backup_radacct
deleted file mode 100755 (executable)
index 2b6d2d3..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/usr/bin/perl
-use POSIX;
-use File::Temp;
-
-$conf=shift||'/data/local/dialupadmin/conf/admin.conf';
-$back_days = 80;
-$backup_directory = "/logs/radiusd/accounting";
-
-open CONF, "<$conf"
-       or die "Could not open configuration file\n";
-while(<CONF>){
-       chomp;
-       ($key,$val)=(split /:\s*/,$_);
-       $sql_server = $val if ($key eq 'sql_server');
-       $sql_type = $val if ($key eq 'sql_type');
-       $sql_port = $val if ($key eq 'sql_port');
-       $sql_username = $val if ($key eq 'sql_username');
-       $sql_password = $val if ($key eq 'sql_password');
-       $sql_database = $val if ($key eq 'sql_database');
-       $sql_accounting_table = $val if ($key eq 'sql_accounting_table');
-       $sqlcmd = $val if ($key eq 'sql_command');
-}
-close CONF;
-
-die "sql_command directive is not set in admin.conf\n" if ($sqlcmd eq '');
-die "sql command '$sqlcmd' not found or does not seem to be executable\n" if (! -x $sqlcmd);
-if ($sql_type eq 'mysql'){
-       $sql_password = ($sql_password eq '') ? '' : "-p$sql_password";
-}
-$sql_password =~ s/(\W)/\\$1/g;
-
-($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime;
-$date = POSIX::strftime("%Y-%m-%d",$sec,$min,$hour,($mday - ($back_days - 1)),$mon,$year,$wday,$yday,$isdst);
-$date2 = POSIX::strftime("%Y-%m-%d",$sec,$min,$hour,($mday - ($back_days + 1)),$mon,$year,$wday,$yday,$isdst);
-$date3 = POSIX::strftime("%Y%m%d",$sec,$min,$hour,($mday - $back_days),$mon,$year,$wday,$yday,$isdst);
-if (POSIX::strftime("%Y-%m-%d %T",localtime) eq $date){
-       die "Could not set correct back date.\n";
-}
-
-$query = "SELECT * FROM $sql_accounting_table WHERE AcctStopTime < '$date' AND AcctStopTime > '$date2';";
-print "$query\n";
-my ($fh, $tmp_filename) = tempfile() or die "Could not open tmp file\n";
-print $fh "ALTER SESSION SET NLS_TIMESTAMP_TZ_FORMAT='YYYY-MM-DD HH24:MI:SS.FF TZH:TZM';\n" if ($sql_type eq 'oracle');
-print $fh $query;
-close $fh;
-$comm = "$sqlcmd -B -h $sql_server -u $sql_username $sql_password $sql_database < $tmp_filename >$backup_directory/$date3" if ($sql_type eq 'mysql');
-$comm = "$sqlcmd  -U $sql_username -f $tmp_filename $sql_database >$backup_directory/$date3" if ($sql_type eq 'pg');
-$command = "$sqlcmd  $sql_username/$pass" . "@" . "$sql_database <$tmpfile.$server" if ($sql_type eq 'oracle');
-$command = "$sqlcmd '$sql_server' '$sql_port' '' '$sql_username' '$sql_password' < $tmp_filename >$backup_directory/$date3" if ($sql_type eq 'sqlrelay');
-`$comm`;
-`/usr/local/bin/gzip -9 $backup_directory/$date3`;
diff --git a/dialup_admin/bin/clean_radacct b/dialup_admin/bin/clean_radacct
deleted file mode 100755 (executable)
index 76ac4c8..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/usr/bin/perl
-#
-# Clean stale open sessions from the radacct table.
-# we only clean up sessions which are older than $back_days
-# Works with mysql and postgresql
-#
-use POSIX;
-use File::Temp;
-
-$conf=shift||'/usr/local/dialup_admin/conf/admin.conf';
-$back_days = 35;
-
-
-open CONF, "<$conf"
-       or die "Could not open configuration file\n";
-while(<CONF>){
-       chomp;
-       ($key,$val)=(split /:\s*/,$_);
-       $sql_type = $val if ($key eq 'sql_type');
-       $sql_server = $val if ($key eq 'sql_server');
-       $sql_username = $val if ($key eq 'sql_username');
-       $sql_password = $val if ($key eq 'sql_password');
-       $sql_database = $val if ($key eq 'sql_database');
-       $sql_accounting_table = $val if ($key eq 'sql_accounting_table');
-       $sqlcmd = $val if ($key eq 'sql_command');
-}
-close CONF;
-
-die "sql_command directive is not set in admin.conf\n" if ($sqlcmd eq '');
-die "sql command '$sqlcmd' not found or does not seem to be executable\n" if (! -x $sqlcmd);
-
-if ($sql_type eq 'mysql'){
-       $sql_password = (!$sql_password) ? '' : "-p$sql_password";
-}
-$sql_password =~ s/(\W)/\\$1/g;
-
-($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime;
-$date = POSIX::strftime("%Y-%m-%d %T",$sec,$min,$hour,($mday - $back_days),$mon,$year,$wday,$yday,$isdst);
-print "$date\n";
-if (POSIX::strftime("%Y-%m-%d %T",localtime) eq $date){
-       die "Could not set correct back date.\n";
-}
-
-$query = "DELETE FROM $sql_accounting_table WHERE AcctStopTime IS NULL AND AcctStartTime < '$date';";
-print "$query\n";
-my ($fh, $tmp_filename) = tempfile() or die "Could not open tmp file\n";
-print $fh $query;
-close $fh;
-$command = "$sqlcmd -h$sql_server -u$sql_username $sql_password $sql_database < $tmp_filename" if ($sql_type eq 'mysql');
-$command = "$sqlcmd  -U $sql_username -f  $tmp_filename $sql_database" if ($sql_type eq 'pg');
-$command = "$sqlcmd '$sql_server' '$sql_port' '' '$sql_username' '$sql_password' < $tmp_filename" if ($sql_type eq 'sqlrelay');
-`$command`;
diff --git a/dialup_admin/bin/clearsession b/dialup_admin/bin/clearsession
deleted file mode 100755 (executable)
index 35060d7..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/usr/bin/perl
-
-$login = 'nas-login';
-$passwd = 'nas-password';
-
-$host=shift || '';
-$type = shift || 'snmp';
-$nastype = shift || 'cisco';
-$username=shift || '';
-$sessionid = shift || '';
-
-$port = 0;
-$comm = '';
-
-if ($type eq 'snmp'){
-$comm = shift || 'public';
-}
-if ($type eq 'telnet'){
-$port = shift || 0;
-}
-
-
-die "No \$host argument given\n" if ($host eq '');
-die "No \$username argument given\n" if ($username eq '');
-
-if ($nastype eq 'cisco' && $type eq 'telnet'){
-       die "Usage: clearsession \$host telnet cisco \$username \$sessionid \$port\n" if ($port  == 0);
-
-       if (eval require Net::Telnet::Cisco){
-               Net::Telnet::Cisco->import();
-
-               my $session = Net::Telnet::Cisco->new(Host => $host);
-               $session->login($login, $passwd);
-
-               if ($port >= 20000){
-                       my @output = $session->cmd("sh caller user $username");
-                       foreach $line (@output){
-                               if ($line =~ /User: $username, line (Vi\d+),/){
-                                       $session->cmd("clear interface $1");
-                               }
-                       }
-               }
-               else{
-                       $session->cmd("clear line $port\n");
-               }
-
-               $session->close;
-       }
-}
-if ($nastype eq 'cisco' && $type eq 'snmp'){
-
-       $SNMPGET="/usr/local/bin/snmpget";
-       $SNMPSET="/usr/local/bin/snmpset";
-
-       die "Could not find snmpwalk binary. Please make sure that the \$SNMPGET variable points to the right location\n" if (! -x $SNMPGET);
-       die "Could not find snmpset binary. Please make sure that the \$SNMPSET variable points to the right location\n" if (! -x $SNMPSET);
-       die "Usage: clearsession \$host snmp \$username cisco \$sessionid \$community\n" if ($sessionid eq '' || $comm eq '');
-
-       if ($sessionid ne '' && $username ne ''){
-               print "$SNMPGET -v2c -c $comm $host .iso.org.dod.internet.private.enterprises.9.9.150.1.1.3.1.2.$sessionid\n";
-               $walk =`$SNMPGET -v2c -c $comm $host .iso.org.dod.internet.private.enterprises.9.9.150.1.1.3.1.2.$sessionid`;
-               unless ($walk =~ /^$/){
-                       if ($walk =~ /$username/){
-                               print "FOUND: $username\n";
-               `$SNMPSET -v2c -c $comm $host .iso.org.dod.internet.private.enterprises.9.9.150.1.1.3.1.5.$sessionid i 1`;
-                       }
-               }
-       }
-}
diff --git a/dialup_admin/bin/dialup_admin.cron b/dialup_admin/bin/dialup_admin.cron
deleted file mode 100644 (file)
index bc1cee2..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-1 0 * * * /usr/local/dialup_admin/bin/tot_stats >/dev/null 2>&1
-5 0 * * * /usr/local/dialup_admin/bin/monthly_tot_stats >/dev/null 2>&1
-10 0 1 * * /usr/local/dialup_admin/bin/truncate_radacct >/dev/null 2>&1
-15 0 1 * * /usr/local/dialup_admin/bin/clean_radacct >/dev/null 2>&1
diff --git a/dialup_admin/bin/log_badlogins b/dialup_admin/bin/log_badlogins
deleted file mode 100755 (executable)
index 5a1ee99..0000000
+++ /dev/null
@@ -1,228 +0,0 @@
-#!/usr/bin/perl
-#
-# Log failed logins in the sql database
-# Works with mysql, postgresql and Oracle
-# It will read the sql parameters from the admin.conf file
-#
-# Usage:
-# log_badlogins <radius.log> [<admin.conf>] [all]
-#
-# Defaults:
-# radius.log: none
-# 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);
-use Digest::MD5;
-use File::Temp;
-$|=1;
-
-$file=shift||'none';
-$conf=shift||'/usr/local/dialup_admin/conf/admin.conf';
-$all_file=shift||'no';
-#
-# Uncomment to force inserts even if there are sql errors. That can
-# help in case there is one sql query which stops the whole failed
-# logins logging system from working
-#$force=1;
-#
-#
-# CHANGE THESE TO MATCH YOUR SETUP
-#
-#$regexp = 'from client localhost port 135|from client blabla ';
-$tmpdir=tempdir( CLEANUP => 1 );
-$tmpfile="$tmpdir/sql.input";
-#
-$verbose = 0;
-#
-
-open CONF, "<$conf"
-       or die "Could not open configuration file\n";
-while(<CONF>){
-       chomp;
-       ($key,$val)=(split /:\s*/,$_);
-       # Fixme : recursivly solve %{.*} replacement for $val
-       # Fixme: Conf should be put in an associative array
-       $sql_type = $val if ($key eq 'sql_type');
-       $sql_server = $val if ($key eq 'sql_server');
-       $sql_username = $val if ($key eq 'sql_username');
-       $sql_password = $val if ($key eq 'sql_password');
-       $sql_database = $val if ($key eq 'sql_database');
-       $sql_accounting_table = $val if ($key eq 'sql_accounting_table');
-       $realm_strip = $val if ($key eq 'general_strip_realms');
-       $realm_del = $val if ($key eq 'general_realm_delimiter');
-       $realm_for = $val if ($key eq 'general_realm_format');
-       $domain = $val if ($key eq 'general_domain');
-       $sql_timeout = $val if ($key eq 'sql_connect_timeout');
-       $sql_extra = $val if ($key eq 'sql_extra_servers');
-       $sqlcmd = $val if ($key eq 'sql_command');
-       $clients= $val if ($key eq 'general_clients_conf');
-}
-close CONF;
-
-open CLIENTS, "<$clients"
-       or die "Could not open $clients file\n";
-while(<CLIENTS>){
-       chomp;
-       s/^\s*//g;
-       s/\s*#.*//g;
-       if (!/^\s*$/ && /=/) {
-               ($key,$val)=(split /\s*=\s*/,$_);
-               $client_short = $val if ($key eq 'shortname');
-       } else {
-               if (/\{/) {
-                       s/.*client\s+([^\s]*)\s+\{.*$/\1/;
-                       if (/^\d+\.\d+\.\d+\.\d+/) {
-                               $client = $_;
-                       } else {
-                               if (/\./ || /localhost/) {
-                                       $name = $_ ;
-                               } else {
-                                       $name = $_.".".$domain;
-                               }
-                               $addr = gethostbyname $name;
-                               ($a,$b,$c,$d)=unpack('C4',$addr);
-                               $client = "$a.$b.$c.$d";
-#DEBUG#                                print $name." = ".$client."\n";
-                       }
-               } else {
-                       if (/\}/) {
-                               $client_array{$client_short} .= $client;
-                       }
-               }
-       }
-}
-close CLIENTS;
-
-$realm_del = '@' if ($realm_del eq '');
-$realm_for = 'suffix' if ($realm_for eq '');
-if ($sql_type eq 'mysql'){
-       $pass = (!$sql_password) ? '' : "-p$sql_password";
-}
-else{
-       $pass = $sql_password;
-}
-$pass =~ s/(\W)/\\$1/g;
-die "SQL server not defined\n" if ($sql_server eq '');
-
-die "sql_command directive is not set in admin.conf\n" if ($sqlcmd eq '');
-die "sql command '$sqlcmd' not found or does not seem to be executable\n" if (! -x $sqlcmd);
-
-$opt = "";
-$opt = "-O connect_timeout=$sql_timeout" if ($sql_timeout);
-$opt .= " -f" if ($force);
-@servers = (split /\s+/,$sql_extra) if ($sql_extra ne '');
-unshift @servers, $sql_server;
-
-open LOG, "<$file"
-       or die "Could not open file $file\n";
-if ($verbose > 1) { print STDOUT "DEBUG: Opened $file\n" }
-
-seek LOG, 0, 2 if ($all_file eq 'no');
-for(;;){
-       while(<LOG>){
-               if ($verbose > 1) { print STDOUT "DEBUG: Reading $file\n" }
-               $do=0;
-               chomp;
-               next if ($regexp ne '' && !/$regexp/);
-               if ($_ ne ''){
-                       $user = $nas = $port = $caller = '-';
-                       if (/Login incorrect/){
-                               if (/Login incorrect \((.+?)\):/){
-                                       $cause = "Login-Incorrect ($1)";
-                                       if ($verbose > 1) { print STDOUT "DEBUG: Login-Incorrect ($1)\n" }
-                               }else{
-                                       $cause='Login-Incorrect';
-                                       if ($verbose > 1) { print STDOUT "DEBUG: Login-Incorrect\n" }
-                               }
-                               $do=1;
-                       }
-                       elsif (/Invalid user/){
-                               if (/Invalid user \((.+?)\):/){
-                                       $cause = "Invalid-User ($1)";
-                               }else{
-                                       $cause='Invalid-User';
-                               }
-                               $do=1;
-                       }
-                       elsif (/Multiple logins/){
-                               if (/MPP attempt/){
-                                       $cause='Multiple-Logins (MPP Attempt)';
-                               }else{
-                                       $cause='Multiple-Logins';
-                               }
-                               $do=1;
-                       }
-                       elsif (/(Outside allowed timespan \(.+?\)):/){
-                               $cause = "$1";
-                               $do=1;
-                       }
-                       if ($do){
-                               $date = (split / : /,$_)[0];
-                               $date2 = ParseDate($date);
-                               if ($date2){
-                                       ($year,$mon,$mday,$hour,$min,$sec)=UnixDate($date2,'%Y','%m','%d','%H','%M','%S');
-                               }
-                               $time = "$year-$mon-$mday $hour:$min:$sec";
-                               if (/\[([\w\-\.\!\@\s]+?)\]\s+\(from (.+?)\)/){
-                                       $user = $1;
-                                       ($nas,$port) = (split /\s+/,$2)[1,3];
-                                       if ($2 =~ /cli (.+?)$/){
-                                               $caller = $1;
-                                       }
-                               }
-                               elsif (/\[([\w\-\.\!\@\s]+?)\/.+?\]\s+\(from (.+?)\)/){
-                                       $user = $1;
-                                       ($nas,$port) = (split /\s+/,$2)[1,3];
-                                       if ($2 =~ /cli (.+?)$/){
-                                               $caller = $1;
-                                       }
-                               }
-                               $caller='' if (!defined($caller));
-                               $user =~s/[^\w\-\.\d\!\@\s]//g;
-                               $nas =~s/[^\w\.\-]//g;
-                               $port =~s/[^\d]//g;
-                               $addr = $client_array{$nas};
-                               if ($user ne '' && $realm_strip eq 'yes'){
-                                       ($one,$two) = (split /$realm_del/, $user)[0,1];
-                                       if ($two ne ''){
-                                               $user = ($realm_for eq 'suffix') ? $one : $two;
-                                       }
-                               }
-                               foreach $server (@servers){
-                                       unlink "$tmpfile.$server" if ($delete{$server});
-                                       open TMP, ">>$tmpfile.$server"
-                                               or die "Could not open temporary file\n";
-                                       $ctx = Digest::MD5->new;
-                                       $ctx->add($user);
-                                       $ctx->add($addr);
-                                       $ctx->add($port);
-                                       $ctx->add($time);
-                                       $ctx->add('badlogin');
-                                       $uniqueid = $ctx->hexdigest;
-                                       print TMP "ALTER SESSION SET NLS_TIMESTAMP_TZ_FORMAT='YYYY-MM-DD HH24:MI:SS.FF TZH:TZM';\n" if ($sql_type eq 'oracle');
-#DEBUG#                                        print "INSERT INTO $sql_accounting_table (UserName,AcctUniqueId,NASIPAddress,NASPortId,AcctStartTime,AcctStopTime,AcctSessionTime,AcctInputOctets,AcctOutputOctets,CallingStationId,AcctTerminateCause) VALUES ('$user','$uniqueid','$addr','$port','$time','$time','0','0','0','$caller','$cause');\n";
-                                       print TMP "INSERT INTO $sql_accounting_table (UserName,AcctSessionId,AcctUniqueId,NASIPAddress,NASPortId,AcctStartTime,AcctStopTime,AcctSessionTime,AcctInputOctets,AcctOutputOctets,CallingStationId,AcctTerminateCause) VALUES ('$user','$uniqueid','$uniqueid','$addr','$port','$time','$time','0','0','0','$caller','$cause');\n";
-                                       close TMP;
-                                       $command = "$sqlcmd -h$server $opt -u$sql_username $pass $sql_database <$tmpfile.$server" if ($sql_type eq 'mysql');
-                                       $command = "$sqlcmd  -U $sql_username -f $tmpfile.$server $sql_database" if ($sql_type eq 'pg');
-                                       $command = "$sqlcmd  $sql_username/$pass" . "@" . "$sql_database <$tmpfile.$server" if ($sql_type eq 'oracle');
-                                       $command = "$sqlcmd '$server' '$sql_port' '' '$sql_username' '$sql_pass' <$tmpfile.$server" if ($sql_type eq 'sqlrelay');
-                                       if ($verbose > 1) { print STDOUT "DEBUG: Sending datafile $tmpfile.$server to \"$sql_type\" database\n" }
-                                       `$command`;
-                                       if ($verbose > 1) { print STDOUT "DEBUG: Sent data to \"$sql_type\" database\n" }
-
-                                       $exit = $? >> 8;
-                                       $delete{$server} = ($exit == 0) ? 1 : 0;
-                                       print STDERR "ERROR: SQL query failed for host $server\n" if ($exit != 0);
-                               }
-                       }
-               }
-       }
-       if ($all_file ne 'once') {
-               sleep 2;
-               seek LOG,0,1;
-       } else {
-               exit(0);
-       }
-}
diff --git a/dialup_admin/bin/monthly_tot_stats b/dialup_admin/bin/monthly_tot_stats
deleted file mode 100755 (executable)
index e3e7ea4..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/perl
-use POSIX;
-use File::Temp;
-
-# Log in the mtotacct table aggregated accounting information for
-# each user spaning in one month period.
-# If the current month has not ended it will log information up to
-# the current month day
-# Works only with mysql and postgresql
-#
-
-$conf=shift||'/usr/local/dialup_admin/conf/admin.conf';
-
-
-open CONF, "<$conf"
-       or die "Could not open configuration file\n";
-while(<CONF>){
-       chomp;
-       ($key,$val)=(split /:\s*/,$_);
-       $sql_type = $val if ($key eq 'sql_type');
-       $sql_server = $val if ($key eq 'sql_server');
-       $sql_username = $val if ($key eq 'sql_username');
-       $sql_password = $val if ($key eq 'sql_password');
-       $sql_database = $val if ($key eq 'sql_database');
-       $sql_accounting_table = $val if ($key eq 'sql_accounting_table');
-       $sqlcmd = $val if ($key eq 'sql_command');
-}
-close CONF;
-
-die "sql_command directive is not set in admin.conf\n" if ($sqlcmd eq '');
-die "sql command '$sqlcmd' not found or does not seem to be executable\n" if (! -x $sqlcmd);
-
-if ($sql_type eq 'mysql'){
-       $sql_password = (!$sql_password) ? '' : "-p$sql_password";
-}
-$sql_password =~ s/(\W)/\\$1/g;
-
-($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime;
-if ($mday == 1){
-       $mon--;
-}
-$date_start = POSIX::strftime("%Y-%m-%d",0,0,0,1,$mon,$year,$wday,$yday,$isdst);
-$date_end = POSIX::strftime("%Y-%m-%d",0,0,0,$mday,$mon,$year,$wday,$yday,$isdst);
-
-$query1 = "DELETE FROM mtotacct WHERE AcctDate = '$date_start';";
-$query2 = "INSERT INTO mtotacct (UserName,AcctDate,ConnNum,ConnTotDuration,
-       ConnMaxDuration,ConnMinDuration,InputOctets,OutputOctets,NASIPAddress)
-       SELECT UserName,'$date_start',SUM(ConnNum),SUM(ConnTotDuration),
-       MAX(ConnMaxDuration),MIN(ConnMinDuration),SUM(InputOctets),
-       SUM(OutputOctets),NASIPAddress FROM totacct
-       WHERE AcctDate >= '$date_start' AND
-       AcctDate <= '$date_end' GROUP BY UserName,NASIPAddress;";
-print "$query1\n";
-print "$query2\n";
-my ($fh, $tmp_filename) = tempfile() or die "Could not open tmp file\n";
-print $fh "ALTER SESSION SET NLS_TIMESTAMP_TZ_FORMAT='YYYY-MM-DD HH24:MI:SS.FF TZH:TZM';\n" if ($sql_type eq 'oracle');
-print $fh $query1;
-print $fh $query2;
-close $fh;
-$command = "$sqlcmd -h $sql_server -u $sql_username $sql_password $sql_database < $tmp_filename" if ($sql_type eq 'mysql');
-$command = "$sqlcmd  -U $sql_username -f  $tmp_filename $sql_database" if ($sql_type eq 'pg');
-$command = "$sqlcmd  $sql_username/$pass" . "@" . "$sql_database <$tmpfile.$server" if ($sql_type eq 'oracle');
-$command = "$sqlcmd '$sql_server' '$sql_port' '' '$sql_username' '$sql_password' < $tmp_filename" if ($sql_type eq 'sqlrelay');
-`$command`;
diff --git a/dialup_admin/bin/showmodem b/dialup_admin/bin/showmodem
deleted file mode 100755 (executable)
index 5804057..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-#!/usr/bin/perl
-#
-# This works with Net-SNMP and UCD-SNMP
-
-$host=shift;
-$user=shift;
-$comm=shift || "public";
-$type=shift|| "xml";
-
-$conf='/usr/local/dialup_admin/conf/admin.conf';
-open CONF, "<$conf"
-       or die "Could not open configuration file\n";
-while(<CONF>){
-       chomp;
-       ($key,$val)=(split /:\s*/,$_);
-       $snmp_type = $val if ($key eq 'general_snmp_type');
-       $snmpget = $val if ($key eq 'general_snmpget_command');
-       $snmpwalk = $val if ($key eq 'general_snmpwalk_command');
-}
-close CONF;
-
-die "general_snmp_type directive is not set in admin.conf\n" if ($snmp_type eq '');
-die "Could not find snmpwalk binary. Please make sure that the \$snmpwalk variable points to the right location\n" if (! -x $snmpwalk);
-
-if ($snmp_type = 'ucd') {
-       $snmpgetcmd="$snmpget $host $comm";
-       $snmpwalkcmd="$snmpwalk $host $comm";
-}
-if ($snmp_type = 'net') {
-       $snmpgetcmd="$snmpget -v 1 -c $comm $host";
-       $snmpwalkcmd="$snmpwalk -v 1 -c $comm $host";
-}
-#DEBUG#print "$snmpwalkcmd\n"; print "$snmpgetcmd\n";
-@ModulationScheme = (
-       "error",
-       "unknown",
-       "bell103a",
-       "bell212a",
-       "v21",
-       "v22",
-       "v22bis",
-       "v32",
-       "v32bis",
-       "vfc",
-       "v34",
-       "v17",
-       "v29",
-       "v33",
-       "k56flex",
-       "v23",
-       "v32terbo",
-       "v34plus",
-       "v90",
-       "v27ter",
-);
-
-@Protocol = (
-       "error",
-       "normal",
-       "direct",
-       "reliableMNP",
-       "reliableLAPM",
-       "syncMode",
-       "asyncMode",
-       "ara10",
-       "ara20",
-       "unknown",
-);
-#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;
-  $slot=(1+int($modem/120));
-  $port=$modem%120-1;
-  $modem="$slot.$port";
-
-#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";
-  $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";
-  $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";
-  $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";
-  $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";
-  $rxsignal=`$snmpgetcmd enterprises.9.9.47.1.3.1.1.17.$modem` or die "No MIB\n";
-#  $rxsignal=~ s/INTEGER\://;
-  $rxsignal=~/ \= (.*)\n/;
-  $rxsignal=$1;
-
-  if($type eq "xml"){
-    print "<User>$user</User>\n";
-    print "\t<Duration>$duration</Duration>\n";
-    print "\t<Modulation>$modulation</Modulation>\n";
-    print "\t<Protocol>$protocol</Protocol>\n";
-    print "\t<TxRate>$txrate</TxRate>\n";
-    print "\t<RxRate>$rxrate</RxRate>\n";
-    print "\t<RxSignal>$rxsignal dBm</RxSignal>\n\n";
-  }else{
-    printf("%14s\t%s\n","User",$user);
-    printf("%14s\t%s\n","Duration",$duration);
-    printf("%14s\t%s\n","Modulation",$modulation);
-    printf("%14s\t%s\n","Protocol",$protocol);
-    printf("%14s\t%s\n","TxRate",$txrate);
-    printf("%14s\t%s\n","RxRate",$rxrate);
-    printf("%14s\t%s dBm\n\n","RxSignal",$rxsignal);
-  }
-}
diff --git a/dialup_admin/bin/snmpfinger b/dialup_admin/bin/snmpfinger
deleted file mode 100755 (executable)
index 5fd04a0..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/perl
-#
-# This works with Net-SNMP and UCD-SNMP
-
-$host=shift;
-$comm=shift || 'public';
-$type=shift || 'cisco';
-
-$conf='/usr/local/dialup_admin/conf/admin.conf';
-open CONF, "<$conf"
-       or die "Could not open configuration file\n";
-while(<CONF>){
-       chomp;
-       ($key,$val)=(split /:\s*/,$_);
-       $snmp_type = $val if ($key eq 'general_snmp_type');
-       $snmpwalk = $val if ($key eq 'general_snmpwalk_command');
-}
-close CONF;
-
-die "general_snmp_type directive is not set in admin.conf\n" if ($snmp_type eq '');
-die "Could not find snmpwalk binary. Please make sure that the \$snmpwalk variable points to the right location\n" if (! -x $snmpwalk);
-
-$snmpwalkcmd="$snmpwalk $host $comm" if ($snmp_type = 'ucd');
-$snmpwalkcmd="$snmpwalk -v 1 -c $comm $host" if ($snmp_type = 'net');
-
-if ($type eq 'cisco'){
-       $walk =`$snmpwalkcmd  .iso.org.dod.internet.private.enterprises.9.9.150.1.1.3.1.2`;
-       if ($walk =~ /^$/ || $walk =~ /No Such Object/){
-               $walk =`$snmpwalkcmd .iso.org.dod.internet.private.enterprises.9.10.19.1.3.1.1.3`;
-               if ($walk =~ /^$/ || $walk =~ /No Such Object/){
-                       $walk =`$snmpwalkcmd .iso.org.dod.internet.private.enterprises.9.2.9.2.1.18`;
-               }
-       }
-}
-elsif ($type eq 'lucent'){
-       $walk =`$snmpwalkcmd .iso.org.dod.internet.private.enterprises.529.10.4.1.12`;
-}
-elsif ($type eq 'usrhiper'){
-       $walk =`$snmpwalkcmd .iso.org.dod.internet.private.enterprises.429.4.10.1.1.18`;
-}
-
-while($walk=~/\"([\@\.\w\-]+?)\"/g){
- $user=lc($1);
- if($out) {
-  $out=$out.",'$user'";
- }else{
-  $out="'$user'";
- }
-}
-print "$out\n";
diff --git a/dialup_admin/bin/sqlrelay_query b/dialup_admin/bin/sqlrelay_query
deleted file mode 100755 (executable)
index 20704e7..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/perl
-$sqlrelay = '/usr/bin/query';
-$host=shift;
-$port=shift;
-$socket=shift;
-$user=shift;
-$passwd=shift;
-while(<>){
-       chomp;
-       `$sqlrelay '$host' '$port' '$socket' '$user' '$passwd' '$_'`;
-       $exit = $? >> 8;
-       if ($exit != 0){
-               exit $exit;
-       }
-}
diff --git a/dialup_admin/bin/tot_stats b/dialup_admin/bin/tot_stats
deleted file mode 100755 (executable)
index a521485..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/usr/bin/perl
-use POSIX;
-use File::Temp;
-
-# Log in the totacct table aggregated daily accounting information for
-# each user.
-# We keep a row per user for each day.
-# Works with mysql and postgresql
-#
-
-$conf=shift||'/usr/local/dialup_admin/conf/admin.conf';
-
-
-open CONF, "<$conf"
-       or die "Could not open configuration file\n";
-while(<CONF>){
-       chomp;
-       ($key,$val)=(split /:\s*/,$_);
-       $sql_type = $val if ($key eq 'sql_type');
-       $sql_server = $val if ($key eq 'sql_server');
-       $sql_username = $val if ($key eq 'sql_username');
-       $sql_password = $val if ($key eq 'sql_password');
-       $sql_database = $val if ($key eq 'sql_database');
-       $sql_accounting_table = $val if ($key eq 'sql_accounting_table');
-       $sqlcmd = $val if ($key eq 'sql_command');
-}
-close CONF;
-
-die "sql_command directive is not set in admin.conf\n" if ($sqlcmd eq '');
-die "sql command '$sqlcmd' not found or does not seem to be executable\n" if (! -x $sqlcmd);
-
-if ($sql_type eq 'mysql'){
-       $sql_password = (!$sql_password) ? '' : "-p$sql_password";
-}
-$sql_password =~ s/(\W)/\\$1/g;
-
-($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime;
-$date_start = POSIX::strftime("%Y-%m-%d %T",0,0,0,($mday - 1),$mon,$year,$wday,$yday,$isdst);
-$date_small_start = POSIX::strftime("%Y-%m-%d",0,0,0,($mday - 1),$mon,$year,$wday,$yday,$isdst);
-$date_end = POSIX::strftime("%Y-%m-%d %T",0,0,0,$mday,$mon,$year,$wday,$yday,$isdst);
-
-$query1 = "DELETE FROM totacct WHERE AcctDate = '$date_start';";
-$query2 = "INSERT INTO totacct (UserName,AcctDate,ConnNum,ConnTotDuration,
-       ConnMaxDuration,ConnMinDuration,InputOctets,OutputOctets,NASIPAddress)
-       SELECT UserName,'$date_small_start',COUNT(*),SUM(AcctSessionTime),
-       MAX(AcctSessionTime),MIN(AcctSessionTime),SUM(AcctInputOctets),
-       SUM(AcctOutputOctets),NASIPAddress FROM radacct
-       WHERE AcctStopTime >= '$date_start' AND
-       AcctStopTime < '$date_end' GROUP BY UserName,NASIPAddress;";
-print "$query1\n";
-print "$query2\n";
-my ($fh, $tmp_filename) = tempfile() or die "Could not open tmp file\n";
-print $fh "ALTER SESSION SET NLS_TIMESTAMP_TZ_FORMAT='YYYY-MM-DD HH24:MI:SS.FF TZH:TZM';\n" if ($sql_type eq 'oracle');
-print $fh $query1;
-print $fh $query2;
-close $fh;
-$command = "$sqlcmd -h $sql_server -u $sql_username $sql_password $sql_database < $tmp_filename" if ($sql_type eq 'mysql');
-$command = "$sqlcmd  -U $sql_username -f  $tmp_filename $sql_database" if ($sql_type eq 'pg');
-$command = "$sqlcmd  $sql_username/$pass" . "@" . "$sql_database <$tmpfile.$server" if ($sql_type eq 'oracle');
-$command = "$sqlcmd '$sql_server' '$sql_port' '' '$sql_username' '$sql_password' < $tmp_filename" if ($sql_type eq 'sqlrelay');
-`$command`;
diff --git a/dialup_admin/bin/truncate_radacct b/dialup_admin/bin/truncate_radacct
deleted file mode 100755 (executable)
index 22d24fd..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/usr/bin/perl
-#
-# Delete sessions from the radacct table which are older than
-# $back_days
-# Works with mysql and postgresql
-#
-use POSIX;
-use File::Temp;
-
-$conf=shift||'/usr/local/dialup_admin/conf/admin.conf';
-$back_days = 90;
-
-
-open CONF, "<$conf"
-       or die "Could not open configuration file\n";
-while(<CONF>){
-       chomp;
-       ($key,$val)=(split /:\s*/,$_);
-       $sql_type = $val if ($key eq 'sql_type');
-       $sql_server = $val if ($key eq 'sql_server');
-       $sql_username = $val if ($key eq 'sql_username');
-       $sql_password = $val if ($key eq 'sql_password');
-       $sql_database = $val if ($key eq 'sql_database');
-       $sql_accounting_table = $val if ($key eq 'sql_accounting_table');
-       $sqlcmd = $val if ($key eq 'sql_command');
-}
-close CONF;
-
-die "sql_command directive is not set in admin.conf\n" if ($sqlcmd eq '');
-die "sql command '$sqlcmd' not found or does not seem to be executable\n" if (! -x $sqlcmd);
-
-if ($sql_type eq 'mysql'){
-       $sql_password = (!$sql_password) ? '' : "-p$sql_password";
-}
-$sql_password =~ s/(\W)/\\$1/g;
-
-($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime;
-$date = POSIX::strftime("%Y-%m-%d %T",$sec,$min,$hour,($mday - $back_days),$mon,$year,$wday,$yday,$isdst);
-print "$date\n";
-if (POSIX::strftime("%Y-%m-%d %T",localtime) eq $date){
-       die "Could not set correct back date.\n";
-}
-$query = "";
-$query = "LOCK TABLES $sql_accounting_table WRITE;" if ($sql_type eq 'mysql');
-$query .= "DELETE FROM $sql_accounting_table WHERE AcctStopTime < '$date' AND AcctStopTime IS NOT NULL ;";
-$query .= "UNLOCK TABLES;" if ($sql_type eq 'mysql');
-print "$query\n";
-my ($fh, $tmp_filename) = tempfile() or die "Could not open tmp file\n";
-print $fh "ALTER SESSION SET NLS_TIMESTAMP_TZ_FORMAT='YYYY-MM-DD HH24:MI:SS.FF TZH:TZM';\n" if ($sql_type eq 'oracle');
-print $fh $query;
-close $fh;
-$command = "$sqlcmd -h$sql_server -u$sql_username $sql_password $sql_database < $tmp_filename" if ($sql_type eq 'mysql');
-$command = "$sqlcmd  -U $sql_username -f  $tmp_filename $sql_database" if ($sql_type eq 'pg');
-$command = "$sqlcmd  $sql_username/$pass" . "@" . "$sql_database <$tmpfile.$server" if ($sql_type eq 'oracle');
-$command = "$sqlcmd '$sql_server' '$sql_port' '' '$sql_username' '$sql_password' < $tmp_filename" if ($sql_type eq 'sqlrelay');
-`$command`;
diff --git a/dialup_admin/conf/accounting.attrs b/dialup_admin/conf/accounting.attrs
deleted file mode 100644 (file)
index 2ef30e3..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-# Used by the User Accounting, the User finger and the Failed Logins page
-#
-# For the user finger page only callerid(9) and 
-# ip address(4) are applicable
-#
-# For the Failed Logins page only looged in(2), server(7), 
-# terminate cause(8) and callerid(9) are applicable
-#
-# attribute number             Description             Show in         Show in         Show in
-#                                                      User Accounting User Finger     Failed Logins
-#
-1                              type                    no              no              no
-2                              logged in               yes             no              yes
-3                              session time            yes             no              no
-4                              ip address              no              yes             no
-5                              upload                  yes             no              no
-6                              download                yes             no              no
-7                              server                  yes             no              yes
-8                              terminate cause         yes             no              yes
-9                              callerid                yes             yes             yes
diff --git a/dialup_admin/conf/admin.conf b/dialup_admin/conf/admin.conf
deleted file mode 100644 (file)
index b0121f8..0000000
+++ /dev/null
@@ -1,351 +0,0 @@
-#
-# Main Configuration File
-#
-# it can be default or whatever language. Only greek are supported
-# from non latin alphabet languages
-# These attribute only apply for ldap not for sql
-#
-general_prefered_lang: en
-general_prefered_lang_name: English
-#
-# The charset which will be added as a meta tag in all pages
-#
-general_charset: iso-8859-1
-#
-# Uncomment this if normal attributes (not the ;lang-xx ones) in ldap
-# are utf8 encoded.
-#
-#general_decode_normal_attributes: yes
-#
-# The directory where dialupadmin is installed
-#
-general_base_dir: /usr/local/dialup_admin
-#
-# The base directory of the freeradius radius installation
-#
-general_radiusd_base_dir: /usr/local/radiusd
-general_domain: company.com
-#
-# Set it to yes to use sessions and cache the various mappings
-# You can also set use_session = 1 in config.php to also cache
-# the admin.conf
-#
-# ---- IMPORTANT -- IMPORTANT -- IMPORTANT ----
-#Remember to use the 'Clear Cache' page if you use sessions and do any changes
-#in any of the configuration files.
-#
-general_use_session: no
-#
-# This is used by the failed logins page. It states the default back time
-# in minutes.
-#
-general_most_recent_fl: 30
-
-#
-# Realm setup
-#
-# Set general_strip_realms to yes in order  to stip realms from usernames.
-# By default realms are not striped
-#general_strip_realms: yes
-#
-# The delimiter used  in realms. Default is @
-#
-general_realm_delimiter: @
-#
-# The format of the realms. Can be either suffix (realm is after the username)
-# or prefix (realm is before the username). Default is suffix
-#
-general_realm_format: suffix
-#
-
-#
-# Determines if the administrator will be able to see and change the user password through
-# the user edit page
-general_show_user_password: yes
-
-general_raddb_dir: %{general_radiusd_base_dir}/etc/raddb
-general_ldap_attrmap: %{general_raddb_dir}/ldap.attrmap
-# Need to fix admin.conf file parser
-#general_clients_conf: %{general_raddb_dir}/clients.conf
-general_clients_conf: /usr/local/etc/raddb/clients.conf
-general_sql_attrmap: %{general_base_dir}/conf/sql.attrmap
-general_accounting_attrs_file: %{general_base_dir}/conf/accounting.attrs
-general_extra_ldap_attrmap: %{general_base_dir}/conf/extra.ldap-attrmap
-general_username_mappings_file: %{general_base_dir}/conf/username.mappings
-#
-# it can be either ldap or sql
-# This affects the user base not accounting. Accounting is always in sql
-#
-general_lib_type: sql
-#
-# Define which attributes will be visible in the user edit page
-#
-general_user_edit_attrs_file: %{general_base_dir}/conf/user_edit.attrs
-#
-# Used by the Accounting Report Generator
-#
-general_sql_attrs_file: %{general_base_dir}/conf/sql.attrs
-#
-# Set default values for various attributes
-#
-general_default_file: %{general_base_dir}/conf/default.vals
-#general_ld_library_path: /usr/local/snmpd/lib
-#
-# can be 'snmp' (for snmpfinger) or empty to query the radacct table without first
-# querying the nas
-# This is used by the online users page
-#
-general_finger_type: snmp
-#
-# Defines the nas type. This is only used by snmpfinger
-# cisco, usrhiper and lucent are supported for now
-#
-general_nas_type: cisco
-general_snmpfinger_bin: %{general_base_dir}/bin/snmpfinger
-#
-# Used by the 'Disconnect User' button in the Clear Open Sessions page
-# Uses the Cisco AAA Session MIB or a telnet session
-#
-general_sessionclear_bin: %{general_base_dir}/bin/clearsession
-#
-# Can be one of telnet or snmp
-#
-general_sessionclear_method: snmp
-general_radclient_bin: %{general_radiusd_base_dir}/bin/radclient
-#
-# this information is used from the server check page
-#
-general_test_account_login: test
-general_test_account_password: testpass
-#
-# These are used as default values for the user test page
-#
-general_radius_server: localhost
-general_radius_server_port: 1812
-#
-# can be either pap or chap
-#
-general_radius_server_auth_proto: pap
-#
-# sorry, single valued for now. Should become something like
-# password[server-name]: xxxxx
-#
-general_radius_server_secret: XXXXXX
-general_auth_request_file: %{general_base_dir}/conf/auth.request
-#
-# can be one of crypt,md5,clear
-#
-general_encryption_method: crypt
-#
-# can be either asc (older dates first) or desc (recent dates first)
-# This is used in the user accounting and badusers pages
-#
-general_accounting_info_order: desc
-#
-# Use the totacct table in the user statistics page instead of the radacct
-# table. That will make the page run quicker. totacct should have data for
-# this to work :-)
-#
-general_stats_use_totacct: no
-#
-# If set to yes then we only allow each administrator to examine it's own entries
-# in the badusers table
-#
-general_restrict_badusers_access: no
-#
-# If set to yes then we restrict access to the nas administration page only to those
-# users which are allowed by their username mapping (nasadmin is set to yes)
-#
-general_restrict_nasadmin_access: no
-
-
-INCLUDE: %{general_base_dir}/conf/naslist.conf
-
-INCLUDE: %{general_base_dir}/conf/captions.conf
-
-#
-# The ldap server to connect to.
-# Both ldap_server and ldap_write_server can be a space-separated
-# list of ldap hostnames. In that case the library will try to connect
-# to the servers in the order that they appear. If the first host is down
-# ldap_connect will ask for the second ldap host and so on.
-#
-ldap_server: ldap.%{general_domain}
-#
-# There are many cases where we have a small write master and
-# a lot of fast read only replicas. If that is the case uncomment
-# ldap_write_server and point it to the write master. It will be
-# used only when writing to the directory, not when reading
-#
-#ldap_write_server: master.%{general_domain}
-ldap_base: dc=company,dc=com
-ldap_binddn: cn=Directory Manager
-ldap_bindpw: XXXXXXX
-ldap_default_new_entry_suffix: ou=dialup,ou=guests,%{ldap_base}
-ldap_default_dn: uid=default-dialup,%{ldap_base}
-ldap_regular_profile_attr: dialupregularprofile
-#
-# If set to yes then the HTTP credentials (http authentication)
-# will be used to bind to the ldap server instead of ldap_binddn
-# and ldap_bindpw. That way multiple admins with different rights
-# on the ldap database can connect through one dialup_admin interface.
-# The ldap_binddn and ldap_bindpw are still needed to find the DN
-# to bind with (http authentication will only provide us with a
-# username). As a result the ldap_binddn should be able to do a search
-# with a filter of (uid=<username>). Normally, the anonymous (empty DN)
-# user can do that.
-#ldap_use_http_credentials: yes
-#
-# If we are using http credentials we can map a specific username to the
-# directory manager (which usually does not correspond to a specific username)
-#
-#ldap_directory_manager: cn=Directory Manager
-#ldap_map_to_directory_manager: admin
-#
-# Uncomment to enable ldap debug
-#
-ldap_debug: true
-#
-# Allow for defining the ldap filter used when searching for a user
-# Variables supported:
-# %u: username
-# %U: username provided though http authentication
-# %mu: mappings for userdb
-# %ma: mappings for accounting
-# %mn: mappings for nasdb
-# %mN: mappings for nas administration
-#
-# One use of this would be to restrict access to only the user's belonging to
-# a specific administrator like this:
-# ldap_filter: (&(uid=%u)(manager=uid=%U,ou=admins,o=company,c=com))
-#
-#ldap_filter: (uid=%u)
-#
-# If ldap_userdn is set then we use that for user dns, we don't perform an ldap
-# search. This can be somewhat faster. The variables supported for ldap_filter
-# are also supported here
-#
-#ldap_userdn: uid=%u,%{ldap_base}
-
-
-#
-# can be one of mysql,pg,oracle,sqlrelay where:
-# mysq: MySQL database (port 3306)
-# pg: PostgreSQL database (port 5432)
-# oracle: Oracle database (port 1521)
-# sqlrelay: SQL Relay
-#
-sql_type: mysql
-sql_server: localhost
-sql_port: 3306
-sql_username: dialup_admin
-sql_password: XXXXXX
-sql_database: radius
-sql_accounting_table: radacct
-sql_badusers_table: badusers
-sql_check_table: radcheck
-sql_reply_table: radreply
-sql_user_info_table: userinfo
-sql_groupcheck_table: radgroupcheck
-sql_groupreply_table: radgroupreply
-sql_usergroup_table: radusergroup
-sql_total_accounting_table: totacct
-sql_nas_table: nas
-#
-# If set to true then we show all the available groups with the groups
-# that the user is a member of highlighted in the user edit page.
-# Otherwise we only show the groups he is a member of.
-sql_show_all_groups: true
-#
-# This variable is used by the scripts in the bin folder
-# It should contain the path to the sql binary used to run
-# sql commands (mysql, psql, oracle and sqlrelay are only supported for now)
-sql_command: /usr/local/bin/mysql
-#sql_command: /usr/bin/psql
-#sql_command: /usr/bin/sqlplus
-#
-# This variable is used by the scripts in the bin folder
-# It should contain the snmp type and  path to the binary 
-# used to run snmp commands. 
-# (ucd = UCD-Snmp and net = Net-Snmp are only supported for now)
-general_snmp_type: net
-general_snmpwalk_command: /usr/local/bin/snmpwalk
-general_snmpget_command: /usr/local/bin/snmpget
-#
-# Uncomment to enable sql debug
-#
-sql_debug: true
-#
-# If set to yes then the HTTP credentials (http authentication)
-# will be used to connect to the sql server instead of sql_username
-# and sql_password. That way multiple admins with different rights
-# on the sql database can connect through one dialup_admin interface.
-#sql_use_http_credentials: yes
-#
-# If set the query will be added to all of the queries on the accounting
-# table
-# Variables supported:
-# %u: username
-# %U: username provided though http authentication
-# %mu: mappings for userdb
-# %ma: mappings for accounting
-# %mn: mappings for nasdb
-# %mN: mappings for nas administration
-#sql_accounting_extra_query: %ma
-
-
-#
-# true or false
-#
-sql_use_user_info_table: true
-sql_use_operators: true
-#
-# Set this to the value of the default_user_profile in your
-# sql.conf if that one is set. If it is not set leave blank
-# or commented out
-#sql_default_user_profile: DEFAULT
-#
-#
-sql_password_attribute: User-Password
-sql_date_format: Y-m-d
-sql_full_date_format: Y-m-d H:i:s
-#
-# Used in the accounting report generator so that we
-# don't return too many results
-#
-sql_row_limit: 40
-#
-# These options are used by the log_badlogins script and by the
-# mysql driver
-#
-# Set the sql connect timeout (secs)
-sql_connect_timeout: 3
-# Give a space separated list of extra mysql servers to connect to when
-# logging bad logins or adding users in the badusers table
-#sql_extra_servers: sql2.company.com sql3.company.com
-
-#
-# Default values for the various user limits in case the counter module
-# is used to impose such limits.
-# The value should be the user limit in seconds or none for nothing
-# Check out conf/sql.attrmap or extra.ldap-attrmap (depending on if you are
-# using sql or ldap) for per user attributes. The mapping should be made to
-# the attributes configured in the counter module. The attributes used by
-# dialupadmin will always be the ones appearing in the attribute mapping files
-# so you should make sure they are mapped to the correct attributes
-#
-#counter_default_daily: 14400
-#counter_default_weekly: 72000
-counter_default_daily: none
-counter_default_weekly: none
-counter_default_monthly: none
-#
-# Since calculating monthly usage can be quite expensive we make
-# it configurable
-# This is not needed if the monthly limit is not none
-#counter_monthly_calculate_usage: true
-
-# some of the date/time related functions need to know what timezone we are in
-
-timezone: Europe/Luxembourg
-
diff --git a/dialup_admin/conf/auth.request b/dialup_admin/conf/auth.request
deleted file mode 100644 (file)
index 6973a1a..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#
-# Extra attributes that the test user/check server pages will send to
-# the RADIUS server
-#
-Service-Type = Framed-User
diff --git a/dialup_admin/conf/captions.conf b/dialup_admin/conf/captions.conf
deleted file mode 100644 (file)
index ea34571..0000000
+++ /dev/null
@@ -1 +0,0 @@
-general_caption_finger_free_lines: free lines
diff --git a/dialup_admin/conf/config.php b/dialup_admin/conf/config.php
deleted file mode 100644 (file)
index 3e25e7a..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-<?php
-#
-# Things should work even if register_globals is set to off
-#
-
-$testVer=intval(str_replace(".", "",'4.1.0'));
-$curVer=intval(str_replace(".", "",phpversion()));
-if( $curVer >= $testVer )
-       import_request_variables('GPC');
-# If using sessions set use_session to 1 to also cache the config file
-#
-$use_session = 0;
-unset($config);
-unset($nas_list);
-if ($use_session){
-       // Start session
-       @session_start();
-       if (isset($_SESSION['config']))
-               $config = $_SESSION['config'];
-       if (isset($_SESSION['nas_list']))
-               $nas_list = $_SESSION['nas_list'];
-}
-if (!isset($config)){
-       $ARR=file("../conf/admin.conf");
-       $EXTRA_ARR = array();
-       foreach($ARR as $val) {
-               $val=chop($val);
-               if (preg_match('/^[[:space:]]*#/',$val) || preg_match('/^[[:space:]]*$/',$val))
-                       continue;
-               list($key,$v)=preg_split("/:[[:space:]]*/",$val,2);
-               if (preg_match("/%\{(.+)\}/",$v,$matches)){
-                       $val=$config[$matches[1]];
-                       $v=preg_replace("/%\{$matches[1]\}/",$val,$v);
-               }
-               if (preg_match("/^nas(\d+)_(\w+)$/",$key,$matches))
-                       $nas_list[$matches[1]][$matches[2]] = $v;
-               if ($key == 'INCLUDE'){
-                       if (is_readable($v))
-                               array_push($EXTRA_ARR,file($v));
-                       else
-                               echo "<b>Error: File '$v' does not exist or is not readable</b><br>\n";
-               }
-               else
-                       $config["$key"]="$v";
-       }
-       foreach($EXTRA_ARR as $val1) {
-               foreach($val1 as $val){
-                       $val=chop($val);
-                       if (preg_match('/^[[:space:]]*#/',$val) || preg_match('/^[[:space:]]*$/',$val))
-                               continue;
-                       list($key,$v)=preg_split("/:[[:space:]]*/",$val,2);
-                       if (preg_match("/%\{(.+)\}/",$v,$matches)){
-                               $val=$config[$matches[1]];
-                               $v=preg_replace("/%\{$matches[1]\}/",$val,$v);
-                       }
-                       if (preg_match("/^nas(\d+)_(\w+)$/",$key,$matches))
-                               $nas_list[$matches[1]][$matches[2]] = $v;
-                       $config["$key"]="$v";
-               }
-       }
-       if ($use_session){
-               session_register('config');
-               session_register('nas_list');
-       }
-
-}
-if ($use_session == 0 && $config[general_use_session] == 'yes'){
-       // Start session
-       @session_start();
-       if (isset($nas_list))
-               session_register('nas_list');
-}
-//Make sure we are only passed allowed strings in username
-if ($login != '')
-       $login = preg_replace("/[^\w\.\/\@\:\-]/",'',$login);
-
-if ($login != '' && $config[general_strip_realms] == 'yes'){
-       $realm_del = ($config[general_realm_delimiter] != '') ? $config[general_realm_delimiter] : '@';
-       $realm_for = ($config[general_realm_format] != '') ? $config[general_realm_format] : 'suffix';
-       $new = explode($realm_del,$login,2);
-       if (count($new) == 2)
-               $login = ($realm_for == 'suffix') ? $new[0] : $new[1];
-}
-unset($mappings);
-if (isset($_SESSION['mappings']))
-       $mappings = $_SESSION['mappings'];
-if (!isset($mappings) && $config[general_username_mappings_file] != ''){
-       $ARR = file($config[general_username_mappings_file]);
-       foreach($ARR as $val){
-               $val=chop($val);
-               if (preg_match('/^[[:space:]]*#/',$val) || preg_match('/^[[:space:]]*$/',$val))
-                       continue;
-               list($key,$realm,$v)=preg_split("/:[[:space:]]*/",$val,3);
-               if ($realm == 'accounting' || $realm == 'userdb' || $realm == 'nasdb' || $realm == 'nasadmin')
-                       $mappings["$key"][$realm] = $v;
-               if ($realm == 'nasdb'){
-                       $NAS_ARR = array();
-                       $NAS_ARR = preg_split('/,/',$v);
-                       foreach ($nas_list as $key => $nas){
-                               foreach ($NAS_ARR as $nas_check){
-                                       if ($nas_check == $nas[name])
-                                               unset($nas_list[$key]);
-                               }
-                       }
-               }
-       }
-       if ($config[general_use_session] == 'yes')
-               session_register('mappings');
-}
-
-date_default_timezone_set($config[timezone]);
-
-//Include missing.php if needed
-if (!function_exists('array_change_key_case'))
-       include_once('../lib/missing.php');
-@header('Content-type: text/html; charset='.$config[general_charset].';');
-?>
diff --git a/dialup_admin/conf/default.vals b/dialup_admin/conf/default.vals
deleted file mode 100644 (file)
index 9453982..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-#
-# Uncomment and edit these lines if you add corresponding default
-# values in the users file
-#
-#Simultaneous-Use: 1
-#Framed-IP-Address: 255.255.255.254
-#Framed-IP-Netmask: 255.255.255.255
-#Framed-MTU: 1500
-#Framed-Protocol: PPP
-#Framed-Compression: Van-Jacobson-TCP-IP
-#Session-Timeout: 14400
-#Idle-Timeout: 600
-#Port-Limit: 1
-#Max-Weekly-Session: 72000
-#Max-Daily-Session: 14400
-#Login-Time:
-#Auth-Type: LDAP
diff --git a/dialup_admin/conf/extra.ldap-attrmap b/dialup_admin/conf/extra.ldap-attrmap
deleted file mode 100644 (file)
index fb0637a..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# An extra file for radius -> ldap attribute mapping
-#
-checkItem       Dialup-Lock-Msg                radiuslockmsg
-checkItem      User-Password           userpassword
-checkItem      Regular-Profile         radiusProfileDn
-checkItem      Check-Item              radiusCheckItem         generic
-checkItem      Max-Daily-Session       radiusMaxDailySession
-checkItem      Max-Weekly-Session      radiusMaxWeeklySession
-checkItem      Max-Monthly-Session     radiusMaxMonthlySession
-
-replyItem      Reply-Item              radiusReplyItem         generic
diff --git a/dialup_admin/conf/naslist.conf b/dialup_admin/conf/naslist.conf
deleted file mode 100644 (file)
index 567893c..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# This file contains the NAS list
-#
-nas1_name: nas1.%{general_domain}
-nas1_model: Cisco 2511 access server
-nas1_ip: 147.122.122.121
-nas1_port_num: 16
-nas1_community: public
-nas2_name: nas2.%{general_domain}
-nas2_model: Cisco 2511 access server
-nas2_ip: 147.122.122.123
-nas2_port_num: 16
-nas2_community: public
-#
-# finger type can also be set per NAS
-# snmp: Use snmp to query the NAS
-# database: Only query the sql database
-#
-# If it is not set, general_finger_type is assumed
-nas2_finger_type: database
-# nas type can also be set per NAS
-nas2_type: cisco
-nas3_name: nas3.%{general_domain}
-nas3_model: Cisco 5300 access server
-nas3_ip: 147.122.122.124
-nas3_port_num: 210
-nas3_community: public
-#
-# sessionclear method can also be set per NAS
-#
-nas3_sessionclear_method: telnet
diff --git a/dialup_admin/conf/sql.attrmap b/dialup_admin/conf/sql.attrmap
deleted file mode 100644 (file)
index a5a44c9..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-#
-# A mapping between the attributes used by dialup_admin and the attribute
-# names that will be stored in the SQL database
-#
-# Attributes that are not contained in this file are assumed to be reply
-# items and map to the same name as the one used by dialup_admin
-#
-# Format:
-# checkItem|replyItem  Attribute-In-Dialup-Admin       Attribute-In-SQL
-#
-#
-checkItem      Auth-Type                       Auth-Type
-checkItem      Simultaneous-Use                Simultaneous-Use
-checkItem      Called-Station-Id               Called-Station-Id
-checkItem      Calling-Station-Id              Calling-Station-Id
-checkItem      Dialup-Access                   none
-checkItem      Max-Daily-Session               Max-Daily-Session
-checkItem      Max-Weekly-Session              Max-Weekly-Session
-checkItem      Max-Monthly-Session             Max-Monthly-Session
-checkItem      Login-Time                      Login-Time
-checkItem      Expiration                      Expiration
-
-replyItem      Service-Type                    Service-Type
-replyItem      Framed-Protocol                 Framed-Protocol
-replyItem      Framed-IP-Address               Framed-IP-Address
-replyItem      Framed-IP-Netmask               Framed-IP-Netmask
-replyItem      Framed-Route                    Framed-Route
-replyItem      Framed-Routing                  Framed-Routing
-replyItem      Filter-Id                       Filter-Id
-replyItem      Framed-MTU                      Framed-MTU
-replyItem      Framed-Compression              Framed-Compression
-replyItem      Login-IP-Host                   Login-IP-Host
-replyItem      Login-Service                   Login-Service
-replyItem      Login-TCP-Port                  Login-TCP-Port
-replyItem      Callback-Number                 Callback-Number
-replyItem      Callback-Id                     Callback-Id
-replyItem      Framed-IPX-Network              Framed-IPX-Network
-replyItem      Class                           Class
-replyItem      Session-Timeout                 Session-Timeout
-replyItem      Idle-Timeout                    Idle-Timeout
-replyItem      Termination-Action              Termination-Action
-replyItem      Login-LAT-Service               Login-LAT-Service
-replyItem      Login-LAT-Node                  Login-LAT-Node
-replyItem      Login-LAT-Group                 Login-LAT-Group
-replyItem      Framed-AppleTalk-Link           Framed-AppleTalk-Link
-replyItem      Framed-AppleTalk-Network        Framed-AppleTalk-Network
-replyItem      Framed-AppleTalk-Zone           Framed-AppleTalk-Zone
-replyItem      Port-Limit                      Port-Limit
-replyItem      Login-LAT-Port                  Login-LAT-Port
-replyitem      Reply-Message                   Reply-Message
-replyItem       Dialup-Lock-Msg                        Reply-Message
-replyItem      User-Password                   User-Password
diff --git a/dialup_admin/conf/sql.attrs b/dialup_admin/conf/sql.attrs
deleted file mode 100644 (file)
index 33b926a..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-# Used by the Accounting Report Generator page
-#
-# Mysql attributes             Description             Show    Use function
-#
-RadAcctId                      Accounting Id           no
-AcctSessionId                  Session Id              no
-AcctUniqueId                   Unique Id               no
-UserName                       User Name               yes
-Realm                          Realm                   no
-NASIPAddress                   NAS IP Address          yes
-NASPortId                      NAS Port                yes
-NASPortType                    NAS Port Type           no
-AcctStartTime                  Login Time              yes
-AcctStopTime                   Logout Time             yes
-AcctSessionTime                        Session Time            yes     time2str
-AcctAuthentic                  AcctAuthentic           no
-ConnectInfo_start              Start Connect Info      no      
-ConnectInfo_stop               Stop Connect Info       no
-AcctInputOctets                        Upload                  yes     bytes2str
-AcctOutputOctets               Download                yes     bytes2str
-CalledStationId                        CalledStationId         no
-CallingStationId               Caller Id               no
-AcctTerminateCause             Terminate Cause         no
-ServiceType                    Service Type            no
-FramedProtocol                 Protocol                no
-FramedIPAddress                        Client IP Address       yes
-AcctStartDelay                 Accounting Start Delay  no      time2str
-AcctStopDelay                  Accounting Stop Delay   no      time2str
diff --git a/dialup_admin/conf/user_edit.attrs b/dialup_admin/conf/user_edit.attrs
deleted file mode 100644 (file)
index 8de4486..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-#
-#      Attributes which will be visible in the user/group edit pages
-#
-#      Format: Attribute       Comment
-#
-#
-#Auth-Type                     <a href="help/auth_type_help.html" target=su_help onclick=window.open("help/auth_type_help.html","su_help","width=560,height=230,toolbar=no,scrollbars=no,resizable=yes") title="Auth-Type Help Page"><font color="blue">Auth-Type</font></a>
-#Simultaneous-Use              <a href="help/simultaneous_use_help.html" target=su_help onclick=window.open("help/simultaneous_use_help.html","su_help","width=560,height=170,toolbar=no,scrollbars=no,resizable=yes") title="Simultaneous Use Help Page"><font color="blue">Simultaneous Use</font></a>
-Framed-Protocol                        <a href="help/framed_protocol_help.html" target=fpr_help onclick=window.open("help/framed_protocol_help.htlml","fpr_help","width=560,height=230,toolbar=no,scrollbars=no,resizable=yes") title="Framed-Protocol Help PPage"><font color="blue">Protocol</font></a>
-Framed-IP-Address              <a href="help/framed_ip_address_help.html" target=fia_help onclick=window.open("help/framed_ip_address_help.html","fia_help","width=560,height=230,toolbar=no,scrollbars=no,resizable=yes") title="Framed-IP-Address Help Page"><font color="blue">IP Address</font></a>
-Framed-IP-Netmask              IP Netmask
-#Framed-Route          Route
-#Framed-Routing
-#Filter-Id                     <a href="help/filter_id_help.html" target=fid_help onclick=window.open("help/filter_id_help.html","fid_help","width=560,height=230,toolbar=no,scrollbars=no,resizable=yes") title="Filter-ID Help Page"><font color="blue">Filter ID</font></a>
-Framed-MTU                     <a href="help/framed_mtu_help.html" target=fid_help onclick=window.open("help/framed_mtu_help.html","fid_help","width=560,height=230,toolbar=no,scrollbars=no,resizable=yes") title="Framed-MTU Help Page"><font color="blue">Framed-MTU</font></a>
-Framed-Compression             <a href="help/framed_compression_help.html" target=fc_help onclick=window.open("help/framed_compression_help.html","fc_help","width=600,height=210,toolbar=no,scrollbars=no,resizable=yes") title="Framed Compression Help Page"><font color="blue">Compression Used</font></a>
-Service-Type                   <a href="help/service_type_help.html" target=st_help onclick=window.open("help/service_type_help.html","st_help","width=560,height=230,toolbar=no,scrollbars=no,resizable=yes") title="Service-Type Help Page"><font color="blue">Service Type</font></a>
-#Login-IP-Host
-#Login-Service
-#Login-TCP-Port
-#Callback-Number       <a href="help/callback_number_help.html" target=fid_help onclick=window.open("help/callback_number_help.html","fid_help","width=560,height=230,toolbar=no,scrollbars=no,resizable=yes") title="Callback-Number Help Page"><font color="blue">Callback-Number</font></a>
-#Callback-Id   <a href="help/callback_id_help.html" target=fid_help onclick=window.open("help/callback_id_help.html","fid_help","width=560,height=230,toolbar=no,scrollbars=no,resizable=yes") title="Callback-ID Help Page"><font color="blue">Callback-ID</font></a>
-#Framed-IPX-Network
-#Class <a href="help/class_help.html" target=fid_help onclick=window.open("help/class_help.html","fid_help","width=560,height=230,toolbar=no,scrollbars=no,resizable=yes") title="Class Help Page"><font color="blue">Class</font></a>
-Session-Timeout                        <a href="help/session_timeout_help.html" target=st_help onclick=window.open("help/session_timeout_help.html","st_help","width=600,height=170,toolbar=no,scrollbars=no,resizable=yes") title="Session Timeout Help Page"><font color="blue">Session Timeout</font></a>
-Idle-Timeout                   <a href="help/idle_timeout_help.html" target=it_help onclick=window.open("help/idle_timeout_help.html","it_help","width=600,height=170,toolbar=no,scrollbars=no,resizable=yes") title="Idle Timeout Help Page"><font color="blue">Idle Timeout</font></a>
-#Termination-Action
-#Login-LAT-Service
-#Login-LAT-Node
-#Login-LAT-Group
-#Framed-AppleTalk-Link
-#Framed-AppleTalk-Network
-#Framed-AppleTalk-Zone
-Port-Limit                     <a href="help/port_limit_help.html" target=pl_help onclick=window.open("help/port_limit_help.html","pl_help","width=600,height=170,toolbar=no,scrollbars=no,resizable=yes") title="Port Limit Help Page"><font color="blue">Port Limit</font></a>
-#Login-LAT-Port
-#Dialup-Access                 <a href="help/dialup_access_help.html" target=da_help onclick=window.open("help/dialup_access_help.html","da_help","width=560,height=200,toolbar=no,scrollbars=no,resizable=yes") title="Dialup Access Help Page"><font color="blue">Dialup Access (use FALSE to lock)</font></a>
-Dialup-Lock-Msg                        <a href="help/lock_message_help.html" target=lm_help onclick=window.open("help/lock_message_help.html","lm_help","width=600,height=210,toolbar=no,scrollbars=no,resizable=yes") title="Lock Message Help Page"><font color="blue">Lock Message</font></a>
-#Reply-Message <a href="help/reply_message_help.html" target=lm_help onclick=window.open("help/reply_message_help.html","lm_help","width=600,height=210,toolbar=no,scrollbars=no,resizable=yes") title="Reply-Message Help Page"><font color="blue">Reply-Message</font></a>
-#Max-Daily-Session             Daily Limit (secs)
-#Max-Weekly-Session            Weekly Limit (secs)
-#Max-Monthly-Session           Monthly Limit (secs)
-#Login-Time                    <a href="login_time_create.php?val=$name1&first=yes" target=lt_create onclick=window.open("login_time_create.php?val=$name1&first=yes","lt_create","width=600,height=490,toolbar=no,scrollbars=yes,resizable=yes") title="Login-Time Creation Page"><font color="blue">User Login Period </font></a>(<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 </font></a>Format)
-#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>
-#
-# Uncomment this if you are using ldap and you are using user regular profiles.
-# Also make sure that Regular-Profile maps to the correct ldap attribute in
-# extra.ldap-attrmap
-#
-#Regular-Profile               User Regular Profile DN
diff --git a/dialup_admin/conf/username.mappings b/dialup_admin/conf/username.mappings
deleted file mode 100644 (file)
index 3180365..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-# Username mappings
-# Format:
-# Username:realm:query
-#
-# where realm is:
-# accounting: for the map to be used when querying the accounting db
-# userdb: for the map to be used when querying the user db
-# nasdb: To only map specific NASes to the username (separated by ,)
-# nasadmin: To allow the user to use the nas_admin page (yes or no)
-#
-library-admin:accounting:AND nasipaddress = '123.123.123.123'
-library-admin:userdb:AND Admin = 'library-admin'
-library-admin:nasdb:nas.lib.company.com
-library-admin:nasadmin:no
-#
-lab-admin:accounting:AND nasipaddress =  '123.123.124.123'
-lab-admin:userdb:AND Admin = 'lab-admin'
-lab-admin:nasdb:nas.lab.company.com
-lab-admin:nasadmin:no
-#
-admin:nasadmin:yes
diff --git a/dialup_admin/doc/AUTHORS b/dialup_admin/doc/AUTHORS
deleted file mode 100644 (file)
index 8ec253f..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-Kostas Kalevras: kkalev@noc.ntua.gr
-Main developper
-
-Vasilis Pappas: vpappas@noc.ntua.gr
-parts of user_edit and user_admin
-
-Thanasis Duitsis: aduitsis@noc.ntua.gr
-Part of accounting report generator
-
-Panagiotis Christias: christia@noc.ntua.gr
-HTML pages layout designer
-
-Dragan Milivojevic: galileo@MICROSKY.NET
-A number of bug reports and a lot of crash testing
-
-Gary McKinney
-A number of bug reports and a lot of crash testing
-
-Alex Savguira: alexs@ravdata.com
-Ido Shavit
-Patches for auto generate password
-
-Nick Marino <nickm@kryptontech.com>
-A number of bug reports
-
-Paris Stamatopoulos <mobius@hack.gr>
-The HOWTO document
-
-Ulrich Walcher <uwalcher@bcore.de>
-A few attribute help pages
diff --git a/dialup_admin/doc/FAQ b/dialup_admin/doc/FAQ
deleted file mode 100644 (file)
index 9999fd8..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-> I was wondering if there is any more documentation about howto setup this 
-> software other than what comes in the README? 
-
-No, there isn't. It's easier for me to write code than to document it :-)
-Anyway, I always try to make better documentation.
-There's also this FAQ :-)
-
->
-> When I try to access some page I see the php code instead of html
->
-
-Make sure that you have configured php to handle files with .php extension
-
-> 
-> What tables do I need to create in the MySQL database?
-
-It depends.
-If you are using ldap for user authentication/information then you only need
-to create the freeradius sql tables (in order to create the radacct table,
-the other tables will just sit around doing nothing) which can be created from a
-sql script in the freeradius distribution. If you are runing mysql it is in
-src/modules/rlm_sql/drivers/rlm_sql_mysql/db_mysql.sql
-
-If you are using mysql for user authentication/information then you will again
-need to create the freeradius sql tables and if you want you could also create
-the userinfo table to store user information (name,telephone etc)
-
-You could also create the badusers table if you want the functionality it provides.
-
-sql scripts to create the badusers and userinfo tables can be found in the
-directory sql (of dialup_admin distribution).
-
->
-> Some attributes are missing from the user/group edit pages
->
-
-First of all check conf/user_edit.atts and see if the attribute you are interested in is
-commented out. If it is just enable it by uncommenting it. If the attribute is not
-included in the file add it. If you use SQL check conf/sql.attrmap. If you use LDAP check
-${freeradius_install_dir}/etc/raddb/ldap.attrmap and check if the attribute is included in
-the attribute mapping. If it is not then add it there also.
-Everything should work ok after that.
-
->
-> When an attribute contains double (") or single (') quotes something goes wrong.
->
-
-Make sure that magic quotes in PHP are turned off
-
->
-> The Online Users page does not show me anything
->
-
-Check conf/admin.conf and especially the comments about general_finger_type. Make sure that bin/snmpfinger
-uses the correct snmpwalk command and that it returns the correct results (snmfinger works on cisco access
-servers). Try commenting out general_finger_type so that the Online Users page will just query the radacct
-table and not try to do a finger on the NAS.
-
-> Even though I have uncommented Dialup-Access in user_edits.attrs, when
-> editing a user, that field is not available.  Is this because in sql.attrmap
-> I have:
->
-> checkItem     Dialup-Access                   none
->
-> What should the attribute be?
-
-Dialup-Access is an attribute used by the ldap module. It is not implemented in
-the sql module, that's why the mapping is set to none.
-You could set Auth-Type to Reject instead.
-
-> Why do the personal information fields show multiple
-> entries for attributes like name, department, etc in the user_admin page?
-> Is there a way to remove the duplicate fields in the display?
-
-Set general_prefered_lang to en
-
-
->
-> After I make a few changes in one of the configuration files things only work like they worked before
->
-
-If you are using sessions then remember to use the 'Clear Cache' page after making any changes
-
->
-> When i try to access a dynamic web page it only shows a blank white page
->
-
-You may have not enabled support for the corresponding sql driver in PHP. If you are also using ldap, check for
-php ldap support.
-
->
-> It is still not working
->
-
-Check that the register_globals in php.ini is set to on. As of PHP 4.2.0 this is set to off by default. The latest
-versions of dialup_admin will work even if register_globals is set to off if the php version is > 4.1.0
-(Thanks to Evren Yurtesen <eyurtese@turkuamk.fi> for the suggestion).
-
-In latest versions you can also enable sql debug (sql_debug: true) and ldap debug (ldap_debug: true)
-
---
-kkalev
diff --git a/dialup_admin/doc/HELP_WANTED b/dialup_admin/doc/HELP_WANTED
deleted file mode 100644 (file)
index c5c7b81..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-What you can contribute:
-
-o Billing and statistics pages. Fancy bars and diagrams are needed for dialup_admin to be complete.
-
-o Documentation.
-
-o Attribute help pages like those that already exist.
diff --git a/dialup_admin/doc/HOWTO b/dialup_admin/doc/HOWTO
deleted file mode 100644 (file)
index 4fb4ae4..0000000
+++ /dev/null
@@ -1,726 +0,0 @@
-
-Dialup Admin HOWTO 
-------------------
-
-Version 0.1 Sun Oct 26 04:03:00 EET 2003
-
-
-1. Installation
-       1.1 Obtaining Dialup Admin
-       1.2 Prerequisities
-       1.3 Installing & System Configuration
-               1.3.1 Unpacking & Installation
-               1.3.2 Apache Configuration
-                       1.3.2.1 Enabling PHP Support On Apache
-                       1.3.2.2 Creating a more secure web interface
-               1.3.3 Creating the mySQL Tables
-2. Configuration
-       2.1 Configuration Options
-               2.1.1 General Options 
-               2.1.2 Realms Options
-               2.1.3 LDAP/SQL Options
-               2.1.4 NAS Quering
-               2.1.5 Test Variables
-               2.1.6 Encryption Methods
-               2.1.7 NAS Informations
-               2.1.8 LDAP Options
-               2.1.9 SQL Options
-               2.1.10 Limits Timers
-               2.1.11 Various Options
-       2.2 The bin/ scripts
-               2.2.1 The snmpfinger script
-               2.2.2 The log_badlogins script
-               2.2.3 The clean_radacct script
-               2.2.4 The truncate_radacct script
-               2.2.5 The tot_stats script
-               2.2.6 The monthly_tot_stats script
-       2.3 User Attributes
-       2.4 Finishing Off
-
-
-3. Troubleshooting
-       3.1 When I try to access some page I see the php code instead of html
-       3.2 When an attribute contains double (") or single (') quotes 
-           something goes wrong
-       3.3 Even though I have uncommented Dialup-Access in user_edits.attrs,
-           when editing a user, that field is not available...
-       3.4 Why do the personal information fields show multiple entries for 
-           attributes like name, department, etc in the user_admin page?
-       3.5 After I make a few changes in one of the configuration files 
-           things only work like they worked before
-       3.6 It is still not working
-
-4. HOWTO Information
-
-1. Installation
----------------
-
-This section will take you step by step to create system suitable for 
-dialup admin to run properly.
-
-
-[1.1] Obtaining Dialup Admin
-
-Dialup_admin is included with FreeRADIUS.
-
-[1.2] Prerequisities
-
-Dialup Admin requires the following in order to have full functionality:
-o PHP                          Obtained at: http://www.php.net
-o Date::Manip Perl Module      Obtained at: http://www.cise.ufl.edu/~sbeck/
-
-[1.3] Installing & System Configuration
-
-At this point we presume that either you have successfully installed PHP and 
-Date::Manip Perl Module or that your distribution has came with both of them 
-precompiled and already installed.
-
-[1.3.1] Unpacking and installation
-
-shell> cd freeradius-server-VERSION
-shell> mv dialup_admin /usr/local
-
-The dialup admin contains a number of directories necessary for the program 
-to operate. Let's concentrate on the htdocs directory. This directory
-contains the php scripts needed. In order to have it accessable through
-our web server we must set a symbolic link between the two locations. 
-We presume that the DefaultRoot of the Apache Web Server is /var/www/htdocs
-
-shell> ln -s /usr/local/dialup_admin/htdocs /var/www/htdocs/dialup
-
-[1.3.2] Apache Configuration
-
-[1.3.2.1] Enabling PHP Support on Apache
-
-Apache must be configured to execute PHP scripts. In order to do so locate 
-the httpd.conf file (for Slackware Linux this is /etc/apache). We must
-enter the following lines inside the httpd.conf
-
-LoadModule php4_module libexec/libphp4.so
-AddModule mod_php4.c
-AddType application/x-httpd-php .php
-AddType application/x-httpd-php .php           # This is most important since many of the PHP scripts of Dialup Admin have this extension
-
-[1.3.2.2] Creating a more secure web interface.
-
-Since dialup admin does not come with any kind of administrators authorisation
-of its own it would be safe to protect this ourselves. 
-
-Add the following to your httpd.conf file:
-
-<Directory /var/www/htdocs/dialup>
-    AuthName "Restricted Area"
-    AuthType Basic
-    AuthUserFile /var/www/.htpasswd
-    require valid-user
-</Directory>
-
-Changing of course the directory path to match yours as well as the 
-AuthUserFile argument to point to the place where the usernames/passwords 
-are stored.
-
-In order to create the htpasswd file the htpasswd utility is required
-(It is provided with the apache web server)
-
-Let's create our first user:
-
-shell> htpasswd -c /var/www/.htpasswd -m administrator password
-
-Note: The -c argument should not be used from that point on since it creates 
-      a new password file. 
-
-On the next restart of apache the dialup/ directory is only accessable by a
-username/password verification which in our case is administrator:password
-
-The HTTP authentication we have just configured can be used by dialupadmin
-when connecting to the ldap and sql databases (see sections on sql and ldap
-options).
-
-At this point when we connect to the url http://localhost/dialup we should 
-see the Dialup Admin pages
-
-[1.3.3] Creating the mySQL tables
-
-In order to have dialup admin work to the maximum you should create a few 
-tables in your mySQL. We assume at this point you have a fair ammount of mySQL
-knowledge and have a mySQL running somewhere on your network. 
-
-First of all you should create a database for all the tables to be stored into
-it. We will call this radius.
-
-shell> mysql -h mysql.host.com -u username -p 
-
-mysql> CREATE DATABASE radius;
-mysql> exit
-
-This step is only necessary if you haven't already created a corresponding database
-for the freeradius server.
-
-At dialup_admin/sql there are four files containg the SQL command to create 
-the required tables. This is done as follows:
-
-shell> mysql -h mysql.host.com -u username -p radius < badusers.sql
-shell> mysql -h mysql.host.com -u username -p radius < mtotacct.sql
-shell> mysql -h mysql.host.com -u username -p radius < totacct.sql
-shell> mysql -h mysql.host.com -u username -p radius < userinfo.sql
-
-The userinfo table though is only needed if you want to keep your user database in sql.
-If you keep your users in ldap then it's not needed.
-
-NOTE: Remember we named our database "radius". Have you named it somewhat 
-      different replace the "radius" argument on the above commands with 
-      the name you used
-
-2. Configuration
-----------------
-
-This is the most important part of this document since the configuration must
-match your needs.
-The configuration file is located at dialup_admin/conf/admin.conf
-
-[2.1] Configuration Options
-
-A few variables must be set to the correct values in order for dialup admin
-to work. 
-
-
-[2.1.1] General Options
-
-
-General configuration options 
-
-> general_base_dir: /usr/local/dialup_admin
-
-This is the location where we have installed dialup admin. 
-Refer to section 1.3.1 for more information
-
-> general_radiusd_base_dir: /usr/local/bin
-
-This is the location where the radiusd binary and various radius 
-related programs resides. Check where FreeRadius has been installed
-
-> general_domain: domain.gr
-
-Set the domain name of your network.
-
-
-[2.1.2] Realms Options
-
-
-For more informations on realms consult the documentations provided 
-with FreeRadius under the doc/ directory
-
-> general_strip_realms : yes
-
-Should Dialup Admin strip the realm from the username when displaying this?
-Values: Yes / No (Default Yes)
-
-> general_realm_delimiter: @
-
-The delimiter used  in realms. Default is @
-
-> general_realm_format: suffix
-
-The format of the realms. Can be either suffix (realm is after the username)
-or prefix (realm is before the username). Default is suffix
-
-
-[2.1.3] LDAP/SQL Options
-
-
-Options that specifies the way dialup admin handles users. SQL or LDAP
-
-> general_lib_type: sql
-
-This can have as values either ldap or sql.
-
-For the following values there shouldn't be any need for changes
-
-> general_ldap_attrmap: /etc/raddb/ldap.attrmap
-> general_sql_attrmap: %{general_base_dir}/conf/sql.attrmap
-> general_extra_ldap_attrmap: %{general_base_dir}/conf/extra.ldap-attrmap
-> general_user_edit_attrs_file: %{general_base_dir}/conf/user_edit.attrs
-> general_sql_attrs_file: %{general_base_dir}/conf/sql.attrs
-> general_default_file: %{general_base_dir}/conf/default.vals
-
-
-[2.1.4] NAS Quering
-
-
-In general the nas quering provides the dialup admin with information 
-regarding the Online Users.
-
-> general_finger_type: snmp
-
-What should be the default quering method of the nas. It can be 'snmp' (for snmpfinger)
-or empty to query the radacct table without first querying the nas
-
-> general_snmpfinger_bin: %{general_base_dir}/bin/snmpfinger
-
-This probably does not need to be changed
-For now snmpfinger will only work with Cisco equipment.
-
-> general_radclient_bin: /usr/local/bin/radclient
-
-Must point to the radclient binary
-
-> general_nas_type: cisco
-
-Defines the nas type. This is only used by snmpfinger
-cisco and lucent are supported for now
-
-
-[2.1.5] Test Variables
-
-
-The following variables which are self explained are being used while the
-"Check Server" button is being pressed to verify that the radius server 
-is working. The username and password must be of a valid dialup account
-
-> general_test_account_login: dummy
-> general_test_account_password: dummy_password
-
-> general_radius_server: localhost
-
-The hostname where the FreeRadius Server runs
-
-> general_radius_server_port: 1645
-
-The port that FreeRadius uses on the hostname
-
-> general_radius_server_auth_proto: chap
-
-The method of connecting. Could be either 'chap' or 'pap'
-
-> general_radius_server_secret: secret_password
-
-The secret of the server that dialup admin should use while connecting. 
-
-NOTE: You must have a correct entry in clients.conf for the host running 
-      the dialup admin. For more information consult the documentations 
-      that come with FreeRadius
-
-> general_auth_request_file: %{general_base_dir}/conf/auth.request
-
-The file conf/auth.request contains the options passed while the 
-authentification is performed. Should you need to add anything edit this file
-
-
-[2.1.6] Encryption Method
-
-
-> general_encryption_method: md5
-
-How the passwords of the users are stored (or should be) in the database.
-Could be 'clear', 'md5', 'des'. See Also Section 2.1.9 
-
-
-[2.1.7] NAS Information
-
-
-> nas1_name: host.%{general_domain}
-
-The name of the NAS. Only the host must be replaced to match yours, 
-provided that the nas are on the general_domain specified above
-
-> nas1_model: Lucent
-
-The model of the NAS. 
-
-> nas1_ip: 10.0.0.1
-
-The IP of the NAS
-
-> nas1_port_num: 120
-
-The port number to connect to on the NAS
-
-> nas1_community: community string
-
-The community string used by the nas for queries via snmp
-
-> nas1_finger_type: snmp
-
-The finger type for the specific nas. Comment out to use the 
-general_finger_type from above.
-
-> nas1_type: cisco
-
-The nas type for the specific nas. Comment out to use the
-general_nas_type from above.
-
-
-[2.1.8] LDAP Options
-
-
->ldap_server: ldap.%{general_domain}
-
-The ldap server to connect to
-Both ldap_server and ldap_write_server can be a space-separated
-list of ldap hostnames. In that case the library will try to connect
-to the servers in the order that they appear. If the first host is down
-ldap_connect will ask for the second ldap host and so on.
-
->ldap_write_server: master.%{general_domain}
-
-There are many cases where we have a small write master and
-a lot of fast read only replicas. If that is the case uncomment
-ldap_write_server and point it to the write master. It will be
-used only when writing to the directory, not when reading
-
->ldap_base: dc=company,dc=com
-
-The LDAP base for the ldap searches
-
->ldap_binddn: cn=Directory Manager
->ldap_bindpw: XXXXXXX
-
-The DN and password which will be used to bind to the LDAP server. If we don't use
-http credentials (see below) than these setting will be used for all ldap operations
-(both searches and modifies/adds).
-
->ldap_default_new_entry_suffix: ou=dialup,ou=guests,%{ldap_base}
-
-The LDAP suffix under which all new user entries created through the new user
-page will be placed
-
->ldap_default_dn: uid=default-dialup,%{ldap_base}
-
-The DN of an ldap entry containing radius user settings which will be
-applied for all users. Though these settings are applied *before* the
-regular profile and per user settings, so they can be easily overwritten.
-That way we could for example set Session-Timeout to 4 hours for all our users
-and set it to a lower/higher value for specific users or groups of users
-
->ldap_regular_profile_attr: dialupregularprofile
-
-The ldap attribute which if present in a user entry will contain the DN
-of another ldap entry specifying radius user settings (check and reply items).
-That way we can keep these settings in only one entry and assign them to each
-user that we want through the regular profile attribute.
->ldap_use_http_credentials: yes
-
-If set to yes then the HTTP credentials (http authentication)
-will be used to bind to the ldap server instead of ldap_binddn
-and ldap_bindpw directives. That way multiple admins with different rights
-on the ldap database can connect through one dialup_admin interface.
-The ldap_binddn and ldap_bindpw are still needed to find the DN of the user
-to bind with (http authentication will only provide us with a
-username). As a result the ldap_binddn should be able to do a search
-with a filter of (uid=<username>). Normally, the anonymous (empty DN)
-user can do that.
-
->ldap_directory_manager: cn=Directory Manager
->ldap_map_to_directory_manager: admin
-
-If we are using http credentials we can map a specific username to the
-directory manager entry (which usually does not correspond to a specific username)
-
-> ldap_debug: true
-
-Set to true to enable ldap debugging
-
->ldap_filter: (uid=%u)
-
-Allow for defining the ldap filter used when searching for a user
-Variables supported:
-%u: username
-%U: username provided though http authentication
-
-One use of this would be to restrict access to only the user's belonging to
-a specific administrator like this:
-ldap_filter: (&(uid=%u)(manager=uid=%U,ou=admins,o=company,c=com))
-
-
-[2.1.9] SQL Options
-
-> sql_type: mysql
-
-The type of the database. Currenty dialup admin support mySQL ('mysql') 
-and PostgreSQL('pg')
-
-> sql_server: localhost
-> sql_port: 3306
-> sql_username: radius
-> sql_password: XXXXX
-
-Information regargind the SQL database such as hostname, port, 
-username and password to be used for connection
-
-NOTE: The default port for mySQL is 3306 while for PostgreSQL is 5432. 
-      The Username and password are ones set in the database. Creating a
-      new username is behond the scope of this documentation.
-
-> sql_database: radius
-
-The database where all our tables are stored. Read section 1.3.3
-
-> sql_accounting_table: radacct
-> sql_check_table: radcheck
-> sql_groupcheck_table: radgroupcheck
-> sql_groupreply_table: radgroupreply
-> sql_reply_table: radreply
-
-The above tables are the ones used also directly through FreeRadius. 
-The SQL file containing the way to create these tables are at 
-freeradius-x.x.x/src/modules/rlm_sql/drivers/rlm_sql_<DATABASE TYPE>/db_<DATABASE_TYPE>.sql
-
-For more information consult the documentation of FreeRadius
-
-> sql_badusers_table: badusers
-> sql_user_info_table: userinfo
-> sql_usergroup_table: usergroup
-> sql_total_accounting_table: totacct
-
-These are the tables created during section 1.3.3. 
-There shouldn't be any need to change those
-
-> sql_use_user_info_table: true
-> sql_use_operators: true
-
-Could be true or false
-
-> sql_default_user_profile: DEFAULT
-
-Set this to the value of the default_user_profile in your sql.conf if 
-that one is set. If it is not set leave blank or commented out
-
-> sql_password_attribute: User-Password
-
-The password attribute. Should be User-Password if encryption method 
-is clear (See section 2.1.6) or Crypt-Password if either md5 or des is choosed
-
-> sql_date_format: Y-m-d
-> sql_full_date_format: Y-m-d H:i:s
-
-The date format
-
-> sql_row_limit: 40
-
-The row limit used in the accounting page in order to limit the output
-
-> sql_connect_timeout: 3
-> sql_extra_servers: sql2.company.com sql3.company.com
-
-The above options are used by bin/log_badlogins (See Section 2.x.x)
-The sql_connect_timeout is also used by the mysql driver and the sql_extra_servers
-is also used when adding users in the badusers table
-
-> sql_debug: false
-
-Set to true to enable SQL debugging
-
-> sql_use_http_credentials: no
-
-If set to yes then the HTTP credentials (http authentication) will be used 
-to connect to the sql server instead of sql_username and sql_password. 
-That way multiple admins with different rights on the sql database can 
-connect through one dialup_admin interface.
-
-> sql_command: /usr/local/bin/mysql
-This variable is used by the scripts in the bin folder
-It should contain the path to the sql binary used to run
-sql commands (mysql is only supported for now)
-
-
-[2.1.10] Limits Timers
-
-> counter_default_daily: 14400
-> counter_default_weekly: 72000
-> counter_default_monthly: none
-
-The dialup limit displayed on the Dialup Admin. Set to none for no limit
-
-
-[2.1.11] Various Options
-
-
-> general_accounting_info_order: desc
-
-Can be either asc (older dates first) or desc (recent dates first)
-
-> general_stats_use_totacct: no
-
-Use the totacct table for statistics
-
-> general_use_session: yes
-
-Set it to yes to use sessions and cache the various mappings. You can also
-set use_session = 1 in config.php to also cache the admin.conf
-
-NOTE: Remember to use the 'Clear Cache' page if you use sessions and 
-      do any changes in any of the configuration files.
-
-> general_most_recent_fl: 30
-
-This is used by the failed logins page. It states the default back time
-in minutes.
-
-> general_prefered_lang: el
-> general_prefered_lang_name: Greek
-
-It can be default or whatever language. Only greek are supported from 
-non latin alphabet languages. These attribute only apply for ldap not for sql
-
-> general_charset: iso-8859-1
-
-The charset which will be added as a meta tag in all pages
-
-> general_decode_normal_attributes: no
-
-Uncomment this if normal attributes (not the ;lang-xx ones) in ldap 
-are utf8 encoded.
-
-
-[2.2] The bin/ scripts
-
-
-[2.2.1] The snmpfinger script
-
-This script make an snmp request to the nas server to retrieve 
-the online users directly from the NAS and is being used by dialup admin
-when general_finger_type: snmp is set (or the per nas equivelant
-directive). (See section 2.1.4). 
-
-You also must have installed the net-snmp package obtained at 
-http://www.net-snmp.org
-
-The snmpfinger script must be edited in order to point to the correct 
-snmpwalk binary. 
-
-Edit the line $SNMPWALK="/usr/local/bin/snmpwalk"; to represent the location 
-of snmpwalk binary
-
-Besides that the snmpfinger uses MIBs only for the CISCO XXXX NAS or for Lucent
-equipment (at least for the MAX 3000) which may not work if your NAS is different.
-
-However the snmpfinger is not actually required if your accounting 
-is working properly.
-
-[2.2.2] The log_badlogins script
-
-The log_badlogins scripts actually does a tail -f to the radius.log and
-intercepts any authentification failure and passes it to the database. 
-If you are interested in having the Failed Logins on the Dialup Admin 
-you should execute it once like this:
-
-bin/log_badlogins /var/log/radius/radius.log /usr/local/dialup_admin/conf/admin.conf& 
-
-Of cource the proper file locations must be set
-
-Also log_badlogins will concatenate the client shortname and the general_domain variable
-defined in admin.conf in order to find the nas ip address. So it is important to make sure
-that $client_shortname.$domain resolves to the correct nas ip address.
-regular expression matching is also supported. If the $regexp variable is set then
-only failed login lines matching the regular expression will be logged.
-
-[2.2.3] The clean_radacct script
-
-The clean_radacct script can be used to clear the database of stale open sessions
-(sessions for which an Accounting-Stop has not been received hence they remain open)
-The $back_days variable can be changed to specify how many days we should leave the
-sessions open before removing them. Make sure though that all your user sesions are
-short lived (no DSL users for example) before using the script. If that is not the
-case edit the sql query to only match short lived sessions (depending on the NAS-Port-Type
-for example).
-
-[2.2.4] The truncate_radacct script
-
-The truncate_radacct script can be used to delete all sessions which are older than a
-specified number of days. This number can be changed through the $back_days variable.
-The script will do a lock tables so make sure you run it during the night when the traffic
-is low. It will also only delete *closed* session, so the clean_radacct script should be
-used together to clear the possible open sessions.
-
-[2.2.4] The tot_stats script
-
-This script will log aggregated per user information in the totacct table. It will log a row
-per user, per day. It should be run *once* every day to create the corresponding entries in
-the totacct table. The general_stats_use_totacct configuration directive could then be set to
-yes in order for the statistics page to use the totacct table instead of the radacct table.
-
-[2.2.5] The monthly_tot_stats script
-
-This script can be used to aggregate the information from the totacct table into the mtotacct table
-creating aggregated accounting information for each spaning in one month period. If the current
-month has not ended it will log information up to the current month day. It should be run once
-a day to create the corresponding entries in the mtotacct table.
-
-
-[2.3] User Attributes
-
-First of all check conf/user_edit.atts and see if the attribute you are 
-interested in is commented out. If it is just enable it by uncommenting it.
-If the attribute is not included in the file add it. 
-
-If you use SQL check conf/sql.attrmap. Attributes that are not contained in this file
-are assumed to be reply items and map to the same name as the one used by dialup_admin
-
-If you use LDAP check ${freeradius_install_dir}/etc/raddb/ldap.attrmap 
-and check if the attribute is included in the attribute mapping. 
-
-If it is not then add it there also.Everything should work ok after that.
-
-[2.4] Finishing
-
-The above sections should propably have brought you to a working dialup admin.
-Note however that if you are interested in logging the failed logins
-(See section 2.3.2) you should execute the log_badlogins each time 
-the system starts.
-
-
-3. Troubleshooting
---------------------------
-
-[3.1] When I try to access some page I see the php code instead of html
-
-See section 1.3.2.1
-
-[3.2] When an attribute contains double (") or single (') quotes 
-      something goes wrong
-
-Make sure that magic quotes in PHP are turned off
-
-[3.3] Even though I have uncommented Dialup-Access in user_edits.attrs,
-      when editing a user, that field is not available...
-
-...Is this because in sql.attrmap
-I have:
-
-checkItem     Dialup-Access                   none
-
-What should the attribute be?
-
-Dialup-Access is an attribute used by the ldap module. It is not implemented in the sql module, that's why the mapping is set to none.
-You could set Auth-Type to Reject instead.
-
-[3.4] Why do the personal information fields show multiple entries for 
-      attributes like name, department, etc in the user_admin page?
-
-Set general_prefered_lang to en
-
-[3.5] After I make a few changes in one of the configuration files things
-      only work like they worked before
-
-If you are using sessions then remember to use the 'Clear Cache' page after
-making any changes. See Section 2.1.11
-
-[3.6] It is still not working
-
-Check that the register_globals in php.ini is set to on. As of PHP 4.2.0 
-this is set to off by default. The latest versions of dialup_admin will work
-even if register_globals is set to off if the php version is > 4.1.0 
-(Thanks to Evren Yurtesen <eyurtese@turkuamk.fi> for the suggestion).
-
-In latest versions you can also enable sql debug (sql_debug: true) 
-and ldap debug (ldap_debug: true)
-
-
-4. HOWTO Information
----------------------------------
-
-This document is distributed under the terms of the GPL (GNU Public License). 
-Paris Stamatopoulos <mobius@hack.gr> (main author)
-Kostas Kalevras <kkalev@noc.ntua.gr> (a few additions)
diff --git a/dialup_admin/doc/TODO b/dialup_admin/doc/TODO
deleted file mode 100644 (file)
index 90abd85..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-* Minimize database (ldap,mysql) connections.
-* Clean up html code to make it smaller
-* More messages
-* Multilanguage support for ldap attributes
-* Add language attributes in user_new.php
-* Finger facility. Should find a way to make it work with all nases. That will
-  mean that it should be made modular and fall back to simple queries to the
-  sql db if it cannot get user info from the nas server
-* Check out dbx library. It seems very promising for database independent code.
-  We 'll see where it goes.
-* Add billing and statistics pages. Billing is a must. The page should also create
-  reports which could be printed or sent by email to the users containing their billing
-  information. We also need more statistics pages with fancy bars and diagrams. Ideas
-  are welcome.
-* Parse the radius dictionary files so that we can show a pull down menu of possible values
-  for various attributes.
-* Also be able to keep username mappings in sql. Create an administration page
-* Improve sqlrelay support
-* Make the userinfo attributes configurable and create calculation formulas.Like:
-  Attribute-Name:DB-Attribute:Internal-Attribute:Initial-Value:Editable
-  Administrator:admin:admin:%U:No
diff --git a/dialup_admin/htdocs/about.html b/dialup_admin/htdocs/about.html
deleted file mode 100644 (file)
index 65172e8..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-<html>
-<head>
-<title>About page</title>
-<link rel="stylesheet" href="style.css">
-</head>
-<body>
-<center>
-<table border=0 width=550 cellpadding=0 cellspacing=0>
-<tr valign=top>
-<td align=center><img src="images/title2.gif"></td>
-</tr>
-</table>
-<table border=0 width=400 cellpadding=0 cellspacing=2></table>
-<br>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=400>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th><font color="white">dialup_admin About Page</font>&nbsp;</th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-<br>
-<center>
-<br>
-<b>A web based administration interface for the freeradius radius server<br>
-written in PHP4</b>
-<br><br>
-Copyright (C) 2001,2002 Kostas Kalevras
-<br><br><br>
-<pre>
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version
-2 of the License, or (at your option) any later version.
-</pre>
-<br>
-<i>Authors:<br>Kostas Kalevras (kkalev at noc.ntua.gr)<br>
-Basilis Pappas (vpappas at noc.ntua.gr)<br>
-Panagiotis Christias (christia at noc.ntua.gr)<br>
-Thanasis Duitsis (aduitsis at noc.ntua.gr)</i></font>
-</center>
-<br>
-</td></tr>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/accounting.php b/dialup_admin/htdocs/accounting.php
deleted file mode 100644 (file)
index 57a6897..0000000
+++ /dev/null
@@ -1,309 +0,0 @@
-<?php
-
-require('../conf/config.php');
-require('../lib/functions.php');
-require('../lib/sql/functions.php');
-require('../lib/acctshow.php');
-
-if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
-       include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
-else{
-       echo <<<EOM
-<html>
-<head>
-<title>Accounting Report Generator</title>
-<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
-<link rel="stylesheet" href="style.css">
-</head>
-<body>
-<center>
-<b>Could not include SQL library functions. Aborting</b>
-</body>
-</html>
-EOM;
-       exit();
-}
-
-$operators=array( '=','<', '>', '<=', '>=', '!=', 'regexp', 'like', 'not like' );
-if ($config[sql_type] == 'pg'){
-       $operators=array( '=','<', '>', '<=', '>=', '~', 'like', '~*', '~~*', '<<=' );
-}
-
-$link = @da_sql_pconnect ($config) or die('cannot connect to sql databse');
-$fields = @da_sql_list_fields($config[sql_accounting_table],$link,$config);
-$no_fields = @da_sql_num_fields($fields,$config);
-
-unset($items);
-
-for($i=0;$i<$no_fields;$i++){
-       $key = strtolower(@da_sql_field_name($fields,$i,$config));
-       $val = $sql_attrs[$key][desc];
-       if ($val == '')
-               continue;
-       $show = $sql_attrs[$key][show];
-       $selected[$key] = ($show == 'yes') ? 'selected' : '';
-       $items[$key] = "$val";
-}
-asort($items);
-
-class Qi {
-       var $name;
-       var $item;
-       var $_item;
-       var $operator;
-       var $type;
-       var $typestr;
-       var $value;
-       function Qi($name,$item,$operator) {
-                               $this->name=$name;
-                               $this->item=$item;
-                               $this->operator=$operator;
-       }
-
-       function show() {       global $operators;
-                               global $items;
-               $nam = $this->item;
-                       echo <<<EOM
-       <tr><td align=left>
-       <i>$items[$nam]</i>
-       <input type=hidden name="item_of_$this->name" value="$this->item">
-       </td><td align=left>
-       <select name=operator_of_$this->name>
-EOM;
-               foreach($operators as $operator){
-                       if($this->operator == $operator)
-                               $selected=" selected ";
-                       else
-                               $selected='';
-                       print("<option value=\"$operator\" $selected>$operator</option>\n");
-                }
-       echo <<<EOM
-       </select>
-       </td><td align=left>
-       <input name="value_of_$this->name" type=text value="$this->value">
-       </td><td align=left>
-       <input type=hidden name="delete_$this->name" value=0>
-       <input type=submit class=button size=5 value=del onclick="this.form.delete_$this->name.value=1">
-       </td></tr>
-EOM;
-       }
-
-       function get($designator) {     global ${"item_of_$designator"};
-                       global ${"value_of_$designator"};
-                       global ${"operator_of_$designator"};
-                       if(${"item_of_$designator"}){
-                               $this->value= ${"value_of_$designator"};
-                               $this->operator=${"operator_of_$designator"};
-                               $this->item=${"item_of_$designator"};
-                       }
-               }
-       function query(){
-               global $operators;
-               global $items;
-               return $items[$this->item]."  $this->operator  '$this->value'";
-       }
-}
-
-?>
-<html>
-<head>
-<title>Accounting Report Generator</title>
-<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $config[general_charset]?>">
-<link rel="stylesheet" href="style.css">
-</head>
-<body>
-
-<?php
-if(!$queryflag) {
-       echo <<<EOM
-<form method=post>
-<table border=0 width=740 cellpadding=1 cellspacing=1>
-<tr>
-<td>
-<b>Show the following attributes:</b><br>
-<select name="accounting_show_attrs[]" size=5 multiple>
-EOM;
-foreach($items as $key => $val)
-       echo <<<EOM
-<option $selected[$key] value="$key">$val</option>
-EOM;
-
-echo <<<EOM
-</select>
-<br><br>
-<b>Order by:</b><br>
-<select name="order_by">
-EOM;
-
-foreach($items as $key => $val)
-       if ($val == 'username')
-               echo <<<EOM
-       <option selected value="$key">$val</option>
-EOM;
-       else
-       echo <<<EOM
-<option value="$key">$val</option>
-EOM;
-
-echo <<<EOM
-</select>
-<br><br>
-<b>Max results returned:</b><br>
-<input name=maxresults value=$config[sql_row_limit] size=5>
-</td>
-<td valign=top>
-<input type=hidden name=add value=0>
-<table border=0 width=340 cellpadding=1 cellspacing=1>
-<tr><td>
-<b>Selection criteria:</b>
-</td></tr>
-<tr><td>
-<select name=item_name onchange="this.form.add.value=1;this.form.submit()">
-<option>--Attribute--</option>
-EOM;
-
-foreach($items as $key => $val)
-       print("<option value=\"$key\">$val</option>");
-
-echo <<<EOM
-</select>
-</td></tr>
-EOM;
-
-$number=1;
-$offset=0;
-while (${"item_of_w$number"}) {
-       if(${"delete_w$number"}==1) {$offset=1;$number++;}
-               else {
-               $designator=$number-$offset;
-               ${"w$designator"} = new Qi("w$designator","","");
-               ${"w$designator"}->get("w$number");
-               ${"w$designator"}->show();
-               $number++;
-               }
-       }
-if($add==1) {
-       ${"w$number"} = new Qi("w$number","$item_name","$operators[0]");
-       ${"w$number"}->show();
-       }
-echo <<<EOM
-</table>
-</td>
-<tr>
-<td>
-<input type=hidden name=queryflag value=0>
-<br><input type=submit class=button onclick="this.form.queryflag.value=1">
-</td>
-</tr>
-</table>
-</form>
-</body>
-</html>
-EOM;
-
-}
-
-if ($queryflag == 1){
-$i = 1;
-while (${"item_of_w$i"}){
-       $op_found = 0;
-       foreach ($operators as $operator){
-               if (${"operator_of_w$i"} == $operator){
-                       $op_found = 1;
-                       break;
-               }
-       }
-       if (!$op_found)
-               die("Operator passed is not valid. Exiting abnormaly.");
-       ${"item_of_w$i"} = preg_replace('/\s/','',${"item_of_w$i"});
-       ${"value_of_w$i"} = da_sql_escape_string(${"value_of_w$i"});
-       $where .= ($i == 1) ? ' WHERE ' . ${"item_of_w$i"} . ' ' . ${"operator_of_w$i"} . " '" . ${"value_of_w$i"} . "'" :
-                               ' AND ' . ${"item_of_w$i"} . ' ' . ${"operator_of_w$i"} . " '" . ${"value_of_w$i"} . "'" ;
-       $i++;
-}
-
-$order = ($order_by != '') ? "$order_by" : 'username';
-
-if (preg_match("/[\s;]/",$order))
-       die("ORDER BY pattern is illegal. Exiting abnornally.");
-
-if (!is_numeric($maxresults))
-       die("Max Results is not in numeric form. Exiting abnormally.");
-
-unset($query_view);
-foreach ($accounting_show_attrs as $val)
-       $query_view .= $val . ',';
-$query_view = preg_replace('/,$/','',$query_view);
-unset($sql_extra_query);
-if ($config[sql_accounting_extra_query] != '')
-       $sql_extra_query = xlat($config[sql_accounting_extra_query],$login,$config);
-       $sql_extra_query = da_sql_escape_string($sql_extra_query);
-$query="SELECT " . da_sql_limit($maxresults,0,$config) . " $query_view FROM $config[sql_accounting_table]
-       $where $sql_extra_query " . da_sql_limit($maxresults,1,$config) .
-       " ORDER BY $order " . da_sql_limit($maxresults,2,$config) . ";";
-
-echo <<<EOM
-<html>
-<head>
-<link rel="stylesheet" href="style.css">
-</head>
-<body>
-<br>
-<table border=0 width=940 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=740></td>
-<td bgcolor="black" width=200>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th>
-       <font color="white">Accounting Report Generator</font>&nbsp;
-       </th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-<p>
-       <table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
-       <tr bgcolor="#d0ddb0">
-       </tr>
-EOM;
-foreach($accounting_show_attrs as $val){
-       $desc = $sql_attrs[$val][desc];
-       echo "<th>$desc</th>\n";
-}
-echo "</tr>\n";
-
-       $search = @da_sql_query($link,$config,$query);
-       if ($search){
-               while( $row = @da_sql_fetch_array($search,$config) ){
-                       $num++;
-                       echo "<tr align=center>\n";
-                       foreach($accounting_show_attrs as $val){
-                               $info = $row[$val];
-                               if ($info == '')
-                                       $info = '-';
-                               $info = $sql_attrs[$val][func]($info);
-                               if ($val == 'username'){
-                                       $Info = urlencode($info);
-                                       $info = "<a href=\"user_admin.php?login=$Info\" title=\"Edit user $info\">$info<a/>";
-                               }
-                               echo <<<EOM
-                       <td>$info</td>
-EOM;
-                       }
-                       echo "</tr>\n";
-               }
-       }
-       else
-               echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
-echo <<<EOM
-       </table>
-       </td></tr>
-       </table>
-</td></tr>
-</table>
-</body>
-</html>
-EOM;
-}
-?>
diff --git a/dialup_admin/htdocs/badusers.php b/dialup_admin/htdocs/badusers.php
deleted file mode 100644 (file)
index d2e590e..0000000
+++ /dev/null
@@ -1,231 +0,0 @@
-<?php
-require('../conf/config.php');
-require('../lib/functions.php');
-?>
-<html>
-<?php
-
-if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
-       include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
-else{
-       echo <<<EOM
-<title>Unauthorized Service Usage History for $login</title>
-<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
-<link rel="stylesheet" href="style.css">
-</head>
-<body>
-<center>
-<b>Could not include SQL library functions. Aborting</b>
-</body>
-</html>
-EOM;
-       exit();
-}
-
-$now = time();
-$now_str = ($now_str != '') ? "$now_str" : date($config[sql_date_format],$now + 86400);
-$prev_str = ($prev_str != '') ? "$prev_str" : "0001-01-01 00:00:00";
-
-$now_str = da_sql_escape_string($now_str);
-$prev_str = da_sql_escape_string($prev_str);
-
-$num = 0;
-$pagesize = ($pagesize) ? $pagesize : 10;
-if (!is_numeric($pagesize) && $pagesize != 'all')
-       $pagesize = 10;
-$limit = ($pagesize == 'all') ? '' : "$pagesize";
-$selected[$pagesize] = 'selected';
-$login = ($login != '') ? $login : 'anyone';
-$usercheck = ($login == 'anyone') ? "LIKE '%'" : "= '$login'";
-$order = ($order != '') ? $order : $config[general_accounting_info_order];
-if ($order != 'desc' && $order != 'asc')
-       $order = 'desc';
-$selected[$order] = 'selected';
-
-echo <<<EOM
-<head>
-<title>Unauthorized Service Usage History for $login</title>
-<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
-<link rel="stylesheet" href="style.css">
-</head>
-<body>
-<center>
-<table border=0 width=550 cellpadding=0 cellspacing=0>
-<tr valign=top>
-<td align=center><img src="images/title2.gif"></td>
-</tr>
-</table>
-EOM;
-
-if ($login != 'anyone'){
-       echo <<<EOM
-<table border=0 width=400 cellpadding=0 cellspacing=2>
-EOM;
-
-include("../html/user_toolbar.html.php");
-
-print <<<EOM
-</table>
-EOM;
-}
-
-if ($do_delete == 1 && ($row_id != 0 && is_numeric($row_id))){
-$link = @da_sql_connect($config);
-if ($link){
-       $search = @da_sql_query($link,$config,
-       "SELECT id,admin FROM $config[sql_badusers_table]
-       WHERE id = '$row_id';");
-       if ($search){
-               $row = @da_sql_fetch_array($search,$config);
-               if ($row[id] == $row_id){
-                       $admin = "$row[admin]";
-                       if (($admin != '-' && $_SERVER["PHP_AUTH_USER"] == $admin) || $admin == '-'){
-                               $sql_servers = array();
-                               if ($config[sql_extra_servers] != '')
-                                       $sql_servers = explode(' ',$config[sql_extra_servers]);
-                               $sql_servers[] = $config[sql_server];
-                               foreach ($sql_servers as $server){
-                                       $link2 = @da_sql_host_connect($server,$config);
-                                       if ($link2){
-                                               $r = da_sql_query($link2,$config,
-                                               "DELETE FROM $config[sql_badusers_table]
-                                               WHERE id = '$row_id';");
-                                               if (!$r)
-                                                       echo "<b>SQL Error:" . da_sql_error($link2,$config) . "</b><br>\n";
-                                               @da_sql_close($link2,$config);
-                                       }
-                                       else
-                                               echo "<b>SQL Error: Could not connect to SQL database: $server</b><br>\n";
-                               }
-                       }
-               }
-       }
-       else
-               echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
-       @da_sql_close($link,$config);
-}
-else
-       echo "<b>Could not connect to SQL database</b><br>\n";
-}
-
-echo <<<EOM
-<br><br>
-<table border=0 width=740 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=55%></td>
-<td bgcolor="black" width=45%>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th>
-       <font color="white">Unauthorized Service Usage History for $login</font>&nbsp;
-       </th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-<b>$prev_str</b> up to <b>$now_str</b>
-<form action="badusers.php" method="get" name="master">
-<input type=hidden name=do_delete value=0>
-<input type=hidden name=row_id value=0>
-EOM;
-?>
-
-<p>
-       <table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
-       <tr bgcolor="#d0ddb0">
-       <th>#</th><th>user</th><th>date</th><th>admin</th><th>reason</th><th>administrator action</th>
-       </tr>
-
-<?php
-$auth_user = $_SERVER["PHP_AUTH_USER"];
-if ($config[general_restrict_badusers_access] == 'yes'){
-       $auth_user = da_sql_escape_string($auth_user);
-       $extra_query = "AND admin == '$auth_user'";
-}
-$link = @da_sql_pconnect($config);
-if ($link){
-       $search = @da_sql_query($link,$config,
-       "SELECT " . da_sql_limit($limit,0,$config) . " * FROM $config[sql_badusers_table]
-       WHERE username $usercheck $extra_query AND incidentdate <= '$now_str'
-       AND incidentdate >= '$prev_str' " . da_sql_limit($limit,1,$config) .
-       " ORDER BY incidentdate $order " . da_sql_limit($limit,2,$config) . " ;");
-       if ($search){
-               while( $row = @da_sql_fetch_array($search,$config) ){
-                       $num++;
-                       $id = $row[id];
-                       $user = "$row[username]";
-                       $User = urlencode($user);
-                       $date = "$row[incidentdate]";
-                       $reason = "$row[reason]";
-                       $admin = "$row[admin]";
-                       if ($admin == $auth_user || $admin == '-')
-       $action = "<td><input type=submit class=button value=\"Delete\" OnClick=\"this.form.do_delete.value=1;this.form.row_id.value=$id\"></td>";
-                       else
-                               $action = "<td>-</td>";
-                       if ($admin == '')
-                               $admin = '-';
-                       if ($reason == '')
-                               $reason = '-';
-                       echo <<<EOM
-                       <tr align=center>
-                               <td>$num</td>
-                               <td><a href="user_admin.php?login=$User" title="Edit user $user">$user</a></td>
-                               <td>$date</td>
-                               <td>$admin</td>
-                               <td>$reason</td>
-                               $action
-                       </tr>
-EOM;
-               }
-       }
-       else
-               echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
-}
-else
-       echo "<b>Could not connect to SQL database</b><br>\n";
-echo <<<EOM
-       </table>
-<tr><td>
-<hr>
-<tr><td align="center">
-       <table border=0>
-               <tr><td colspan=6></td>
-                       <td rowspan=3 valign="bottom">
-                               <small>
-                               the <b>from</b> date matches any login after the 00:00 that day,
-                               and the <b>to</b> date any login before the 23:59 that day.
-                               the default values shown are the <b>current week</b>.
-                       </td>
-               </tr>
-               <tr valign="bottom">
-                       <td><small><b>user</td><td><small><b>from date</td><td><small><b>to date</td><td><small><b>pagesize</td><td><b>order</td>
-&nbsp;</td>
-       <tr valign="middle"><td>
-<input type="text" name="login" size="11" value="$login"></td>
-<td><input type="text" name="prev_str" size="11" value="$prev_str"></td>
-<td><input type="text" name="now_str" size="11" value="$now_str"></td>
-<td><select name="pagesize">
-<option $selected[5] value="5" >05
-<option $selected[10] value="10">10
-<option $selected[15] value="15">15
-<option $selected[20] value="20">20
-<option $selected[40] value="40">40
-<option $selected[80] value="80">80
-<option $selected[all] value="all">all
-</select>
-</td>
-<td><select name="order">
-<option $selected[asc] value="asc">older first
-<option $selected[desc] value="desc">recent first
-</select>
-</td>
-EOM;
-?>
-
-<td><input type="submit" class=button value="show"></td></tr>
-</table></td></tr></form>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/buttons.php b/dialup_admin/htdocs/buttons.php
deleted file mode 100644 (file)
index 2d57c2c..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-$auth_user = $_SERVER["PHP_AUTH_USER"];
-if ($auth_user){
-       if (is_file("../html/buttons/$auth_user/buttons.html.php"))
-               include("../html/buttons/$auth_user/buttons.html.php");
-       else{
-               if (is_file("../html/buttons/default/buttons.html.php"))
-                       include("../html/buttons/default/buttons.html.php");
-       }
-}
-else{
-       if (is_file("../html/buttons/default/buttons.html.php"))
-               include("../html/buttons/default/buttons.html.php");
-}
-?>
diff --git a/dialup_admin/htdocs/clear_opensessions.php b/dialup_admin/htdocs/clear_opensessions.php
deleted file mode 100644 (file)
index 73955f5..0000000
+++ /dev/null
@@ -1,187 +0,0 @@
-<?php
-require('../conf/config.php');
-require_once('../lib/xlat.php');
-if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
-       include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
-else{
-       echo <<<EOM
-<title>Clear Open User Sessions for $login</title>
-<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
-<link rel="stylesheet" href="style.css">
-</head>
-<body>
-<center>
-<b>Could not include SQL library functions. Aborting</b>
-</body>
-</html>
-EOM;
-        exit();
-}
-
-echo <<<EOM
-<html>
-<head>
-<title>Clear Open User Sessions for $login</title>
-<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
-<link rel="stylesheet" href="style.css">
-</head>
-<body>
-<center>
-<table border=0 width=550 cellpadding=0 cellspacing=0>
-<tr valign=top>
-<td align=center><img src="images/title2.gif"></td>
-</tr>
-</table>
-
-<table border=0 width=400 cellpadding=0 cellspacing=2>
-EOM;
-
-include("../html/user_toolbar.html.php");
-
-$open_sessions = 0;
-
-$sql_extra_query = '';
-if ($config[sql_accounting_extra_query] != ''){
-       $sql_extra_query = xlat($config[sql_accounting_extra_query],$login,$config);
-       $sql_extra_query = da_sql_escape_string($sql_extra_query);
-}
-
-print <<<EOM
-</table>
-
-<br>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=200>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th>
-       <font color="white">Clear open sessions for $login</font>&nbsp;
-       </th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-EOM;
-
-if ($drop_conns == 1){
-       $method = 'snmp';
-       $nastype = 'cisco';
-       if ($config[general_sessionclear_method] != '')
-               $method = $config[general_sessionclear_method];
-       if ($config[general_nas_type] != '')
-               $nastype = $config[general_nas_type];
-       if ($config[general_ld_library_path] != '')
-               putenv("LD_LIBRARY_PATH=$config[general_ld_library_path]");
-       $nas_by_ip = array();
-       $meth_by_ip = array();
-       $nastype_by_ip = array();
-       foreach ($nas_list as $nas){
-               if ($nas[ip] != ''){
-                       $ip = $nas[ip];
-                       $nas_by_ip[$ip] = $nas[community];
-                       $meth_by_ip[$ip] = $nas[sessionclear_method];
-                       $nastype_by_ip[$ip] = $nas[nas_type];
-               }
-       }
-
-       $link = @da_sql_pconnect($config);
-       if ($link){
-               $search = @da_sql_query($link,$config,
-               "SELECT nasipaddress,acctsessionid FROM $config[sql_accounting_table]
-               WHERE username = '$login' AND acctstoptime IS NULL;");
-               if ($search){
-                       while($row = @da_sql_fetch_array($search,$config)){
-                               $sessionid = $row[acctsessionid];
-                               $sessionid = hexdec($sessionid);
-                               $nas = $row[nasipaddress];
-                               $port = $row[nasportid];
-                               $meth = $meth_by_ip[$nas];
-                               $nastype = ($nastype_by_ip[$nas] != '') ? $nastype_by_ip[$nas] : $nastype;
-                               $comm = $nas_by_ip[$nas];
-                               if ($meth == '')
-                                       $meth = $method;
-                               if ($meth == 'snmp' && $comm != '')
-                                       exec("$config[general_sessionclear_bin] $nas snmp $nastype $login $sessionid $comm");
-                               if ($meth == 'telnet')
-                                       exec("$config[general_sessionclear_bin] $nas telnet $nastype $login $sessionid $port");
-                       }
-               }
-               else
-                       echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
-       }
-       else
-               echo "<b>Could not connect to SQL database</b><br>\n";
-}
-if ($clear_sessions == 1){
-       $sql_servers = array();
-       if ($config[sql_extra_servers] != '')
-               $sql_servers = explode(' ',$config[sql_extra_servers]);
-       $quer = '= 0';
-       if ($config[sql_type] == 'pg')
-               $quer = 'IS NULL';
-       $sql_servers[] = $config[sql_server];
-       foreach ($sql_servers as $server){
-               $link = @da_sql_host_connect($server,$config);
-               if ($link){
-                       $res = @da_sql_query($link,$config,
-                       "DELETE FROM $config[sql_accounting_table]
-                       WHERE username='$login' AND acctstoptime $quer $sql_extra_query;");
-                       if ($res)
-                               echo "<b>Deleted open sessions from accounting table on server $server</b><br>\n";
-                       else
-                               echo "<b>Error deleting open sessions for user" . da_sql_error($link,$config) . "</b><br>\n";
-               }
-               else
-                       echo "<b>Could not connect to SQL database</b><br>\n";
-       }
-       echo <<<EOM
-</td></tr>
-</table>
-</tr>
-</table>
-</body>
-</html>
-EOM;
-       exit();
-}
-else{
-       $link = @da_sql_pconnect($config);
-       if ($link){
-               $search = @da_sql_query($link,$config,
-               "SELECT COUNT(*) AS counter FROM $config[sql_accounting_table]
-               WHERE username = '$login' AND acctstoptime IS NULL $sql_extra_query;");
-               if ($search){
-                       if ($row = @da_sql_fetch_array($search,$config))
-                               $open_sessions = $row[counter];
-               }
-               else
-                       echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
-       }
-       else
-               echo "<b>Could not connect to SQL database</b><br>\n";
-}
-?>
-   <form method=post>
-      <input type=hidden name=login value=<?php print $login ?>>
-      <input type=hidden name=clear_sessions value="0">
-       <table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
-<tr>
-<td align=center>
-User <?php echo $login; ?> has <i><?php echo $open_sessions; ?></i> open sessions<br><br>
-Are you sure you want to clear all open user sessions?
-</td>
-</tr>
-       </table>
-<br>
-<input type=submit class=button value="Yes Clear" OnClick="this.form.clear_sessions.value=1">
-<br><br>
-<input type=submit class=button value="Yes Drop Connections" OnClick="this.form.drop_conns.value=1">
-</form>
-</td></tr>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/content.html b/dialup_admin/htdocs/content.html
deleted file mode 100644 (file)
index 8e27e24..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<html>
-<head>
-<link rel="stylesheet" href="style.css">
-</head>
-<body>
-<center><img src="images/title2.gif">
-<br><font size=+1><br>
-<b>A web based administration interface for the freeradius radius server</b>
-<br><br>
-</font></center>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/failed_logins.php b/dialup_admin/htdocs/failed_logins.php
deleted file mode 100644 (file)
index 34ba2c0..0000000
+++ /dev/null
@@ -1,236 +0,0 @@
-<?php
-require('../conf/config.php');
-require('../lib/attrshow.php');
-require('../lib/sql/nas_list.php');
-require_once('../lib/xlat.php');
-?>
-<html>
-<?php
-
-if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
-       include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
-else{
-       echo <<<EOM
-<title>Failed logins</title>
-<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
-<link rel="stylesheet" href="style.css">
-</head>
-<body>
-<center>
-<b>Could not include SQL library functions. Aborting</b>
-</body>
-</html>
-EOM;
-       exit();
-}
-
-$now = time();
-if (!isset($last))
-       $last = ($config[general_most_recent_fl]) ? $config[general_most_recent_fl] : 5;
-if (!is_numeric($last))
-       $last = 5;
-$start = $now - ($last*60);
-$now_str = date($config[sql_full_date_format],$now);
-$prev_str = date($config[sql_full_date_format],$start);
-
-$now_str = da_sql_escape_string($now_str);
-$prev_str = da_sql_escape_string($prev_str);
-
-$pagesize = ($pagesize) ? $pagesize : 10;
-if (!is_numeric($pagesize) && $pagesize != 'all')
-       $pagesize = 10;
-$limit = ($pagesize == 'all') ? '' : "$pagesize";
-$selected[$pagesize] = 'selected';
-$order = ($order != '') ? $order : $config[general_accounting_info_order];
-if ($order != 'desc' && $order != 'asc')
-       $order = 'desc';
-$selected[$order] = 'selected';
-if ($callerid != ''){
-       $callerid = da_sql_escape_string($callerid);
-       $callerid_str = "AND callingstationid = '$callerid'";
-}
-if ($server != '' && $server != 'all'){
-       $server = da_sql_escape_string($server);
-       $server_str = "AND nasipaddress = '$server'";
-}
-
-unset($da_name_cache);
-if (isset($_SESSION['da_name_cache']))
-       $da_name_cache = $_SESSION['da_name_cache'];
-
-?>
-
-<head>
-<title>Failed Logins</title>
-<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $config[general_charset]?>">
-<link rel="stylesheet" href="style.css">
-</head>
-<body>
-<center>
-<table border=0 width=550 cellpadding=0 cellspacing=0>
-<tr valign=top>
-<td align=center><img src="images/title2.gif"></td>
-</tr>
-</table>
-<table border=0 width=400 cellpadding=0 cellspacing=2>
-</table>
-<br>
-<table border=0 width=840 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=65%></td>
-<td bgcolor="black" width=35%>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th>
-       <font color="white">Failed Logins</font>&nbsp;
-       </th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-<?php
-echo <<<EOM
-<b>$prev_str</b> up to <b>$now_str</b>
-EOM;
-?>
-
-<p>
-       <table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
-       <tr bgcolor="#d0ddb0">
-       <th>#</th><th>login</th>
-<?php
-if ($acct_attrs['fl'][2] != '') echo "<th>" . $acct_attrs['fl'][2] . "</th>\n";
-if ($acct_attrs['fl'][7] != '') echo "<th>" . $acct_attrs['fl'][7] . "</th>\n";
-if ($acct_attrs['fl'][8] != '') echo "<th>" . $acct_attrs['fl'][8] . "</th>\n";
-if ($acct_attrs['fl'][9] != '') echo "<th>" . $acct_attrs['fl'][9] . "</th>\n";
-unset($sql_extra_query);
-if ($config[sql_accounting_extra_query] != ''){
-       $sql_extra_query = xlat($config[sql_accounting_extra_query],$login,$config);
-       $sql_extra_query = da_sql_escape_string($sql_extra_query);
-}
-?>
-       </tr>
-
-<?php
-$link = @da_sql_pconnect($config);
-if ($link){
-       $search = @da_sql_query($link,$config,
-       "SELECT " . da_sql_limit($limit,0,$config) . " acctstoptime,username,nasipaddress,nasportid,acctterminatecause,callingstationid
-       FROM $config[sql_accounting_table]
-       WHERE acctstoptime <= '$now_str' AND acctstoptime >= '$prev_str'
-       AND (acctterminatecause LIKE 'Login-Incorrect%' OR
-       acctterminatecause LIKE 'Invalid-User%' OR
-       acctterminatecause LIKE 'Multiple-Logins%') $callerid_str $server_str $sql_extra_query " . da_sql_limit($limit,1,$config) .
-       " ORDER BY acctstoptime $order " . da_sql_limit($limit,2,$config) . " ;");
-       if ($search){
-               while( $row = @da_sql_fetch_array($search,$config) ){
-                       $num++;
-                       $acct_login = $row[username];
-                       if ($acct_login == '')
-                               $acct_login = '-';
-                       else
-                               $acct_login = "<a href=\"user_admin.php?login=$acct_login\" title=\"Edit user $acct_login\">$acct_login</a>";
-                       $acct_time = $row[acctstoptime];
-                       $acct_server = $row[nasipaddress];
-                       if ($acct_server != ''){
-                               $acct_server = $da_name_cache[$acct_server];
-                               if (!isset($acct_server)){
-                                       $acct_server = $row[nasipaddress];
-                                       $acct_server = @gethostbyaddr($acct_server);
-                                       if (!isset($da_name_cache) && $config[general_use_session] == 'yes'){
-                                               $da_name_cache[$row[nasipaddress]] = $acct_server;
-                                               session_register('da_name_cache');
-                                       }
-                                       else
-                                               $da_name_cache[$row[nasipaddress]] = $acct_server;
-                               }
-                       }
-                       else
-                               $acct_server = '-';
-                       $acct_server = "$acct_server:$row[nasportid]";
-                       $acct_terminate_cause = "$row[acctterminatecause]";
-                       if ($acct_terminate_cause == '')
-                               $acct_terminate_cause = '-';
-                       $acct_callerid = "$row[callingstationid]";
-                       if ($acct_callerid == '')
-                               $acct_callerid = '-';
-                       echo <<<EOM
-                       <tr align=center bgcolor="white">
-                               <td>$num</td>
-                               <td>$acct_login</td>
-EOM;
-                               if ($acct_attrs['fl'][2] != '') echo "<td>$acct_time</td>\n";
-                               if ($acct_attrs['fl'][2] != '') echo "<td>$acct_server</td>\n";
-                               if ($acct_attrs['fl'][2] != '') echo "<td>$acct_terminate_cause</td>\n";
-                               if ($acct_attrs['fl'][2] != '') echo "<td>$acct_callerid</td>\n";
-                               echo "</tr>\n";
-               }
-       }
-       else
-               echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
-}
-else
-       echo "<b>Could not connect to SQL database</b><br>\n";
-echo <<<EOM
-       </table>
-<tr><td>
-<hr>
-<tr><td align="left">
-       <form action="failed_logins.php" method="get" name="master">
-       <table border=0>
-               <tr valign="bottom">
-                       <td><small><b>time back (mins)</td><td><small><b>pagesize</td><td><small><b>caller id</td><td><b>order</td>
-       <tr valign="middle"><td>
-<input type="text" name="last" size="11" value="$last"></td>
-<td><select name="pagesize">
-<option $selected[5] value="5" >05
-<option $selected[10] value="10">10
-<option $selected[15] value="15">15
-<option $selected[20] value="20">20
-<option $selected[40] value="40">40
-<option $selected[80] value="80">80
-<option $selected[all] value="all">all
-</select>
-</td>
-<td>
-<input type="text" name="callerid" size="11" value="$callerid"></td>
-<td><select name="order">
-<option $selected[asc] value="asc">older first
-<option $selected[desc] value="desc">recent first
-</select>
-</td>
-EOM;
-?>
-
-<td><input type="submit" class=button value="show"></td></tr>
-<tr><td>
-<b>On Access Server:</b>
-</td></tr><tr><td>
-<select name="server">
-<?php
-foreach ($nas_list as $nas){
-       $name = $nas[name];
-       if ($nas[ip] == '')
-               continue;
-       $servers[$name] = $nas[ip];
-}
-ksort($servers);
-foreach ($servers as $name => $ip){
-       if ($server == $ip)
-               echo "<option selected value=\"$ip\">$name\n";
-       else
-               echo "<option value=\"$ip\">$name\n";
-}
-if ($server == '' || $server == 'all')
-       echo "<option selected value=\"all\">all\n";
-else
-       echo "<option value=\"all\">all\n";
-?>
-</select>
-</td></tr>
-</table></td></tr></form>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/find.php b/dialup_admin/htdocs/find.php
deleted file mode 100644 (file)
index 2ce6565..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-<?php
-require('../conf/config.php');
-$selected[$search_IN] = 'selected';
-$selected[$radius_attr] = 'selected';
-$max = ($max_results) ? $max_results : 40;
-?>
-<html>
-<head>
-<title>Find User Page</title>
-<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $config[general_charset]?>">
-<link rel="stylesheet" href="style.css">
-</head>
-<body>
-<center>
-<table border=0 width=550 cellpadding=0 cellspacing=0>
-<tr valign=top>
-<td align=center><img src="images/title2.gif"></td>
-</tr>
-</table>
-<table border=0 width=400 cellpadding=0 cellspacing=2>
-</table>
-<br>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=200>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th>
-       <font color="white">Find User Page</font>&nbsp;
-       </th></tr>
-       </table>
-</td></tr>
-<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 ($find_user == 1){
-       unset($found_users);
-       if (is_file("../lib/$config[general_lib_type]/find.php"))
-               include("../lib/$config[general_lib_type]/find.php");
-       if (isset($found_users)){
-               $num = 0;
-               $msg .= <<<EOM
-<p>
-        <table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
-        <tr bgcolor="#d0ddb0">
-        <th>#</th><th>user</th>
-        </tr>
-EOM;
-               foreach ($found_users as $user){
-                       if ($user == '')
-                               $user = '-';
-                       $User = urlencode($user);
-                       $num++;
-                       $msg .= <<<EOM
-                       <tr align=center>
-                               <td>$num</td>
-                               <td><a href="user_admin.php?login=$User" title="Edit user $user">$user</a></td>
-                       </tr>
-EOM;
-               }
-               $msg .= "</table>\n";
-       }
-       else
-               $msg = "<b>No users found</b><br>\n";
-}
-?>
-   <form method=post>
-      <input type=hidden name=find_user value="0">
-       <table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
-<tr>
-<td align=right bgcolor="#d0ddb0">
-Search Criteria
-</td>
-<td>
-
-<?php
-echo <<<EOM
-<select name="search_IN" editable onChange="this.form.submit();">
-<option $selected[username] value="username">User Name
-<option $selected[name]  value="name">User Full Name
-<option $selected[department] value="department">User Department
-<option $selected[radius] value="radius">User Radius Attribute
-EOM;
-?>
-
-</select>
-</td>
-</tr>
-<?php
-if ($search_IN == 'radius'){
-       require('../lib/attrshow.php');
-       echo <<<EOM
-<tr>
-<td align=right bgcolor="#d0ddb0">
-RADIUS Attribute
-</td>
-<td>
-<select name="radius_attr" editable>
-EOM;
-       foreach($show_attrs as $key => $desc)
-               echo "<option $selected[$key] value=\"$key\">$desc\n";
-       echo <<<EOM
-</select>
-</td>
-</tr>
-EOM;
-}
-?>
-<tr>
-<td align=right bgcolor="#d0ddb0">
-Criteria Contains
-</td>
-<td>
-<input type=text name="search" value="<?php echo $search ?>" size=25>
-</td>
-</tr>
-<tr>
-<td align=right bgcolor="#d0ddb0">
-Max Results
-</td>
-<td>
-<input type=text name="max_results" value="<?php echo $max ?>" size=25>
-</td>
-</tr>
-       </table>
-<br>
-<input type=submit class=button value="Find User" OnClick="this.form.find_user.value=1">
-</form>
-<?php
-if ($find_user == 1){
-       echo <<<EOM
-<br>
-$msg
-EOM;
-}
-?>
-       </td></tr>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/group_admin.php b/dialup_admin/htdocs/group_admin.php
deleted file mode 100644 (file)
index 3414675..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-<?php
-require('../conf/config.php');
-if ($show == 1 && isset($del_members)){
-        header("Location: user_admin.php?login=$del_members[0]");
-        exit;
-}
-if ($config[general_lib_type] != 'sql'){
-       echo <<<EOM
-<title>Group Administration Page</title>
-<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
-<link rel="stylesheet" href="style.css">
-</head>
-<body>
-<center>
-<b>This page is only available if you are using sql as general library type</b>
-</body>
-</html>
-EOM;
-       exit();
-}
-
-unset($group_members);
-if (is_file("../lib/$config[general_lib_type]/group_info.php")){
-       include("../lib/$config[general_lib_type]/group_info.php");
-       if ($group_exists == 'no'){
-               echo <<<EOM
-<title>Group Administration Page</title>
-<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
-<link rel="stylesheet" href="style.css">
-</head>
-<body>
-<center>
-<form action="group_admin.php" method=get>
-<b>Group Name&nbsp;&nbsp;</b>
-<input type="text" size=10 name="login" value="$login">
-<b>&nbsp;&nbsp;does not exist</b><br>
-<input type=submit class=button value="Show Group">
-</body>
-</html>
-EOM;
-                exit();
-        }
-}
-?>
-
-<html>
-<head>
-<title>Group Administration Page</title>
-<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $config[general_charset]?>">
-<link rel="stylesheet" href="style.css">
-</head>
-<body>
-<center>
-<table border=0 width=550 cellpadding=0 cellspacing=0>
-<tr valign=top>
-<td align=center><img src="images/title2.gif"></td>
-</tr>
-</table>
-<table border=0 width=400 cellpadding=0 cellspacing=2>
-
-<?php
-include("../html/group_toolbar.html.php");
-?>
-
-</table>
-<br>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=200>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th>
-       <font color="white">Group <?php echo $login ?> Administration</font>&nbsp;
-       </th></tr>
-       </table>
-</td></tr>
-<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 ($do_changes == 1){
-       if (is_file("../lib/$config[general_lib_type]/group_admin.php"))
-               include("../lib/$config[general_lib_type]/group_admin.php");
-       if (is_file("../lib/$config[general_lib_type]/group_info.php"))
-               include("../lib/$config[general_lib_type]/group_info.php");
-}
-?>
-
-
-   <form method=post>
-      <input type=hidden name=login value="<?php echo $login ?>">
-      <input type=hidden name=do_changes value=0>
-      <input type=hidden name=show value=0>
-       <table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
-<tr>
-<td align=right bgcolor="#d0ddb0">
-Group Members (Check to Delete)
-</td>
-<td>
-<select name=del_members[] multiple size=5>
-<?php
-foreach ($group_members as $member){
-       echo "<option value=\"$member\">$member\n";
-}
-?>
-</select>
-</td>
-</tr>
-<tr>
-<td align=right bgcolor="#d0ddb0">
-New Group Member(s)<br>Separate group members<br> by whitespace or newline
-</td>
-<td>
-<textarea name=new_members cols="15" wrap="PHYSICAL" rows=5></textarea>
-</td>
-</tr>
-       </table>
-<br>
-<input type=submit class=button value="Commit Changes" OnClick="this.form.do_changes.value=1">
-<br><br>
-<input type=submit class=button value="Administer selected user" OnClick="this.form.show.value=1">
-</form>
-</td></tr>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/group_new.php b/dialup_admin/htdocs/group_new.php
deleted file mode 100644 (file)
index b870341..0000000
+++ /dev/null
@@ -1,173 +0,0 @@
-<?php
-require('../conf/config.php');
-if ($show == 1){
-       header("Location: group_admin.php?login=$login");
-       exit;
-}
-
-if ($config[general_lib_type] != 'sql'){
-       echo <<<EOM
-<title>New group creation page</title>
-<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
-<link rel="stylesheet" href="style.css">
-</head>
-<body>
-<center>
-<b>This page is only available if you are using sql as general library type</b>
-</body>
-</html>
-EOM;
-        exit();
-}
-
-require('../lib/attrshow.php');
-require('../lib/defaults.php');
-require("../lib/$config[general_lib_type]/group_info.php");
-
-if ($config[general_lib_type] == 'sql' && $config[sql_use_operators] == 'true'){
-       $colspan=2;
-       $show_ops=1;
-}else{
-       $show_ops = 0;
-       $colspan=1;
-}
-
-?>
-
-<html>
-<head>
-<title>New group creation page</title>
-<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $config[general_charset]?>">
-<link rel="stylesheet" href="style.css">
-</head>
-<body>
-<center>
-<table border=0 width=550 cellpadding=0 cellspacing=0>
-<tr valign=top>
-<td align=center><img src="images/title2.gif"></td>
-</tr>
-</table>
-
-<br>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=200>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th>
-       <font color="white">Preferences for new group</font>&nbsp;
-       </th></tr>
-       </table>
-</td></tr>
-<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.php"))
-       include("../lib/$config[general_lib_type]/group_info.php");
-if ($create == 1){
-       if ($group_exists != "no"){
-               echo <<<EOM
-<b>The group <i>$login</i> already exists in the group database</b>
-EOM;
-       }
-       else{
-               if (is_file("../lib/$config[general_lib_type]/create_group.php"))
-                       include("../lib/$config[general_lib_type]/create_group.php");
-               if (is_file("../lib/$config[general_lib_type]/group_info.php"))
-                       include("../lib/$config[general_lib_type]/group_info.php");
-       }
-}
-?>
-   <form method=post>
-      <input type=hidden name=create value="0">
-      <input type=hidden name=show value="0">
-       <table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
-<?php
-       echo <<<EOM
-       <tr>
-               <td align=right colspan=$colspan bgcolor="#d0ddb0">
-               Available Groups
-               </td><td>
-EOM;
-               if (!isset($existing_groups))
-                       echo "<b>No groups available</b>\n";
-               else{
-                       echo "<select name=\"existing_groups\">\n";
-                       foreach ($existing_groups as $group => $count)
-                               echo "<option value=\"$group\">$group\n";
-                       echo "</select>\n";
-               }
-       echo <<<EOM
-               </td>
-       </tr>
-       <tr>
-               <td align=right colspan=$colspan bgcolor="#d0ddb0">
-               Group name
-               </td><td>
-               <input type=text name="login" value="$login" size=35>
-               </td>
-       </tr>
-       <tr>
-               <td align=right colspan=$colspan bgcolor="#d0ddb0">
-               First member(s)<br>Separate group members<br> by whitespace or newline
-               </td><td>
-               <textarea name=members cols="15" wrap="PHYSICAL" rows=5></textarea>
-               </td>
-       </tr>
-
-EOM;
-       foreach($show_attrs as $key => $desc){
-               $name = $attrmap["$key"];
-               if ($name == 'none')
-                       continue;
-               $oper_name = $name . '_op';
-               $val = ($item_vals["$key"][0] != "") ? $item_vals["$key"][0] : $default_vals["$key"][0];
-               print <<<EOM
-<tr>
-<td align=right bgcolor="#d0ddb0">
-$desc
-</td>
-EOM;
-
-               if ($show_ops)
-                       print <<<EOM
-<td>
-<select name=$oper_name>
-<option selected value="=">=
-<option value=":=">:=
-<option value="+=">+=
-<option value="==">==
-<option value="!=">!=
-<option value=">">&gt;
-<option value=">=">&gt;=
-<option value="<">&lt;
-<option value="<=">&lt;=
-<option value="=~">=~
-<option value="!~">!~
-
-</select>
-</td>
-EOM;
-
-               print <<<EOM
-<td>
-<input type=text name="$name" value="$val" size=35>
-</td>
-</tr>
-EOM;
-       }
-?>
-       </table>
-<br>
-<input type=submit class=button value="Create" OnClick="this.form.create.value=1">
-<br><br>
-<input type=submit class=button value="Show Group" OnClick="this.form.show.value=1">
-</form>
-       </td></tr>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/help/auth_type_help.html b/dialup_admin/htdocs/help/auth_type_help.html
deleted file mode 100644 (file)
index c3a1660..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-<html>
-<head>
-<title>Auth-Type Help Page</title>
-<link rel="stylesheet" href="../style.css">
-</head>
-<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
-<center>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=400>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th><font color="white">Auth-Type Help Page</font>&nbsp;</th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-<br>
-<center>
-<pre>
-Value: String
-</pre>
-<pre>
-The Auth-Type attribute describes which authentication module to call.
-Standard values from a default FreeRADIUS setup my be:
-</pre>
-<i>PAP</i><br>
-<i>CHAP</i><br>
-<i>MSCHAP</i><br>
-<i>PAM</i><br>
-<i>UNIX</i><br>
-<i>LADP</i><br>
-<i>EAP</i><br>
-</td></tr>
-<tr><td align=center>
-<a href="javascript:window.close();"><b>Close Window</b></a>
-</td></tr>
-</center>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/help/badusers_help.html b/dialup_admin/htdocs/help/badusers_help.html
deleted file mode 100644 (file)
index eb64ebe..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<html>
-<head>
-<title>BADUSERS Help Page</title>
-<link rel="stylesheet" href="../style.css">
-</head>
-<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
-<center>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=400>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th><font color="white">Expiration Help Page</font>&nbsp;</th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-<br>
-<center>
-<pre>
-The badusers table can be used to keep a history of unauthorized actions by
-certain users.
-To add a user to the badusers table you first have to insert a descriptive text
-in the 'Lock Message' attribute
-</pre>
-</td></tr>
-<tr><td align=center>
-<a href="javascript:window.close();"><b>Close Window</b></a>
-</td></tr>
-</center>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/help/callback_id_help.html b/dialup_admin/htdocs/help/callback_id_help.html
deleted file mode 100644 (file)
index 0f5c81b..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<html>
-<head>
-<title>Callback-ID Help Page</title>
-<link rel="stylesheet" href="../style.css">
-</head>
-<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
-<center>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=400>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th><font color="white">Callback-ID Help Page</font>&nbsp;</th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-<br>
-<center>
-<pre>
-  Attribute Number: 20
-  Value: String
-</pre>
-<br>
-<pre>
-  This attribute is used when a RADIUS implementation is set up to
-  return a user's call. This is commonly used in corporate situations
-  to avoid long-distance charges in hotel rooms and other remote
-  locations. This value, A STRING, is often the identifier for a
-  profile configured on the service equipment; there is no specific
-  standrad for a string name, a triggered action, or something else.
-  In other words, it is environment specific. RADIUS client gear is
-  allowed to reject a connection if this attribute is present but
-  not supported by the gear.
-</pre>
-</td></tr>
-<tr><td align=center>
-<a href="javascript:window.close();"><b>Close Window</b></a>
-</td></tr>
-</center>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/help/callback_number_help.html b/dialup_admin/htdocs/help/callback_number_help.html
deleted file mode 100644 (file)
index 2148210..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-<html>
-<head>
-<title>Callback-Number Help Page</title>
-<link rel="stylesheet" href="../style.css">
-</head>
-<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
-<center>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=400>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th><font color="white">Callback-Number Help Page</font>&nbsp;</th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-<br>
-<center>
-<pre>
-  Attribute Number: 19
-  Value: String
-</pre>
-<br>
-<pre>
-  The value of this attribute is the number to which the RADIUS client
-  gear should return a call to the authenticating user. Depending on
-  what packet this attribute is found in, different actions may be
-  configured. For instance, if <i>Callback-Number</i> is found in an
-  <i>Access Request</i> packet, the implementation may assume that the
-  end user is requesting callback service. If the attribute is found
-  in the <i>Access Accept</i> packet, it can mean everything that the
-  administrator configuring the gear wants it to mean. In fact, in
-  some cases, <i>Callback-ID</i> and <i>Callback-Number</i> will <i>not</i> be found
-  together in one packet.
-</pre>
-</td></tr>
-<tr><td align=center>
-<a href="javascript:window.close();"><b>Close Window</b></a>
-</td></tr>
-</center>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/help/class_help.html b/dialup_admin/htdocs/help/class_help.html
deleted file mode 100644 (file)
index 830ad93..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-<html>
-<head>
-<title>Class Help Page</title>
-<link rel="stylesheet" href="../style.css">
-</head>
-<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
-<center>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=400>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th><font color="white">Class Help Page</font>&nbsp;</th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-<br>
-<center>
-<pre>
-Attribute Number: 25
-Value: String
-</pre>
-<br>
-<pre>
-The Class attribute mainly exists to funnel identification and
-property information to the accounting systems of RADIUS
-implementations.<br>
-From RFC2865:<br>"This Attribute is available to be sent by the server to the client
-in an Access-Accept and SHOULD be sent unmodified by the client to
-the accounting server as part of the Accounting-Request packet if
-accounting is supported.  The client MUST NOT interpret the
-attribute locally."
-</pre>
-</td></tr>
-<tr><td align=center>
-<a href="javascript:window.close();"><b>Close Window</b></a>
-</td></tr>
-</center>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/help/dialup_access_help.html b/dialup_admin/htdocs/help/dialup_access_help.html
deleted file mode 100644 (file)
index 164b542..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<html>
-<head>
-<title>Dialup Access Help Page</title>
-<link rel="stylesheet" href="../style.css">
-</head>
-<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
-<center>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=400>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th><font color="white">Dialup Access Help Page</font>&nbsp;</th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-<br>
-<center>
-<pre>
-  If the Dialup-Access attribute is specified, the ldap module
-  checks for its existance in user object. If it exists and is
-  set to FALSE, user is denied remote access. Otherwise, the user
-  is allowed remote access.
-</pre>
-</td></tr>
-<tr><td align=center>
-<a href="javascript:window.close();"><b>Close Window</b></a>
-</td></tr>
-</center>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/help/expiration_help.html b/dialup_admin/htdocs/help/expiration_help.html
deleted file mode 100644 (file)
index 2dfe030..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<html>
-<head>
-<title>Expiration Help Page</title>
-<link rel="stylesheet" href="../style.css">
-</head>
-<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
-<center>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=400>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th><font color="white">Expiration Help Page</font>&nbsp;</th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-<br>
-<center>
-<pre>
-  This attribute can be used to set the user expiration date. It
-  should be in the format "$month_day $month_name $year" like:
-  "20 May 2002"
-</pre>
-</td></tr>
-<tr><td align=center>
-<a href="javascript:window.close();"><b>Close Window</b></a>
-</td></tr>
-</center>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/help/filter_id_help.html b/dialup_admin/htdocs/help/filter_id_help.html
deleted file mode 100644 (file)
index 3f51982..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-<html>
-<head>
-<title>Framed-Id Help Page</title>
-<link rel="stylesheet" href="../style.css">
-</head>
-<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
-<center>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=400>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th><font color="white">Filter-Id Help Page</font>&nbsp;</th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-<br>
-<center>
-<pre>
-  This Attribute indicates the name of the filter list for this
-  user. Zero or more Filter-Id attributes MAY be sent in an
-  Access-Accept packet.
-
-  Identifying a filter list by name allows the filter to be used on
-  different NASes without regard to filter-list implementation
-  details.  
-</td></tr>
-<tr><td align=center>
-<a href="javascript:window.close();"><b>Close Window</b></a>
-</td></tr>
-</center>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/help/framed_compression_help.html b/dialup_admin/htdocs/help/framed_compression_help.html
deleted file mode 100644 (file)
index 07dc7c3..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-<html>
-<head>
-<title>Framed Compression Help Page</title>
-<link rel="stylesheet" href="../style.css">
-</head>
-<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
-<center>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=400>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th><font color="white">Framed Compression Help Page</font>&nbsp;</th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-<br>
-<center>
-<pre>
-  Framed-Compression indicates a compression protocol to be used for the link.
-  Possible values are:
-</pre>
-  <i>None</i><br>
-  <i>Van-Jacobson-TCP-IP</i><br>
-  <i>IPX-Header-Compression</i><br>
-  <i>Stac-LZS</i><br>
-</td></tr>
-<tr><td align=center>
-<a href="javascript:window.close();"><b>Close Window</b></a>
-</td></tr>
-</center>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/help/framed_ip_address_help.html b/dialup_admin/htdocs/help/framed_ip_address_help.html
deleted file mode 100644 (file)
index 6002cf4..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-<html>
-<head>
-<title>Framed-IP-Address Help Page</title>
-<link rel="stylesheet" href="../style.css">
-</head>
-<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
-<center>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=400>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th><font color="white">Framed-IP-Address Help Page</font>&nbsp;</th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-<br>
-<center>
-<pre>
-  Framed-IP-Address can be used to specify the IP address that
-  a dialup user will use. There are two special values:
-</pre>
-<i>255.255.255.255: Assign the user requested IP</i><br>
-<i>255.255.255.254: Assign an IP from the NAS IP pool</i><br>
-<pre>
-  All other values will be assigned as they are to the user dialup
-  interface
-</pre>
-</td></tr>
-<tr><td align=center>
-<a href="javascript:window.close();"><b>Close Window</b></a>
-</td></tr>
-</center>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/help/framed_ip_netmask_help.html b/dialup_admin/htdocs/help/framed_ip_netmask_help.html
deleted file mode 100644 (file)
index bb231e2..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-<html>
-<head>
-<title>Framed-IP-Netmask Help Page</title>
-<link rel="stylesheet" href="../style.css">
-</head>
-<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
-<center>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=400>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th><font color="white">Framed-IP-Netmask Help Page</font>&nbsp;</th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-<br>
-<center>
-<pre>
-Attribute Number: 9
-Value: IPADDR
-</pre>
-<pre>
-This attribute can be used to assign a specific netmask to
-a connection.
-</pre>
-</td></tr>
-<tr><td align=center>
-<a href="javascript:window.close();"><b>Close Window</b></a>
-</td></tr>
-</center>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/help/framed_mtu_help.html b/dialup_admin/htdocs/help/framed_mtu_help.html
deleted file mode 100644 (file)
index f7982a3..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-<html>
-<head>
-<title>Framed-MTU Help Page</title>
-<link rel="stylesheet" href="../style.css">
-</head>
-<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
-<center>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=400>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th><font color="white">Framed-MTU Help Page</font>&nbsp;</th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-<br>
-<center>
-<pre>
-Attribute Numer: 12
-Value: Integer
-</pre>
-<pre>
-MTU, the Maximum Transfer Unit, is the largest
-packet size that can be transmitted over a connection.<br>
-The value can be between 64 and 65535.
-</pre>
-</td></tr>
-<tr><td align=center>
-<a href="javascript:window.close();"><b>Close Window</b></a>
-</td></tr>
-</center>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/help/framed_protocol_help.html b/dialup_admin/htdocs/help/framed_protocol_help.html
deleted file mode 100644 (file)
index 92b3ae8..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-<html>
-<head>
-<title>Framed Protocol Help Page</title>
-<link rel="stylesheet" href="../style.css">
-</head>
-<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
-<center>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=400>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th><font color="white">Framed Protocol Help Page</font>&nbsp;</th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-<br>
-<center>
-<pre>
-  This Attribute indicates the framing to be used for framed access.
-  It MAY be used in both Access-Request and Access-Accept packets.
-
-  Possible values are:
-</pre>
-  <i>1 PPP</i><br>
-  <i>2 SLIP</i><br>
-  <i>3 AppleTalk Remote Access Protocol (ARAP)</i><br>
-  <i>4 Gandalf proprietary SingleLink/Multilink protocol</i><br>
-  <i>5 Xylogics proprietary IPX/SLIP</i><br>
-  <i>6 X.75 Synchronous</i><br>
-</td></tr>
-<tr><td align=center>
-<a href="javascript:window.close();"><b>Close Window</b></a>
-</td></tr>
-</center>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/help/help.php b/dialup_admin/htdocs/help/help.php
deleted file mode 100644 (file)
index 725797f..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-<html>
-<head>
-<title>Help page</title>
-<link rel="stylesheet" href="../style.css">
-</head>
-<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
-<center>
-<table border=0 width=550 cellpadding=0 cellspacing=0>
-<tr valign=top>
-<td align=center><img src="../images/title2.gif"></td>
-</tr>
-</table>
-
-<table border=0 width=400 cellpadding=0 cellspacing=2></table>
-
-<br>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=540></td>
-<td bgcolor="black" width=400>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th><font color="white">dialup_admin help page</font>&nbsp;</th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-<br>
-
-<b>Please choose which file you wish to read:</b><br><br>
-<form name="readhelp" method=post>
-<select name=help_file>
-<?php
-$selected[$help_file] = 'selected';
-
-echo <<<EOM
-<option $selected[readme] value="readme">README File
-<option $selected[howto] value="howto">HOWTO File
-<option $selected[faq] value="faq">FAQ File
-EOM;
-?>
-</select>
-<br><br>
-<input type=submit class=button value="Read File">
-</form>
-
-<pre>
-<?php
-$in_file = '';
-if ($help_file == 'readme')
-       $in_file = '../../README';
-else if ($help_file == 'howto')
-       $in_file = '../../doc/HOWTO';
-else if ($help_file == 'faq')
-       $in_file = '../../doc/FAQ';
-if ($in_file != '')
-       readfile("$in_file");
-?>
-</pre>
-<br>
-</td></tr>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/help/idle_timeout_help.html b/dialup_admin/htdocs/help/idle_timeout_help.html
deleted file mode 100644 (file)
index eafc611..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<html>
-<head>
-<title>Idle Timeout Help Page</title>
-<link rel="stylesheet" href="../style.css">
-</head>
-<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
-<center>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=400>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th><font color="white">Idle Timeout Help Page</font>&nbsp;</th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-<br>
-<center>
-<pre>
-  This Attribute sets the maximum number of consecutive seconds of
-  idle connection allowed to the user before termination of the
-  session or prompt.
-</pre>
-</td></tr>
-<tr><td align=center>
-<a href="javascript:window.close();"><b>Close Window</b></a>
-</td></tr>
-</center>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/help/lock_message_help.html b/dialup_admin/htdocs/help/lock_message_help.html
deleted file mode 100644 (file)
index d36efbd..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<html>
-<head>
-<title>Lock Message Help Page</title>
-<link rel="stylesheet" href="../style.css">
-</head>
-<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
-<center>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=400>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th><font color="white">Lock Message Help Page</font>&nbsp;</th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-<br>
-<center>
-<pre>
-  The Lock Message will be included as a Reply-Item in all radius server responses for
-  the user. It will also appear in the Usefull User Description in the user admin page.
-  It is intended to be used as a hint to the user and to the administrator for the reason
-  of the user lock out.
-  In case it is a multi word message it should be enclosed in double quotes
-</pre>
-</td></tr>
-<tr><td align=center>
-<a href="javascript:window.close();"><b>Close Window</b></a>
-</td></tr>
-</center>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/help/login_time_help.html b/dialup_admin/htdocs/help/login_time_help.html
deleted file mode 100644 (file)
index 42ed56f..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-<html>
-<head>
-<title>Login-Time Help Page</title>
-<link rel="stylesheet" href="../style.css">
-</head>
-<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
-<center>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=400>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th><font color="white">Login-Time Help Page</font>&nbsp;</th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-<br>
-<center>
-<pre>
-  Login-Time defines the time span a user may login to the system. The
-  format of a so-called time string is like the format used by UUCP.
-  A time string may be a list of simple time strings separated by "|" or ",".
-
-  Each simple time string must begin with a day definition. That can be just
-  one day, multiple days, or a range of days separated by a hyphen. A
-  day is Mo, Tu, We, Th, Fr, Sa or Su, or Wk for Mo-Fr. "Any" or "Al"
-  means all days.
-
-  After that a range of hours follows in hhmm-hhmm format.
-
-  For example, "Wk2305-0855,Sa,Su2305-1655".
-
-  Radiusd calculates the number of seconds left in the time span, and
-  sets the Session-Timeout to that number of seconds. So if someones
-  Login-Time is "Al0800-1800" and he logs in at 17:30, Session-Timeout
-  is set to 1800 seconds so that he is kicked off at 18:00.
-</pre>
-</td></tr>
-<tr><td align=center>
-<a href="javascript:window.close();"><b>Close Window</b></a>
-</td></tr>
-</center>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/help/nomadix/nomadix_bw_down_help.html b/dialup_admin/htdocs/help/nomadix/nomadix_bw_down_help.html
deleted file mode 100644 (file)
index c215074..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<html>
-<head>
-<title>Nomadix-Bw-Down Help Page</title>
-<link rel="stylesheet" href="../style.css">
-</head>
-<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
-<center>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=400>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th><font color="white">Nomadix-Bw-Down Help Page</font>&nbsp;</th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-<br>
-<center>
-<pre>
-Attribute Numer: 26
-Value: Integer
-</pre>
-<pre>
-  This Nomadix specific attribute limits the download bandwidth per
-  user. The given value is interpreted as kbps.
-</td></tr>
-<tr><td align=center>
-<a href="javascript:window.close();"><b>Close Window</b></a>
-</td></tr>
-</center>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/help/nomadix/nomadix_bw_up_help.html b/dialup_admin/htdocs/help/nomadix/nomadix_bw_up_help.html
deleted file mode 100644 (file)
index 997f58f..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<html>
-<head>
-<title>Nomadix-Bw-Up Help Page</title>
-<link rel="stylesheet" href="../style.css">
-</head>
-<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
-<center>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=400>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th><font color="white">Nomadix-Bw-Up Help Page</font>&nbsp;</th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-<br>
-<center>
-<pre>
-Attribute Numer: 26
-Value: Integer
-</pre>
-<pre>
-  This Nomadix specific attribute limits the upload bandwidth per
-  user. The given value is interpreted as kbps.
-</td></tr>
-<tr><td align=center>
-<a href="javascript:window.close();"><b>Close Window</b></a>
-</td></tr>
-</center>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/help/nomadix/nomadix_config_url_help.html b/dialup_admin/htdocs/help/nomadix/nomadix_config_url_help.html
deleted file mode 100644 (file)
index 1f6959e..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-<html>
-<head>
-<title>Nomadix-Config-URL Help Page</title>
-<link rel="stylesheet" href="../style.css">
-</head>
-<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
-<center>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=400>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th><font color="white">Nomadix-Config-URL Help Page</font>&nbsp;</th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-<br>
-<center>
-<pre>
-Attribute Numer: 26
-Value: String
-</pre>
-<pre>
-  This Nomadix specific attribute specifies the ftp server where the Nomdix
-  can download its configuration, thus allowing the administrator to change
-  the configuration of many Nomadix' easily.
-</td></tr>
-<tr><td align=center>
-<a href="javascript:window.close();"><b>Close Window</b></a>
-</td></tr>
-</center>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/help/nomadix/nomadix_endofsession_help.html b/dialup_admin/htdocs/help/nomadix/nomadix_endofsession_help.html
deleted file mode 100644 (file)
index 094a53e..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-<html>
-<head>
-<title>Nomadix-EndofSession Help Page</title>
-<link rel="stylesheet" href="../style.css">
-</head>
-<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
-<center>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=400>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th><font color="white">Nomadix-EndofSession Help Page</font>&nbsp;</th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-<br>
-<center>
-<pre>
-Attribute Numer: 26
-Value: Integer
-</pre>
-<pre>
-  This attribute makes the user being kicked off the line exactly
-  at the end of the day at 0 o'clock. The user won't be able to
-  reconnect after that date.
-</td></tr>
-<tr><td align=center>
-<a href="javascript:window.close();"><b>Close Window</b></a>
-</td></tr>
-</center>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/help/nomadix/nomadix_expiration_help.html b/dialup_admin/htdocs/help/nomadix/nomadix_expiration_help.html
deleted file mode 100644 (file)
index a9134df..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<html>
-<head>
-<title>Nomadix-Expiration Help Page</title>
-<link rel="stylesheet" href="../style.css">
-</head>
-<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
-<center>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=400>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th><font color="white">Nomadix-Expiration Help Page</font>&nbsp;</th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-<br>
-<center>
-<pre>
-Attribute Numer: 26
-Value: String
-</pre>
-<pre>
-  This attribute specifies a date after which the account of the
-  user will no longer be valid.
-</td></tr>
-<tr><td align=center>
-<a href="javascript:window.close();"><b>Close Window</b></a>
-</td></tr>
-</center>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/help/nomadix/nomadix_ip_upsell_help.html b/dialup_admin/htdocs/help/nomadix/nomadix_ip_upsell_help.html
deleted file mode 100644 (file)
index cc841cd..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-<html>
-<head>
-<title>Nomadix-IP-Upsell Help Page</title>
-<link rel="stylesheet" href="../style.css">
-</head>
-<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
-<center>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=400>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th><font color="white">Nomadix-IP-Upsell Help Page</font>&nbsp;</th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-<br>
-<center>
-<pre>
-Attribute Numer: 26
-Value: Integer
-</pre>
-<pre>
-  This Nomadix specific attribute assigns a special (normally public)
-  ip address to the connecting user. There are two valid values:<br>
-  0 - which means PrivatePool
-  1 - which means PublicPool 
-</td></tr>
-<tr><td align=center>
-<a href="javascript:window.close();"><b>Close Window</b></a>
-</td></tr>
-</center>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/help/nomadix/nomadix_logoff_url_help.html b/dialup_admin/htdocs/help/nomadix/nomadix_logoff_url_help.html
deleted file mode 100644 (file)
index 9357c02..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-<html>
-<head>
-<title>Nomadix-Logoff-URL Help Page</title>
-<link rel="stylesheet" href="../style.css">
-</head>
-<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
-<center>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=400>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th><font color="white">Nomadix-Logoff-URL Help Page</font>&nbsp;</th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-<br>
-<center>
-<pre>
-Attribute Numer: 26
-Value: String
-</pre>
-<pre>
-  This Nomadix specific attribute defines the webpage that the user
-  shall see on session termination. There is no differnence whether
-  the Termination-Cause is a Session-Timeout or User-Request.
-</td></tr>
-<tr><td align=center>
-<a href="javascript:window.close();"><b>Close Window</b></a>
-</td></tr>
-</center>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/help/nomadix/nomadix_maxbytesdown_help.html b/dialup_admin/htdocs/help/nomadix/nomadix_maxbytesdown_help.html
deleted file mode 100644 (file)
index 7389694..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<html>
-<head>
-<title>Nomadix-MaxBytesDown Help Page</title>
-<link rel="stylesheet" href="../style.css">
-</head>
-<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
-<center>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=400>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th><font color="white">Nomadix-MaxBytesDown Help Page</font>&nbsp;</th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-<br>
-<center>
-<pre>
-Attribute Numer: 26
-Value: Integer
-</pre>
-<pre>
-  This attribute specifies the maximum number of single bytes a user
-  is allowed to download, means receive from the internet.
-</td></tr>
-<tr><td align=center>
-<a href="javascript:window.close();"><b>Close Window</b></a>
-</td></tr>
-</center>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/help/nomadix/nomadix_maxbytesup_help.html b/dialup_admin/htdocs/help/nomadix/nomadix_maxbytesup_help.html
deleted file mode 100644 (file)
index 334d0d6..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<html>
-<head>
-<title>Nomadix-MaxBytesUp Help Page</title>
-<link rel="stylesheet" href="../style.css">
-</head>
-<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
-<center>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=400>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th><font color="white">Nomadix-MaxBytesUp Help Page</font>&nbsp;</th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-<br>
-<center>
-<pre>
-Attribute Numer: 26
-Value: Integer
-</pre>
-<pre>
-  This attribute specifies the maximum number of single bytes a user
-  is allowed to upload, means send from his machine to the internet.
-</td></tr>
-<tr><td align=center>
-<a href="javascript:window.close();"><b>Close Window</b></a>
-</td></tr>
-</center>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/help/nomadix/nomadix_subnet_help.html b/dialup_admin/htdocs/help/nomadix/nomadix_subnet_help.html
deleted file mode 100644 (file)
index 84ed963..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-<html>
-<head>
-<title>Nomadix-Subnet Help Page</title>
-<link rel="stylesheet" href="../style.css">
-</head>
-<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
-<center>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=400>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th><font color="white">Nomadix-Subnet Help Page</font>&nbsp;</th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-<br>
-<center>
-<pre>
-Attribute Numer: 26
-Value: String
-</pre>
-<pre>
-  As Nomadix has the possibility to set up more than one subnet
-  for DHCP use this attribute specifies from which of the DHCP
-  subnets/pools the user shall get it's lease.
-</td></tr>
-<tr><td align=center>
-<a href="javascript:window.close();"><b>Close Window</b></a>
-</td></tr>
-</center>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/help/nomadix/nomadix_url_redirection_help.html b/dialup_admin/htdocs/help/nomadix/nomadix_url_redirection_help.html
deleted file mode 100644 (file)
index 6974e3a..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-<html>
-<head>
-<title>Nomadix-URL-Redirection Help Page</title>
-<link rel="stylesheet" href="../style.css">
-</head>
-<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
-<center>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=400>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th><font color="white">Nomadix-URL-Redirection Help Page</font>&nbsp;</th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-<br>
-<center>
-<pre>
-Attribute Numer: 26
-Value: String
-</pre>
-<pre>
-  This Nomadix specific attribute specifies the URL where the user
-  should be directed to directly after login. Format:<br>
-  http://www.the_domain.com/the_page_to_see.html
-</td></tr>
-<tr><td align=center>
-<a href="javascript:window.close();"><b>Close Window</b></a>
-</td></tr>
-</center>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/help/port_limit_help.html b/dialup_admin/htdocs/help/port_limit_help.html
deleted file mode 100644 (file)
index 6ae3281..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<html>
-<head>
-<title>Port Limit Help Page</title>
-<link rel="stylesheet" href="../style.css">
-</head>
-<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
-<center>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=400>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th><font color="white">Port Limit Help Page</font>&nbsp;</th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-<br>
-<center>
-<pre>
-  Port-Limit is intended for use in conjuction with Multilink PPP or similar uses.
-  It defines the maximum number of channels the user is allowed to open during
-  a multilink dialup session.
-</pre>
-</td></tr>
-<tr><td align=center>
-<a href="javascript:window.close();"><b>Close Window</b></a>
-</td></tr>
-</center>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/help/reply_message_help.html b/dialup_admin/htdocs/help/reply_message_help.html
deleted file mode 100644 (file)
index a785b28..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-<html>
-<head>
-<title>Reply-Message Help Page</title>
-<link rel="stylesheet" href="../style.css">
-</head>
-<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
-<center>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=400>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th><font color="white">Reply-Message Help Page</font>&nbsp;</th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-<br>
-<center>
-<pre>
-Attribute Numer: 18
-Value: String
-</pre>
-<pre>
-The Reply-Message attribute is used to send a message back to the client
-in response of another packet.
-RFC2865 describes it as easy as:<br>
-"This attribute indicates text which MAY be displayed to the user.
-When used in an Access-Accept, it is the success message.
-When used in an Access-Reject, it is the failure message. It MAY
-indicate a dialog message to prompt the user before another
-Access-Request attempt.
-When used in an Access-Challenge, it MAY indicate a dialog message
-to prompt the user for a response.
-Multiple Reply-Message's MAY be included and if any are displayed,
-they MUST be displayed in the same order as they appear in the packet.
-A summary of the Reply-Message Attribute format is shown below. The
-fields are transmitted from left to right."
-</pre>
-</td></tr>
-<tr><td align=center>
-<a href="javascript:window.close();"><b>Close Window</b></a>
-</td></tr>
-</center>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/help/service_type_help.html b/dialup_admin/htdocs/help/service_type_help.html
deleted file mode 100644 (file)
index 7190e4d..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-<html>
-<head>
-<title>Service-Type Help Page</title>
-<link rel="stylesheet" href="../style.css">
-</head>
-<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
-<center>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=400>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th><font color="white">Service-Type Help Page</font>&nbsp;</th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-<br>
-<center>
-<pre>
-  This Attribute indicates the type of service the user has
-  requested, or the type of service to be provided. It MAY be used
-  in both Access-Request and Access-Accept packets. A NAS is not
-  required to implement all of these service types, and MUST treat
-  unknown or unsupported Service-Types as though an Access-Reject
-  had been received instead.
-
-  Possible values are.
-</pre>
-<i>1 Login</i><br>
-<i>2 Framed</i><br>
-<i>3 Callback Login</i><br>
-<i>4 Callback Framed</i><br>
-<i>5 Outbound</i><br>
-<i>6 Administrative</i><br>
-<i>7 NAS Prompt</i><br>
-<i>8 Authenticate Only</i><br>
-<i>9 Callback NAS Prompt</i><br>
-<pre>
-  The service types are defined as follows when used in an Access-
-  Accept.  When used in an Access-Request, they should be considered
-  to be a hint to the RADIUS server that the NAS has reason to
-  believe the user would prefer the kind of service indicated, but
-  the server is not required to honor the hint.
-
-      Login               The user should be connected to a host.
-      Framed              A Framed Protocol should be started for the
-                          User, such as PPP or SLIP.
-      Callback Login      The user should be disconnected and called
-                          back, then connected to a host.
-      Callback Framed     The user should be disconnected and called
-                          back, then a Framed Protocol should be started
-                          for the User, such as PPP or SLIP.
-      Outbound            The user should be granted access to outgoing
-                          devices.
-      Administrative      The user should be granted access to the
-                          administrative interface to the NAS from which
-                          privileged commands can be executed.
-      NAS Prompt          The user should be provided a command prompt
-                          on the NAS from which non-privileged commands
-                          can be executed.
-      Authenticate Only   Only Authentication is requested, and no
-                          authorization information needs to be returned
-                          in the Access-Accept (typically used by proxy
-                          servers rather than the NAS itself).
-      Callback NAS Prompt The user should be disconnected and called
-                          back, then provided a command prompt on the
-                          NAS from which non-privileged commands can be
-                          executed.
-</pre>
-</td></tr>
-<tr><td align=center>
-<a href="javascript:window.close();"><b>Close Window</b></a>
-</td></tr>
-</center>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/help/session_timeout_help.html b/dialup_admin/htdocs/help/session_timeout_help.html
deleted file mode 100644 (file)
index b246443..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<html>
-<head>
-<title>Session Timeout Help Page</title>
-<link rel="stylesheet" href="../style.css">
-</head>
-<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
-<center>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=400>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th><font color="white">Session Timeout Help Page</font>&nbsp;</th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-<br>
-<center>
-<pre>
-  This Attribute sets the maximum number of seconds of service to be
-  provided to the user before termination of the session or prompt.
-</pre>
-</td></tr>
-<tr><td align=center>
-<a href="javascript:window.close();"><b>Close Window</b></a>
-</td></tr>
-</center>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/help/simultaneous_use_help.html b/dialup_admin/htdocs/help/simultaneous_use_help.html
deleted file mode 100644 (file)
index 6ce5f71..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<html>
-<head>
-<title>Simultaneous Use Help Page</title>
-<link rel="stylesheet" href="../style.css">
-</head>
-<body bgcolor="#80a040" background="../images/greenlines1.gif" link="black" alink="black">
-<center>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=400>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th><font color="white">Simultaneous Use Help Page</font>&nbsp;</th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-<br>
-<center>
-<pre>
-  This attribute defines the maximum number of concurrent logins
-  for a user. It is independent from the number of ports the user
-  is allowed to open in a multilink session.
-</pre>
-</td></tr>
-<tr><td align=center>
-<a href="javascript:window.close();"><b>Close Window</b></a>
-</td></tr>
-</center>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/images/arrow.gif b/dialup_admin/htdocs/images/arrow.gif
deleted file mode 100644 (file)
index 5d71929..0000000
Binary files a/dialup_admin/htdocs/images/arrow.gif and /dev/null differ
diff --git a/dialup_admin/htdocs/images/bg.gif b/dialup_admin/htdocs/images/bg.gif
deleted file mode 100644 (file)
index 3a45d0f..0000000
Binary files a/dialup_admin/htdocs/images/bg.gif and /dev/null differ
diff --git a/dialup_admin/htdocs/images/black.gif b/dialup_admin/htdocs/images/black.gif
deleted file mode 100644 (file)
index 639e5f2..0000000
Binary files a/dialup_admin/htdocs/images/black.gif and /dev/null differ
diff --git a/dialup_admin/htdocs/images/greenlines1.gif b/dialup_admin/htdocs/images/greenlines1.gif
deleted file mode 100644 (file)
index 2b5fc8e..0000000
Binary files a/dialup_admin/htdocs/images/greenlines1.gif and /dev/null differ
diff --git a/dialup_admin/htdocs/images/logo2.gif b/dialup_admin/htdocs/images/logo2.gif
deleted file mode 100644 (file)
index c47ce14..0000000
Binary files a/dialup_admin/htdocs/images/logo2.gif and /dev/null differ
diff --git a/dialup_admin/htdocs/images/pixel.gif b/dialup_admin/htdocs/images/pixel.gif
deleted file mode 100644 (file)
index 1118d01..0000000
Binary files a/dialup_admin/htdocs/images/pixel.gif and /dev/null differ
diff --git a/dialup_admin/htdocs/images/title2.gif b/dialup_admin/htdocs/images/title2.gif
deleted file mode 100644 (file)
index 3e0d954..0000000
Binary files a/dialup_admin/htdocs/images/title2.gif and /dev/null differ
diff --git a/dialup_admin/htdocs/index.html b/dialup_admin/htdocs/index.html
deleted file mode 100644 (file)
index 1c603a9..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<html>
-<head>
-<title>
-dialup administration</title>
-</head>
-       <frameset cols="130,*" border="0" frameborder="0" framespacing="0">
-               <frame  name="buttons" src="buttons.php" marginwidth="8"
-                       marginheight="8" noresize >
-               <frame  name="content" src="content.html" marginwidth="8"
-                       marginheight="8" >
-       </frameset>
-       <noframes>
-               <body bgcolor=yellow>
-               <p><font color="darkblue"><h1>this page can only be seen by a frames capable browser. sorry...</h1></font>
-               </p></body>
-       </noframes>
-</html>
diff --git a/dialup_admin/htdocs/login_time_create.php b/dialup_admin/htdocs/login_time_create.php
deleted file mode 100644 (file)
index d4f8717..0000000
+++ /dev/null
@@ -1,283 +0,0 @@
-<html>
-<head>
-<title>Login-Time Creation Page</title>
-<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $config[general_charset]?>">
-<link rel="stylesheet" href="style.css">
-</head>
-<body>
-<?php
-
-function check_day($day){
-       switch($day){
-               case 'Mo':
-               case 'Tu':
-               case 'We':
-               case 'Th':
-               case 'Th':
-               case 'Fr':
-               case 'Sa':
-               case 'Su':
-               case 'Al':
-               case 'Any':
-               case 'Wk':
-                       return 1;
-                       break;
-               default:
-                       return 0;
-                       break;
-       }
-}
-
-$mapping = array(
-       'Mo' => 'Monday',
-       'Tu' => 'Tuesday',
-       'We' => 'Wednesday',
-       'Th' => 'Thursday',
-       'Fr' => 'Friday',
-       'Sa' => 'Saturday',
-       'Su' => 'Sunday',
-       'Al' => 'All Days',
-       'Any' => 'All Days',
-       'Wk' => 'Weekdays');
-
-$rules = array();
-
-if ($add == 1){
-       if ($use == 'double' && $start_day != $stop_day){
-               $new = $start_day;
-               if ($stop_day != '')
-                       $new .= "-$stop_day";
-               if ($Dstart_time != '' && $Dstop_time != '')
-                       $new .= "$Dstart_time-$Dstop_time";
-       }
-       else if ($use == 'one'){
-               $new = $day;
-               if ($Mstart_time != '' && $Mstop_time != '')
-                       $new .= "$Mstart_time-$Mstop_time";
-       }
-       if ($new != ''){
-               if ($rulestr == '')
-                       $rulestr = $new;
-               else
-                       $rulestr .= ",$new";
-       }
-}
-$Mstart_time = $Mstop_time = $Dstart_time = $Dstop_time = '';
-
-
-if ($rulestr != ''){
-       $rulestr = str_replace('"','',$rulestr);
-       $rules1 = preg_split('/[,|]/',$rulestr);
-}
-
-if ($rules1){
-       foreach ($rules1 as $rule){
-               if ($delete1 == 1 && $sel_rule == $rule)
-                       continue;
-               $matches = array();
-               if (preg_match('/^\w{2,3}$/',$rule)){
-                       if (!check_day($rule)){
-                               $err_msg .= "<b>Rule '$rule' is invalid</b><br>\n";
-                               continue;
-                       }
-                       if ($sel_rule == $rule || $sel_rule == ''){
-                               $checked[one] = 'checked';
-                               $selected_more[$rule] = 'selected';
-                       }
-                       $msg = $mapping[$rule];
-               }
-               else if (preg_match('/^(\w{2,3})(\d{4})-(\d{4})$/',$rule,$matches)){
-                       if (!check_day($matches[1])){
-                               $err_msg .= "<b>Rule '$rule' is invalid</b><br>\n";
-                               continue;
-                       }
-                       if ($sel_rule == $rule || $sel_rule == ''){
-                               $checked[one] = 'checked';
-                               $selected_more[$matches[1]] = 'selected';
-                               $Mstart_time = $matches[2];
-                               $Mstop_time = $matches[3];
-                       }
-                       $msg = $mapping[$matches[1]] . " $matches[2] - $matches[3]";
-               }
-               else if (preg_match('/^(\w{2,3})-(\w{2,3})$/',$rule,$matches)){
-                       if (!check_day($matches[1]) || !check_day($matches[2])){
-                               $err_msg .= "<b>Rule '$rule' is invalid</b><br>\n";
-                               continue;
-                       }
-                       if ($sel_rule == $rule || $sel_rule == ''){
-                               $checked[double] = 'checked';
-                               $selected_start[$matches[1]] = 'selected';
-                               $selected_stop[$matches[2]] = 'selected';
-                       }
-                       $msg = $mapping[$matches[1]] . " - " . $mapping[$matches[2]];
-               }
-               else if (preg_match('/^(\w{2,3})-(\w{2,3})(\d{4})-(\d{4})$/',$rule,$matches)){
-                       if (!check_day($matches[1]) || !check_day($matches[2])){
-                               $err_msg .= "<b>Rule '$rule' is invalid</b><br>\n";
-                               continue;
-                       }
-                       if ($sel_rule == $rule || $sel_rule == ''){
-                               $checked[double] = 'checked';
-                               $selected_start[$matches[1]] = 'selected';
-                               $selected_stop[$matches[2]] = 'selected';
-                               $Dstart_time = $matches[3];
-                               $Dstop_time = $matches[4];
-                       }
-                       $msg = $mapping[$matches[1]] . " - " . $mapping[$matches[2]] . " $matches[3] - $matches[4]";
-               }
-               else{
-                       $err_msg .= "<b>Rule $rule is invalid</b><br>\n";
-                       continue;
-               }
-               array_push($rules,$rule);
-               $rule_msgs[$rule] = $msg;
-       }
-}
-if ($sel_rule != '')
-       $selected_rule[$sel_rule] = 'selected';
-else
-       $Mstart_time = $Mstop_time = $Dstart_time = $Dstop_time = '';
-
-$rulestr = '';
-foreach ($rules as $rule){
-       if ($rulestr == '')
-               $rulestr = "$rule";
-       else
-               $rulestr .= ",$rule";
-}
-if ($update == 1 && $val != '')
-       echo <<<EOM
-<script language="JavaScript1.1" type="text/javascript">
-window.opener.document.edituser.$val.value = "\"$rulestr\"";
-window.close();
-</script>
-EOM;
-
-if ($checked[double] == '' && $checked[one] == '')
-       $checked[double] = 'checked';
-
-?>
-<center>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=400>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th><font color="white">Login-Time Create Page</font>&nbsp;</th></tr>
-       </table>
-</td></tr>
-<form name=ruleform method=post action="login_time_create.php">
-<input type=hidden name=add value="0">
-<input type=hidden name=delete1 value="0">
-<input type=hidden name=update value="0">
-<input type=hidden name=val value="<?php echo $val?>">
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td align=center>
-<table width=90%>
-<tr>
-<td>&nbsp;</td>
-<td><b>Start Day</b></td>
-<td><b>Stop Day</b></td>
-<td align=center><b>Time (HHMM)</b></td>
-</tr>
-<tr>
-
-<?php
-       echo <<<EOM
-<td><input type=radio name=use value=double $checked[double]>&nbsp;<b>Range</b></td>
-<td><select name=start_day OnClick="this.form.use[0].checked=true;this.form.Mstart_time.value='';this.form.Mstop_time.value=''">
-<option value="Mo" $selected_start[Mo]>Monday
-<option value="Tu" $selected_start[Tu]>Tuesday
-<option value="We" $selected_start[We]>Wednesday
-<option value="Th" $selected_start[Th]>Thursday
-<option value="Fr" $selected_start[Fr]>Friday
-<option value="Sa" $selected_start[Sa]>Saturday
-<option value="Su" $selected_start[Su]>Sunday
-</select></td>
-<td><select name=stop_day OnClick="this.form.use[0].checked=true;this.form.Mstart_time.value='';this.form.Mstop_time.value=''">
-<option value="Mo" $selected_stop[Mo]>Monday
-<option value="Tu" $selected_stop[Tu]>Tuesday
-<option value="We" $selected_stop[We]>Wednesday
-<option value="Th" $selected_stop[Th]>Thursday
-<option value="Fr" $selected_stop[Fr]>Friday
-<option value="Sa" $selected_stop[Sa]>Saturday
-<option value="Su" $selected_stop[Su]>Sunday
-</select></td>
-<td align=right><input type=text name=Dstart_time size=4 value="$Dstart_time" OnClick="this.form.use[0].checked=true;this.form.Mstart_time.value='';this.form.Mstop_time.value=''">
-&nbsp;-&nbsp;
-<input type=text name=Dstop_time size=4 value="$Dstop_time" OnClick="this.form.use[0].checked=true;this.form.Mstart_time.value='';this.form.Mstop_time.value=''"></td>
-</tr>
-<tr>
-<td><input type=radio name=use value=one $checked[one]>&nbsp;<b>Specific</b></td>
-<td><select name=day OnClick="this.form.use[1].checked=true;this.form.Dstart_time.value='';this.form.Dstop_time.value=''">
-<option value="Mo" $selected_more[Mo]>Monday
-<option value="Tu" $selected_more[Tu]>Tuesday
-<option value="We" $selected_more[We]>Wednesday
-<option value="Th" $selected_more[Th]>Thursday
-<option value="Fr" $selected_more[Fr]>Friday
-<option value="Sa" $selected_more[Sa]>Saturday
-<option value="Su" $selected_more[Su]>Sunday
-<option value="Wk" $selected_more[Wk]>Weekdays
-<option value="Al" $selected_more[Al]>All Days
-</select></td>
-<td colspan=2 align=right><input type=text name=Mstart_time size=4 value="$Mstart_time" OnClick="this.form.use[1].checked=true;this.form.Dstart_time.value='';this.form.Dstop_time.value=''">
-&nbsp;-&nbsp;
-<input type=text name=Mstop_time size=4 value="$Mstop_time" OnClick="this.form.use[1].checked=true;this.form.Dstart_time.value='';this.form.Dstop_time.value=''"></td>
-</tr>
-EOM;
-?>
-
-<tr><td>&nbsp;</td></tr>
-<tr><td colspan=5 align=center>
-<input type=submit class=button value=" + " OnClick="this.form.add.value=1">
-&nbsp;&nbsp;&nbsp;
-<input type=submit class=button value=" - " OnClick="this.form.delete1.value=1">
-</td></tr>
-<tr><td colspan=5 align=center>
-<br>
-<b>Rule Set</b>
-</td></tr>
-<tr><td colspan=5 align=center>
-<?php
-if (!empty($rules)){
-       echo "<select name=\"sel_rule\" size=5 multi OnChange=\"this.form.submit()\">\n";
-       foreach ($rules as $rule)
-               echo "<option value=\"$rule\" $selected_rule[$rule]>$rule_msgs[$rule]\n";
-       echo "</select>\n";
-}
-else
-       echo "<i>No rules available</i><br>\n";
-?>
-</td></tr>
-<tr><td colspan=5 align=center><?php echo $err_msg ?></td></tr>
-<tr><td>&nbsp;</td></tr>
-<tr><td colspan=5 align=center><b>Rule string (<a href="help/login_time_help.html" target=lt_help onclick=window.open("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>)</b></td></tr>
-<tr><td colspan=5 align=center>
-<input type=text name=rulestr value="<?php echo $rulestr ?>" size=40 OnChange="this.form.submit()">
-</td></tr>
-<tr><td>&nbsp;</td></tr>
-<tr><td colspan=5 align=center>
-<input type=submit class=button value="Update Attribute in User Edit page" OnClick="this.form.update.value=1">
-</td></tr>
-</table>
-<?php
-if ($rulestr == '' && $first == 'yes')
-       echo <<<EOM
-<script language="JavaScript1.1" type="text/javascript">
-window.document.ruleform.rulestr.value=window.opener.document.edituser.$val.value;
-window.document.ruleform.submit();
-</script>
-EOM;
-?>
-</form>
-</td></tr>
-<tr><td align=center>
-<a href="javascript:window.close();"><b>Close Window</b></a>
-</td></tr>
-</center>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/nas_admin.php b/dialup_admin/htdocs/nas_admin.php
deleted file mode 100644 (file)
index 03d1edd..0000000
+++ /dev/null
@@ -1,288 +0,0 @@
-<?php
-require('../conf/config.php');
-
-if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
-       include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
-else{
-       echo <<<EOM
-<title>NAS Administration Page</title>
-<link rel="stylesheet" href="style.css">
-</head>
-<body>
-<center>
-<b>Could not include SQL library functions. Aborting</b>
-</body>
-</html>
-EOM;
-       exit();
-}
-if ($config[general_restrict_nasadmin_access] == 'yes'){
-       $auth_user = $_SERVER["PHP_AUTH_USER"];
-       if ($auth_user == '' || $mappings[$auth_user][nasadmin] != 'yes'){
-               echo <<<EOM
-<title>NAS Administration Page</title>
-<link rel="stylesheet" href="style.css">
-</head>
-<body>
-<center>
-<b>Access is not allowed to this username.</b>
-</body>
-</html>
-EOM;
-               exit();
-       }
-}
-
-
-if ($clear_fields == 1 || ($do_it == 0 && $select_nas == 0))
-       $selected_nas = $readonly = '';
-else
-       $readonly = 'readonly';
-
-$link = @da_sql_pconnect($config);
-if ($link){
-       if ($do_it == 1){
-               $selected_nas = da_sql_escape_string($selected_nas);
-               switch ($action) {
-                       case 'check_nas':
-                               require_once('../lib/functions.php');
-                               if (!check_ip($selected_nas) && $selected_nas == gethostbyname($selected_nas))
-                                       $msg = "<b>The NAS name <font color=red>is not</font> valid</b><br>\n";
-                               else
-                                       $msg = "<b>The NAS name <font color=green>is</font> valid</b><br>\n";
-                               break;
-                       case 'del_nas':
-                               $res = @da_sql_query($link,$config,
-                               "DELETE FROM $config[sql_nas_table] WHERE nasname = '$selected_nas';");
-                               if ($res){
-                                       $msg = "<b>NAS '$selected_nas' was deleted successfully</b><br>\n";
-                                       $selected_nas = '';
-                               }
-                               else
-               $msg = "<b>Error deleting NAS '$selected_nas' " . da_sql_error($link,$config) . "</b><br>\n";
-                               break;
-                       case 'add_nas':
-                               if ($nasname == '' || $nassecret == '' || $nasshortname == '')
-                                       $msg = "<b>Error. Required fields are not set</b><br>\n";
-                               else{
-                                       $nasshortname = da_sql_escape_string($nasshortname);
-                                       $nastype = da_sql_escape_string($nastype);
-                                       $nasportnum = da_sql_escape_string($nasportnum);
-                                       $nassecret = da_sql_escape_string($nassecret);
-                                       $nascommunity = da_sql_escape_string($nascommunity);
-                                       $nasdescription = da_sql_escape_string($nasdescription);
-                                       $nasname = da_sql_escape_string($nasname);
-
-                                       $res = @da_sql_query($link,$config,
-                                       "INSERT INTO $config[sql_nas_table]
-                                       (nasname,shortname,type,ports,secret,community,description)
-                                       VALUES ('$nasname','$nasshortname', '$nastype','$nasportnum',
-                                       '$nassecret','$nascommunity','$nasdescription');");
-                                       if ($res){
-                                               $msg = "<b>NAS '$nasname' was added successfully</b><br>\n";
-                                               $selected_nas = $nasname;
-                                       }
-                                       else
-                       $msg = "<b>Error adding NAS '$nasname' " . da_sql_error($link,$config) . "</b><br>\n";
-                               }
-                               break;
-                       case 'change_nas':
-                               if ($nassecret == '' || $nasshortname == '')
-                                       $msg = "<b>Error. Required fields are not set</b><br>\n";
-                               else{
-                                       $nasshortname = da_sql_escape_string($nasshortname);
-                                       $nastype = da_sql_escape_string($nastype);
-                                       $nasportnum = da_sql_escape_string($nasportnum);
-                                       $nassecret = da_sql_escape_string($nassecret);
-                                       $nascommunity = da_sql_escape_string($nascommunity);
-                                       $nasdescription = da_sql_escape_string($nasdescription);
-                                       $nasname = da_sql_escape_string($nasname);
-
-                                       $res = @da_sql_query($link,$config,
-                                       "UPDATE $config[sql_nas_table] SET
-                                       shortname = '$nasshortname',
-                                       type = '$nastype',
-                                       ports = '$nasportnum',
-                                       secret = '$nassecret',
-                                       community = '$nascommunity',
-                                       description = '$nasdescription' WHERE nasname = '$nasname';");
-                                       if ($res)
-                                               $msg = "<b>NAS '$nasname' was updated successfully</b><br>\n";
-                                       else
-                       $msg = "<b>Error updating NAS '$selected_nas' " . da_sql_error($link,$config) . "</b><br>\n";
-                               }
-                               break;
-               }
-       }
-       $search = @da_sql_query($link,$config,
-       "SELECT * FROM $config[sql_nas_table] ORDER BY nasname;");
-       if ($search){
-               $num = 0;
-               unset($my_nas_list);
-               while($row = @da_sql_fetch_array($search,$config)){
-                       $my_nas_name = $row['nasname'];
-                       if ($my_nas_name != ''){
-                               $num++;
-                               $my_nas_list[$my_nas_name]['name'] = $my_nas_name;
-                               $my_nas_list[$my_nas_name]['shortname'] = $row['shortname'];
-                               $my_nas_list[$my_nas_name]['type'] = $row['type'];
-                               if ($clear_fields == 0 && $selected_nas == $my_nas_name){
-                                       $selected[$my_nas_name] = 'selected';
-                                       $selected[$my_nas_list[$my_nas_name]['type']] = 'selected';
-                               }
-                               $my_nas_list[$my_nas_name]['ports'] = $row['ports'];
-                               $my_nas_list[$my_nas_name]['secret'] = $row['secret'];
-                               $my_nas_list[$my_nas_name]['community'] = $row['community'];
-                               $my_nas_list[$my_nas_name]['description'] = $row['description'];
-                       }
-               }
-       }
-}
-else
-       echo "<b>Could not connect to SQL database</b><br>\n";
-
-
-?>
-
-<html>
-<head>
-<title>NAS Administration Page</title>
-<link rel="stylesheet" href="style.css">
-</head>
-<body>
-<center>
-<table border=0 width=550 cellpadding=0 cellspacing=0>
-<tr valign=top>
-<td align=center><img src="images/title2.gif"></td>
-</tr>
-</table>
-<table border=0 width=400 cellpadding=0 cellspacing=2>
-
-</table>
-<br>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=200>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th>
-       <font color="white">NAS Administration</font>&nbsp;
-       </th></tr>
-       </table>
-</td></tr>
-<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=do_it value=0>
-      <input type=hidden name=clear_fields value=0>
-      <input type=hidden name=select_nas value=0>
-<?php echo $msg?>
-       <table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
-<tr>
-<td align=right bgcolor="#d0ddb0">
-NAS List
-</td>
-<td>
-<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];
-       echo "<option $selected[$name] value=\"$name\">$name\n";
-}
-?>
-</select>
-</td>
-</tr>
-<?php
-$array = $my_nas_list[$selected_nas];
-echo <<<EOM
-<tr>
-<td align=right bgcolor="#d0ddb0">
-NAS Name
-</td>
-<td>
-<input type=text name=nasname size=40 value="$array[name]" $readonly>
-</td></tr>
-<tr>
-<td align=right bgcolor="#d0ddb0">
-NAS Short Name
-</td>
-<td>
-<input type=text name=nasshortname size=40 value="$array[shortname]">
-</td></tr>
-<tr>
-<td align=right bgcolor="#d0ddb0">
-NAS Type
-</td>
-<td>
-<select name=nastype size=1>
-<option $selected[cisco] value="cisco">cisco
-<option $selected[computone] value="computone">computone
-<option $selected[livingston] value="livingston">livingston
-<option $selected[max40xx] value="max40xx">max40xx
-<option $selected[multitech] value="multitech">multitech
-<option $selected[netserver] value="netserver">netserver
-<option $selected[pathras] value="pathras">pathras
-<option $selected[patton] value="patton">patton
-<option $selected[portslave] value="portslave">portslave
-<option $selected[tc] value="tc">tc
-<option $selected[usrhiper] value="usrhiper">usrhiper
-<option $selected[other] value="other">other
-</select>
-</td></tr>
-<tr>
-<td align=right bgcolor="#d0ddb0">
-NAS Ports Number
-</td>
-<td>
-<input type=text name=nasportnum size=40 value="$array[ports]">
-</td></tr>
-<tr>
-<td align=right bgcolor="#d0ddb0">
-NAS Secret
-</td>
-<td>
-<input type=text name=nassecret size=40 value="$array[secret]">
-</td></tr>
-<tr>
-<td align=right bgcolor="#d0ddb0">
-NAS SNMP community
-</td>
-<td>
-<input type=text name=nascommunity size=40 value="$array[community]">
-</td></tr>
-<tr>
-<td align=right bgcolor="#d0ddb0">
-NAS Description
-</td>
-<td>
-<input type=text name=nasdescription size=40 value="$array[description]">
-</td></tr>
-EOM;
-?>
-       </table>
-<br>
-<select name=action size=1>
-<?php
-if ($clear_fields == 1 || ($do_it == 0 && $select_nas == 0))
-       echo "<option value=\"add_nas\">Add NAS\n";
-if ($clear_fields == 0)
-       echo <<<EOM
-<option value="change_nas">Change NAS Info
-<option value="del_nas">Delete Selected NAS
-<option value="check_nas">Check NAS validity
-EOM;
-?>
-</select>
-<input type=submit class=button value="Perform Action" OnClick="this.form.do_it.value=1">
-<br><br>
-<input type=submit class=button value="Clear Fields" OnClick="this.form.clear_fields.value=1">
-</form>
-</td></tr>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/password.php b/dialup_admin/htdocs/password.php
deleted file mode 100644 (file)
index 0699df4..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<form name="master" action="user_admin.php#pass" method="post">
-<input type=hidden name=login value=<?php echo $login ?>>
-<input type=hidden name=action value=checkpass>
-<br>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=200>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th>
-       <font color="white">Check Password</font>&nbsp;
-       </th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <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>
-       </table>
-       </table>
-</table>
diff --git a/dialup_admin/htdocs/password_generator.jsc b/dialup_admin/htdocs/password_generator.jsc
deleted file mode 100644 (file)
index 8e7911e..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<script language="JavaScript"><!--
-
-/*******************************************************
-* Random Password Generator JavaScript
-* <http://www.kipp.smith.net/javascripts/random.htm/>
-* This script is free as long as original credits remain.
-********************************************************/
-
-// Use the following variables for password characters
-// and length
-
-  var characters="0123456789abcdefghijklmnopqrstuvwxyz"
-
-  var passwordlength=0
-
-function generatepassword(object, plength) {
-// This function will build a string using randomly
-// generated characters.
-
-  var password = ""
-  var n = 0
-  var randomnumber = 0
-  passwordlength=plength
-  while( n < passwordlength ) {
-     n ++
-     randomnumber = Math.floor(characters.length*Math.random());
-     password += characters.substring(randomnumber,randomnumber + 1)
-  }
-
-// Display the word inside the form text box
-
-  object.value = password
-}
-
-// --></script>
diff --git a/dialup_admin/htdocs/session_destroy.php b/dialup_admin/htdocs/session_destroy.php
deleted file mode 100644 (file)
index 7934552..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-session_start();
-session_unset();
-session_destroy();
-?>
-<html>
-<head>
-<title>Session Cache Destroy Page</title>
-<link rel="stylesheet" href="style.css">
-</head>
-<body>
-<center>
-<b>Session Cache Destroyed</b>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/show_groups.php b/dialup_admin/htdocs/show_groups.php
deleted file mode 100644 (file)
index 1f3a0a4..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-<?php
-require('../conf/config.php');
-?>
-<html>
-<?php
-
-if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
-       include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
-else{
-       echo <<<EOM
-<title>User Groups</title>
-<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
-<link rel="stylesheet" href="style.css">
-</head>
-<body>
-<center>
-<b>Could not include SQL library functions. Aborting</b>
-</body>
-</html>
-EOM;
-       exit();
-}
-if ($config[general_lib_type] != 'sql'){
-       echo <<<EOM
-<title>User Groups</title>
-<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
-<link rel="stylesheet" href="style.css">
-</head>
-<body>
-<center>
-<b>This page is only available if you are using sql as general library type</b>
-</body>
-</html>
-EOM;
-       exit();
-}
-?>
-<head>
-<title>User Groups</title>
-<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $config[general_charset]?>">
-<link rel="stylesheet" href="style.css">
-</head>
-<body>
-<center>
-<table border=0 width=550 cellpadding=0 cellspacing=0>
-<tr valign=top>
-<td align=center><img src="images/title2.gif"></td>
-</tr>
-</table>
-
-<br><br>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=55%></td>
-<td bgcolor="black" width=45%>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th>
-       <font color="white">User Groups</font>&nbsp;
-       </th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-<font size=-2>Only groups with members are shown</font><p>
-       <table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
-       <tr bgcolor="#d0ddb0">
-       <th>#</th><th>group</th><th># of members</th>
-       </tr>
-
-<?php
-unset($login);
-$num = 0;
-include_once("../lib/$config[general_lib_type]/group_info.php");
-if (isset($existing_groups)){
-       foreach ($existing_groups as $group => $num_members){
-               $num++;
-               $Group = urlencode($group);
-               echo <<<EOM
-               <tr align=center>
-                       <td>$num</td>
-                       <td><a href="group_admin.php?login=$Group" title="Edit group $group">$group</a></td>
-                       <td>$num_members</td>
-               </tr>
-EOM;
-       }
-}
-else
-       echo "<b>Could not find any groups</b><br>\n";
-?>
-       </table>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/stats.php b/dialup_admin/htdocs/stats.php
deleted file mode 100644 (file)
index e8c61ad..0000000
+++ /dev/null
@@ -1,185 +0,0 @@
-<?php
-require('../conf/config.php');
-require('../lib/sql/nas_list.php');
-require_once('../lib/xlat.php');
-?>
-<html>
-<head>
-<title>account analysis</title>
-<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $config[general_charset]?>">
-<link rel="stylesheet" href="style.css">
-</head>
-<body>
-<center>
-
-<?php
-require_once('../lib/functions.php');
-
-if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
-       include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
-else{
-       echo <<<EOM
-<b>Could not include SQL library functions. Aborting</b>
-</body>
-</html>
-EOM;
-       exit();
-}
-
-$stats_num = array();
-
-$date = strftime('%A, %e %B %Y, %T %Z');
-$now = time();
-if ($before == '')
-       $before = date($config[sql_date_format], $now + 86400);
-$after = ($after != '') ? "$after" : date($config[sql_date_format], $now - 604800 );
-
-$after_time = date2time($after);
-$before_time = date2time($before);
-$days[0] = $after;
-$counter = $after_time + 86400;
-$i = 1;
-while($counter < $before_time){
-       $days[$i++] = date($config[sql_date_format],$counter);
-       $counter += 86400;
-}
-$days[$i] = $before;
-$num_days = $i;
-
-$column1 = ($column1 != '') ? "$column1" : 'sessions';
-$column2 = ($column2 != '') ? "$column2" : 'usage';
-$column3 = ($column3 != '') ? "$column3" : 'download';
-$column[1] = "$column1";
-$column[2] = "$column2";
-$column[3] = "$column3";
-$selected1["$column1"] = 'selected';
-$selected2["$column2"] = 'selected';
-$selected3["$column3"] = 'selected';
-
-$message['sessions'] = 'sessions';
-$message['usage'] = 'total usage time';
-$message['upload'] = 'uploads';
-$message['download'] = 'downloads';
-if ($config[general_stats_use_totacct] == 'yes'){
-       $sql_val['sessions'] = 'connnum';
-       $sql_val['usage'] = 'conntotduration';
-       $sql_val['upload'] = 'inputoctets';
-       $sql_val['download'] = 'outputoctets';
-}
-else{
-       $sql_val['usage'] = 'acctsessiontime';
-       $sql_val['upload'] = 'acctinputoctets';
-       $sql_val['download'] = 'acctoutputoctets';
-}
-$fun['sessions'] = nothing;
-$fun['usage'] = time2strclock;
-$fun['upload'] = bytes2str;
-$fun['download'] = bytes2str;
-$sql_val['user'] = ($login == '') ? "WHERE username LIKE '%'" : "WHERE username = '$login'";
-for ($j = 1; $j <= 3; $j++){
-       $tmp = "{$sql_val[$column[$j]]}";
-       $res[$j] = ($tmp == "") ? "COUNT(radacctid) AS res_$j" : "sum($tmp) AS res_$j";
-}
-$i = 1;
-$servers[all] = 'all';
-foreach ($nas_list as $nas){
-       $name = $nas[name];
-       if ($nas[ip] == '')
-               continue;
-       $servers[$name] = $nas[ip];
-       $i++;
-}
-ksort($servers);
-if ($server != 'all' && $server != ''){
-       $server = da_sql_escape_string($server);
-       $s = "AND nasipaddress = '$server'";
-}
-$sql_extra_query = '';
-if ($config[sql_accounting_extra_query] != '')
-       $sql_extra_query = xlat($config[sql_accounting_extra_query],$login,$config);
-
-$link = @da_sql_pconnect($config);
-if ($link){
-       for ($i = $num_days;$i > -1; $i--){
-               $day = "$days[$i]";
-               if ($config[general_stats_use_totacct] == 'yes')
-                       $search = @da_sql_query($link,$config,
-                       "SELECT $res[1],$res[2],$res[3] FROM $config[sql_total_accounting_table]
-                       $sql_val[user] AND acctdate = '$day' $s $sql_extra_query;");
-               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'
-                       AND acctstoptime <= '$day 23:59:59' $s $sql_extra_query;");
-               if ($search){
-                       $row = @da_sql_fetch_array($search,$config);
-                       $data[$day][1] = $row[res_1];
-                       $data[sum][1] += $row[res_1];
-                       $stats_num[1] = ($data[$day][1]) ? $stats_num[1] + 1 : $stats_num[1];
-                       $data[$day][2] = $row[res_2];
-                       $data[sum][2] += $row[res_2];
-                       $stats_num[2] = ($data[$day][2]) ? $stats_num[2] + 1 : $stats_num[2];
-                       $data[$day][3] = $row[res_3];
-                       $data[sum][3] += $row[res_3];
-                       $stats_num[3] = ($data[$day][3]) ? $stats_num[3] + 1 : $stats_num[3];
-               }
-               else
-                       echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
-       }
-}
-else
-       echo "<b>Could not connect to SQL database</b><br>\n";
-
-$stats_num[1] = ($stats_num[1]) ? $stats_num[1] : 1;
-$stats_num[2] = ($stats_num[2]) ? $stats_num[2] : 1;
-$stats_num[3] = ($stats_num[3]) ? $stats_num[3] : 1;
-
-$data['avg'][1] = ceil($data['sum'][1] / $stats_num[1]);
-$data['avg'][2] = ceil($data['sum'][2] / $stats_num[2]);
-$data['avg'][3] = ceil($data['sum'][3] / $stats_num[3]);
-
-$data['avg'][1] = $fun[$column[1]]($data['avg'][1]);
-$data['avg'][2] = $fun[$column[2]]($data['avg'][2]);
-$data['avg'][3] = $fun[$column[3]]($data['avg'][3]);
-
-$data['sum'][1] = $fun[$column[1]]($data['sum'][1]);
-$data['sum'][2] = $fun[$column[2]]($data['sum'][2]);
-$data['sum'][3] = $fun[$column[3]]($data['sum'][3]);
-
-for ($i = 0; $i <= $num_days; $i++){
-       $day = "$days[$i]";
-       $max[1] = ($max[1] > $data[$day][1] ) ? $max[1] : $data[$day][1];
-       $max[2] = ($max[2] > $data[$day][2] ) ? $max[2] : $data[$day][2];
-       $max[3] = ($max[3] > $data[$day][3] ) ? $max[3] : $data[$day][3];
-
-}
-for ($i = 0; $i <= $num_days; $i++){
-       $day = "$days[$i]";
-       for ($j = 1; $j <= 3; $j++){
-               $tmp = $data[$day][$j];
-               if (!$max[$j])
-                       $p = $w = $c = 0;
-               else{
-                       $p = floor(100 * ($tmp / $max[$j]));
-                       $w = floor(70 * ($tmp / $max[$j]));
-                       $c = hexdec('f0e9e2') - (258 * $p);
-                       $c = dechex($c);
-               }
-               if (!$w)
-                       $w++;
-               $perc[$day][$j] = $p . "%";
-               $width[$day][$j] = $w;
-               $color[$day][$j] = $c;
-       }
-
-       $data[$day][1] = $fun[$column[1]]($data[$day][1]);
-       $data[$day][2] = $fun[$column[2]]($data[$day][2]);
-       $data[$day][3] = $fun[$column[3]]($data[$day][3]);
-}
-
-$data[max][1] = $fun[$column[1]]($max[1]);
-$data[max][2] = $fun[$column[2]]($max[2]);
-$data[max][3] = $fun[$column[3]]($max[3]);
-
-require('../html/stats.html.php');
-?>
diff --git a/dialup_admin/htdocs/style.css b/dialup_admin/htdocs/style.css
deleted file mode 100644 (file)
index 44f19d8..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-td {font-family:verdana,sans-serif;text-decoration:none;font-size:11px}
-th {font-family:verdana,sans-serif;text-decoration:none;font-size:11px}
-A {FONT-FAMILY: verdana,sans-serif; FONT-SIZE: 11px; TEXT-DECORATION: none}
-H1 {FONT-FAMILY: lucida,sans-serif; FONT-SIZE: 24px; TEXT-DECORATION: none}
-INPUT{
-       BACKGROUND-COLOR: #FFFFFF;
-       BORDER-BOTTOM: #3333CC 1px solid;
-       BORDER-LEFT: #3333CC 1px solid;
-       BORDER-RIGHT: #3333CC 1px solid;
-       BORDER-TOP: #3333CC 1px solid;
-       COLOR: #000000;
-       FONT-FAMILY: Verdana
-}
-INPUT.button{
-       BACKGROUND-COLOR: #999999;
-       BORDER-BOTTOM: #3333CC 1px solid;
-       BORDER-LEFT: #3333CC 1px solid;
-       BORDER-RIGHT: #3333CC 1px solid;
-       BORDER-TOP: #3333CC 1px solid;
-       COLOR: #000000;
-       FONT-FAMILY: Verdana
-}
-body
-{
-       scrollbar-track-color:#b0bd90;
-       scrollbar-arrow-color:#000000;
-       scrollbar-face-color:#d0ddb0;
-       scrollbar-shadow-color:#909d70;
-       scrollbar-highlight-color:#fffff0;
-       scrollbar-3dlight-color:#000000;
-       scrollbar-darkshadow-color:#000000;
-       bgcolor:#80a040;
-       background-image: url(images/greenlines1.gif);
-}
-a:link {
-       color: #000000;
-}
-a:visited {
-       color:#000000;
-}
-a:hover {
-       color:#000000;
-}
-a:active {
-       color:#000000;
-}
diff --git a/dialup_admin/htdocs/user_accounting.php b/dialup_admin/htdocs/user_accounting.php
deleted file mode 100644 (file)
index 6cf5397..0000000
+++ /dev/null
@@ -1,242 +0,0 @@
-<?php
-require('../conf/config.php');
-?>
-<html>
-<?php
-require('../lib/functions.php');
-require('../lib/sql/functions.php');
-require('../lib/attrshow.php');
-
-if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
-       include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
-else{
-       echo <<<EOM
-<title>subscription analysis for $login</title>
-<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
-<link rel="stylesheet" href="style.css">
-</head>
-<body>
-<center>
-<b>Could not include SQL library functions. Aborting</b>
-</body>
-</html>
-EOM;
-       exit();
-}
-
-$now = time();
-$now_str = ($now_str != '') ? "$now_str" : date($config[sql_date_format],$now + 86400);
-$prev_str = ($prev_str != '') ? "$prev_str" : date($config[sql_date_format], $now - 604800 );
-$num = 0;
-$pagesize = ($pagesize) ? $pagesize : 10;
-if (!is_numeric($pagesize) && $pagesize != 'all')
-       $pagesize = 10;
-$limit = ($pagesize == 'all') ? '' : "$pagesize";
-$selected[$pagesize] = 'selected';
-$order = ($order != '') ? $order : $config[general_accounting_info_order];
-if ($order != 'desc' && $order != 'asc')
-       $order = 'desc';
-$selected[$order] = 'selected';
-$now_str = da_sql_escape_string($now_str);
-$prev_str = da_sql_escape_string($prev_str);
-
-unset($da_name_cache);
-if (isset($_SESSION['da_name_cache']))
-       $da_name_cache = $_SESSION['da_name_cache'];
-
-
-echo <<<EOM
-<head>
-<title>subscription analysis for $login</title>
-<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
-<link rel="stylesheet" href="style.css">
-</head>
-<body>
-<center>
-<table border=0 width=550 cellpadding=0 cellspacing=0>
-<tr valign=top>
-<td align=center><img src="images/title2.gif"></td>
-</tr>
-</table>
-<table border=0 width=400 cellpadding=0 cellspacing=2>
-EOM;
-
-include("../html/user_toolbar.html.php");
-
-print <<<EOM
-</table>
-<br>
-<table border=0 width=840 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=65%></td>
-<td bgcolor="black" width=35%>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th>
-       <font color="white">Subscription Analysis for $login</font>&nbsp;
-       </th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-<b>$prev_str</b> up to <b>$now_str</b>
-EOM;
-?>
-
-<p>
-       <table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
-       <tr bgcolor="#d0ddb0">
-       <th>#</th>
-<?php
-for($i=1;$i<=9;$i++){
-       if ($acct_attrs['ua']["$i"] != '')
-               echo "<th>" . $acct_attrs['ua']["$i"] . "</th>\n";
-}
-$sql_extra_query = '';
-if ($config[sql_accounting_extra_query] != '')
-       $sql_extra_query = xlat($config[sql_accounting_extra_query],$login,$config);
-?>
-       </tr>
-
-<?php
-$link = @da_sql_pconnect($config);
-if ($link){
-       $search = @da_sql_query($link,$config,
-       "SELECT " . da_sql_limit($limit,0,$config) . " * FROM $config[sql_accounting_table]
-       WHERE username = '$login' AND acctstarttime <= '$now_str'
-       AND acctstarttime >= '$prev_str' $sql_extra_query " . da_sql_limit($limit,1,$config) .
-       " ORDER BY acctstarttime $order " . da_sql_limit($limit,2,$config). " ;");
-       if ($search){
-               while( $row = @da_sql_fetch_array($search,$config) ){
-                       $tr_color='white';
-                       $num++;
-                       $acct_type = "$row[framedprotocol]/$row[nasporttype]";
-                       if ($acct_type == '')
-                               $acct_type = '-';
-                       $acct_logedin = $row[acctstarttime];
-                       $acct_sessiontime = $row[acctsessiontime];
-                       $acct_sessiontime_sum += $acct_sessiontime;
-                       $acct_sessiontime = time2str($acct_sessiontime);
-                       $acct_ip = $row[framedipaddress];
-                       if ($acct_ip == '')
-                               $acct_ip = '-';
-                       $acct_upload = $row[acctinputoctets];
-                       $acct_upload_sum += $acct_upload;
-                       $acct_upload = bytes2str($acct_upload);
-                       $acct_download = $row[acctoutputoctets];
-                       $acct_download_sum += $acct_download;
-                       $acct_download = bytes2str($acct_download);
-                       $acct_server = $row[nasipaddress];
-                       if ($acct_server != ''){
-                               $acct_server = $da_name_cache[$row[nasipaddress]];
-                               if (!isset($acct_server)){
-                                       $acct_server = @gethostbyaddr($row[nasipaddress]);
-                                       if (!isset($da_name_cache) && $config[general_use_session] == 'yes'){
-                                               $da_name_cache[$row[nasipaddress]] = $acct_server;
-                                               session_register('da_name_cache');
-                                       }
-                                       else
-                                               $da_name_cache[$row[nasipaddress]] = $acct_server;
-                               }
-                       }
-                       else
-                               $acct_server = '-';
-                       $acct_server = "$acct_server:$row[nasportid]";
-                       $acct_terminate_cause = "$row[acctterminatecause]";
-                       if ($acct_terminate_cause == '')
-                               $acct_terminate_cause = '-';
-                       if (preg_match('/Login-Incorrect/',$acct_terminate_cause) ||
-                               preg_match('/Multiple-Logins/', $acct_terminate_cause) || preg_match('/Invalid-User/',$acct_terminate_cause))
-                               $tr_color='#ffe8e0';
-                       $acct_callerid = "$row[callingstationid]";
-                       if ($acct_callerid == '')
-                               $acct_callerid = '-';
-                       echo <<<EOM
-                       <tr align=center bgcolor="$tr_color">
-                               <td>$num</td>
-EOM;
-                               if ($acct_attrs[ua][1] != '') echo "<td>$acct_type</td>\n";
-                               if ($acct_attrs[ua][2] != '') echo "<td>$acct_logedin</td>\n";
-                               if ($acct_attrs[ua][3] != '') echo "<td>$acct_sessiontime</td>\n";
-                               if ($acct_attrs[ua][4] != '') echo "<td>$acct_ip</td>\n";
-                               if ($acct_attrs[ua][5] != '') echo "<td>$acct_upload</td>\n";
-                               if ($acct_attrs[ua][6] != '') echo "<td>$acct_download</td>\n";
-                               if ($acct_attrs[ua][7] != '') echo "<td>$acct_server</td>\n";
-                               if ($acct_attrs[ua][8] != '') echo "<td>$acct_terminate_cause</td>\n";
-                               if ($acct_attrs[ua][9] != '') echo "<td>$acct_callerid</td>\n";
-                       echo "</tr>\n";
-               }
-               $acct_sessiontime_sum = time2str($acct_sessiontime_sum);
-               $acct_upload_sum = bytes2str($acct_upload_sum);
-               $acct_download_sum = bytes2str($acct_download_sum);
-       }
-       else
-               echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
-}
-else
-       echo "<b>Could not connect to SQL database</b><br>\n";
-$colspan = 3;
-if ($acct_attrs[ua][1] == '')
-       $colspan--;
-if ($acct_attrs[ua][2] == '')
-       $colspan--;
-echo <<<EOM
-                       <tr bgcolor="lightyellow">
-                       <td colspan=$colspan align="right">Page Total</td>
-EOM;
-                               if ($acct_attrs[ua][3] != '') echo "<td align=\"center\"><b>$acct_sessiontime_sum</td>\n";
-                               if ($acct_attrs[ua][4] != '') echo "<td>&nbsp;</td>\n";
-                               if ($acct_attrs[ua][5] != '') echo "<td align=\"right\" nowrap><b>$acct_upload_sum</td>\n";
-                               if ($acct_attrs[ua][6] != '') echo "<td align=\"right\" nowrap><b>$acct_download_sum</td>\n";
-                               if ($acct_attrs[ua][7] != '') echo "<td>&nbsp;</td>\n";
-                               if ($acct_attrs[ua][8] != '') echo "<td>&nbsp;</td>\n";
-                               if ($acct_attrs[ua][9] != '') echo "<td>&nbsp;</td>\n";
-?>
-                               </tr>
-       </table>
-<tr><td>
-<hr>
-<tr><td align="center">
-       <form action="user_accounting.php" method="get" name="master">
-       <table border=0>
-               <tr><td colspan=6></td>
-                       <td rowspan=3 valign="bottom">
-                               <small>
-                               the <b>from</b> date matches any login after the 00:00 that day,
-                               and the <b>to</b> date any login before the 23:59 that day.
-                               the default values shown are the <b>current week</b>.
-                       </td>
-               </tr>
-               <tr valign="bottom">
-                       <td><small><b>user</td><td><small><b>from date</td><td><small><b>to date</td><td><small><b>pagesize</td><td><b>order</td>
-       <tr valign="middle"><td>
-<?php
-       echo <<<EOM
-<input type="text" name="login" size="11" value="$login"></td>
-<td><input type="text" name="prev_str" size="11" value="$prev_str"></td>
-<td><input type="text" name="now_str" size="11" value="$now_str"></td>
-<td><select name="pagesize">
-<option $selected[5] value="5" >05
-<option $selected[10] value="10">10
-<option $selected[15] value="15">15
-<option $selected[20] value="20">20
-<option $selected[40] value="40">40
-<option $selected[80] value="80">80
-<option $selected[all] value="all">all
-</select>
-</td>
-<td><select name="order">
-<option $selected[asc] value="asc">older first
-<option $selected[desc] value="desc">recent first
-</select>
-</td>
-EOM;
-?>
-
-<td><input type="submit" class=button value="show"></td></tr>
-</table></td></tr></form>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/user_admin.php b/dialup_admin/htdocs/user_admin.php
deleted file mode 100644 (file)
index 880638c..0000000
+++ /dev/null
@@ -1,323 +0,0 @@
-<?php
-require('../conf/config.php');
-?>
-<html>
-<head>
-<?php
-require('../lib/functions.php');
-require('../lib/defaults.php');
-$date = strftime('%A, %e %B %Y, %T %Z');
-
-if (is_file("../lib/$config[general_lib_type]/user_info.php")){
-       include("../lib/$config[general_lib_type]/user_info.php");
-       if ($user_exists == 'no'){
-               echo <<<EOM
-<title>user information page</title>
-<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
-<link rel="stylesheet" href="style.css">
-</head>
-<body>
-<center>
-<form action="user_admin.php" method=get>
-<b>User Name&nbsp;&nbsp;</b>
-<input type="text" size=10 name="login" value="$login">
-<b>&nbsp;&nbsp;does not exist</b><br>
-<input type=submit class=button value="Show User">
-</body>
-</html>
-EOM;
-               exit();
-       }
-}
-
-if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
-       include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
-else{
-       echo <<<EOM
-<title>user information page</title>
-<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
-<link rel="stylesheet" href="style.css">
-</head>
-<body>
-<center>
-<b>Could not include SQL library functions. Aborting</b>
-</body>
-</html>
-EOM;
-       exit();
-}
-
-$monthly_limit = ($item_vals['Max-Monthly-Session'][0] != '') ? $item_vals['Max-Monthly-Session'][0] : $default_vals['Max-Monthly-Session'][0];
-$monthly_limit = ($monthly_limit) ? $monthly_limit : $config[counter_default_monthly];
-$weekly_limit = ($item_vals['Max-Weekly-Session'][0] != '') ? $item_vals['Max-Weekly-Session'][0] : $default_vals['Max-Weekly-Session'][0];
-$weekly_limit = ($weekly_limit) ? $weekly_limit : $config[counter_default_weekly];
-$daily_limit = ($item_vals['Max-Daily-Session'][0] != '') ? $item_vals['Max-Daily-Session'][0] : $default_vals['Max-Daily-Session'][0];
-$daily_limit = ($daily_limit) ? $daily_limit : $config[counter_default_daily];
-$session_limit = ($item_vals['Session-Timeout'][0] != '') ? $item_vals['Session-Timeout'][0] : $default_vals['Session-Timeout'][0];
-$session_limit = ($session_limit) ? $session_limit : 'none';
-$remaining = 'unlimited time';
-$log_color = 'green';
-
-$now = time();
-$week = $now - 604800;
-$now_str = date("$config[sql_date_format]",$now + 86400);
-$week_str = date("$config[sql_date_format]",$week);
-$day = date('w');
-$week_start = date($config[sql_date_format],$now - ($day)*86400);
-$month_start = date($config[sql_date_format],$now - date('j')*86400);
-$today = $day;
-$now_tmp = $now;
-for ($i = $day; $i >-1; $i--){
-       $days[$i] = date($config[sql_date_format],$now_tmp);
-       $now_tmp -= 86400;
-}
-$day++;
-//$now -= ($day * 86400);
-$now -= 604800;
-$now += 86400;
-for ($i = $day; $i <= 6; $i++){
-       $days[$i] = date($config[sql_date_format],$now);
-//     $now -= 86400;
-       $now += 86400;
-}
-
-$daily_used = $weekly_used = $monthly_used = $lastlog_session_time = '-';
-$extra_msg = '';
-$used = array('-','-','-','-','-','-','-');
-
-$link = @da_sql_pconnect($config);
-if ($link){
-       $search = @da_sql_query($link,$config,
-       "SELECT sum(acctsessiontime) AS sum_sess_time,
-       sum(acctinputoctets) AS sum_in_octets,
-       sum(acctoutputoctets) AS sum_out_octets,
-       avg(acctsessiontime) AS avg_sess_time,
-       avg(acctinputoctets) AS avg_in_octets,
-       avg(acctoutputoctets) AS avg_out_octets,
-       COUNT(*) as counter FROM
-       $config[sql_accounting_table] WHERE username = '$login'
-       AND acctstarttime >= '$week_str' AND acctstarttime <= '$now_str';");
-       if ($search){
-               $row = @da_sql_fetch_array($search,$config);
-               $tot_time = time2str($row[sum_sess_time]);
-               $tot_input = bytes2str($row[sum_in_octets]);
-               $tot_output = bytes2str($row[sum_out_octets]);
-               $avg_time = time2str($row[avg_sess_time]);
-               $avg_input = bytes2str($row[avg_in_octets]);
-               $avg_output = bytes2str($row[avg_out_octets]);
-               $tot_conns = $row[counter];
-       }
-       else
-               echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
-       $search = @da_sql_query($link,$config,
-       "SELECT sum(acctsessiontime) AS sum_sess_time FROM $config[sql_accounting_table] WHERE username = '$login'
-       AND acctstarttime >= '$week_start' AND acctstarttime <= '$now_str';");
-       if ($search){
-               $row = @da_sql_fetch_array($search,$config);
-               $weekly_used = $row[sum_sess_time];
-       }
-       else
-               echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
-       if ($monthly_limit != 'none' || $config[counter_monthly_calculate_usage] == 'true'){
-               $search = @da_sql_query($link,$config,
-               "SELECT sum(acctsessiontime) AS sum_sess_time FROM $config[sql_accounting_table] WHERE username = '$login'
-               AND acctstarttime >= '$month_start' AND acctstarttime <= '$now_str';");
-               if ($search){
-                       $row = @da_sql_fetch_array($search,$config);
-                       $monthly_used = $row[sum_sess_time];
-               }
-               else
-                       echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
-       }
-       $search = @da_sql_query($link,$config,
-       "SELECT COUNT(*) AS counter FROM $config[sql_accounting_table] WHERE username = '$login'
-       AND acctstoptime >= '$week_str' AND acctstoptime <= '$now_str'
-       AND (acctterminatecause LIKE 'Login-Incorrect%' OR
-       acctterminatecause LIKE 'Invalid-User%' OR
-       acctterminatecause LIKE 'Multiple-Logins%');");
-       if ($search){
-               $row = @da_sql_fetch_array($search,$config);
-               $tot_badlogins = $row[counter];
-       }
-       else
-               echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
-       for($i = 0; $i <=6; $i++){
-               if ($days[$i] == '')
-                       continue;
-               $search = @da_sql_query($link,$config,
-               "SELECT sum(acctsessiontime) AS sum_sess_time FROM $config[sql_accounting_table] WHERE
-               username = '$login' AND acctstoptime >= '$days[$i] 00:00:00'
-               AND acctstoptime <= '$days[$i] 23:59:59';");
-               if ($search){
-                       $row = @da_sql_fetch_array($search,$config);
-                       $used[$i] = $row[sum_sess_time];
-                       if ($daily_limit != 'none' && $used[$i] > $daily_limit)
-                               $used[$i] = "<font color=red>" . time2str($used[$i]) . "</font>";
-                       else
-                               $used[$i] = time2str($used[$i]);
-                       if ($today == $i){
-                               $daily_used = $row[sum_sess_time];
-                               if ($daily_limit != 'none'){
-                                       $remaining = $daily_limit - $daily_used;
-                                       if ($remaining <=0)
-                                               $remaining = 0;
-                                       $log_color = ($remaining) ? 'green' : 'red';
-                                       if (!$remaining)
-                                               $extra_msg = '(Out of daily quota)';
-                               }
-                               $daily_used = time2str($daily_used);
-                               if ($daily_limit != 'none' && !$remaining)
-                                       $daily_used = "<font color=red>$daily_used</font>";
-                       }
-               }
-               else
-                       echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
-       }
-       if ($weekly_limit != 'none'){
-               $tmp = $weekly_limit - $weekly_used;
-               if ($tmp <=0){
-                       $tmp = 0;
-                       $extra_msg .= '(Out of weekly quota)';
-               }
-               if (!is_numeric($remaining))
-                       $remaining = $tmp;
-               if ($remaining > $tmp)
-                       $remaining = $tmp;
-               $log_color = ($remaining) ? 'green' : 'red';
-       }
-       $weekly_used = time2str($weekly_used);
-       if ($weekly_limit != 'none' && !$tmp)
-               $weekly_used = "<font color=red>$weekly_used</font>";
-
-       if ($monthly_limit != 'none'){
-               $tmp = $monthly_limit - $monthly_used;
-               if ($tmp <=0){
-                       $tmp = 0;
-                       $extra_msg .= '(Out of monthly quota)';
-               }
-               if (!is_numeric($remaining))
-                       $remaining = $tmp;
-               if ($remaining > $tmp)
-                       $remaining = $tmp;
-               $log_color = ($remaining) ? 'green' : 'red';
-       }
-       if ($monthly_limit != 'none' || $config[counter_monthly_calculate_usage] == 'true'){
-               $monthly_used = time2str($monthly_used);
-               if ($monthly_limit != 'none' && !$tmp)
-                       $monthly_used = "<font color=red>$monthly_used</font>";
-       }
-       if ($session_limit != 'none'){
-               if (!is_numeric($remaining))
-                       $remaining = $session_limit;
-               if ($remaining > $session_limit)
-                       $remaining = $session_limit;
-       }
-
-       $search = @da_sql_query($link,$config,
-       "SELECT " . da_sql_limit(1,0,$config) . " * FROM $config[sql_accounting_table]
-       WHERE username = '$login' AND acctstoptime IS NULL " . da_sql_limit(1,1,$config) . "
-        ORDER BY acctstarttime DESC " . da_sql_limit(1,2,$config). " ;");
-       if ($search){
-               if (@da_sql_num_rows($search,$config)){
-                       $logged_now = 1;
-                       $row = @da_sql_fetch_array($search,$config);
-                       $lastlog_time = $row['acctstarttime'];
-                       $lastlog_server_ip = $row['nasipaddress'];
-                       $lastlog_server_port = $row['nasportid'];
-                       $lastlog_session_time = date2timediv($lastlog_time,0);
-                       if ($daily_limit != 'none'){
-                               $remaining = $remaining - $lastlog_session_time;
-                               if ($remaining < 0)
-                                       $remaining = 0;
-                               $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_server_name = @gethostbyaddr($lastlog_server_ip);
-                       $lastlog_client_name = @gethostbyaddr($lastlog_client_ip);
-                       $lastlog_callerid = $row['callingstationid'];
-                       if ($lastlog_callerid == '')
-                               $lastlog_callerid = 'not available';
-                       $lastlog_input = $row['acctinputoctets'];
-                       if ($lastlog_input)
-                               $lastlog_input = bytes2str($lastlog_input);
-                       else
-                               $lastlog_input = 'not available';
-                       $lastlog_output = $row['acctoutputoctets'];
-                       if ($lastlog_output)
-                               $lastlog_output = bytes2str($lastlog_output);
-                       else
-                               $lastlog_output = 'not available';
-               }
-       }
-       else
-               echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
-       if (! $logged_now){
-               $search = @da_sql_query($link,$config,
-               "SELECT " . da_sql_limit(1,0,$config) . " * FROM $config[sql_accounting_table]
-               WHERE username = '$login' AND acctsessiontime != '0' " . da_sql_limit(1,1,$config) . "
-                ORDER BY acctstoptime DESC " . da_sql_limit(1,2,$config). " ;");
-               if ($search){
-                       if (@da_sql_num_rows($search,$config)){
-                               $row = @da_sql_fetch_array($search,$config);
-                               $lastlog_time = $row['acctstarttime'];
-                               $lastlog_server_ip = $row['nasipaddress'];
-                               $lastlog_server_port = $row['nasportid'];
-                               $lastlog_session_time = time2str($row['acctsessiontime']);
-                               $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'];
-                               if ($lastlog_callerid == '')
-                                       $lastlog_callerid = 'not available';
-                               $lastlog_input = $row['acctinputoctets'];
-                               $lastlog_input = bytes2str($lastlog_input);
-                               $lastlog_output = $row['acctoutputoctets'];
-                               $lastlog_output = bytes2str($lastlog_output);
-                       }
-                       else
-                               $not_known = 1;
-               }
-               else
-                       echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
-       }
-}
-else
-       echo "<b>Could not connect to SQL database</b><br>\n";
-
-$monthly_limit = (is_numeric($monthly_limit)) ? time2str($monthly_limit) : $monthly_limit;
-$weekly_limit = (is_numeric($weekly_limit)) ? time2str($weekly_limit) : $weekly_limit;
-$daily_limit = (is_numeric($daily_limit)) ? time2str($daily_limit) : $daily_limit;
-$session_limit = (is_numeric($session_limit)) ? time2str($session_limit) : $session_limit;
-$remaining = (is_numeric($remaining)) ? time2str($remaining) : $remaining;
-
-if ($item_vals['Dialup-Access'][0] == 'FALSE' || (!isset($item_vals['Dialup-Access'][0]) && $attrmap['Dialup-Access'] != '' && $attrmap['Dialup-Access'] != 'none'))
-       $msg =<<<EON
-<font color=red><b> The user account is locked </b></font>
-EON;
-else
-       $msg =<<<EON
-user can login for <font color="$log_color"> <b>$remaining $extra_msg</font>
-EON;
-$lock_msg = $item_vals['Dialup-Lock-Msg'][0];
-if ($lock_msg != '')
-       $descr =<<<EON
-<font color=red><b>$lock_msg </b</font>
-EON;
-else
-       $descr = '-';
-
-$expiration = $default_vals['Expiration'][0];
-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.php');
-?>
diff --git a/dialup_admin/htdocs/user_delete.php b/dialup_admin/htdocs/user_delete.php
deleted file mode 100644 (file)
index 16e4d60..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-<?php
-require('../conf/config.php');
-if ($type != 'group')
-       if (is_file("../lib/$config[general_lib_type]/user_info.php"))
-               include("../lib/$config[general_lib_type]/user_info.php");
-else
-       if (is_file("../lib/$config[general_lib_type]/group_info.php"))
-               include("../lib/$config[general_lib_type]/group_info.php");
-
-$whatis = ($user_type == 'group') ? 'group' : 'user';
-$whatisL = ($user_type == 'group') ? 'Group' : 'User';
-
-echo <<<EOM
-<html>
-<head>
-EOM;
-
-if ($user_type != 'group')
-       echo "<title>delete user $login ($cn)</title>\n";
-else
-       echo "<title>delete group $login</title>\n";
-
-echo <<<EOM
-<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
-<link rel="stylesheet" href="style.css">
-</head>
-<body>
-<center>
-<table border=0 width=550 cellpadding=0 cellspacing=0>
-<tr valign=top>
-<td align=center><img src="images/title2.gif"></td>
-</tr>
-</table>
-
-<table border=0 width=400 cellpadding=0 cellspacing=2>
-EOM;
-
-if ($user_type != 'group')
-       include("../html/user_toolbar.html.php");
-else
-       include("../html/group_toolbar.html.php");
-
-print <<<EOM
-</table>
-
-<br>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=200>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th>
-       <font color="white">$whatisL $login Deletion</font>&nbsp;
-       </th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <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.php"))
-                       include("../lib/$config[general_lib_type]/delete_user.php");
-       }
-       else{
-               if (is_file("../lib/$config[general_lib_type]/delete_group.php"))
-                       include("../lib/$config[general_lib_type]/delete_group.php");
-       }
-       echo <<<EOM
-</td></tr>
-</table>
-</tr>
-</table>
-</body>
-</html>
-EOM;
-       exit();
-}
-?>
-   <form method=post>
-      <input type=hidden name=login value="<?php print $login ?>">
-      <input type=hidden name=delete_user value="0">
-       <table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
-<tr>
-<td align=center>
-Are you sure you want to delete <?php echo "$whatis $login"; ?> ?
-</td>
-</tr>
-       </table>
-<br>
-<input type=submit class=button value="Yes Delete" OnClick="this.form.delete_user.value=1">
-</form>
-</td></tr>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/user_edit.php b/dialup_admin/htdocs/user_edit.php
deleted file mode 100644 (file)
index 0dc4083..0000000
+++ /dev/null
@@ -1,296 +0,0 @@
-<?php
-require('../conf/config.php');
-require('../lib/attrshow.php');
-require('../lib/defaults.php');
-$extra_text = '';
-if ($user_type != 'group'){
-       if (is_file("../lib/$config[general_lib_type]/user_info.php"))
-               include("../lib/$config[general_lib_type]/user_info.php");
-       if ($config[general_lib_type] == 'sql' && $config[sql_show_all_groups] == 'true'){
-               $extra_text = "<br><font size=-2><i>(The groups that the user is a member of are highlated)</i></font>";
-               $saved_login = $login;
-               $login = '';
-               if (is_file("../lib/sql/group_info.php"))
-                       include("../lib/sql/group_info.php");
-               $login = $saved_login;
-       }
-}
-else{
-       if (is_file("../lib/$config[general_lib_type]/group_info.php"))
-               include("../lib/$config[general_lib_type]/group_info.php");
-}
-if ($config[general_lib_type] == 'sql' && $config[sql_use_operators] == 'true'){
-       $colspan=2;
-       $show_ops = 1;
-       include("../lib/operators.php");
-}
-else{
-       $show_ops = 0;
-       $colspan=1;
-}
-
-
-echo <<<EOM
-<html>
-<head>
-EOM;
-
-if ($user_type != 'group')
-       echo " <title>subscription configuration for $login ($cn)</title>\n";
-else
-       echo " <title>subscription configuration for $login</title>\n";
-?>
-
-<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $config[general_charset]?>">
-<link rel="stylesheet" href="style.css">
-</head>
-<body>
-<center>
-<table border=0 width=550 cellpadding=0 cellspacing=0>
-<tr valign=top>
-<td align=center><img src="images/title2.gif"></td>
-</tr>
-</table>
-<table border=0 width=400 cellpadding=0 cellspacing=2>
-
-<?php
-if ($user_type != 'group')
-       include("../html/user_toolbar.html.php");
-else
-       include("../html/group_toolbar.html.php");
-
-print <<<EOM
-</table>
-
-<br>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=75%>&nbsp;</td>
-<td bgcolor="black" width=25% align=right>
-       <table border=0 width="200" cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=center valign=top><th>
-       <font color="white">User Preferences for $login ($cn)</font>&nbsp;
-       </th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <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.php"))
-               include("../lib/$config[general_lib_type]/change_attrs.php");
-       if ($user_type != 'group'){
-               if ($config[general_show_user_password] != 'no' && $passwd != ''
-                       && is_file("../lib/$config[general_lib_type]/change_passwd.php"))
-                       include("../lib/$config[general_lib_type]/change_passwd.php");
-               if (is_file("../lib/$config[general_lib_type]/user_info.php"))
-                       include("../lib/$config[general_lib_type]/user_info.php");
-               if ($group_change && $config[general_lib_type] == 'sql' && $config[sql_show_all_groups] == 'true'){
-                       include("../lib/sql/group_change.php");
-                       include("../lib/defaults.php");
-               }
-       }
-       else{
-               if (is_file("../lib/$config[general_lib_type]/group_info.php"))
-                       include("../lib/$config[general_lib_type]/group_info.php");
-       }
-}
-else if ($badusers == 1){
-       if (is_file("../lib/add_badusers.php"))
-               include("../lib/add_badusers.php");
-}
-
-?>
-   <form name="edituser" method=post>
-      <input type=hidden name=login value="<?php print $login ?>">
-      <input type=hidden name=user_type value=<?php print $user_type ?>>
-      <input type=hidden name=change value="0">
-      <input type=hidden name=add value="0">
-      <input type=hidden name=badusers value="0">
-      <input type=hidden name=group_change value="0">
-       <table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
-<?php
-if ($user_type == 'group')
-       echo <<<EOM
-Note: The attributes contained in the groups the user belongs to<br>
-are extracted after the attributes in the radcheck/radreply tables.<br>
-Please take that into consideration when adding attributes in the group<br>
-and selecting operators.
-<br>
-EOM;
-if ($user_type != 'group' && $config[general_show_user_password] != 'no'){
-       echo <<<EOM
-<tr>
-<td align=right colspan=$colspan bgcolor="#d0ddb0">
-User Password (changes only)<br>
-EOM;
-if ($user_password_exists == 'yes')
-       echo "<font size=-2>User password <font color=\"green\"><b>exists</b></font></font>\n";
-else
-       echo "<font size=-2>User password <font color=\"red\"><b>does not exist</b></font></font>\n";
-       echo <<<EOM
-</td>
-<td>
-<input type=password name=passwd value="" size=40>
-</td>
-</tr>
-EOM;
-}
-       foreach($show_attrs as $key => $desc){
-               $name = $attrmap["$key"];
-               $generic = $attrmap[generic]["$key"];
-               if ($name == 'none')
-                       continue;
-               unset($vals);
-               unset($ops);
-               $def_added = 0;
-               if ($item_vals["$key"][count]){
-                       for($i=0;$i<$item_vals["$key"][count];$i++){
-                               $vals[] = $item_vals["$key"][$i];
-                               $ops[] = $item_vals["$key"][operator][$i];
-                       }
-               }
-               else{
-                       if ($default_vals["$key"][count]){
-                               for($i=0;$i<$default_vals["$key"][count];$i++){
-                                       $vals[] = $default_vals["$key"][$i];
-                                       $ops[] = $default_vals["$key"][operator][$i];
-                               }
-                       }
-                       else{
-                               $vals[] = '';
-                               $ops[] = '=';
-                       }
-                       $def_added = 1;
-               }
-               if ($generic == 'generic' && $def_added == 0){
-                       for($i=0;$i<$default_vals["$key"][count];$i++){
-                               $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] : '=';
-               }
-
-               $i = 0;
-               foreach($vals as $val){
-                       unset($selected);
-                       $name1 = $name . $i;
-                       $val = preg_replace('/"/','&quot;',$val);
-                       $oper_name = $name1 . '_op';
-                       $oper = $ops[$i];
-                       $selected[$oper] = 'selected';
-                       $i++;
-                       print <<<EOM
-<tr>
-<td align=right bgcolor="#d0ddb0">
-EOM;
-                       $desc = addslashes($desc);
-                       eval("\$desc = \"$desc\";");
-                       $desc = stripslashes($desc);
-                       if ($i == 1)
-                               echo "$desc\n";
-                       else
-                               echo "$desc ($i)\n";
-                       print <<<EOM
-</td>
-EOM;
-                       if ($show_ops)
-                               print <<<EOM
-<td>
-<select name=$oper_name>
-<option $selected[$op_eq] value="=">=
-<option $selected[$op_set] value=":=">:=
-<option $selected[$op_add] value="+=">+=
-<option $selected[$op_eq2] value="==">==
-<option $selected[$op_ne] value="!=">!=
-<option $selected[$op_gt] value=">">&gt;
-<option $selected[$op_ge] value=">=">&gt;=
-<option $selected[$op_lt] value="<">&lt;
-<option $selected[$op_le] value="<=">&lt;=
-<option $selected[$op_regeq] value="=~">=~
-<option $selected[$op_regne] value="!~">!~
-<option $selected[$op_exst] value="=*">=*
-<option $selected[$op_nexst] value="!*">!*
-</select>
-</td>
-EOM;
-
-                       print <<<EOM
-<td>
-<input type=text name="$name1" value="$val" size=40>
-</td>
-</tr>
-EOM;
-               }
-       }
-?>
-<tr>
-<td align=right colspan=<?php print $colspan ?> bgcolor="#d0ddb0">
-Add Attribute
-</td>
-<td>
-<select name="add_attr" OnChange="this.form.add.value=1;this.form.submit()">
-<?php
-foreach ($show_attrs as $key => $desc){
-       $name = $attrmap["$key"];
-       print <<<EOM
-<option value="$name">$desc
-EOM;
-}
-?>
-</select>
-</td>
-</tr>
-
-<?php
-if (isset($member_groups)){
-       echo <<<EOM
-<tr>
-<td align=right colspan=$colspan bgcolor="#d0ddb0">
-Member of $extra_text
-</td>
-<td>
-<select size=2 name="edited_groups[]" multiple OnChange="this.form.group_change.value=1">
-EOM;
-       if ($config[sql_show_all_groups] == 'true'){
-               foreach ($existing_groups as $group => $count){
-                       if ($member_groups[$group] == $group)
-                               echo "<option selected value=\"$group\">$group\n";
-                       else
-                               echo "<option value=\"$group\">$group\n";
-               }
-       }else{
-               foreach ($member_groups as $group)
-                       echo "<option value=\"$group\">$group\n";
-       }
-       echo <<<EOM
-</select>
-</td>
-</tr>
-EOM;
-}
-?>
-       </table>
-<br>
-<input type=submit class=button value=Change OnClick="this.form.change.value=1">
-<?php
-if ($user_type != 'group'){
-       echo <<<EOM
-<br><br>
-<input type=submit class=button value="Add to Badusers" OnClick="this.form.badusers.value=1">
-<a href="help/badusers_help.html" target=bu_help onclick=window.open("help/badusers_help.html","bu_help","width=600,height=210,toolbar=no,scrollbars=no,resizable=yes") title="BADUSERS Help Page"><font color="blue">&lt;--Help</font></a>
-EOM;
-}
-?>
-</form>
-       </td></tr>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/user_finger.php b/dialup_admin/htdocs/user_finger.php
deleted file mode 100644 (file)
index b6b9e19..0000000
+++ /dev/null
@@ -1,224 +0,0 @@
-<?php
-require('../conf/config.php');
-require('../lib/attrshow.php');
-require('../lib/sql/nas_list.php');
-if (!isset($usage_summary)){
-       echo <<<EOM
-<html>
-<head>
-<META HTTP-EQUIV="Refresh" CONTENT="50">
-<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
-<title>User Finger Facility</title>
-<link rel="stylesheet" href="style.css">
-</head>
-EOM;
-}
-
-if ($config[general_decode_normal_attributes] == 'yes'){
-       if (is_file("../lib/lang/$config[general_prefered_lang]/utf8.php"))
-               include_once("../lib/lang/$config[general_prefered_lang]/utf8.php");
-       else
-               include_once('../lib/lang/default/utf8.php');
-       $k = init_decoder();
-       $decode_normal = 1;
-}
-require_once('../lib/functions.php');
-require("../lib/$config[general_lib_type]/functions.php");
-
-if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
-       include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
-else{
-       echo <<<EOM
-<body>
-<center>
-<b>Could not include SQL library functions. Aborting</b>
-</body>
-</html>
-EOM;
-       exit();
-}
-
-$date = strftime('%A, %e %B %Y, %T %Z');
-
-$sql_extra_query = '';
-if ($config[sql_accounting_extra_query] != ''){
-       $sql_extra_query = xlat($config[sql_accounting_extra_query],$login,$config);
-       $sql_extra_query = da_sql_escape_string($sql_extra_query);
-}
-
-$link = @da_sql_pconnect($config);
-$link2 = connect2db($config);
-$tot_in = $tot_rem = 0;
-if ($link){
-       $h = 21;
-       $servers_num = 0;
-       if ($config[general_ld_library_path] != '')
-               putenv("LD_LIBRARY_PATH=$config[general_ld_library_path]");
-       foreach($nas_list as $nas){
-               $j = 0;
-               $num = 0;
-
-               if ($server != ''){
-                       if ($nas[name] == $server)
-                               $servers_num++;
-                       else
-                               continue;
-               }
-               else
-                       $servers_num++;
-               if ($nas[ip] == '')
-                       continue;
-               $name_data = $nas[ip];
-               $community_data = $nas[community];
-               $server_name[$servers_num] = $nas[name];
-               $server_model[$servers_num] = $nas[model];
-               $extra = "";
-               $finger_type = $config[general_finger_type];
-               if ($nas[finger_type] != '')
-                       $finger_type = $nas[finger_type];
-               if ($finger_type == 'snmp'){
-                       $nas_type = ($nas[type] != '') ? $nas[type] : $config[general_nas_type];
-                       if ($nas_type == '')
-                               $nas_type = 'cisco';
-
-                       $users=exec("$config[general_snmpfinger_bin] $name_data $community_data $nas_type");
-                       if (strlen($users)){
-                               $extra = "AND username IN ($users)";
-                               if ($config[general_strip_realms] == 'yes'){
-                                       if ($config[general_realm_format] == 'prefix')
-                                               $match = "'[^']+" . $config[general_realm_delimiter];
-                                       else
-                                               $match = $config[general_realm_delimiter] . "[^']+'";
-                                       $extra = preg_replace("/$match/","'",$extra);
-                               }
-                       }
-               }
-               $search = @da_sql_query($link,$config,
-               "SELECT COUNT(*) AS onlineusers FROM $config[sql_accounting_table] WHERE
-               acctstoptime IS NULL AND nasipaddress = '$name_data' $extra $sql_extra_query;");
-               if ($search){
-                       if (($row = @da_sql_fetch_array($search,$config)))
-                               $num = $row[onlineusers];
-               }
-               $search = @da_sql_query($link,$config,
-               "SELECT DISTINCT username,acctstarttime,framedipaddress,callingstationid
-               FROM $config[sql_accounting_table] WHERE
-               acctstoptime IS NULL AND nasipaddress = '$name_data' $extra $sql_extra_query
-               GROUP BY username,acctstarttime,framedipaddress,callingstationid
-               ORDER BY acctstarttime;");
-               if ($search){
-                       $now = time();
-                       while($row = @da_sql_fetch_array($search,$config)){
-                               $j++;
-                               $h += 21;
-                               $user = $row['username'];
-                               $finger_info[$servers_num][$j]['ip'] = $row['framedipaddress'];
-                               if ($finger_info[$servers_num][$j]['ip'] == '')
-                                       $finger_info[$servers_num][$j]['ip'] = '-';
-                               $session_time = $row['acctstarttime'];
-                               $session_time = date2timediv($session_time,$now);
-                               $finger_info[$servers_num][$j]['session_time'] = time2strclock($session_time);
-                               $finger_info[$servers_num][$j]['user'] = $user;
-                               $finger_info[$servers_num][$j]['callerid'] = $row['callingstationid'];
-                               if ($finger_info[$servers_num][$j]['callerid'] == '')
-                                       $finger_info[$servers_num][$j]['callerid'] = '-';
-                               if ($user_info["$user"] == ''){
-                                       $user_info["$user"] = get_user_info($link2,$user,$config,$decode_normal,$k);
-                                       if ($user_info["$user"] == '' || $user_info["$user"] == ' ')
-                                               $user_info["$user"] = 'Unknown User';
-                               }
-                       }
-                       $height[$servers_num] = $h;
-               }
-               $server_counting[$servers_num] = $j;
-               $server_loggedin[$servers_num] = $num;
-               $server_rem[$servers_num] = ($config[$portnum]) ? ($config[$portnum] - $num) : 'unknown';
-               $tot_in += $num;
-               if (is_numeric($server_rem[$servers_num]))
-                       $tot_rem += $server_rem[$servers_num];
-       }
-}
-else
-       echo "<b>Could not connect to SQL database</b><br>\n";
-if (isset($usage_summary)){
-       echo "Online: $tot_in Free: $tot_rem\n";
-       exit();
-}
-?>
-
-<body>
-<center>
-<table border=0 width=550 cellpadding=0 cellspacing=0>
-<tr valign=top>
-<td align=center><img src="images/title2.gif"></td>
-</tr>
-</table>
-<br>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=200>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th>
-       <font color="white">Online Users</font>&nbsp;
-       </th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-<?php
-echo <<<EOM
-       <b>$date</b>
-EOM;
-       for($j = 1; $j <= $servers_num; $j++){
-               echo <<<EOM
-<p>
-       <table width=100% cellpadding=0 height=30><tr>
-       <th align=left>$server_name[$j]<br><font color="green">$server_model[$j]</font></th><th align=right><font color="red">$server_loggedin[$j] users connected</font></th><th><font color="green">$server_rem[$j] $config[general_caption_finger_free_lines]</font></th>
-       </tr>
-       </table>
-       <div height="$height[$j]" style="height:$height[$j]">
-       <table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
-       <tr bgcolor="#d0ddb0">
-       <th>#</th><th>user</th>
-EOM;
-       if ($acct_attrs['uf'][4] != '') echo "<th>" . $acct_attrs[uf][4] . "</th>\n";
-       if ($acct_attrs['uf'][9] != '') echo "<th>" . $acct_attrs[uf][9] . "</th>\n";
-echo <<<EOM
-       <th>name</th><th>duration</th>
-       </tr>
-EOM;
-       for( $k = 1; $k <= $server_counting[$j]; $k++){
-               $user = $finger_info[$j][$k][user];
-               if ($user == '')
-                       $user = '&nbsp;';
-               $User = urlencode($user);
-               $time = $finger_info[$j][$k][session_time];
-               $ip = $finger_info[$j][$k][ip];
-               $cid = $finger_info[$j][$k][callerid];
-               $inf = $user_info[$user];
-               echo <<<EOM
-       <tr align=center>
-       <td>$k</td><td><a href="user_admin.php?login=$User" title="Edit User $user">$user</a></td>
-EOM;
-if ($acct_attrs['uf'][4] != '') echo "<td>$ip</td>\n";
-if ($acct_attrs['uf'][9] != '') echo "<td>$cid</td>\n";
-echo <<<EOM
-<td>$inf</td><td>$time</td>
-       </tr>
-EOM;
-       }
-
-       echo <<<EOM
-       </table>
-       </div>
-EOM;
-}
-?>
-       </td></tr>
-       </table>
-</td></tr>
-</table>
-<p>
-</html>
diff --git a/dialup_admin/htdocs/user_info.php b/dialup_admin/htdocs/user_info.php
deleted file mode 100644 (file)
index dfc4e67..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-<?php
-require('../conf/config.php');
-?>
-
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $config[general_charset]?>">
-<title>Personal information page</title>
-<link rel="stylesheet" href="style.css">
-</head>
-<body>
-
-<center>
-<table border=0 width=550 cellpadding=0 cellspacing=0>
-<tr valign=top>
-<td align=center><img src="images/title2.gif"></td>
-</tr>
-</table>
-
-<table border=0 width=400 cellpadding=0 cellspacing=2>
-<?php
-include("../html/user_toolbar.html.php");
-?>
-</table>
-
-<?php
-if ($change == 1){
-       if (is_file("../lib/$config[general_lib_type]/user_info.php"))
-               include("../lib/$config[general_lib_type]/user_info.php");
-       if (is_file("../lib/$config[general_lib_type]/change_info.php"))
-               include("../lib/$config[general_lib_type]/change_info.php");
-}
-
-if (is_file("../lib/$config[general_lib_type]/user_info.php"))
-       include("../lib/$config[general_lib_type]/user_info.php");
-?>
-
-<br>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=200>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th>
-       <font color="white">Personal information for <?php echo "$login ($cn)"?></font>&nbsp;
-       </th></tr>
-       </table>
-</td></tr>
-<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">
-       <table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
-<?php
-       echo <<<EOM
-       <tr>
-               <td align=right bgcolor="#d0ddb0">
-               Name (First Name Surname)
-               </td><td>
-               <input type=text name="Fcn" value="$cn" size=35>
-               </td>
-       </tr>
-       <tr>
-               <td align=right bgcolor="#d0ddb0">
-               Mail
-               </td><td>
-               <input type=text name="Fmail" value="$mail" size=35>
-               </td>
-       </tr>
-       <tr>
-               <td align=right bgcolor="#d0ddb0">
-               Department
-               </td><td>
-               <input type=text name="Fou" value="$ou" size=35>
-               </td>
-       </tr>
-       <tr>
-               <td align=right bgcolor="#d0ddb0">
-               Home Phone
-               </td><td>
-               <input type=text name="Fhomephone" value="$homephone" size=35>
-               </td>
-       </tr>
-       <tr>
-               <td align=right bgcolor="#d0ddb0">
-               Work Phone
-               </td><td>
-               <input type=text name="Ftelephonenumber" value="$telephonenumber" size=35>
-               </td>
-       </tr>
-       <tr>
-               <td align=right bgcolor="#d0ddb0">
-               Mobile Phone
-               </td><td>
-               <input type=text name="Fmobile" value="$mobile" size=35>
-               </td>
-       </tr>
-EOM;
-?>
-       </table>
-<br>
-<input type=submit class=button value="Change" OnClick="this.form.change.value=1">
-</form>
-       </td></tr>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/user_new.php b/dialup_admin/htdocs/user_new.php
deleted file mode 100644 (file)
index 9847694..0000000
+++ /dev/null
@@ -1,213 +0,0 @@
-<?php
-require('../conf/config.php');
-if ($show == 1){
-       header("Location: user_admin.php?login=$login");
-       exit;
-}
-require('../lib/attrshow.php');
-require('../lib/defaults.php');
-
-if ($config[general_lib_type] == 'sql' && $config[sql_use_operators] == 'true'){
-       $colspan=2;
-       $show_ops=1;
-}else{
-       $show_ops = 0;
-       $colspan=1;
-}
-
-?>
-
-<html>
-<head>
-<title>New user creation page</title>
-<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $config[general_charset]?>">
-<link rel="stylesheet" href="style.css">
-</head>
-<body>
-
-<?php
-include("password_generator.jsc");
-?>
-
-<center>
-<table border=0 width=550 cellpadding=0 cellspacing=0>
-<tr valign=top>
-<td align=center><img src="images/title2.gif"></td>
-</tr>
-</table>
-
-<br>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=200>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th>
-       <font color="white">User Preferences for new user</font>&nbsp;
-       </th></tr>
-       </table>
-</td></tr>
-<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.php"))
-               include("../lib/$config[general_lib_type]/user_info.php");
-       if ($user_exists != "no"){
-               echo <<<EOM
-<b>The username <i>$login</i> already exists in the user database</b>
-EOM;
-       }
-       else{
-               if (is_file("../lib/$config[general_lib_type]/create_user.php"))
-                       include("../lib/$config[general_lib_type]/create_user.php");
-               require("../lib/defaults.php");
-               if (is_file("../lib/$config[general_lib_type]/user_info.php"))
-                       include("../lib/$config[general_lib_type]/user_info.php");
-       }
-}
-?>
-   <form method=post>
-      <input type=hidden name=create value="0">
-      <input type=hidden name=show value="0">
-       <table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
-<?php
-       echo <<<EOM
-       <tr>
-               <td align=right colspan=$colspan bgcolor="#d0ddb0">
-               Username
-               </td><td>
-               <input type=text name="login" value="$login" size=35>
-               </td>
-       </tr>
-       <tr>
-               <td align=right colspan=$colspan bgcolor="#d0ddb0">
-               Password
-               </td><td>
-               <input type=text name="passwd" size=35>
-               </td>
-       </tr>
-EOM;
-       if ($config[general_lib_type] == 'sql'){
-               if (isset($member_groups))
-                       $selected[$member_groups[0]] = 'selected';
-               echo <<<EOM
-       <tr>
-               <td align=right colspan=$colspan bgcolor="#d0ddb0">
-               Group
-               </td><td>
-               <select name="Fgroup">
-EOM;
-               foreach ($member_groups as $group)
-                       echo "<option value=\"$group\" $selected[$group]>$group\n";
-
-               echo <<<EOM
-               </select>
-               </td>
-       </tr>
-EOM;
-       }
-       if ($config[general_lib_type] == 'ldap' ||
-       ($config[general_lib_type] == 'sql' && $config[sql_use_user_info_table] == 'true')){
-               echo <<<EOM
-       <tr>
-               <td align=right colspan=$colspan bgcolor="#d0ddb0">
-               Name (First Name Surname)
-               </td><td>
-               <input type=text name="Fcn" value="$cn" size=35>
-               </td>
-       </tr>
-       <tr>
-               <td align=right colspan=$colspan bgcolor="#d0ddb0">
-               Mail
-               </td><td>
-               <input type=text name="Fmail" value="$mail" size=35>
-               </td>
-       </tr>
-       <tr>
-               <td align=right colspan=$colspan bgcolor="#d0ddb0">
-               Department
-               </td><td>
-               <input type=text name="Fou" value="$ou" size=35>
-               </td>
-       </tr>
-       <tr>
-               <td align=right colspan=$colspan bgcolor="#d0ddb0">
-               Home Phone
-               </td><td>
-               <input type=text name="Fhomephone" value="$homephone" size=35>
-               </td>
-       </tr>
-       <tr>
-               <td align=right colspan=$colspan bgcolor="#d0ddb0">
-               Work Phone
-               </td><td>
-               <input type=text name="Ftelephonenumber" value="$telephonenumber" size=35>
-               </td>
-       </tr>
-       <tr>
-               <td align=right colspan=$colspan bgcolor="#d0ddb0">
-               Mobile Phone
-               </td><td>
-               <input type=text name="Fmobile" value="$mobile" size=35>
-               </td>
-       </tr>
-EOM;
-       }
-       foreach($show_attrs as $key => $desc){
-               $name = $attrmap["$key"];
-               if ($name == 'none')
-                       continue;
-               $oper_name = $name . '_op';
-               $val = ($item_vals["$key"][0] != "") ? $item_vals["$key"][0] : $default_vals["$key"][0];
-               print <<<EOM
-<tr>
-<td align=right bgcolor="#d0ddb0">
-$desc
-</td>
-EOM;
-
-               if ($show_ops)
-                       print <<<EOM
-<td>
-<select name=$oper_name>
-<option selected value="=">=
-<option value=":=">:=
-<option value="+=">+=
-<option value="==">==
-<option value="!=">!=
-<option value=">">&gt;
-<option value=">=">&gt;=
-<option value="<">&lt;
-<option value="<=">&lt;=
-<option value="=~">=~
-<option value="!~">!~
-
-</select>
-</td>
-EOM;
-
-               print <<<EOM
-<td>
-<input type=text name="$name" value="$val" size=35>
-</td>
-</tr>
-EOM;
-       }
-?>
-       </table>
-<br>
-<input type=submit class=button value="Create" OnClick="this.form.create.value=1">
-<br><br>
-<input type=submit class=button value="Show User" OnClick="this.form.show.value=1">
-<br><br>
-<input type="button" class=button value="Auto/Password" OnClick="generatepassword(this.form.passwd,8);">
-</form>
-       </td></tr>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/user_state.php b/dialup_admin/htdocs/user_state.php
deleted file mode 100644 (file)
index 1cb7a35..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-<?php
-require('../conf/config.php');
-require('../lib/functions.php');
-require('../lib/defaults.php');
-if (is_file("../lib/$config[general_lib_type]/user_info.php"))
-       include("../lib/$config[general_lib_type]/user_info.php");
-
-if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
-       include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
-else
-       exit();
-
-$vars = array( 'Dialup-Access' => 'TRUE','Dialup-Lock-Msg' => '-',
-               'Max-Weekly-Session' => 0,'Max-Daily-Session' => 0);
-foreach($vars as $key => $val){
-       $val = ($item_vals["$key"][0] != "") ? $item_vals["$key"][0] : $default_vals["$key"][0];
-       $vars["$key"]=$val;
-}
-$vars['Dialup-Access'] = ($vars['Dialup-Access'] == 'FALSE') ? 'inactive' : 'active';
-$vars['Max-Daily-Session'] = time2strclock($vars['Max-Daily-Session']);
-$vars['Max-Weekly-Session'] = time2strclock($vars['Max-Weekly-Session']);
-
-$now = time();
-$week = $now - date('w') * 86400;
-$now_str = date("$config[sql_date_format]",$now + 86400);
-$week_str = date("$config[sql_date_format]",$week);
-$today = date("$config[sql_date_format]",$now);
-$open_conns = $daily_conns = $weekly_conns = 0;
-$weekly_used = $daily_used = $online_time = time2strclock(0);
-
-$link = @da_sql_pconnect($config);
-if ($link){
-       $search = @da_sql_query($link,$config,
-       "SELECT COUNT(*) AS counter, sum(acctsessiontime) AS sum_sess_time FROM $config[sql_accounting_table] WHERE
-       username = '$login' AND acctstoptime >= '$week_str' AND
-       acctstoptime <= '$now_str';");
-       if ($search){
-               if ($row = @da_sql_fetch_array($search,$config)){
-                       $weekly_used = time2strclock($row[sum_sess_time]);
-                       $weekly_conns = $row[counter];
-               }
-       }
-       $search = @da_sql_query($link,$config,
-       "SELECT COUNT(*) AS counter,sum(acctsessiontime) AS sum_sess_time FROM $config[sql_accounting_table] WHERE
-       username = '$login' AND acctstoptime >= '$today 00:00:00'
-       AND acctstoptime <= '$today 23:59:59';");
-       if ($search){
-               if ($row = @da_sql_fetch_array($search,$config)){
-                       $daily_used = time2strclock($row[sum_sess_time]);
-                       $daily_conns = $row[counter];
-               }
-       }
-       $search = @da_sql_query($link,$config,
-       "SELECT COUNT(*) AS counter, unix_timestamp() - unix_timestamp(acctstarttime) as diff FROM
-       $config[sql_accounting_table] WHERE acctstoptime is null AND username = '$login'
-       GROUP BY username;");
-       if ($search){
-               if ($row = @da_sql_fetch_array($search,$config)){
-                       $open_conns = $row[counter];
-                       $online_time = $row[diff];
-                       $weekly_used += $online_time;
-                       $daily_used += $online_time;
-                       $daily_conns += $open_conns;
-                       $weekly_conns += $open_conns;
-                       $online_time = time2strclock($online_time);
-               }
-       }
-       $weekly_used = time2strclock($weekly_used);
-       $daily_used = time2strclock($daily_used);
-}
-
-
-foreach($vars as $val){
-       echo "$val\n";
-}
-echo "$weekly_used\n$weekly_conns\n$daily_used\n$daily_conns\n$open_conns\n$online_time";
-?>
diff --git a/dialup_admin/htdocs/user_stats.php b/dialup_admin/htdocs/user_stats.php
deleted file mode 100644 (file)
index 2aca913..0000000
+++ /dev/null
@@ -1,234 +0,0 @@
-<?php
-require('../conf/config.php');
-require('../lib/functions.php');
-require('../lib/sql/nas_list.php');
-require_once('../lib/xlat.php');
-?>
-<html>
-<?php
-
-if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
-       include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
-else{
-       echo <<<EOM
-<title>User Statistics</title>
-<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
-<link rel="stylesheet" href="style.css">
-</head>
-<body>
-<center>
-<b>Could not include SQL library functions. Aborting</b>
-</body>
-</html>
-EOM;
-       exit();
-}
-
-if ($start == '' && $stop == ''){
-       $now = time();
-       $stop = date($config[sql_date_format],$now);
-       $now -= 604800;
-       $start = date($config[sql_date_format],$now);
-}
-$start = da_sql_escape_string($start);
-$stop = da_sql_escape_string($stop);
-$pagesize = ($pagesize) ? $pagesize : 10;
-if (!is_numeric($pagesize) && $pagesize != 'all')
-       $pagezise = 10;
-if ($pagesize > 100)
-       $pagesize = 100;
-$limit = ($pagesize == 'all') ? '100' : "$pagesize";
-$selected[$pagesize] = 'selected';
-$order = ($order) ? $order : $config[general_accounting_info_order];
-if ($order != 'desc' && $order != 'asc')
-       $order = 'desc';
-if ($sortby != '')
-       $order_attr = ($sortby == 'num') ? 'connnum' : 'conntotduration';
-else
-       $order_attr = 'connnum';
-if ($server != '' && $server != 'all'){
-       $server = da_sql_escape_string($server);
-       $server_str = "AND nasipaddress = '$server'";
-}
-$login_str = ($login) ? "AND username = '$login' " : '';
-
-$selected[$order] = 'selected';
-$selected[$sortby] = 'selected';
-
-$sql_extra_query = '';
-if ($config[sql_accounting_extra_query] != ''){
-       $sql_extra_query = xlat($config[sql_accounting_extra_query],$login,$config);
-       $sql_extra_query = da_sql_escape_string($sql_extra_query);
-}
-
-unset($da_name_cache);
-if (isset($_SESSION['da_name_cache']))
-       $da_name_cache = $_SESSION['da_name_cache'];
-
-?>
-
-<head>
-<title>User Statistics</title>
-<link rel="stylesheet" href="style.css">
-</head>
-<body>
-<center>
-<table border=0 width=550 cellpadding=0 cellspacing=0>
-<tr valign=top>
-<td align=center><img src="images/title2.gif"></td>
-</tr>
-</table>
-<table border=0 width=400 cellpadding=0 cellspacing=2>
-</table>
-<br>
-<table border=0 width=840 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=65%></td>
-<td bgcolor="black" width=35%>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th>
-       <font color="white">User Statistics</font>&nbsp;
-       </th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-<?php
-echo <<<EOM
-<b>$start</b> up to <b>$stop</b>
-EOM;
-?>
-
-<p>
-       <table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
-       <tr bgcolor="#d0ddb0">
-       <th>#</th><th>login</th><th>date</th><th>server</th><th>connections number</th><th>connections duration</th><th>upload</th><th>download</th>
-       </tr>
-
-<?php
-$link = @da_sql_pconnect($config);
-if ($link){
-       $search = @da_sql_query($link,$config,
-       "SELECT " . da_sql_limit($limit,0,$config) . " * FROM $config[sql_total_accounting_table]
-       WHERE acctdate >= '$start' AND acctdate <= '$stop' $server_str $login_str $sql_extra_query " . da_sql_limit($limit,1,$config)
-       . " ORDER BY $order_attr $order " . da_sql_limit($limit,2,$config) . " ;");
-
-       if ($search){
-               while( $row = @da_sql_fetch_array($search,$config) ){
-                       $num++;
-                       $acct_login = $row[username];
-                       if ($acct_login == '')
-                               $acct_login = '-';
-                       else{
-                               $Acct_login = urlencode($acct_login);
-                               $acct_login = "<a href=\"user_admin.php?login=$Acct_login\" title=\"Edit user $acct_login\">$acct_login</a>";
-                       }
-                       $acct_time = $row[conntotduration];
-                       $acct_time = time2str($acct_time);
-                       $acct_conn_num = $row[connnum];
-                       $acct_date = $row[acctdate];
-                       $acct_upload = $row[inputoctets];
-                       $acct_download = $row[outputoctets];
-                       $acct_upload = bytes2str($acct_upload);
-                       $acct_download = bytes2str($acct_download);
-                       $acct_server = $da_name_cache[$row[nasipaddress]];
-                       if (!isset($acct_server)){
-                               $acct_server = @gethostbyaddr($row[nasipaddress]);
-                               if (!isset($da_name_cache) && $config[general_use_session] == 'yes'){
-                                       $da_name_cache[$row[nasipaddress]] = $acct_server;
-                                       session_register('da_name_cache');
-                               }
-                               else
-                                       $da_name_cache[$row[nasipaddress]] = $acct_server;
-                       }
-                       if ($acct_server == '')
-                               $acct_server = '-';
-                       echo <<<EOM
-                       <tr align=center bgcolor="white">
-                               <td>$num</td>
-                               <td>$acct_login</td>
-                               <td>$acct_date</td>
-                               <td>$acct_server</td>
-                               <td>$acct_conn_num</td>
-                               <td>$acct_time</td>
-                               <td>$acct_upload</td>
-                               <td>$acct_download</td>
-                       </tr>
-EOM;
-               }
-       }
-}
-echo <<<EOM
-       </table>
-<tr><td>
-<hr>
-<tr><td align="left">
-       <form action="user_stats.php" method="post" name="master">
-       <table border=0>
-               <tr valign="bottom">
-                       <td><small><b>start time</td><td><small><b>stop time</td><td><small><b>pagesize</td><td><b>sort by</td><td><b>order</td>
-       <tr valign="middle"><td>
-<input type="hidden" name="show" value="0">
-<input type="text" name="start" size="11" value="$start"></td>
-<td><input type="text" name="stop" size="11" value="$stop"></td>
-<td><select name="pagesize">
-<option $selected[5] value="5" >05
-<option $selected[10] value="10">10
-<option $selected[15] value="15">15
-<option $selected[20] value="20">20
-<option $selected[40] value="40">40
-<option $selected[80] value="80">80
-<option $selected[all] value="all">all
-</select>
-</td>
-<td>
-<select name="sortby">
-<option $selected[num] value="num">connections number
-<option $selected[time] value="time">connections duration
-</select>
-</td>
-<td><select name="order">
-<option $selected[asc] value="asc">ascending
-<option $selected[desc] value="desc">descending
-</select>
-</td>
-EOM;
-?>
-
-<td><input type="submit" class=button value="show"></td></tr>
-<tr><td>
-<b>On Access Server:</b>
-</td>
-<td><b>User</b></td></tr>
-<tr><td>
-<select name="server">
-<?php
-foreach ($nas_list as $nas){
-       $name = $nas[name];
-       if ($nas[ip] == '')
-               continue;
-       $servers[$name] = $nas[ip];
-}
-ksort($servers);
-foreach ($servers as $name => $ip){
-       if ($server == $ip)
-               echo "<option selected value=\"$ip\">$name\n";
-       else
-               echo "<option value=\"$ip\">$name\n";
-}
-if ($server == '' || $server == 'all')
-       echo "<option selected value=\"all\">all\n";
-else
-       echo "<option value=\"all\">all\n";
-?>
-</select>
-</td>
-<td><input type="text" name="login" size="11" value="<?php echo $login ?>"></td>
-</tr>
-</table></td></tr></form>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/htdocs/user_test.php b/dialup_admin/htdocs/user_test.php
deleted file mode 100644 (file)
index 9e26c11..0000000
+++ /dev/null
@@ -1,208 +0,0 @@
-<?php
-require('../conf/config.php');
-
-if ($login == 'da_server_test'){
-       $login = $config[general_test_account_login];
-       $test_login=1;
-}
-
-echo <<<EOM
-<html>
-<head>
-<title>test user $login</title>
-<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
-<link rel="stylesheet" href="style.css">
-</head>
-<body>
-<center>
-<table border=0 width=550 cellpadding=0 cellspacing=0>
-<tr valign=top>
-<td align=center><img src="images/title2.gif"></td>
-</tr>
-</table>
-
-<table border=0 width=400 cellpadding=0 cellspacing=2>
-EOM;
-
-if (!$test_login)
-       include("../html/user_toolbar.html.php");
-
-print <<<EOM
-</table>
-
-<br>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=200>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th>
-EOM;
-
-if ($test_login){
-       print <<<EOM
-       <font color="white">Radius Server Test Page</font>&nbsp;
-EOM;
-}else{
-       print <<<EOM
-       <font color="white">User $login Test Page</font>&nbsp;
-EOM;
-}
-?>
-       </th></tr>
-       </table>
-</td></tr>
-<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 ($server == '' || !preg_match('/^[\w\.]+$/',$server))
-       $server = $config[general_radius_server];
-if ($port == 0 || !is_numeric($port))
-       $port = $config[general_radius_server_port];
-if ($auth_proto == '')
-       $auth_proto = $config[general_radius_server_auth_proto];
-$selected[$auth_proto] = 'selected';
-
-if ($test_user == 1){
-       $tmp_file = tempnam("$config[general_tmp_dir]",'DA');
-       $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]
-               . ' >' . $tmp_file;
-       $fp = popen("$comm","w");
-       if ($fp){
-               foreach ($req as $val){
-                       // Ignore comments
-                       if (preg_match('/^[[:space:]]*#/',$val) || preg_match('/^[[:space:]]*$/',$val))
-                               continue;
-                       fwrite($fp,$val);
-               }
-               if ($test_login){
-                       $test=1;
-                       fwrite($fp, "User-Name = \"$config[general_test_account_login]\"\n");
-                       fwrite($fp, "User-Password = \"$config[general_test_account_password]\"\n");
-                       pclose($fp);
-               }
-               else{
-                       fwrite($fp, "User-Name = \"$login\"\n");
-                       if ($auth_proto == 'chap')
-                               fwrite($fp, "CHAP-Password = \"$passwd\"\n");
-                       else
-                               fwrite($fp, "User-Password = \"$passwd\"\n");
-                       if (strlen($extra))
-                               fwrite($fp,$extra);
-                       pclose($fp);
-               }
-               $reply = file($tmp_file);
-               unlink($tmp_file);
-               $msg = "<b>" . strftime('%A, %e %B %Y, %T %Z') . "</b><br>\n";
-               $msg .= "<b>Server: </b><i>$server:$port</i><br><br>\n";
-               if (preg_match('/code 2/', $reply[0]))
-                       $msg .= "<b>Authentication was <font color=green>successful</font>";
-               else if (preg_match('/code 3/',$reply[0]))
-                       $msg .= "<b>Authentication <font color=red>failed</font>";
-               else if (preg_match('/no response from server/', $reply[0]))
-                       $msg .= "<b><font color=red>No response from server</font>";
-               else if (preg_match('/Connection refused/',$reply[0]))
-                       $msg .= "<b><font color=red>Connection was refused</font>";
-               if ($test_login)
-                       $msg .= "</b><i> (test user $login)</i><br>\n";
-               else
-                       $msg .= "</b><br>\n";
-               array_shift($reply);
-               if (count($reply)){
-                       $msg .= "<br><b>Server response:</b><br>\n";
-                       foreach ($reply as $val){
-                               $msg .= "<i>$val</i><br>\n";
-                       }
-               }
-               if ($test_login){
-                       print <<<EOM
-$msg
-<br>
-</td></tr>
-</table>
-</tr>
-</table>
-</body>
-</html>
-EOM;
-                       exit();
-               }
-
-       }
-}
-?>
-   <form method=post>
-      <input type=hidden name=login value=<?php print $login ?>>
-      <input type=hidden name=test_user value="0">
-       <table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
-<tr>
-<td align=right bgcolor="#d0ddb0">
-User Password
-</td>
-<td>
-<input type=password name=passwd value="<?php print $passwd ?>" size=25>
-</td>
-</tr>
-<tr>
-<td align=right bgcolor="#d0ddb0">
-Radius Server
-</td>
-<td>
-<input type=text name=server value="<?php print $server ?>" size=25>
-</td>
-</tr>
-<tr>
-<td align=right bgcolor="#d0ddb0">
-Radius Server Port
-</td>
-<td>
-<input type=text name=port value="<?php print $port ?>" size=25>
-</td>
-</tr>
-<tr>
-<td align=right bgcolor="#d0ddb0">
-Extra Attributes
-</td>
-<td>
-<textarea name="extra" cols="35" wrap="PHYSICAL" rows="4"><?php print $extra ?></textarea>
-</td>
-</tr>
-<tr>
-<td align=right bgcolor="#d0ddb0">
-Authentication Protocol
-</td>
-<td>
-<?php
-echo <<<EOM
-<select name="auth_proto" editable>
-<option $selected[pap] value="pap">PAP
-<option $selected[chap] value="chap">CHAP
-EOM
-?>
-</select>
-</td>
-</tr>
-
-       </table>
-<br>
-<input type=submit class=button value="Run Test" OnClick="this.form.test_user.value=1">
-</form>
-<?php
-if ($test_user == 1){
-       echo <<<EOM
-<br>
-$msg
-EOM;
-}
-?>
-       </td></tr>
-</table>
-</tr>
-</table>
-</body>
-</html>
diff --git a/dialup_admin/html/buttons/default/buttons.html.php b/dialup_admin/html/buttons/default/buttons.html.php
deleted file mode 100644 (file)
index e6df819..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-<html>
-<head>
-<link rel="stylesheet" href="style.css">
-<script>
-function myin(a) {
-       eval ( "document.all.menu" + a + ".style.backgroundColor='#cac060';" );
-       eval ( "document.all.a" + a + ".style.color='#ffffff';" );
-}
-function myout(a) {
-       eval ( "document.all.menu" + a + ".style.backgroundColor='#ffffd0';" );
-       eval ( "document.all.a" + a + ".style.color='#000000';" );
-}
-</script>
-</head>
-<body>
-<form action="user_admin.php" method=get target="content">
-<table border=0 width=100 cellpadding=1 cellspacing=1>
-<tr><td align=center>
-<img src="images/logo2.gif" vspace=2>
-</td></tr>
-<?php
-if ($_SERVER["PHP_AUTH_USER"])
-       echo "<tr valign=top><td align=center><b>Logged in as " . $_SERVER["PHP_AUTH_USER"] . "...</b><br><br></td></tr>\n";
-?>
-<tr bgcolor="black" valign=top><td>
-<table border=0 width=100% cellpadding=2 cellspacing=0>
-<tr bgcolor="#907030" align=center valign=top><th>
-<font color="white">Main Menu</font>
-</th></tr>
-</table>
-</td></tr>
-<tr bgcolor="black" valign=top><td>
-<table border=0 width=100% height=100% cellpadding=0 cellspacing=0>
-<tr bgcolor="#ffffd0" valign=top><td>
-       <table border=0 width=100% height=100% cellpadding=4 cellspacing=2>
-       <tr align=left><td id="menu0" onmouseover='myin("0");' onmouseout='myout("0");'>
-       <a id="a0" href="content.html" target="content">Home</a>
-       </td></tr>
-       <tr align=left><td id="menu1" onmouseover='myin("1");' onmouseout='myout("1");'>
-       <a id="a1" href="accounting.php" target="content" title="Accounting Report Generator">Accounting</a>
-       </td></tr>
-       <tr align=left><td id="menu2" onmouseover='myin("2");' onmouseout='myout("2");'>
-       <a id="a2" href="stats.php" target="content" title="Dialup Statistics">Statistics</a>
-       </td></tr>
-       <tr align=left><td id="menu17" onmouseover='myin("17");' onmouseout='myout("17");'>
-       <a id="a17" href="user_stats.php" target="content" title="Show User Statistics">User Statistics</a>
-       </td></tr>
-       <tr align=left><td id="menu3" onmouseover='myin("3");' onmouseout='myout("3");'>
-       <a id="a3" href="user_finger.php" target="content" title="Show Online Users">Online Users</a>
-       </td></tr>
-       <tr align=left><td id="menu18" onmouseover='myin("18");' onmouseout='myout("18");'>
-       <a id="a18" href="nas_admin.php" target="content" title="Administer RADIUS Clients">RADIUS Clients</a>
-       </td></tr>
-       <tr align=left><td id="menu7" onmouseover='myin("7");' onmouseout='myout("7");'>
-       <a id="a7" href="badusers.php?login=anyone" target="content" title="Show Bad Users">Bad Users</a>
-       </td></tr>
-       <tr align=left><td id="menu16" onmouseover='myin("16");' onmouseout='myout("16");'>
-       <a id="a16" href="failed_logins.php" target="content" title="Show Most Recent Failed Logins">Failed Logins</a>
-       </td></tr>
-       <tr align=left><td id="menu14" onmouseover='myin("14");' onmouseout='myout("14");'>
-       <a id="a14" href="find.php" target="content" title="Find User">Find User</a>
-       </td></tr>
-       <tr align=left><td id="menu4" onmouseover='myin("4");' onmouseout='myout("4");'>
-       <a id="a4">Edit User</a>
-       <img align=top src="images/black.gif" vspace=7 hspace=0 width=1 height=1><br>
-       <input type="text" size=11 name="login" target="content">
-       </td></tr>
-       <tr align=left><td id="menu9" onmouseover='myin("9");' onmouseout='myout("9");'>
-       <a id="a9" href="user_new.php" target="content" title="Create New User">New User</a>
-       </td></tr>
-       <tr align=left><td><img src="images/black.gif" vspace=2 hspace=0 width=80 height=1></td></tr>
-</form>
-<form action="group_admin.php" method=get target="content">
-       <tr align=left><td id="menu13" onmouseover='myin("13");' onmouseout='myout("13");'>
-       <a id="a13" href="show_groups.php" target="content" title="Show User Groups">Show Groups</a>
-       </td></tr>
-       <tr align=left><td id="menu11" onmouseover='myin("11");' onmouseout='myout("11");'>
-       <a id="a11" href="group_admin.php" target="content" title="Group Administration">Edit Group</a>
-       <img align=top src="images/black.gif" vspace=7 hspace=0 width=1 height=1><br>
-       <input type="text" size=11 name="login" target="content">
-       </td></tr>
-       <tr align=left><td id="menu12" onmouseover='myin("12");' onmouseout='myout("12");'>
-       <a id="a12" href="group_new.php" target="content" title="Create New Group">New Group</a>
-       </td></tr>
-       <tr align=left><td><img src="images/black.gif" vspace=2 hspace=0 width=80 height=1></td></tr>
-       <tr align=left><td id="menu10" onmouseover='myin("10");' onmouseout='myout("10");'>
-       <a id="a10" href="user_test.php?login=da_server_test&test_user=1" target="content" title="Check Server Response">Check Server</a>
-       </td></tr>
-<?php
-include('../conf/config.php');
-if ($config[general_use_session] == 'yes')
-       echo <<<EOM
-       <tr align=left><td><img src="images/black.gif" vspace=2 hspace=0 width=80 height=1></td></tr>
-       <tr align=left><td id="menu15" onmouseover='myin("15");' onmouseout='myout("15");'>
-       <a id="a15" href="session_destroy.php" target="content" title="Clear Session Cache">Clear Cache</a>
-       </td></tr>
-EOM;
-?>
-       <tr align=left><td><img src="images/black.gif" vspace=2 hspace=0 width=80 height=1></td></tr>
-       <tr align=left><td id="menu5" onmouseover='myin("5");' onmouseout='myout("5");' nowrap>
-       <a id="a5" href="help/help.php" target="content" title="Show Help">Help</a>
-       </td></tr>
-       <tr align=left><td id="menu6" onmouseover='myin("6");' onmouseout='myout("6");'>
-       <a id="a6" href="about.html" target="content" title="About dialup_admin">About</a>
-       </td></tr>
-       </table>
-</td></tr>
-<tr bgcolor="#ffffd0" align=right valign=bottom><td><img vspace=0 hspace=0 src="images/bg.gif"></td></tr>
-</table>
-</td></tr>
-</table>
-</form>
-</html>
diff --git a/dialup_admin/html/group_toolbar.html.php b/dialup_admin/html/group_toolbar.html.php
deleted file mode 100644 (file)
index ee4cbf6..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-$Login = urlencode($login);
-print <<<EOM
-<tr valign=top>
-<td align=center bgcolor="black" width=100>
-<a href="group_admin.php?login=$Login" title="Administer Group"><font color="white"><b>ADMIN</b></font></a></td>
-<td align=center bgcolor="black" width=100>
-<a href="user_edit.php?login=$Login&user_type=group" title="Edit Group Dialup Settings"><font color="white"><b>EDIT</b></font></a></td>
-<td align=center bgcolor="black" width=100>
-<a href="user_delete.php?login=$Login&user_type=group" title="Delete Group"><font color="white"><b>DELETE</b></font></a></td>
-</tr>
-EOM;
-?>
diff --git a/dialup_admin/html/stats.html.php b/dialup_admin/html/stats.html.php
deleted file mode 100644 (file)
index d69874a..0000000
+++ /dev/null
@@ -1,270 +0,0 @@
-<form action="stats.php" method="get">
-<table border=0 width=600 cellpadding=2 cellspacing=0>
-<tr>
-       <td align=left>
-       <table border=0 cellspacing=0 cellpadding=2>
-       <tr valign=bottom>
-               <td><small><b>from date</td>
-               <td><small><b>to date</td>
-               <td><small><b>user</td>
-               <td><small><b>on server</td>
-               <td>&nbsp;</td>
-               </tr>
-       <tr background="images/greenlines1.gif" valign=middle>
-<?php
-echo <<<EOM
-               <td valign=middle><input type="text" name="after"  size="12" value="$after" ></td>
-               <td valign=middle><input type="text" name="before" size="12" value="$before"></td>
-               <td valign=middle><input type="text" name="login"  size="12" value="$login" ></td>
-               <td valign=middle><select name="server" size=1>
-EOM;
-foreach($servers as $key => $val)
-       echo <<<EOM
-       <option value="$val">$key
-EOM;
-?>
-               </select></td>
-               <td valign=middle><input type="submit" class=button value="Go"></td>
-               </tr>
-       </table>
-       </td>
-</tr>
-<tr>
-<td><hr size=1 noshade></td>
-</tr>
-<tr>
-       <td valign=top>
-       <table border=0 width="100%">
-       <tr>    <td align=center valign=top width="45%">
-               <small>
-               <font color="darkblue"><b><?php echo $date ?></b></font>
-               </td>
-               <td align=center valign=top width="10%">&nbsp;</td>
-               <td align=center valign=top width="45%"><small>
-               statistics period:<br>
-<?php
-echo <<<EOM
-               <b>$after</b> up to <b>$before</b>
-EOM;
-?>
-               </td>
-               </tr>
-       </table>
-       </td>
-</tr>
-<tr>
-       <td align=center><h1><b>access statistics</td>
-</tr>
-<tr>
-       <td valign=top>
-       <table border=0 width="100%">
-       <tr>
-               <td colspan=2>
-               <center>
-               statistics for
-<?php
-if ($login == '')
-       echo <<<EOM
-<b><font color="darkblue">all</font></b> users
-EOM;
-else
-       echo <<<EOM
-user <b><font color="darkblue">$login</font></b>
-EOM;
-?>
-       </td>
-       </tr>
-       </table>
-       </td>
-</tr>
-
-<tr>
-       <td>
-       <table border=0 cellpadding=0 cellspacing=0 width="100%">
-       <tr>    <td colspan=2><hr size=1 noshade>
-               </td>
-               </tr>
-
-       </table>
-       </td>
-       </tr>
-<tr>
-       <td align="center">
-       <table border=0 cellpadding=0 cellspacing=1 width="100%">
-<?php
-echo <<<EOM
-       <tr>
-               <td colspan=10 align=center nowrap><select name="column1">
-               <option $selected1[sessions] value="sessions">sessions
-               <option $selected1[usage] value="usage">total usage time
-               <option value="upload">------------------
-               <option $selected1[upload] value="upload">uploads
-               <option $selected1[download] value="download">downloads
-       </select> <select name="column2">
-               <option $selected2[sessions] value="sessions">sessions
-               <option $selected2[usage] value="usage">total usage time
-               <option value="upload">------------------
-               <option $selected2[upload] value="upload">uploads
-               <option $selected2[download] value="download">downloads
-       </select> <select name="column3">
-               <option $selected3[sessions] value="sessions">sessions
-               <option $selected3[usage] value="usage">total usage time
-               <option value="upload">------------------
-               <option $selected3[upload] value="upload">uploads
-               <option $selected3[download] value="download">downloads
-EOM;
-?>
-               </select>
-               </td>
-       </tr>
-       <tr>
-               <td colspan=10 background="images/greenlines1.gif" align=center valign=middle>
-               <table border=0 width="100%">
-               <tr>
-                       <td width=50% align=left>
-                       <table border=0 cellpadding=0 cellspacing=0>
-                       <tr>
-                       <td align=right><input type="submit" class=button value="Refresh"></td>
-                       </tr>
-                       </table>
-                       </td>
-               </tr>
-               </table>
-               </td>
-       </tr>
-       </table>
-       </td>
-       <tr>
-       <td colspan=10 height=20><img src="images/pixel.gif"></td>
-       </tr>
-       <tr>
-               <td colspan=10 height=20 align=center>
-               <table border=0 width=640 cellpadding=1 cellspacing=1>
-               <tr valign=top>
-                               <td width=440></td>
-                               <td bgcolor="black" width=200>
-                                       <table border=0 width=100% cellpadding=2 cellspacing=0>
-                                       <tr bgcolor="#907030" align=right valign=top><th>
-                                                       <font color="white">Daily Analysis</font>&nbsp;
-                                       </th></tr>
-                                       </table>
-                               </td></tr>
-               <tr valign=top><td colspan=2>
-                       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-                       <tr><td>
-                               <p>
-                               <table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
-                               <tr bgcolor="#d0ddb0">
-                                       <th>date</th>
-<?php
-echo <<<EOM
-       <th colspan=3>$message[$column1]</th>
-       <th colspan=3>$message[$column2]</th>
-       <th colspan=3>$message[$column3]</th>
-EOM;
-?>
-                               </tr>
-<?php
-       for($i = 0; $i <= $num_days; $i++){
-               $day = $days[$i];
-               $trcolor = ($i % 2) ? "#f7f7e4" : "#efefe4";
-               echo <<<EOM
-       <tr align=center bgcolor="$trcolor">
-               <td>$day</td>
-               <td>{$data[$day][1]}</td>
-               <td>{$perc[$day][1]}</td>
-               <td align=left height=14>
-                       <table border=0 cellpadding=0>
-                       <tr>
-                               <td bgcolor="{$color[$day][1]}" width={$width[$day][1]}><img border=0 height=14 width={$width[$day][1]} src="images/pixel.gif" alt="the $message[$column1] for $day is {$data[$day][1]}"></td>
-                       </tr>
-                       </table>
-               </td>
-               <td>{$data[$day][2]}</td>
-               <td>{$perc[$day][2]}</td>
-               <td align=left height=14>
-                       <table border=0 cellpadding=0>
-                       <tr>
-                               <td bgcolor="{$color[$day][2]}" width={$width[$day][2]}><img border=0 height=14 width={$width[$day][2]} src="images/pixel.gif" alt="the $message[$column3] for $day is {$data[$day][2]}"></td>
-                       </tr>
-                       </table>
-               </td>
-               <td>{$data[$day][3]}</td>
-               <td>{$perc[$day][3]}</td>
-               <td align=left height=14>
-                       <table border=0 cellpadding=0>
-                       <tr>
-                       <td bgcolor="{$color[$day][3]}" width={$width[$day][3]}><img border=0 height=14 width={$width[$day][3]} src="images/pixel.gif" alt="the $message[$column3] for $day is {$data[$day][3]}"></td>
-                       </tr>
-                       </table>
-               </td>
-               </tr>
-EOM;
-}
-?>
-</table>
-</td></tr>
-</table>
-</td></tr>
-</table>
-</td></tr>
-</table>
-<p>
-<table border=0 width=640 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=440></td>
-<td bgcolor="black" width=200>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th>
-       <font color="white">Daily Summary</font>&nbsp;
-       </th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
-       <tr><td>
-<p>
-       <table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ff
-ffe0" valign=top>
-       <tr bgcolor="#d0ddb0">
-       <th>&nbsp;</th>
-<?php
-echo <<<EOM
-       <th>$message[$column1]</th>
-       <th>$message[$column2]</th>
-       <th>$message[$column3]</th>
-EOM;
-?>
-       </tr>
-<?php
-echo <<<EOM
-               <tr align=center bgcolor="#efefe4">
-                       <td>maximum</td>
-                       <td>{$data[max][1]}</td>
-                       <td>{$data[max][2]}</td>
-                       <td>{$data[max][3]}</td>
-                       </tr>
-               <tr align=center bgcolor="#f7f7e4">
-                       <td>average</td>
-                       <td>{$data[avg][1]}</td>
-                       <td>{$data[avg][2]}</td>
-                       <td>{$data[avg][3]}</td>
-                       </tr>
-               <tr align=center bgcolor="#efefe4">
-                       <td>sum</td>
-                       <td>{$data[sum][1]}</td>
-                       <td>{$data[sum][2]}</td>
-                       <td>{$data[sum][3]}</td>
-                       </tr>
-EOM;
-?>
-</table>
-               </table>
-               </td></tr>
-       </table>
-       </td></tr>
-</table>
-</form>
-</center>
-</body>
-</html>
diff --git a/dialup_admin/html/user_admin.html.php b/dialup_admin/html/user_admin.html.php
deleted file mode 100644 (file)
index 8280a24..0000000
+++ /dev/null
@@ -1,419 +0,0 @@
-<?php
-
-echo <<<EOM
-<title>user information for $cn</title>
-<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
-</head>
-<body>
-<link rel="stylesheet" href="style.css">
-EOM;
-if ($logged_now)
-       print <<<EOM
-<script Language="JavaScript">
-<!--
-       var start;
-       var our_time;
-
-       function startcounter()
-       {
-               var start_date = new Date();
-               start = start_date.getTime();
-               our_time = $lastlog_session_time_jvs;
-               showcounter();
-       }
-
-       function showcounter ()
-       {
-               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);
-       }
-       //-->
-</script>
-EOM;
-
-print <<<EOM
-<center>
-<table border=0 width=550 cellpadding=0 cellspacing=0>
-<tr valign=top>
-<td align=center><img src="images/title2.gif"></td>
-</tr>
-</table>
-<table border=0 width=400 cellpadding=0 cellspacing=2>
-EOM;
-
-include("../html/user_toolbar.html.php");
-
-print <<<EOM
-</table>
-<br>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=250>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th>
-       <font color="white">Connection Status for $login ($cn)</font>&nbsp;
-       </th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <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>
-
-EOM;
-if ($logged_now){
-       print <<<EOM
-       <form name="online" onSubmit="return(false);">
-       <tr><td align=center bgcolor="#d0ddb0">
-       User is <b>online</b> since
-       </td><td>
-       $lastlog_time
-       </td></tr>
-       <tr><td align=center bgcolor="#d0ddb0">
-       Connection Duration
-       </td><td>
-       <input type="text" name="status" size=10 value="$lastlog_session_time">
-       </form>
-       </td></tr>
-EOM;
-       require('../html/user_admin_userinfo.html.php');
-
-}else if ($not_known)  print <<<EOM
-       <tr><td align=center bgcolor="#d0ddb0">
-       This user has <b>never</b> connected
-       </td><td>-
-       </td></tr>
-EOM;
-else{
-       print <<<EOM
-       <tr><td align=center bgcolor="#d0ddb0">
-       User is <b>not online</b> now<br>
-       </td><td>-
-       </td></tr>
-       <tr><td align=center bgcolor="#d0ddb0">
-       Last Connection Time
-       </td><td>
-       $lastlog_time
-       </td></tr>
-       <tr><td align=center bgcolor="#d0ddb0">
-       Online Time
-       </td><td>
-       $lastlog_session_time
-       </td></tr>
-EOM;
-       require('../html/user_admin_userinfo.html.php');
-}
-
-print <<<EOM
-       <tr><td align=center bgcolor="#d0ddb0">
-       Allowed Session
-       </td><td>
-       $msg
-       </td></tr>
-       <tr><td align=center bgcolor="#d0ddb0">
-       Usefull User Description
-       </td><td>
-       $descr
-       </td></tr>
-       </table>
-       </table>
-</table>
-
-EOM;
-
-if (is_file("../lib/$config[general_lib_type]/password_check.php"))
-       include("../lib/$config[general_lib_type]/password_check.php");
-
-echo <<<EOM
-<br>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=250>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th>
-       <font color="white">Subscription Analysis</font>&nbsp;
-       </th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <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">-</td><td align=center bgcolor="#d0ddb0"><b>monthly</b></td><td align=center bgcolor="#d0ddb0"><b>weekly</b></td><td align=center bgcolor="#d0ddb0"><b>daily</b></td><td align=center bgcolor="#d0ddb0"><b>per session</b></td></tr>
-       <tr><td align=center bgcolor="#d0ddb0"><b>limit</b></td><td>$monthly_limit</td><td>$weekly_limit</td><td>$daily_limit</td><td>$session_limit</td></tr>
-       <tr><td align=center bgcolor="#d0ddb0"><b>used</b></td><td>$monthly_used</td><td>$weekly_used</td><td>$daily_used</td><td>$lastlog_session_time</td></tr>
-       </table>
-       <table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" va
-lign=top>
-       <tr><td align=center bgcolor="#d0ddb0"><b>day</b></td><td align=center bgcolor="#d0ddb0"><b>daily limit</b></td><td align=center bgcolor="#d0ddb0"><b>used</b></td><tr>
-       <tr><td align=center bgcolor="#d0ddb0">sunday</td><td>$daily_limit</td><td>$used[0]</td></tr>
-       <tr><td align=center bgcolor="#d0ddb0">monday</td><td>$daily_limit</td><td>$used[1]</td></tr>
-       <tr><td align=center bgcolor="#d0ddb0">tuesday</td><td>$daily_limit</td><td>$used[2]</td></tr>
-       <tr><td align=center bgcolor="#d0ddb0">wednesday</td><td>$daily_limit</td><td>$used[3]</td></tr>
-       <tr><td align=center bgcolor="#d0ddb0">thursday</td><td>$daily_limit</td><td>$used[4]</td></tr>
-       <tr><td align=center bgcolor="#d0ddb0">friday</td><td>$daily_limit</td><td>$used[5]</td></tr>
-       <tr><td align=center bgcolor="#d0ddb0">saturday</td><td>$daily_limit</td><td>$used[6]</td></tr>
-       </table></table>
-</table>
-<br>
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=200>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th>
-       <font color="white">Account Status For The Last 7 Days</font>&nbsp;
-       </th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <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">Connections</td><td>
-       <b><font color="darkblue">$tot_conns</font></b></td></tr>
-       <tr><td align=center bgcolor="#d0ddb0">Online time</td><td>
-       <b><font color="darkblue">$tot_time</td></tr></td></tr>
-       <tr><td align=center bgcolor="#d0ddb0">Failed Logins</td><td>
-       <b><font color="darkblue">$tot_badlogins</td></tr></td></tr>
-       <tr><td align=center bgcolor="#d0ddb0">Upload</td><td>
-       $tot_input</td></tr></td></tr>
-       <tr><td align=center bgcolor="#d0ddb0">Download</td><td>
-       $tot_output</td></tr></td></tr>
-       <tr><td align=center bgcolor="#d0ddb0">Average Time</td><td>
-       $avg_time</td></tr></td></tr>
-       <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>
-       </table>
-       </table>
-</table>
-<br>
-EOM;
-
-if ($user_info){
-       echo <<<EOM
-<table border=0 width=540 cellpadding=1 cellspacing=1>
-<tr valign=top>
-<td width=340></td>
-<td bgcolor="black" width=250>
-       <table border=0 width=100% cellpadding=2 cellspacing=0>
-       <tr bgcolor="#907030" align=right valign=top><th>
-       <font color="white">Personal Information</font>
-       </th></tr>
-       </table>
-</td></tr>
-<tr bgcolor="black" valign=top><td colspan=2>
-       <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">
-       <b>name</b>
-       </td>
-       <td>
-       $cn
-       </td>
-       </tr>
-EOM;
-       if ($config[general_prefered_lang] != 'en'){
-               echo <<<EOM
-       <tr>
-       <td align=center bgcolor="#d0ddb0">
-       <b>name ($config[general_prefered_lang_name])</b>
-       </td>
-       <td>
-       $cn_lang
-       </td>
-       </tr>
-EOM;
-       }
-       echo <<<EOM
-       <tr>
-       <td align=center bgcolor="#d0ddb0">
-       <b>department</b>
-       </td>
-       <td>
-       $ou
-       </td>
-       </tr>
-EOM;
-       if ($config[general_prefered_lang] != 'en'){
-               echo <<<EOM
-       <tr>
-       <td align=center bgcolor="#d0ddb0">
-       <b>department ($config[general_prefered_lang_name])</b>
-       </td>
-       <td>
-       $ou_lang
-       </td>
-       </tr>
-EOM;
-       }
-       echo <<<EOM
-       <tr>
-       <td align=center bgcolor="#d0ddb0">
-       <b>title</b>
-       </td>
-       <td>
-       $title
-       </td>
-       </tr>
-EOM;
-       if ($config[general_prefered_lang] != 'en'){
-               echo <<<EOM
-       <tr>
-       <td align=center bgcolor="#d0ddb0">
-       <b>title ($config[general_prefered_lang_name])</b>
-       </td>
-       <td>
-       $title_lang
-       </td>
-       </tr>
-EOM;
-       }
-       echo <<<EOM
-       <tr>
-       <td align=center bgcolor="#d0ddb0">
-       <b>address</b>
-       </td>
-       <td>
-       $address
-       </td>
-       </tr>
-EOM;
-       if ($config[general_prefered_lang] != 'en'){
-               echo <<<EOM
-       <tr>
-       <td align=center bgcolor="#d0ddb0">
-       <b>address ($config[general_prefered_lang_name])</b>
-       </td>
-       <td>
-       $address_lang
-       </td>
-       </tr>
-EOM;
-       }
-       echo <<<EOM
-       <tr>
-       <td align=center bgcolor="#d0ddb0">
-       <b>home address</b>
-       </td>
-       <td>
-       $homeaddress
-       </td>
-       </tr>
-EOM;
-       if ($config[general_prefered_lang] != 'en'){
-               echo <<<EOM
-       <tr>
-       <td align=center bgcolor="#d0ddb0">
-       <b>home address ($config[general_prefered_lang_name])</b>
-       </td>
-       <td>
-       $homeaddress_lang
-       </td>
-       </tr>
-EOM;
-       }
-       echo <<<EOM
-       <tr>
-       <td align=center bgcolor="#d0ddb0">
-       <b>phone</b>
-       </td>
-       <td>
-       $telephonenumber
-       </td>
-       </tr>
-       <tr>
-       <td align=center bgcolor="#d0ddb0">
-       <b>home phone</b>
-       </td>
-       <td>
-       $homephone
-       </td>
-       </tr>
-       <tr>
-       <td align=center bgcolor="#d0ddb0">
-       <b>mobile</b>
-       </td>
-       <td>
-       $mobile
-       </td>
-       </tr>
-       <tr>
-       <td align=center bgcolor="#d0ddb0">
-       <b>fax</b>
-       </td>
-       <td>
-       $fax
-       </td>
-       </tr>
-       <tr>
-       <td align=center bgcolor="#d0ddb0">
-       <b>home page</b>
-       </td>
-       <td>
-       <a href="$url" target=userpage onclick=window.open("$url","userpage","width=1000,height=550,toolbar=no,scrollbars=yes,resizable=yes") title="Go to user's homepage">$url</a>
-       </td>
-       </tr>
-       <tr>
-       <td align=center bgcolor="#d0ddb0">
-       <b>e-mail</b>
-       </td>
-       <td>
-       <a href="mailto: $mail" title="Send E-Mail">$mail</a>
-       </td>
-       </tr>
-       <tr>
-       <td align=center bgcolor="#d0ddb0">
-       <b>e-mail alias</b>
-       </td>
-       <td>
-       <a href="mailto: $mailalt" title="Send E-Mail">$mailalt</a>
-       </td>
-       </tr>
-       </table>
-       </table>
-</table>
-
-EOM;
-}
-?>
-       <tr>    <td colspan=3 height=1></td></tr>
-       <tr>    <td colspan=3>
-       </table>
-<?php
-if ($logged_now)
-       print <<<EOM
-<script Language="JavaScript">
-       startcounter();
-</script>
-EOM;
-?>
-
-</body>
-</html>
diff --git a/dialup_admin/html/user_admin_userinfo.html.php b/dialup_admin/html/user_admin_userinfo.html.php
deleted file mode 100644 (file)
index b2e0a87..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-echo <<<EOM
-       <tr><td align=center bgcolor="#d0ddb0">
-       Server
-       </td><td>
-       <b>$lastlog_server_name</b> ($lastlog_server_ip)
-       </td></tr>
-       <tr><td align=center bgcolor="#d0ddb0">
-       Server Port
-       </td><td>
-       $lastlog_server_port
-       </td></tr>
-       <tr><td align=center bgcolor="#d0ddb0">
-       Workstation
-       </td><td>
-       $lastlog_callerid
-       </td></tr>
-       <tr><td align=center bgcolor="#d0ddb0">
-       Upload
-       </td><td>
-       $lastlog_input
-       </td></tr>
-       <tr><td align=center bgcolor="#d0ddb0">
-       Download
-       </td><td>
-       $lastlog_output
-       </td></tr>
-EOM;
-?>
diff --git a/dialup_admin/html/user_toolbar.html.php b/dialup_admin/html/user_toolbar.html.php
deleted file mode 100644 (file)
index 2b48591..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-$Login = urlencode($login);
-print <<<EOM
-<tr valign=top>
-<td align=center bgcolor="black" width=100>
-<a href="user_admin.php?login=$Login" title="Show User Information"><font color="white"><b>SHOW</b></font></a></td>
-<td align=center bgcolor="black" width=100>
-<a href="user_edit.php?login=$Login" title="Change User Dialup Settings"><font color="white"><b>EDIT</b></font></a></td>
-<td align=center bgcolor="black" width=200 colspan=2>
-<a href="user_info.php?login=$Login" title="Change User Personal Information"><font color="white"><b>USER INFO</b></font></a></td>
-</tr>
-<tr valign=top>
-<td align=center bgcolor="black" width=100>
-<a href="user_accounting.php?login=$Login" title="Show User Accounting Information"><font color="white"><b>ACCOUNTING</b></font></a></td>
-<td align=center bgcolor="black" width=100>
-<a href="badusers.php?login=$Login" title="Show User Unauthorized Actions"><font color="white"><b>BADUSERS</b></font></a></td>
-<td align=center bgcolor="black" width=100>
-<a href="user_delete.php?login=$Login" title="Delete User"><font color="white"><b>DELETE</b></font></a></td>
-<td align=center bgcolor="black" width=100>
-<a href="user_test.php?login=$Login" title="Test User"><font color="white"><b>TEST</b></font></a></td>
-</tr>
-<tr valign=top>
-<td align=center width=100></td>
-<td align=center bgcolor="black" width=200 colspan=2>
-<a href="clear_opensessions.php?login=$Login" title="Clear Open User Sessions"><font color="white"><b>OPEN SESSIONS</b></font></a></td>
-<td align=center width=100></td>
-</tr>
-EOM;
-?>
diff --git a/dialup_admin/lib/acctshow.php b/dialup_admin/lib/acctshow.php
deleted file mode 100644 (file)
index ed0a66a..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-#Read sql attribute map
-unset($sql_attrs);
-if (isset($_SESSION['sql_attrs']))
-       $sql_attrs = $_SESSION["sql_attrs"];
-if (!isset($sql_attrs)){
-       $ARR = file($config[general_sql_attrs_file]);
-       foreach($ARR as $val){
-               $val=chop($val);
-               if (preg_match('/^[[:space:]]*#/',$val) || preg_match('/^[[:space:]]*$/',$val))
-                       continue;
-               list($key,$desc,$show,$func)=preg_split("/\t+/",$val);
-               $sql_attrs[strtolower($key)][desc] = "$desc";
-               $sql_attrs[strtolower($key)][show] = "$show";
-               $sql_attrs[strtolower($key)][func] = ($func == "") ? "nothing" : "$func";
-       }
-       if ($config[general_use_session] == 'yes')
-               session_register('sql_attrs');
-}
-?>
diff --git a/dialup_admin/lib/add_badusers.php b/dialup_admin/lib/add_badusers.php
deleted file mode 100644 (file)
index 77d3d86..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
-       include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
-else{
-       echo "<b>Could not include SQL library</b><br>\n";
-       exit();
-}
-
-$date=date($config[sql_full_date_format]);
-$lockmsg_name = $attrmap['Dialup-Lock-Msg'] . '0';
-$msg = $$lockmsg_name;
-$admin = '-';
-if ($_SERVER["PHP_AUTH_USER"] != '')
-       $admin = $_SERVER["PHP_AUTH_USER"];
-if ($msg == '')
-       echo "<b>Lock Message should not be empty</b><br>\n";
-else{
-       $sql_servers = array();
-       if ($config[sql_extra_servers] != '')
-               $sql_servers = explode(' ',$config[sql_extra_servers]);
-       $sql_servers[] = $config[sql_server];
-       foreach ($sql_servers as $server){
-               $link = @da_sql_host_connect($server,$config);
-               if ($link){
-                       $r = da_sql_query($link,$config,
-                       "INSERT INTO $config[sql_badusers_table] (username,incidentdate,admin,reason)
-                       VALUES ('$login','$date','$admin','$msg');");
-                       if (!$r)
-                               echo "<b>SQL Error:" . da_sql_error($link,$config) . "</b><br>\n";
-                       else
-                               echo "<b>User added to badusers table</b><br>\n";
-                       da_sql_close($link,$config);
-               }
-               else
-                       echo "<b>SQL Error: Could not connect to SQL database: $server</b><br>\n";
-       }
-}
-?>
diff --git a/dialup_admin/lib/attrshow.php b/dialup_admin/lib/attrshow.php
deleted file mode 100644 (file)
index 5d2f2fd..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-include_once('../lib/xlat.php');
-#Read user_edit attribute map
-unset($show_attrs);
-if (isset($_SESSION['show_attrs']))
-       $show_attrs = $_SESSION['show_attrs'];
-if (!isset($show_attrs)){
-       $infile = xlat($config[general_user_edit_attrs_file],$login,$config);
-       $ARR = file($infile);
-       foreach($ARR as $val){
-               $val=chop($val);
-               if (preg_match('/^[[:space:]]*#/',$val) || preg_match('/^[[:space:]]*$/',$val))
-                       continue;
-               list($key,$v)=preg_split("/\t+/",$val);
-               $show_attrs["$key"]=($v != '') ? "$v" : "$key";
-       }
-       if ($config[general_use_session] == 'yes')
-               session_register('show_attrs');
-}
-unset($acct_attrs);
-if (isset($_SESSION['acct_attrs']))
-       $acct_attrs = $_SESSION['acct_attrs'];
-if (!isset($acct_attrs) && isset($config[general_accounting_attrs_file])){
-       $infile = xlat($config[general_accounting_attrs_file],$login,$config);
-       $ARR = file($infile);
-       foreach ($ARR as $val){
-               $val=chop($val);
-               if (preg_match('/^[[:space:]]*#/',$val) || preg_match('/^[[:space:]]*$/',$val))
-                       continue;
-               list($num,$desc,$showua,$showuf,$showfl)=preg_split("/\t+/",$val);
-               if ($showua == 'yes'){
-                       $acct_attrs["ua"]["num"]++;
-                       $acct_attrs["ua"]["$num"]=$desc;
-               }
-               if ($showuf == 'yes'){
-                       $acct_attrs["uf"]["num"]++;
-                       $acct_attrs["uf"]["$num"]=$desc;
-               }
-               if ($showfl == 'yes'){
-                       $acct_attrs["fl"]["num"]++;
-                       $acct_attrs["fl"]["$num"]=$desc;
-               }
-       }
-       if ($config[general_use_session] == 'yes')
-               session_register('acct_attrs');
-}
-?>
diff --git a/dialup_admin/lib/crypt/clear.php b/dialup_admin/lib/crypt/clear.php
deleted file mode 100644 (file)
index a4771d1..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-function da_encrypt($passwd)
-{
-        return $passwd;
-}
-?>
diff --git a/dialup_admin/lib/crypt/crypt.php b/dialup_admin/lib/crypt/crypt.php
deleted file mode 100644 (file)
index 037c418..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php
-function da_encrypt()
-{
-       $numargs=func_num_args();
-       $passwd=func_get_arg(0);
-       if ($numargs == 2){
-               $salt=func_get_arg(1);
-               return crypt($passwd,$salt);
-       }
-        return crypt($passwd);
-}
-?>
diff --git a/dialup_admin/lib/crypt/md5.php b/dialup_admin/lib/crypt/md5.php
deleted file mode 100644 (file)
index 7d0c2cc..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-function da_encrypt($passwd)
-{
-        return md5($passwd);
-}
-?>
diff --git a/dialup_admin/lib/defaults.php b/dialup_admin/lib/defaults.php
deleted file mode 100644 (file)
index 2a0572f..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-<?php
-unset($text_default_vals);
-unset($default_vals);
-if (isset($_SESSION['text_default_vals']))
-       $text_default_vals = $_SESSION['text_default_vals'];
-if (!isset($text_default_vals)){
-       $ARR=file("$config[general_default_file]");
-       foreach($ARR as $val) {
-               $val=chop($val);
-               if (preg_match('/^[[:space:]]*#/',$val) || preg_match('/^[[:space:]]*$/',$val))
-                       continue;
-               list($key,$v)=preg_split("/:[[:space:]]*/",$val,2);
-               $text_default_vals["$key"][0]="$v";
-               $text_default_vals["$key"]['count']++;
-       }
-       if (!isset($text_default_vals))
-               $text_default_vals["NOT_EXIST"][0] = '0';
-       if ($config[general_use_session] == 'yes')
-               session_register('text_default_vals');
-}
-$default_vals = $text_default_vals;
-if (is_file("../lib/$config[general_lib_type]/defaults.php"))
-        include("../lib/$config[general_lib_type]/defaults.php");
-?>
diff --git a/dialup_admin/lib/functions.php b/dialup_admin/lib/functions.php
deleted file mode 100644 (file)
index 71e9475..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-<?php
-function time2str($time)
-{
-       $time = floor($time);
-       if (!$time)
-               return "0 seconds";
-       $d = $time/86400;
-       $d = floor($d);
-       if ($d){
-               $str .= "$d days, ";
-               $time = $time % 86400;
-       }
-       $h = $time/3600;
-       $h = floor($h);
-       if ($h){
-               $str .= "$h hours, ";
-               $time = $time % 3600;
-       }
-       $m = $time/60;
-       $m = floor($m);
-       if ($m){
-               $str .= "$m minutes, ";
-               $time = $time % 60;
-       }
-       if ($time)
-               $str .= "$time seconds, ";
-       $str = preg_replace('/, $/','',$str);
-
-       return $str;
-}
-
-function time2strclock($time)
-{
-       $time = floor($time);
-       if (!$time)
-               return "00:00:00";
-
-       $str["days"] = $str["hour"] = $str["min"] = $str["sec"] = "00";
-
-       $d = $time/86400;
-       $d = floor($d);
-       if ($d){
-               if ($d < 10)
-                       $d = "0" . $d;
-               $str["days"] = "$d";
-               $time = $time % 86400;
-       }
-       $h = $time/3600;
-       $h = floor($h);
-       if ($h){
-               if ($h < 10)
-                       $h = "0" . $h;
-               $str["hour"] = "$h";
-               $time = $time % 3600;
-       }
-       $m = $time/60;
-       $m = floor($m);
-       if ($m){
-               if ($m < 10)
-                       $m = "0" . $m;
-               $str["min"] = "$m";
-               $time = $time % 60;
-       }
-       if ($time){
-               if ($time < 10)
-                       $time = "0" . $time;
-       }
-       else
-               $time = "00";
-       $str["sec"] = "$time";
-       if ($str["days"] != "00")
-               $ret = "$str[days]:$str[hour]:$str[min]:$str[sec]";
-       else
-               $ret = "$str[hour]:$str[min]:$str[sec]";
-
-       return $ret;
-}
-
-function date2timediv($date,$now)
-{
-       list($day,$time)=explode(' ',$date);
-       $day = explode('-',$day);
-       $time = explode(':',$time);
-       $timest = mktime($time[0],$time[1],$time[2],$day[1],$day[2],$day[0]);
-       if (!$now)
-               $now = time();
-       return ($now - $timest);
-}
-
-function date2time($date)
-{
-       list($day,$time)=explode(' ',$date);
-       $day = explode('-',$day);
-       $time = explode(':',$time);
-       $timest = mktime($time[0],$time[1],$time[2],$day[1],$day[2],$day[0]);
-       return $timest;
-}
-
-function bytes2str($bytes)
-{
-       $bytes=floor($bytes);
-       if ($bytes > 536870912)
-               $str = sprintf("%5.2f GBs", $bytes/1073741824);
-       else if ($bytes > 524288)
-               $str = sprintf("%5.2f MBs", $bytes/1048576);
-       else
-               $str = sprintf("%5.2f KBs", $bytes/1024);
-
-       return $str;
-}
-
-function nothing($ret)
-{
-       return $ret;
-}
-function check_defaults($val,$op,$def)
-{
-       for($i=0;$i<$def[count];$i++){
-               if ($val == $def[$i] && ($op == '' || $op == $def[operator][$i]))
-                       return 1;
-       }
-
-       return 0;
-}
-
-function check_ip($ipaddr) {
-    if(preg_match("/^([0-9]{1,3})\x2E([0-9]{1,3})\x2E([0-9]{1,3})\x2E([0-9]{1,3})$/", $ipaddr,$digit)) {
-         if(($digit[1] <= 255) && ($digit[2] <= 255) && ($digit[3] <= 255) && ($digit[4] <= 255)) {
-        return(1);
-      }
-    }
-    return(0);
-  }
-
-?>
diff --git a/dialup_admin/lib/lang/default/utf8.php b/dialup_admin/lib/lang/default/utf8.php
deleted file mode 100644 (file)
index aea4837..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php
-function init_decoder()
-{
-       return 0;
-}
-
-function decode_string($line,$k)
-{
-       return $line;
-}
-?>
diff --git a/dialup_admin/lib/lang/el/utf8.php b/dialup_admin/lib/lang/el/utf8.php
deleted file mode 100644 (file)
index bca1900..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-<?php
-function init_encoder()
-{
-       $k = array(
-
-               "~@"=>"\80", "~A"=>"\81", "~B"=>"\82", "~C"=>"\83", "~D"=>"\84", "~E"=>"\85",
-               "~F"=>"\86", "~G"=>"\87", "~H"=>"\88", "~I"=>"\89", "~J"=>"\8a", "~K"=>"\8b",
-               "~L"=>"\8c", "~M"=>"\8d", "~N"=>"\8e", "~O"=>"\8f", "~P"=>"\90", "~Q"=>"\91",
-               "~R"=>"\92", "~S"=>"\93", "~T"=>"\94", "~U"=>"\95", "~V"=>"\96", "~W"=>"\97",
-               "~^"=>"Â\9e", "~_"=>"Â\9f", "| "=>" ", "¡"=>"ʽ", "¢"=>"ʼ", "£"=>"£",
-               "¤"=>"�", "¥"=>"�", "¦"=>"¦", "§"=>"§", "¨"=>"¨", "©"=>"©",
-               "ª"=>"�", "«"=>"«", "¬"=>"¬", "­"=>"­", "®"=>"�", "¯"=>"â\80\95",
-               "°"=>"°", "±"=>"±", "²"=>"²", "³"=>"³", "´"=>"Î\84", "µ"=>"Î\85",
-               "¶"=>"Î\86", "·"=>"·", "¸"=>"Î\88", "¹"=>"Î\89", "º"=>"Î\8a", "»"=>"»",
-               "¼"=>"Î\8c", "½"=>"½", "¾"=>"Î\8e", "¿"=>"Î\8f", "À"=>"Î\90", "Á"=>"Î\91",
-               "Â"=>"Î\92", "Ã"=>"Î\93", "Ä"=>"Î\94", "Å"=>"Î\95", "Æ"=>"Î\96", "Ç"=>"Î\97",
-               "È"=>"Î\98", "É"=>"Î\99", "Ê"=>"Î\9a", "Ë"=>"Î\9b", "Ì"=>"Î\9c", "Í"=>"Î\9d",
-               "Î"=>"Î\9e", "Ï"=>"Î\9f", "Ð"=>"Π", "Ñ"=>"Ρ", "Ò"=>"�", "Ó"=>"Σ",
-               "Ô"=>"Τ", "Õ"=>"Î¥", "Ö"=>"Φ", "×"=>"Χ", "Ø"=>"Ψ", "Ù"=>"Ω",
-               "Ú"=>"Ϊ", "Û"=>"Ϋ", "Ü"=>"ά", "Ý"=>"έ", "Þ"=>"ή", "ß"=>"ί",
-               "à"=>"ΰ", "á"=>"α", "â"=>"β", "ã"=>"γ", "ä"=>"δ", "å"=>"ε",
-               "æ"=>"ζ", "ç"=>"η", "è"=>"θ", "é"=>"ι", "ê"=>"κ", "ë"=>"λ",
-               "ì"=>"μ", "í"=>"ν", "î"=>"ξ", "ï"=>"ο", "ð"=>"Ï\80", "ñ"=>"Ï\81",
-               "ò"=>"Ï\82", "ó"=>"Ï\83", "ô"=>"Ï\84", "õ"=>"Ï\85", "ö"=>"Ï\86", "÷"=>"Ï\87",
-               "ø"=>"Ï\88", "ù"=>"Ï\89", "ú"=>"Ï\8a", "û"=>"Ï\8b", "ü"=>"Ï\8c", "ý"=>"Ï\8d",
-               "þ"=>"Ï\8e", "~X"=>"Â\98", "~Y"=>"Â\99", "~Z"=>"Â\9a", "~["=>"Â\9b", "~]"=>"Â\9d"
-       );
-
-       return $k;
-}
-
-function init_decoder()
-{
-       $k = array(
-               "\80"=>"~@", "\81"=>"~A", "\82"=>"~B", "\83"=>"~C", "\84"=>"~D", "\85"=>"~E",
-               "\86"=>"~F", "\87"=>"~G", "\88"=>"~H", "\89"=>"~I", "\8a"=>"~J", "\8b"=>"~K",
-               "\8c"=>"~L", "\8d"=>"~M", "\8e"=>"~N", "\8f"=>"~O", "\90"=>"~P", "\91"=>"~Q",
-               "\92"=>"~R", "\93"=>"~S", "\94"=>"~T", "\95"=>"~U", "\96"=>"~V", "\97"=>"~W",
-               "Â\9e"=>"~^", "Â\9f"=>"~_", " "=>"| ", "ʽ"=>"¡", "ʼ"=>"¢", "£"=>"£",
-               "�"=>"¤", "�"=>"¥", "¦"=>"¦", "§"=>"§", "¨"=>"¨", "©"=>"©",
-               "�"=>"ª", "«"=>"«", "¬"=>"¬", "­"=>"­", "�"=>"®", "â\80\95"=>"¯",
-               "°"=>"°", "±"=>"±", "²"=>"²", "³"=>"³", "Î\84"=>"´", "Î\85"=>"µ",
-               "Î\86"=>"¶", "·"=>"·", "Î\88"=>"¸", "Î\89"=>"¹", "Î\8a"=>"º", "»"=>"»",
-               "Î\8c"=>"¼", "½"=>"½", "Î\8e"=>"¾", "Î\8f"=>"¿", "Î\90"=>"À", "Î\91"=>"Á",
-               "Î\92"=>"Â", "Î\93"=>"Ã", "Î\94"=>"Ä", "Î\95"=>"Å", "Î\96"=>"Æ", "Î\97"=>"Ç",
-               "Î\98"=>"È", "Î\99"=>"É", "Î\9a"=>"Ê", "Î\9b"=>"Ë", "Î\9c"=>"Ì", "Î\9d"=>"Í",
-               "Î\9e"=>"Î", "Î\9f"=>"Ï", "Π"=>"Ð", "Ρ"=>"Ñ", "�"=>"Ò", "Σ"=>"Ó",
-               "Τ"=>"Ô", "Î¥"=>"Õ", "Φ"=>"Ö", "Χ"=>"×", "Ψ"=>"Ø", "Ω"=>"Ù",
-               "Ϊ"=>"Ú", "Ϋ"=>"Û", "ά"=>"Ü", "έ"=>"Ý", "ή"=>"Þ", "ί"=>"ß",
-               "ΰ"=>"à", "α"=>"á", "β"=>"â", "γ"=>"ã", "δ"=>"ä", "ε"=>"å",
-               "ζ"=>"æ", "η"=>"ç", "θ"=>"è", "ι"=>"é", "κ"=>"ê", "λ"=>"ë",
-               "μ"=>"ì", "ν"=>"í", "ξ"=>"î", "ο"=>"ï", "Ï\80"=>"ð", "Ï\81"=>"ñ",
-               "Ï\82"=>"ò", "Ï\83"=>"ó", "Ï\84"=>"ô", "Ï\85"=>"õ", "Ï\86"=>"ö", "Ï\87"=>"÷",
-               "Ï\88"=>"ø", "Ï\89"=>"ù", "Ï\8a"=>"ú", "Ï\8b"=>"û", "Ï\8c"=>"ü", "Ï\8d"=>"ý",
-               "Ï\8e"=>"þ", "Â\98"=>"~X", "Â\99"=>"~Y", "Â\9a"=>"~Z", "Â\9b"=>"~[", "Â\9d"=>"~]"
-       );
-
-       return $k;
-}
-
-function encode_string($line,$k)
-{
-       for($i=0;$i<strlen($line);$i++){
-               $c = $line{$i};
-               $val = $k["$c"];
-               $c = ($val != "") ? "$val" : "$c";
-               $new_line .= $c;
-       }
-
-       return $new_line;
-}
-
-function decode_string($line,$k)
-{
-       $line = preg_replace("/&/","&&",$line);
-       $line = preg_replace("/([,+0-9.\/() -])/", "%\\1", $line);
-       $mline = chunk_split($line, 2, " ");
-       $chars = explode(" ", $mline);
-       foreach ($chars as $c){
-               $val = $k["$c"];
-               $c = ($val != "") ? "$val" : "$c";
-               $new_line .= $c;
-       }
-       $new_line = preg_replace("/%%/", " ", $new_line);
-       $new_line = preg_replace("/%([,+0-9.\/() -])/", "\\1", $new_line);
-       $new_line = preg_replace("/%/", " ",$new_line);
-       $new_line = preg_replace("/&&/","&",$new_line);
-
-       return $new_line;
-}
-?>
diff --git a/dialup_admin/lib/ldap/attrmap.php b/dialup_admin/lib/ldap/attrmap.php
deleted file mode 100644 (file)
index db05a5b..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-#Read ldap attribute map
-unset($attrmap);
-if (isset($_SESSION['attrmap']))
-       $attrmap = $_SESSION['attrmap'];
-if (!isset($attrmap)){
-       $ARR = file("$config[general_ldap_attrmap]");
-       foreach($ARR as $val){
-               $val=chop($val);
-               if (preg_match('/^[[:space:]]*#/',$val) || preg_match('/^[[:space:]]*$/',$val))
-                       continue;
-               list(,$key,$v,$g)=preg_split('/[[:space:]]+/',$val);
-               $v = strtolower($v);
-               $attrmap["$key"]=$v;
-               $attrmap[generic]["$key"]=$g;
-       }
-       $ARR = file("$config[general_extra_ldap_attrmap]");
-       foreach($ARR as $val){
-               $val=chop($val);
-               if (preg_match('/^[[:space:]]*#/',$val) || preg_match('/^[[:space:]]*$/',$val))
-                       continue;
-               list(,$key,$v,$g)=preg_split('/[[:space:]]+/',$val);
-               $v = strtolower($v);
-               $attrmap["$key"]=$v;
-               $attrmap[generic]["$key"]=$g;
-       }
-       if ($config[general_use_session] == 'yes')
-               session_register('attrmap');
-}
-?>
diff --git a/dialup_admin/lib/ldap/change_attrs.php b/dialup_admin/lib/ldap/change_attrs.php
deleted file mode 100644 (file)
index 2269dfa..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-<?php
-require_once('../lib/functions.php');
-require_once('../lib/ldap/functions.php');
-       if ($config[ldap_write_server])
-               $ds = @ldap_connect($config[ldap_write_server]);
-       else
-               $ds = @ldap_connect($config[ldap_server]);
-       if ($ds){
-               $r = @da_ldap_bind($ds,$config);
-               if ($r){
-
-                       foreach($show_attrs as $key => $attr){
-                               if ($attrmap["$key"] == 'none')
-                                       continue;
-                               $i = 0;
-                               $j = -1;
-                               $name = $attrmap["$key"] . $i;
-
-                               while (isset($$name)){
-                                       $val = $$name;
-                                       $i++;
-                                       $j++;
-                                       $name = $attrmap["$key"] . $i;
-//
-//     if value is the same as the default and the corresponding attribute in ldap does not exist or
-//     the value is the same as that in ldap then continue
-//
-                                       if ( (check_defaults($val,'',$default_vals["$key"]) && !isset($item_vals["$key"][$j])) || $val == $item_vals["$key"][$j])
-                                               continue;
-//
-//     if value is null and ldap attribute does not exist then continue
-//
-                                       if ($val == '' && !isset($item_vals["$key"][$j]))
-                                               continue;
-//
-//     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 == '') &&
-                                               isset($item_vals["$key"][$j]))
-                                               $del[$attrmap["$key"]][] = $item_vals["$key"][$j];
-//
-//     else modify the ldap attribute
-//
-                                       else{
-                                               if (isset($item_vals["$key"][$j])){
-                                                       $del[$attrmap["$key"]][] = $item_vals["$key"][$j];
-                                                       $add_r[$attrmap["$key"]][] = $val;
-                                               }
-                                               else{
-                                                       $add_r[$attrmap["$key"]][] = $val;
-                                               }
-                                       }
-                               }
-                       }
-                       if (isset($del)){
-                              if ($config[ldap_debug] == 'true'){
-                                       print "<b>DEBUG(LDAP): ldap_mod_del(): DN='$dn'</b><br>\n";
-                                       print "<b>DEBUG(LDAP): ldap_mod_del(): Data:";
-                                       print_r($del);
-                                       print "</b><br>\n";
-                               }
-                               @ldap_mod_del($ds,$dn,$del);
-                       }
-                       if (isset($add_r)){
-                              if ($config[ldap_debug] == 'true'){
-                                       print "<b>DEBUG(LDAP): ldap_mod_add(): DN='$dn'</b><br>\n";
-                                       print "<b>DEBUG(LDAP): ldap_mod_add(): Data:";
-                                       print_r($add_r);
-                                       print "</b><br>\n";
-                               }
-                               @ldap_mod_add($ds,$dn,$add_r);
-                       }
-               }
-               if (@ldap_error($ds) == 'Success')
-                       echo "<b>The changes were successfully commited to the directory</b><br>\n";
-               else
-                       echo "<b>LDAP ERROR: " . ldap_error($ds) . "</b><br>\n";
-               @ldap_close($ds);
-       }
-?>
diff --git a/dialup_admin/lib/ldap/change_info.php b/dialup_admin/lib/ldap/change_info.php
deleted file mode 100644 (file)
index cb9057e..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-require_once('../lib/ldap/functions.php');
-       if ($config[ldap_write_server])
-               $ds = @ldap_connect($config[ldap_write_server]);
-       else
-               $ds = @ldap_connect($config[ldap_server]);
-       if ($config[general_decode_normal_attributes] == 'yes'){
-               $decode_normal = 1;
-               if (is_file("../lib/lang/$config[general_prefered_lang]/utf8.php"))
-                       include_once("../lib/lang/$config[general_prefered_lang]/utf8.php");
-               else
-                       include_once('../lib/lang/default/utf8.php');
-               $k = init_encoder();
-       }
-       if ($ds){
-               $r = @da_ldap_bind($ds,$config);
-               if ($r){
-                       if ($Fcn != '' && $Fcn != '-' && $Fcn != $cn){
-                               list ($givenname,$sn) = preg_split('/ /',$Fcn,2);
-                               $mod['cn'] = $Fcn;
-                               $mod['cn'] = ($decode_normal) ? encode_string($mod['cn'],$k) : $mod['cn'];
-                               $mod['givenname'] = $givenname;
-                       $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;
-                       if ($Fou != '' && $Fou != '-' && $Fou != $ou){
-                               $mod['ou'] = $Fou;
-                               $mod['ou'] = ($decode_normal) ? encode_string($mod['ou'],$k) : $mod['ou'];
-                       }
-                       if ($Ftelephonenumber != '' && $Ftelephonenumber != '-' && $Ftelephonenumber != $telephonenumber)
-                               $mod['telephonenumber'] = $Ftelephonenumber;
-                       if ($Fhomephone != '' && $Fhomephone != '-' && $Fhomephone != $homephone)
-                               $mod['homephone'] = $Fhomephone;
-                       if ($dn != ''){
-                              if ($config[ldap_debug] == 'true'){
-                                       print "<b>DEBUG(LDAP): ldap_mod_replace(): DN='$dn'</b><br>\n";
-                                       print "<b>DEBUG(LDAP): ldap_mod_replace(): Data:";
-                                       print_r($mod);
-                                       print "</b><br>\n";
-                               }
-                               @ldap_mod_replace($ds,$dn,$mod);
-                               if (@ldap_error($ds) != 'Success')
-                                       echo "<b>LDAP ERROR: " . ldap_error($ds) . "</b><br>\n";
-                               else
-                                       echo "<b>User personal information updated successfully</b><br>\n";
-                       }
-               }
-               @ldap_close($ds);
-       }
-?>
diff --git a/dialup_admin/lib/ldap/change_passwd.php b/dialup_admin/lib/ldap/change_passwd.php
deleted file mode 100644 (file)
index 13e8648..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-require_once('../lib/ldap/functions.php');
-       if ($config[ldap_write_server])
-               $ds = @ldap_connect($config[ldap_write_server]);
-       else
-               $ds = @ldap_connect($config[ldap_server]);
-       if ($ds){
-               $r = @da_ldap_bind($ds,$config);
-               if ($r){
-                       if (is_file("../lib/crypt/$config[general_encryption_method].php")){
-                               include("../lib/crypt/$config[general_encryption_method].php");
-                               $passwd = da_encrypt($passwd);
-                               $passwd = '{' . $config[general_encryption_method] . '}' . $passwd;
-                               $mod[$attrmap['User-Password']] = $passwd;
-                               if ($config[ldap_debug] == 'true'){
-                                       print "<b>DEBUG(LDAP): ldap_mod_replace(): DN='$dn'</b><br>\n";
-                                       print "<b>DEBUG(LDAP): ldap_mod_replace(): Data:";
-                                       print_r($mod);
-                                       print "</b><br>\n";
-                               }
-                               @ldap_mod_replace($ds,$dn,$mod);
-                               if (@ldap_error($ds) != 'Success')
-                                       echo "<b>LDAP ERROR: " . ldap_error($ds) . "</b><br>\n";
-                       }
-                       else
-                               echo "<b>Could not open encryption library file.</b><br>\n";
-               }
-               @ldap_close($ds);
-       }
-?>
diff --git a/dialup_admin/lib/ldap/create_user.php b/dialup_admin/lib/ldap/create_user.php
deleted file mode 100644 (file)
index 598c259..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-require_once('../lib/functions.php');
-require_once('../lib/ldap/functions.php');
-       if ($config[ldap_write_server])
-               $ds = @ldap_connect($config[ldap_write_server]);
-       else
-               $ds = @ldap_connect($config[ldap_server]);
-       if ($ds){
-               $r = @da_ldap_bind($ds,$config);
-               if ($r){
-                       list ($givenname,$sn) = preg_split('/ /',$Fcn,2);
-                       $dn = 'uid=' . $login . ',' . $config[ldap_default_new_entry_suffix];
-                       $new_user_entry["objectclass"][0]="top";
-                       $new_user_entry["objectclass"][1]="person";
-                       $new_user_entry["objectclass"][2]="organizationalPerson";
-                       $new_user_entry["objectclass"][3]="inetOrgPerson";
-                       $new_user_entry["objectclass"][4]="radiusprofile";
-                       $new_user_entry["cn"]="$Fcn";
-                       $new_user_entry["sn"]="$sn";
-                       $new_user_entry["givenname"]="$givenname";
-                       $new_user_entry["mail"]="$Fmail";
-                       $new_user_entry["telephonenumber"]="$Ftelephonenumber";
-                       $new_user_entry["homephone"]="$Fhomephone";
-                       $new_user_entry["mobile"]="$Fmobile";
-                       $new_user_entry["ou"]="$Fou";
-                       $new_user_entry["uid"]="$login";
-                       if (is_file("../lib/crypt/$config[general_encryption_method].php")){
-                               include("../lib/crypt/$config[general_encryption_method].php");
-                               $passwd = da_encrypt($passwd);
-               $new_user_entry[$attrmap['User-Password']] = '{' . "$config[general_encryption_method]" . '}' . $passwd;
-                       }
-                       else{
-                               echo "<b>Could not open encryption library file.Password will be clear text.</b><br>\n";
-                               $new_user_entry[$attrmap['User-Password']]="{clear}" . $passwd;
-                       }
-
-                       if ($config[ldap_debug] == 'true'){
-                               print "<b>DEBUG(LDAP): ldap_add(): DN='$dn'</b><br>\n";
-                               print "<b>DEBUG(LDAP): ldap_add(): Entry Data:";
-                               print_r($new_user_entry);
-                               print "</b><br>\n";
-                       }
-                       @ldap_add($ds,$dn,$new_user_entry);
-
-                       foreach($show_attrs as $key => $attr){
-                               if ($attrmap["$key"] == 'none')
-                                       continue;
-//
-//     if value is the same as the default and the corresponding attribute in ldap does not exist or
-//     the value is the same as that in ldap then continue
-//
-                               if ( check_defaults($$attrmap["$key"],'',$default_vals["$key"]))
-                                       continue;
-                               if ( $$attrmap["$key"] == '')
-                                       continue;
-                               unset($mod);
-                               $mod[$attrmap["$key"]] = $$attrmap["$key"];
-
-                               if ($config[ldap_debug] == 'true'){
-                                       print "<b>DEBUG(LDAP): ldap_mod_add(): DN='$dn'</b><br>\n";
-                                       print "<b>DEBUG(LDAP): ldap_mod_add(): Data:";
-                                       print_r($mod);
-                                       print "</b><br>\n";
-                               }
-                               @ldap_mod_add($ds,$dn,$mod);
-                       }
-               }
-               if (@ldap_error($ds) == 'Success')
-                       echo "<b>User was added in user database</b><br>\n";
-               else
-                       echo "<b>LDAP ERROR: " . ldap_error($ds) . "</b><br>\n";
-               @ldap_close($ds);
-       }
-?>
diff --git a/dialup_admin/lib/ldap/defaults.php b/dialup_admin/lib/ldap/defaults.php
deleted file mode 100644 (file)
index 7085b2b..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-<?php
-require_once('../lib/ldap/functions.php');
-if ($config[ldap_default_dn] != ''){
-       include('../lib/ldap/attrmap.php');
-       $regular_profile_attr = $config[ldap_regular_profile_attr];
-       $ds=@ldap_connect("$config[ldap_server]");  // must be a valid ldap server!
-       if ($ds) {
-                       $r=@da_ldap_bind($ds,$config);
-               if ($config[ldap_debug] == 'true')
-                       print "<b>DEBUG(LDAP): Search Query: BASE='$config[ldap_default_dn]',FILTER='objectclass=*'</b><br>\n";
-                       $sr=@ldap_search($ds,"$config[ldap_default_dn]", 'objectclass=*');
-                       if ($info = @ldap_get_entries($ds, $sr)){
-                               $dn = $info[0]['dn'];
-                               if ($dn != ''){
-                                       foreach($attrmap as $key => $val){
-                                               if ($info[0]["$val"][0] != '' && $key != 'Dialup-Access'){
-                                                       if ($attrmap[generic]["$key"] == 'generic'){
-                                                               for($i=0;$i<$info[0]["$val"][count];$i++)
-                                                                       $default_vals["$key"][] = $info[0]["$val"][$i];
-                                                               $default_vals["$key"][count] += $info[0]["$val"][count];
-                                                       }
-                                                       else
-                                                               $default_vals["$key"] = $info[0]["$val"];
-                                               }
-                               }
-                       }
-               }
-               if ($regular_profile_attr != ''){
-                       $get_attrs = array("$regular_profile_attr");
-                       if ($config[ldap_filter] != '')
-                               $filter = xlat($config[ldap_filter],$login,$config);
-                       else
-                               $filter = 'uid=' . $login;
-                       if ($config[ldap_debug] == 'true')
-                               print "<b>DEBUG(LDAP): Search Query: BASE='$config[ldap_base]',FILTER='$filter'</b><br>\n";
-                       $sr=@ldap_search($ds,"$config[ldap_base]",$filter,$get_attrs);
-                       if ($info = @ldap_get_entries($ds,$sr)){
-                               for($i=0;$i<$info[0][$regular_profile_attr]["count"];$i++){
-                                       $dn2 = $info[0][$regular_profile_attr][$i];
-                                       if ($dn2 != ''){
-                                               if ($config[ldap_debug] == 'true')
-                                                       print "<b>DEBUG(LDAP): Search Query: BASE='$dn2',FILTER='objectclass=*'</b><br>\n";
-                                               $sr2=@ldap_search($ds,"$dn2",'objectclass=*');
-                                               if ($info2 = @ldap_get_entries($ds,$sr2)){
-                                                       $dn3 = $info2[0]['dn'];
-                                                       if ($dn3 != ''){
-                                                               foreach($attrmap as $key => $val){
-                                                                       if ($info2[0]["$val"][0] != '' && $key != 'Dialup-Access'){
-                                                                               if (!isset($default_vals["$key"]))
-                                                                                       $default_vals["$key"] = array();
-                                                                               if ($attrmap[generic]["$key"] == 'generic'){
-                                                                                       for($j=0;$j<$info2[0]["$val"][count];$j++)
-                                                                                               $default_vals["$key"][] = $info2[0]["$val"][$j];
-                                                                                       $default_vals["$key"][count] += $info2[0]["$val"][count];
-                                                                               }
-                                                                               else
-                                                                                       $default_vals["$key"] = $info2[0]["$val"];
-                                                                       }
-                                                               }
-                                                       }
-                                               }
-                                       }
-                               }
-                       }
-               }
-               @ldap_close($ds);
-       }
-}
-
-?>
diff --git a/dialup_admin/lib/ldap/delete_user.php b/dialup_admin/lib/ldap/delete_user.php
deleted file mode 100644 (file)
index 21824ab..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-require_once('../lib/ldap/functions.php');
-if ($config[ldap_write_server])
-       $ds = @ldap_connect($config[ldap_write_server]);
-else
-       $ds = @ldap_connect($config[ldap_server]);
-if ($ds){
-       $r = @da_ldap_bind($ds,$config);
-       if ($r){
-               if ($config[ldap_debug] == 'true')
-                       print "<b>DEBUG(LDAP): Delete Request: DN='$dn'</b><br>\n";
-               @ldap_delete($ds,$dn);
-               if (@ldap_error($ds) == 'Success')
-                       echo "<b>User Deleted successfully</b><br>\n";
-               else
-                       echo "<b>LDAP ERROR: " . ldap_error($ds) . "</b><br>\n";
-               @ldap_close($ds);
-       }
-}
-?>
diff --git a/dialup_admin/lib/ldap/find.php b/dialup_admin/lib/ldap/find.php
deleted file mode 100644 (file)
index 2199f6a..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-require_once('../lib/ldap/functions.php');
-$ds=@ldap_connect("$config[ldap_server]");  // must be a valid ldap server!
-if ($ds) {
-       if (!is_numeric($max))
-               $max = 10;
-       if ($max > 500)
-               $max = 10;
-       $r=@da_ldap_bind($ds,$config);
-       if ($search_IN == 'name' || $search_IN == 'ou')
-               $attr = ($search_IN == 'name') ? 'cn' : 'ou';
-       else if ($search_IN == 'radius'){
-               require('../lib/ldap/attrmap.php');
-               $attr = $attrmap[$radius_attr];
-       }
-       if ($config[ldap_debug] == 'true')
-               print "<b>DEBUG(LDAP): Search Query: BASE='$config[ldap_base]',FILTER='$attr=*$search*'</b><br>\n";
-       $sr=@ldap_search($ds,"$config[ldap_base]", "$attr=*$search*",array('uid'),0,$max);
-       if (($info = @ldap_get_entries($ds, $sr))){
-               for ($i = 0; $i < $info["count"]; $i++)
-                       $found_users[] = $info[$i]['uid'][0];
-       }
-       @ldap_close($ds);
-}
-else
-       echo "<b>Could not connect to the LDAP server</b><br>\n";
-?>
diff --git a/dialup_admin/lib/ldap/functions.php b/dialup_admin/lib/ldap/functions.php
deleted file mode 100644 (file)
index 716d24e..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-<?php
-require_once('../lib/xlat.php');
-
-function da_ldap_bind($ds,$config)
-{
-       if ($ds){
-               if ($config[ldap_use_http_credentials] == 'yes'){
-                       $din = $_SERVER["PHP_AUTH_USER"];
-                       $pass = $_SERVER["PHP_AUTH_PW"];
-                       if ($config[ldap_map_to_directory_manager] != '' &&
-                       $din == $config[ldap_map_to_directory_manager] &&
-                       $config[ldap_directory_manager] != '')
-                               $din = $config[ldap_directory_manager];
-               }
-               if ($config[ldap_use_http_credentials] != 'yes' ||
-                       ($din == '' && $pass == '')){
-                       $din = $config[ldap_binddn];
-                       $pass = $config[ldap_bindpw];
-               }
-               if (preg_match('/[\s,]/',$din)){        // It looks like a dn
-                       if ($config[ldap_debug] == 'true')
-                               print "<b>DEBUG(LDAP): Bind Request: DN='$din',PASSWD='$pass'</b><br>\n";
-                       return @ldap_bind($ds,"$din","$pass");
-               }
-               else{                           // It's not a DN. Find a corresponding DN
-                       if ($config[ldap_debug] == 'true')
-               print "<b>DEBUG(LDAP): Bind Request: DN='$config[ldap_binddn]',PASSWD='$config[ldap_bindpw]'</b><br>\n";
-                       $r=@ldap_bind($ds,"$config[ldap_binddn]",$config[ldap_bindpw]);
-                       if ($r){
-                               $sr=@ldap_search($ds,"$config[ldap_base]", 'uid=' . $din);
-                               $info = @ldap_get_entries($ds, $sr);
-                               $din = $info[0]['dn'];
-                               if ($din != ''){
-                                       if ($config[ldap_debug] == 'true')
-                                               print "<b>DEBUG(LDAP): Bind Request: DN='$din',PASSWD='$pass'</b><br>\n";
-                                       return @ldap_bind($ds,"$din","$pass");
-                               }
-                       }
-               }
-       }
-}
-
-function connect2db($config)
-{
-       $ds=@ldap_connect("$config[ldap_server]");  // must be a valid ldap server!
-       if ($ds)
-               $r=@da_ldap_bind($ds,$config);
-       return $ds;
-}
-
-function get_user_info($ds,$user,$config,$decode_normal,$k)
-{
-       if ($ds){
-               $attrs = array('cn');
-               if ($config[ldap_userdn] == ''){
-                       if ($config[ldap_filter] != '')
-                               $filter = xlat($config[ldap_filter],$login,$config);
-                       else
-                               $filter = 'uid=' . $login;
-               }
-               else
-                       $filter = xlat($config[ldap_userdn],$login,$config);
-               if ($config[ldap_debug] == 'true'){
-                       if ($config[ldap_userdn] == '')
-       print "<b>DEBUG(LDAP): Search Query: BASE='$config[ldap_base]',FILTER='$filter'</b><br>\n";
-                       else
-       print "<b>DEBUG(LDAP): Search Query: BASE='$filter',FILTER='(objectclass=radiusprofile)'</b><br>\n";
-               }
-               if ($config[ldap_userdn] == '')
-                       $sr=@ldap_search($ds,"$config[ldap_base]", $filter,$attrs);
-               else
-                       $sr=@ldap_read($ds,$filter, '(objectclass=radiusprofile)',$attrs);
-               $info = @ldap_get_entries($ds, $sr);
-               $cn = $info[0]["cn"][0];
-               if ($cn != '' && $decode_normal == 1)
-                       $cn = decode_string($cn,$k);
-               if ($cn == '')
-                       $cn = '-';
-               return $cn;
-       }
-}
-
-function get_user_dn($ds,$user,$config)
-{
-       if ($ds){
-               $attrs = array('dn');
-               if ($config[ldap_userdn] == ''){
-                       if ($config[ldap_filter] != '')
-                               $filter = xlat($config[ldap_filter],$login,$config);
-                       else
-                               $filter = 'uid=' . $login;
-               }
-               else
-                       $filter = xlat($config[ldap_userdn],$login,$config);
-               if ($config[ldap_debug] == 'true'){
-                       if ($config[ldap_userdn] == '')
-       print "<b>DEBUG(LDAP): Search Query: BASE='$config[ldap_base]',FILTER='$filter'</b><br>\n";
-                       else
-       print "<b>DEBUG(LDAP): Search Query: BASE='$filter',FILTER='(objectclass=radiusprofile)'</b><br>\n";
-               }
-               if ($config[ldap_userdn] == '')
-                       $sr=@ldap_search($ds,"$config[ldap_base]", $filter,$attrs);
-               else
-                       $sr=@ldap_read($ds,$filter, '(objectclass=radiusprofile)',$attrs);
-               $entry = ldap_first_entry($ds, $sr);
-               if ($entry)
-                       $dn = ldap_get_dn($ds,$entry);
-               return $dn;
-       }
-}
-
-function check_user_passwd($dn,$passwd,$config)
-{
-       $ds=@ldap_connect("$config[ldap_server]");
-       if ($ds && $dn != '' && $passwd != ''){
-               $r = @ldap_bind($ds,$dn,$passwd);
-               if ($r)
-                       return TRUE;
-               else
-                       return FALSE;
-       }
-       else
-               return FALSE;
-
-       return FALSE;
-}
-
-function closedb($ds,$config)
-{
-       if ($ds)
-               @ldap_close($ds);
-}
-?>
diff --git a/dialup_admin/lib/ldap/password_check.php b/dialup_admin/lib/ldap/password_check.php
deleted file mode 100644 (file)
index e0cc127..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-<?php
-require('password.php');
-
-if ($action == 'checkpass'){
-       $ds=@ldap_connect("$config[ldap_server]");  // must be a valid ldap server!
-       if ($ds){
-               if ($dn != ''){
-                       if ($passwd == '')
-                               $passwd = 'not_exist';
-                       $r = @ldap_bind($ds,$dn,$passwd);
-                       if ($r)
-                               $msg = '<font color=blue><b>YES It is that</b></font>';
-                       else
-                               $msg = '<font color=red><b>NO It is wrong</b></font>';
-               }
-               else
-                       $msg = 'User DN is not available. Check your configuration';
-               @ldap_close($ds);
-       }
-       else
-               $msg = '<font color=red><b>Could not connect to LDAP server</b></font>';
-       echo "<tr><td colspan=3 align=center>$msg</td></tr>\n";
-}
-?>
-</form>
diff --git a/dialup_admin/lib/ldap/personattrs.php b/dialup_admin/lib/ldap/personattrs.php
deleted file mode 100644 (file)
index e16aa87..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php
-#Read person attribute mapings
-$ARR = file($config[general_ldap_person_attrs_file]);
-foreach($ARR as $val){
-       $val=chop($val);
-       if (preg_match('/^[[:space:]]*#/',$val) || preg_match('/^[[:space:]]*$/',$val))
-               continue;
-       list($key,$desc)=preg_split("/\t+/",$val);
-       $person_attrs["$key"] = "$desc";
-}
-?>
diff --git a/dialup_admin/lib/ldap/user_info.php b/dialup_admin/lib/ldap/user_info.php
deleted file mode 100644 (file)
index 02eb824..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-<?php
-require('../lib/ldap/attrmap.php');
-require_once('../lib/ldap/functions.php');
-if (is_file("../lib/lang/$config[general_prefered_lang]/utf8.php"))
-       include_once("../lib/lang/$config[general_prefered_lang]/utf8.php");
-else
-       include_once('../lib/lang/default/utf8.php');
-
-$cn = '-';
-$cn_lang = '-';
-$address = '-';
-$address_lang = '-';
-$homeaddress = '-';
-$homeaddress_lang = '-';
-$fax = '-';
-$url = '-';
-$ou = '-';
-$ou_lang = '-';
-$title = '-';
-$title_lang = '-';
-$telephonenumber = '-';
-$homephone = '-';
-$mobile = '-';
-$mail = '-';
-$mailalt = '-';
-$dn = '';
-$user_exists = 'no';
-unset($item_vals);
-
-if ($config[general_decode_normal_attributes] == 'yes')
-       $decode_normal = 1;
-
-$ds=@ldap_connect("$config[ldap_server]");  // must be a valid ldap server!
-if ($ds) {
-       $r=@da_ldap_bind($ds,$config);
-       if ($config[ldap_userdn] == ''){
-               if ($config[ldap_filter] != '')
-                       $filter = xlat($config[ldap_filter],$login,$config);
-               else
-                       $filter = 'uid=' . $login;
-       }
-       else
-               $filter = xlat($config[ldap_userdn],$login,$config);
-       if ($config[ldap_debug] == 'true'){
-               if ($config[ldap_userdn] == '')
-                       print "<b>DEBUG(LDAP): Search Query: BASE='$config[ldap_base]',FILTER='$filter'</b><br>\n";
-               else
-                       print "<b>DEBUG(LDAP): Search Query: BASE='$filter',FILTER='(objectclass=radiusprofile)'</b><br>\n";
-       }
-       if ($config[ldap_userdn] == '')
-               $sr=@ldap_search($ds,"$config[ldap_base]", $filter);
-       else
-               $sr=@ldap_read($ds,$filter, '(objectclass=radiusprofile)');
-       $info = @ldap_get_entries($ds, $sr);
-       $dn = $info[0]['dn'];
-       if ($dn == '')
-               $user_exists = 'no';
-       else{
-               $user_exists = 'yes';
-               $user_info = 1;
-               $k = init_decoder();
-               $cn = ($info[0]['cn'][0]) ? $info[0]['cn'][0] : '-';
-               if ($decode_normal)
-                       $cn = decode_string($cn,$k);
-               $cn_lang = $info[0]["cn;lang-$config[general_prefered_lang]"][0];
-               $cn_lang = decode_string("$cn_lang", $k);
-               $cn_lang = ($cn_lang) ? $cn_lang : '-';
-               $telephonenumber = ($info[0]['telephonenumber'][0]) ? $info[0]['telephonenumber'][0] : '-';
-               $homephone = ($info[0]['homephone'][0]) ? $info[0]['homephone'][0] : '-';
-               $address = ($info[0]['postaladdress'][0]) ? $info[0]['postaladdress'][0] : '-';
-               if ($decode_normal)
-                       $address = decode_string($address,$k);
-               $address_lang = $info[0]["postaladdress;lang-$config[general_prefered_lang]"][0];
-               $address_lang = decode_string("$address_lang",$k);
-               $address_lang = ($address_lang) ? $address_lang : '-';
-               $homeaddress = ($info[0]['homepostaladdress'][0]) ? $info[0]['homepostaladdress'][0] : '-';
-               $homeaddress_lang = $info[0]["homepostaladdress;lang-$config[general_prefered_lang]"][0];
-               $homeaddress_lang = decode_string("$homeaddress_lang", $k);
-               $homeaddress_lang = ($homeaddress_lang) ? $homeaddress_lang : '-';
-               $mobile = ($info[0]['mobile'][0]) ? $info[0]['mobile'][0] : '-';
-               $fax = ($info[0]['facsimiletelephonenumber'][0]) ? $info[0]['facsimiletelephonenumber'][0] : '-';
-               $url = ($info[0]['labeleduri'][0]) ? $info[0]['labeleduri'][0] : '-';
-               $ou = $info[0]['ou'][0];
-               if ($decode_normal)
-                       $ou = decode_string($ou,$k);
-               $ou_lang = $info[0]["ou;lang-$config[general_prefered_lang]"][0];
-               $ou_lang = decode_string("$ou_lang", $k);
-               $ou_lang = ($ou_lang) ? $ou_lang : '-';
-               $mail = ($info[0]['mail'][0]) ? $info[0]['mail'][0] : '-';
-               $title = ($info[0]['title'][0]) ? $info[0]['title'][0] : '-';
-               if ($decode_normal)
-                       $title = decode_string($title,$k);
-               $title_lang = $info[0]["title;lang-$config[general_prefered_lang]"][0];
-               $title_lang = decode_string("$title_lang", $k);
-               $title_lang = ($title_lang) ? $title_lang : '-';
-               $mailalt = ($info[0]['mailalternateaddress'][0]) ? $info[0]['mailalternateaddress'][0] : '-';
-               $user_password_exists = ($info[0]['userpassword'][0] != '') ? 'yes' : 'no';
-               foreach($attrmap as $key => $val){
-                       $item_vals["$key"] = $info[0]["$val"];
-               }
-       }
-       @ldap_close($ds);
-}
-else
-       echo "<b>Could not connect to the LDAP server</b><br>\n";
-?>
diff --git a/dialup_admin/lib/missing.php b/dialup_admin/lib/missing.php
deleted file mode 100644 (file)
index af2bb8e..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-function array_change_key_case($input,$case)
-{
-       $NEW_ARR = array();
-       foreach ($input as $val => $key){
-               if ($case == CASE_UPPER)
-                       $K = strtoupper($key);
-               else if ($case == CASE_LOWER)
-                       $K = strtolower($key);
-               $NEW_ARR[$K] = $val;
-       }
-
-       return $NEW_ARR;
-}
diff --git a/dialup_admin/lib/operators.php b/dialup_admin/lib/operators.php
deleted file mode 100644 (file)
index 20cb6e0..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-$op_eq = '=';
-$op_set = ':=';
-$op_add = '+=';
-$op_eq2 = '==';
-$op_ne = '!=';
-$op_gt = '>';
-$op_ge = '>=';
-$op_lt = '<';
-$op_le = '<=';
-$op_regeq = '=~';
-$op_regne = '!~';
-$op_exst = '=*';
-$op_nexst = '!*';
-
-// Check the operator if it is allowed for this type of
-// attribute (check or reply).
-// Arguments:
-// $op: The operator
-// $type: 1(check),2(reply)
-// Return value:0 for OK, -1 for error
-function check_operator($op,$type)
-{
-       switch($op){
-               case '=':
-               case ':=':
-               case '+=':
-                       return 0;
-               case '==':
-               case '!=':
-               case '>':
-               case '>=':
-               case '<':
-               case '<=':
-               case '=~':
-               case '!~':
-               case '=*':
-               case '!*':
-                       return ($type == 1) ? 0 : -1;
-       }
-}
-?>
diff --git a/dialup_admin/lib/sql/attrmap.php b/dialup_admin/lib/sql/attrmap.php
deleted file mode 100644 (file)
index 03ae473..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
-#Read sql attribute map
-unset($attrmap);
-unset($rev_attrmap);
-unset($attr_type);
-if (isset($_SESSION['attrmap'])){
-       #If attrmap is set then the rest will also be set
-        $attrmap = $_SESSION['attrmap'];
-       $rev_attrmap =$_SESSION['rev_attrmap'];
-       $attr_type = $_SESSION['attr_type'];
-}
-else{
-       $ARR = file("$config[general_sql_attrmap]");
-       foreach($ARR as $val){
-               $val=chop($val);
-               if (preg_match('/^[[:space:]]*#/',$val) || preg_match('/^[[:space:]]*$/',$val))
-                       continue;
-               list($type,$key,$v)=preg_split('/[[:space:]]+/',$val);
-               $attrmap["$key"]=$v;
-               $rev_attrmap["$v"] = $key;
-               $attr_type["$key"]=$type;
-       }
-       if (isset($show_attrs)){
-               foreach($show_attrs as $key => $desc){
-                       if ($attrmap["$key"] == ''){
-                               $attrmap["$key"] = $key;
-                               $attr_type["key"] = 'replyItem';
-                               $rev_attrmap["$key"] = $key;
-                       }
-               }
-       }
-       if ($config[general_use_session] == 'yes'){
-               session_register('attrmap');
-               session_register('rev_attrmap');
-               session_register('attr_type');
-       }
-}
diff --git a/dialup_admin/lib/sql/change_attrs.php b/dialup_admin/lib/sql/change_attrs.php
deleted file mode 100644 (file)
index 195b76a..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-<?php
-require_once('../lib/functions.php');
-if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
-        include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
-else{
-       echo "<b>Could not include SQL library</b><br>\n";
-       exit();
-}
-if ($config[sql_use_operators] == 'true'){
-       $use_ops=1;
-       $text1 = 'AND op =';
-       $text2 = ',op';
-}
-$link = @da_sql_pconnect($config);
-if ($link){
-       foreach($show_attrs as $key => $desc){
-               if ($attrmap["$key"] == 'none')
-                       continue;
-               if ($attrmap["$key"] == ''){
-                       $attrmap["$key"] = $key;
-                       $attr_type["key"] = 'replyItem';
-                       $rev_attrmap["$key"] = $key;
-               }
-               $i = 0;
-               $j = -1;
-               $name = $attrmap["$key"] . $i;
-
-               while(isset($$name)){
-                       $val=$$name;
-                       $val = da_sql_escape_string($val);
-                       $op_name = $name . '_op';
-                       $i++;
-                       $j++;
-                       $name = $attrmap["$key"] . $i;
-
-                       $sql_attr=$attrmap["$key"];
-                       $query_key = ($user_type == 'group') ? 'groupname' : 'username';
-                       if ($attr_type["$key"] == 'checkItem'){
-                               $table = ($user_type == 'group') ? $config[sql_groupcheck_table] : $config[sql_check_table];
-                               $type = 1;
-                       }
-                       else if ($attr_type["$key"] == 'replyItem'){
-                               $table = ($user_type == 'group') ? $config[sql_groupreply_table] : $config[sql_reply_table];
-                               $type = 2;
-                       }
-                       if ($use_ops){
-                               $op_val = $$op_name;
-                               if ($op_val != ''){
-                                       $op_val = da_sql_escape_string($op_val);
-                                       if (check_operator($op_val,$type) == -1){
-                                               echo "<b>Invalid operator ($op_val) for attribute $key</b><br>\n";
-                                               continue;
-                                       }
-                                       $op_val2 = ",'$op_val'";
-                               }
-                       }
-                       $sql_attr = da_sql_escape_string($sql_attr);
-                       $val = da_sql_escape_string($val);
-       // if we have operators, the operator has changed and the corresponding value exists then update
-                       if ($use_ops && isset($item_vals["$key"][operator][$j]) &&
-                               $op_val != $item_vals["$key"][operator][$j] ){
-                               $res = @da_sql_query($link,$config,
-                               "UPDATE $table SET op = '$op_val' WHERE $query_key = '$login'
-                               AND attribute = '$sql_attr' AND value = '$val';");
-                               if (!$res || !@da_sql_affected_rows($link,$res,$config))
-                                       echo "<b>Operator change failed for attribute $key: " . da_sql_error($link,$config) . "</b><br>\n";
-                       }
-
-       //      if value is the same as that in the sql database do nothing
-                       if ($val == $item_vals["$key"][$j])
-                               continue;
-       //      if value is null or equals the default value and corresponding value exists then delete
-                       else if ((check_defaults($val,$op_val,$default_vals["$key"]) || $val == '') && isset($item_vals["$key"][$j])){
-                               $res = @da_sql_query($link,$config,
-                               "DELETE FROM $table WHERE $query_key = '$login' AND attribute = '$sql_attr';");
-                               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
-                       else if ($val == '' || check_defaults($val,$op_val,$default_vals["$key"]))
-                               continue;
-       //      if value differs from the sql value then update
-                       else{
-                               if (isset($item_vals["$key"][$j])){
-                                       $old_val = $item_vals["$key"][$j];
-                                       $old_val = da_sql_escape_string($old_val);
-                                       $res = @da_sql_query($link,$config,
-                                       "UPDATE $table SET value = '$val' WHERE $query_key = '$login' AND
-                                       attribute = '$sql_attr' AND value = '$old_val';");
-                               }
-                               else
-                                       $res = @da_sql_query($link,$config,
-                                       "INSERT INTO $table ($query_key,attribute,value $text2)
-                                       VALUES ('$login','$sql_attr','$val' $op_val2);");
-                               if (!$res || !@da_sql_affected_rows($link,$res,$config))
-                                       echo "<b>Change failed for attribute $key: " . da_sql_error($link,$config) . "</b><br>\n";
-                       }
-               }
-       }
-}
-else
-       echo "<b>Could not connect to SQL database</b><br>\n";
diff --git a/dialup_admin/lib/sql/change_info.php b/dialup_admin/lib/sql/change_info.php
deleted file mode 100644 (file)
index 4a0779b..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-<?php
-if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
-       include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
-else{
-       echo "<b>Could not include SQL library</b><br>\n";
-       exit();
-}
-$link = @da_sql_pconnect($config);
-$fail = 0;
-if ($link){
-       if ($config[sql_use_user_info_table] == 'true'){
-               $res = @da_sql_query($link,$config,
-               "SELECT username FROM $config[sql_user_info_table] WHERE
-               username = '$login';");
-               if ($res){
-                       $Fcn = da_sql_escape_string($Fcn);
-                       $Fmail = da_sql_escape_string($Fmail);
-                       $Fou = da_sql_escape_string($Fou);
-                       $Ftelephonenumber = da_sql_escape_string($Ftelephonenumber);
-                       $Fhomephone = da_sql_escape_string($Fhomephone);
-                       $Fmobile = da_sql_escape_string($Fmobile);
-
-                       if (!@da_sql_num_rows($res,$config)){
-                               $res = @da_sql_query($link,$config,
-                               "INSERT INTO $config[sql_user_info_table]
-                               (username,name,mail,department,homephone,workphone,mobile) VALUES
-                               ('$login','$Fcn','$Fmail','$Fou','$Ftelephonenumber','$Fhomephone','$Fmobile');");
-                               if (!$res || !@da_sql_affected_rows($link,$res,$config)){
-                                       echo "<b>Could not add user information in user info table: " . da_sql_error($link,$config) . "</b><br>\n";
-                                       $fail = 1;
-                               }
-                       }
-                       else{
-                               $res = @da_sql_query($link,$config,
-                               "UPDATE $config[sql_user_info_table] SET name = '$Fcn',Mail = '$Fmail',
-                               department = '$Fou', homephone = '$Fhomephone', workphone = '$Ftelephonenumber',
-                               mobile = '$Fmobile' WHERE username = '$login';");
-                               if (!$res || !@da_sql_affected_rows($link,$res,$config)){
-                                       echo "<b>Could not update user information in user info table: " . da_sql_error($link,$config) . "</b><br>\n";
-                                       $fail = 1;
-                               }
-                       }
-               }
-               else{
-                       echo "<b>Could not find user in user info table: " . da_sql_error($link,$config) . "</b><br>\n";
-                       $fail = 1;
-               }
-               if ($fail == 0)
-                       echo "<b>User information updated successfully</b><br>\n";
-       }
-       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";
-?>
diff --git a/dialup_admin/lib/sql/change_passwd.php b/dialup_admin/lib/sql/change_passwd.php
deleted file mode 100644 (file)
index e5c0537..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
-       include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
-else{
-       echo "<b>Could not include SQL library</b><br>\n";
-       exit();
-}
-if ($config[sql_use_operators] == 'true'){
-       $text1 = ',op';
-       $text2  = ",':='";
-       $text3 = ", op = ':='";
-}
-else{
-       $text1 = '';
-       $text2 = '';
-       $text3 = '';
-}
-$link = @da_sql_pconnect($config);
-if ($link){
-       if (is_file("../lib/crypt/$config[general_encryption_method].php")){
-               include("../lib/crypt/$config[general_encryption_method].php");
-               $passwd = da_encrypt($passwd);
-               $passwd = da_sql_escape_string($passwd);
-               $res = @da_sql_query($link,$config,
-                       "SELECT value FROM $config[sql_check_table] WHERE username = '$login'
-                       AND attribute = '$config[sql_password_attribute]';");
-               if ($res){
-                       $row = @da_sql_fetch_array($res,$config);
-                       if ($row){
-                               $res = @da_sql_query($link,$config,
-                               "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";
-                       }
-                       else{
-                               $res = @da_sql_query($link,$config,
-                                       "INSERT INTO $config[sql_check_table] (attribute,value,username $text1)
-                                       VALUES ('$config[sql_password_attribute]','$passwd','$login' $text2);");
-                               if (!$res || !@da_sql_affected_rows($link,$res,$config))
-                                       echo "<b>Error while changing password: " . da_sql_error($link,$config) . "</b><br>\n";
-                       }
-               }
-               else
-                       echo "<b>Error while executing query: " . da_sql_error($link,$config) . "</b><br>\n";
-       }
-       else
-               echo "<b>Could not open encryption library file</b><br>\n";
-}
-else
-       echo "<b>Could not connect to SQL database</b><br>\n";
-?>
diff --git a/dialup_admin/lib/sql/create_group.php b/dialup_admin/lib/sql/create_group.php
deleted file mode 100644 (file)
index 964e817..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-<?php
-require_once('../lib/functions.php');
-if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
-       include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
-else{
-       echo "<b>Could not include SQL library</b><br>\n";
-       exit();
-}
-if ($config[sql_use_operators] == 'true'){
-       include("../lib/operators.php");
-       $text = ',op';
-       $passwd_op = ",':='";
-}
-$da_abort=0;
-$op_val2 = '';
-$link = @da_sql_pconnect($config);
-if ($link){
-       $Members = preg_split("/[\n\s]+/",$members,-1,PREG_SPLIT_NO_EMPTY);
-       if (!empty($Members)){
-               foreach ($Members as $member){
-                       $member = da_sql_escape_string($member);
-                       $res = @da_sql_query($link,$config,
-                       "INSERT INTO $config[sql_usergroup_table] (username,groupname)
-                       VALUES ('$member','$login');");
-                       if (!$res || !@da_sql_affected_rows($link,$res,$config)){
-                               echo "<b>Unable to add user $member in group $login: " . da_sql_error($link,$config) . "</b><br>\n";
-                               $da_abort=1;
-                       }
-               }
-       } else {
-               $res = @da_sql_query($link,$config,
-               "INSERT INTO $config[sql_usergroup_table] (groupname)
-               VALUES ('$login');");
-               if (!$res || !@da_sql_affected_rows($link,$res,$config)){
-                       echo "<b>Unable to create group $login: " . da_sql_error($link,$config) . "</b><br>\n";
-                       $da_abort=1;
-               }
-       }
-       if (!$da_abort){
-               foreach($show_attrs as $key => $attr){
-                       if ($attrmap["$key"] == 'none')
-                               continue;
-                       if ($attrmap["$key"] == ''){
-                               $attrmap["$key"] = $key;
-                               $attr_type["$key"] = 'replyItem';
-                               $rev_attrmap["$key"] = $key;
-                       }
-                       if ($attr_type["$key"] == 'checkItem'){
-                               $table = "$config[sql_groupcheck_table]";
-                               $type = 1;
-                       }
-                       else if ($attr_type["$key"] == 'replyItem'){
-                               $table = "$config[sql_groupreply_table]";
-                               $type = 2;
-                       }
-                       $val = $$attrmap["$key"];
-                       $val = da_sql_escape_string($val);
-                       $op_name = $attrmap["$key"] . '_op';
-                       $op_val = $$op_name;
-                       if ($op_val != ''){
-                               $op_val = da_sql_escape_string($op_val);
-                               if (check_operator($op_val,$type) == -1){
-                                       echo "<b>Invalid operator ($op_val) for attribute $key</b><br>\n";
-                                       coninue;
-                               }
-                               $op_val2 = ",'$op_val'";
-                       }
-                       if ($val == '' || check_defaults($val,$op_val,$default_vals["$key"]))
-                               continue;
-                       $res = @da_sql_query($link,$config,
-                       "INSERT INTO $table (attribute,value,groupname $text)
-                       VALUES ('$attrmap[$key]','$val','$login' $op_val2);");
-                       if (!$res || !@da_sql_affected_rows($link,$res,$config))
-                               echo "<b>Query failed for attribute $key: " . da_sql_error($link,$config) . "</b><br>\n";
-               }
-               echo "<b>Group created successfully</b><br>\n";
-       }
-}
-else
-       echo "<b>Could not connect to SQL database</b><br>\n";
-?>
diff --git a/dialup_admin/lib/sql/create_user.php b/dialup_admin/lib/sql/create_user.php
deleted file mode 100644 (file)
index bca289e..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-<?php
-if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
-       include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
-else{
-       echo "<b>Could not include SQL library</b><br>\n";
-       exit();
-}
-include_once('../lib/functions.php');
-if ($config[sql_use_operators] == 'true'){
-       include("../lib/operators.php");
-       $text = ',op';
-       $passwd_op = ",':='";
-}
-$da_abort=0;
-$op_val2 = '';
-$link = @da_sql_pconnect($config);
-if ($link){
-       if (is_file("../lib/crypt/$config[general_encryption_method].php")){
-               include("../lib/crypt/$config[general_encryption_method].php");
-               $passwd = da_encrypt($passwd);
-               $passwd = da_sql_escape_string($passwd);
-               $res = @da_sql_query($link,$config,
-               "INSERT INTO $config[sql_check_table] (attribute,value,username $text)
-               VALUES ('$config[sql_password_attribute]','$passwd','$login' $passwd_op);");
-               if (!$res || !@da_sql_affected_rows($link,$res,$config)){
-                       echo "<b>Unable to add user $login: " . da_sql_error($link,$config) . "</b><br>\n";
-                       $da_abort=1;
-               }
-               if ($config[sql_use_user_info_table] == 'true' && !$da_abort){
-                       $res = @da_sql_query($link,$config,
-                       "SELECT username FROM $config[sql_user_info_table] WHERE
-                       username = '$login';");
-                       if ($res){
-                               if (!@da_sql_num_rows($res,$config)){
-                                       $Fcn = da_sql_escape_string($Fcn);
-                                       $Fmail = da_sql_escape_string($Fmail);
-                                       $Fou = da_sql_escape_string($Fou);
-                                       $Fhomephone = da_sql_escape_string($Fhomephone);
-                                       $Fworkphone = da_sql_escape_string($Fworkphone);
-                                       $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
-                                       ('$login','$Fcn','$Fmail','$Fou','$Fhomephone','$Ftelephonenumber','$Fmobile');");
-                                       if (!$res || !@da_sql_affected_rows($link,$res,$config))
-                                               echo "<b>Could not add user information in user info table: " . da_sql_error($link,$config) . "</b><br>\n";
-                               }
-                               else
-                                       echo "<b>User already exists in user info table.</b><br>\n";
-                       }
-                       else
-                               echo "<b>Could not add user information in user info table: " . da_sql_error($link,$config) . "</b><br>\n";
-               }
-               if ($Fgroup != ''){
-                       $Fgroup = da_sql_escape_string($Fgroup);
-                       $res = @da_sql_query($link,$config,
-                       "SELECT username FROM $config[sql_usergroup_table]
-                       WHERE username = '$login' AND groupname = '$Fgroup';");
-                       if ($res){
-                               if (!@da_sql_num_rows($res,$config)){
-                                       $res = @da_sql_query($link,$config,
-                                       "INSERT INTO $config[sql_usergroup_table]
-                                       (username,groupname) VALUES ('$login','$Fgroup');");
-                                       if (!$res || !@da_sql_affected_rows($link,$res,$config))
-                                               echo "<b>Could not add user to group $Fgroup. SQL Error</b><br>\n";
-                               }
-                               else
-                                       echo "<b>User already is a member of group $Fgroup</b><br>\n";
-                       }
-                       else
-                               echo "<b>Could not add user to group $Fgroup: " . da_sql_error($link,$config) . "</b><br>\n";
-               }
-               if (!$da_abort){
-                       if ($Fgroup != '')
-                               require('../lib/defaults.php');
-                       foreach($show_attrs as $key => $attr){
-                               if ($attrmap["$key"] == 'none')
-                                       continue;
-                               if ($attrmap["$key"] == ''){
-                                       $attrmap["$key"] = $key;
-                                       $attr_type["$key"] = 'replyItem';
-                                       $rev_attrmap["$key"] = $key;
-                               }
-                               if ($attr_type["$key"] == 'checkItem'){
-                                       $table = "$config[sql_check_table]";
-                                       $type = 1;
-                               }
-                               else if ($attr_type["$key"] == 'replyItem'){
-                                       $table = "$config[sql_reply_table]";
-                                       $type = 2;
-                               }
-                               $val = $$attrmap["$key"];
-                               $val = da_sql_escape_string($val);
-                               $op_name = $attrmap["$key"] . '_op';
-                               $op_val = $$op_name;
-                               if ($op_val != ''){
-                                       $op_val = da_sql_escape_string($op_val);
-                                       if (check_operator($op_val,$type) == -1){
-                                               echo "<b>Invalid operator ($op_val) for attribute $key</b><br>\n";
-                                               coninue;
-                                       }
-                                       $op_val2 = ",'$op_val'";
-                               }
-                               if ($val == '' || check_defaults($val,$op_val,$default_vals["$key"]))
-                                       continue;
-                               $res = @da_sql_query($link,$config,
-                               "INSERT INTO $table (attribute,value,username $text)
-                               VALUES ('$attrmap[$key]','$val','$login' $op_val2);");
-                               if (!$res || !@da_sql_affected_rows($link,$res,$config))
-                                       echo "<b>Query failed for attribute $key: " . da_sql_error($link,$config) . "</b><br>\n";
-                       }
-               }
-               echo "<b>User created successfully</b><br>\n";
-       }
-       else
-               echo "<b>Could not open encryption library file</b><br>\n";
-}
-else
-       echo "<b>Could not connect to SQL database</b><br>\n";
-?>
diff --git a/dialup_admin/lib/sql/defaults.php b/dialup_admin/lib/sql/defaults.php
deleted file mode 100644 (file)
index d940919..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-<?php
-require('../lib/sql/attrmap.php');
-if ($login != '' && $user_type != 'group'){
-       if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
-               include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
-       else{
-               echo "<b>Could not include SQL library</b><br>\n";
-               exit();
-       }
-       if ($config[sql_use_operators] == 'true'){
-               $op = ',op';
-               $use_op = 1;
-       }else{
-               $op = "";
-               $use_op = 0;
-       }
-       $overwrite_defaults = 1;
-       $stop = 0;
-       $times = 0;
-       do{
-               unset($item_vals);
-               unset($member_groups);
-               unset($tmp);
-               $times++;
-               $link = @da_sql_pconnect($config);
-               if ($link){
-                       $res = @da_sql_query($link,$config,
-                       "SELECT groupname FROM $config[sql_usergroup_table] WHERE username = '$login';");
-                       if ($res){
-                               while(($row = @da_sql_fetch_array($res,$config))){
-                                       $group = $row[groupname];
-                                       $member_groups[$group] = $group;
-                               }
-                               if (isset($member_groups))
-                                       ksort($member_groups);
-                       }
-                       if (isset($member_groups)){
-                               $in = '(';
-                               foreach ($member_groups as $group)
-                                       $in .= "'$group',";
-                               $in = substr($in,0,-1);
-                               $in .= ')';
-                               $res = @da_sql_query($link,$config,
-                               "SELECT attribute,value $op FROM $config[sql_groupcheck_table]
-                               WHERE groupname IN $in;");
-                               if ($res){
-                                       while(($row = @da_sql_fetch_array($res,$config))){
-                                               $attr = $row[attribute];
-                                               $val = $row[value];
-                                               if ($use_op){
-                                                       $oper = $row[op];
-                                                       $tmp["$attr"][operator][]="$oper";
-                                               }
-                                               $tmp["$attr"][]="$val";
-                                               $tmp["$attr"][count]++;
-                                       }
-                                       $res = @da_sql_query($link,$config,
-                                       "SELECT attribute,value $op FROM $config[sql_groupreply_table]
-                                       WHERE groupname IN $in;");
-                                       if ($res){
-                                               while(($row = @da_sql_fetch_array($res,$config))){
-                                                       $attr = $row[attribute];
-                                                       $val = $row[value];
-                                                       if ($use_op){
-                                                               $oper = $row[op];
-                                                               $tmp["$attr"][operator][]="$oper";
-                                                       }
-                                                       $tmp["$attr"][] = "$val";
-                                                       $tmp["$attr"][count]++;
-                                               }
-                                       }
-                                       else
-                                               echo "<b>Database query failed partially: " . da_sql_error($link,$config) . "</b><br>\n";
-                               }
-                               else
-                                       echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
-                               if (isset($tmp)){
-                                       foreach(array_keys($tmp) as $val){
-                                               if ($val == '')
-                                                       continue;
-                                               $key = $rev_attrmap["$val"];
-                                               if ($key == ''){
-                                                       $key = $val;
-                                                       $attrmap["$key"] = $val;
-                                                       $attr_type["$key"] = 'replyItem';
-                                                       $rev_attrmap["$val"] = $key;
-                                               }
-                                               if (!isset($default_vals["$key"]) || $overwrite_defaults){
-                                                       if ($use_op)
-                                                               $default_vals["$key"][operator] = $tmp["$val"][operator];
-                                                       if ($tmp[$val][0] != '')
-                                                               $default_vals["$key"] = $tmp["$val"];
-                                               }
-                                       }
-                               }
-                       }
-                       if ($times == 1){
-                               if ($config[sql_default_user_profile] == '')
-                                       $stop = 1;
-                               else{
-                                       $saved_login = $login;
-                                       $saved_member_groups = $member_groups;
-                                       $login = $config[sql_default_user_profile];
-                                       $overwrite_defaults = 0;
-                               }
-                       }
-                       if ($times == 2){
-                               $login = $saved_login;
-                               $member_groups = $saved_member_groups;
-                               $stop = 1;
-                       }
-               }
-               else
-                       echo "<b>Could not connect to SQL database</b><br>\n";
-       }while($stop == 0);
-}
-else{
-       if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
-               include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
-       else{
-               echo "<b>Could not include SQL library</b><br>\n";
-               exit();
-       }
-       unset($member_groups);
-       $link = @da_sql_pconnect($config);
-       if ($link){
-               $res = @da_sql_query($link,$config,
-               "SELECT DISTINCT groupname FROM $config[sql_usergroup_table];");
-               if ($res){
-                       while(($row = @da_sql_fetch_array($res,$config)))
-                               $member_groups[] = $row[groupname];
-               }
-               else
-                       echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
-       }
-       else
-               echo "<b>Could not connect to SQL database</b><br>\n";
-}
-?>
diff --git a/dialup_admin/lib/sql/delete_group.php b/dialup_admin/lib/sql/delete_group.php
deleted file mode 100644 (file)
index 8f94bba..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?php
-if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
-       include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
-else{
-       echo "<b>Could not include SQL library</b><br>\n";
-       exit();
-}
-$link = @da_sql_pconnect($config);
-if ($link){
-       $res = @da_sql_query($link,$config,
-               "DELETE FROM $config[sql_groupreply_table] WHERE groupname = '$login';");
-       if ($res){
-               $res = @da_sql_query($link,$config,
-                       "DELETE FROM $config[sql_groupcheck_table] WHERE groupname = '$login';");
-               if ($res){
-                       $res = @da_sql_query($link,$config,
-                               "DELETE FROM $config[sql_usergroup_table] WHERE groupname = '$login';");
-                               if ($res)
-                                       echo "<b>Group $login deleted successfully</b><br>\n";
-                               else
-                                       echo "<b>Error deleting group $login from usergroup table: " . da_sql_error($link,$config) . "</b><br>\n";
-               }
-               else
-                       echo "<b>Error deleting group $login from group check table: " . da_sql_error($link,$config) . "</b><br>\n";
-       }
-       else
-               echo "<b>Error deleting group $login from group reply table: " . da_sql_error($link,$config) . "</b><br>\n";
-}
-else
-       echo "<b>Could not connect to SQL database</b><br>\n";
-?>
diff --git a/dialup_admin/lib/sql/delete_user.php b/dialup_admin/lib/sql/delete_user.php
deleted file mode 100644 (file)
index ab6332e..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
-if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
-       include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
-else{
-       echo "<b>Could not include SQL library</b><br>\n";
-       exit();
-}
-$link = @da_sql_pconnect($config);
-if ($link){
-       $res = @da_sql_query($link,$config,
-               "DELETE FROM $config[sql_reply_table] WHERE username = '$login';");
-       if ($res){
-               $res = @da_sql_query($link,$config,
-                       "DELETE FROM $config[sql_check_table] WHERE username = '$login';");
-               if ($res){
-                       $res = @da_sql_query($link,$config,
-                               "DELETE FROM $config[sql_usergroup_table] WHERE username = '$login';");
-                       if (!$res)
-                               echo "<b>Error deleting user $login from user group table: " . da_sql_error($link,$config) . "</b><br>\n";
-                       if ($config[sql_use_user_info_table] == 'true'){
-                               $res = @da_sql_query($link,$config,
-                               "DELETE FROM $config[sql_user_info_table] WHERE username = '$login';");
-                               if ($res)
-                                       echo "<b>User $login deleted successfully</b><br>\n";
-                               else
-                                       echo "<b>Error deleting user $login from user info table: " . da_sql_error($link,$config) . "</b><br>\n";
-                       }
-               }
-               else
-                       echo "<b>Error deleting user $login from check table: " . da_sql_error($link,$config) . "</b><br>\n";
-       }
-       else
-               echo "<b>Error deleting user $login from reply table: " . da_sql_error($link,$config) . "</b><br>\n";
-}
-else
-       echo "<b>Could not connect to SQL database</b><br>\n";
-?>
diff --git a/dialup_admin/lib/sql/drivers/dbx/functions.php b/dialup_admin/lib/sql/drivers/dbx/functions.php
deleted file mode 100644 (file)
index 11890d0..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-<?php
-function da_sql_limit($limit,$point,$config)
-{
-       switch($point){
-               case 0:
-                       return '';
-               case 1:
-                       return '';
-               case 2:
-                       return "LIMIT $limit";
-       }
-}
-
-function da_sql_host_connect($server,$config)
-{
-       if ($config[sql_use_http_credentials] == 'yes'){
-               global $HTTP_SERVER_VARS;
-               $SQL_user = $HTTP_SERVER_VARS["PHP_AUTH_USER"];
-               $SQL_passwd = $HTTP_SERVER_VARS["PHP_AUTH_PW"];
-       }
-       else{
-               $SQL_user = $config[sql_username];
-               $SQL_passwd = $config[sql_password];
-       }
-       // FIXME: This function is still Postgres specific. Needs to be configurable.
-       return @dbx_connect(DBX_PGSQL, "$server", "$config[sql_database]",
-                       "$SQL_user", "$SQL_passwd", DBX_PERSISTENT);
-}
-
-function da_sql_connect($config)
-{
-       if ($config[sql_use_http_credentials] == 'yes'){
-               global $HTTP_SERVER_VARS;
-               $SQL_user = $HTTP_SERVER_VARS["PHP_AUTH_USER"];
-               $SQL_passwd = $HTTP_SERVER_VARS["PHP_AUTH_PW"];
-       }
-       else{
-               $SQL_user = $config[sql_username];
-               $SQL_passwd = $config[sql_password];
-       }
-       // FIXME: This function is still Postgres specific. Needs to be configurable.
-       return @dbx_connect(DBX_PGSQL, "$server", "$config[sql_database]",
-                       "$SQL_user", "$SQL_passwd");
-}
-
-function da_sql_pconnect($config)
-{
-       if ($config[sql_use_http_credentials] == 'yes'){
-               global $HTTP_SERVER_VARS;
-               $SQL_user = $HTTP_SERVER_VARS["PHP_AUTH_USER"];
-               $SQL_passwd = $HTTP_SERVER_VARS["PHP_AUTH_PW"];
-       }
-       else{
-               $SQL_user = $config[sql_username];
-               $SQL_passwd = $config[sql_password];
-       }
-       // FIXME: This function is still Postgres specific. Needs to be configurable.
-       return @dbx_connect(DBX_PGSQL, "$server", "$config[sql_database]",
-                       "$SQL_user", "$SQL_passwd", DBX_PERSISTENT);
-}
-
-function da_sql_close($link,$config)
-{
-       @dbx_close($link);
-}
-
-function da_sql_escape_string($string)
-{
-       return addslashes($string);
-}
-
-function da_sql_query($link,$config,$query)
-{
-       if ($config[sql_debug] == 'true') {
-               print "<b>DEBUG(SQL,PG DRIVER): Query: <i>$query</i></b><br>\n";
-       }
-       return @dbx_query($link,$query);
-}
-
-function da_sql_num_rows($result,$config)
-{
-       if ($config[sql_debug] == 'true')
-               print "<b>DEBUG(SQL,PG DRIVER): Query Result: Num rows:: " . $result->rows . "</b><br>\n";
-       return $result->rows;
-}
-
-$dbx_global_record_counter = array() ;
-function da_sql_fetch_array($result,$config)
-{
-
-       global $dbx_global_record_counter;
-       if (!$dbx_global_record_counter[$result->handle]){
-               $dbx_global_record_counter[$result->handle] = 0;
-       }
-
-       if ($dbx_global_record_counter[$result->handle] <= $result->rows - 1 ){
-               return $result->data[$dbx_global_record_counter[$result->handle]++];
-       } elseif ($dbx_global_record_counter[$result->handle] > $result->rows - 1 ) {
-               $dbx_global_record_counter[$result->handle]++;
-               return NULL;
-       } else {
-               $dbx_global_record_counter[$result->handle]++;
-               return FALSE;
-       }
-}
-
-function da_sql_affected_rows($link,$result,$config)
-{
-       // FIXME: This function is still Postgres specific.
-       if ($config[sql_debug] == 'true')
-               print "<b>DEBUG(SQL,PG DRIVER): Query Result: Affected rows:: " . @pg_cmdtuples($result->handle) . "</b><br>\n";
-       return @pg_cmdtuples($result->handle);
-}
-
-function da_sql_list_fields($table,$link,$config)
-{
-       $res = @dbx_query($link,"SELECT * FROM ".$table." LIMIT 1 ;");
-       if ($res){
-               $fields[num] = $res->cols;
-       }
-       $res = @dbx_query($link,"SELECT * FROM ".$table." LIMIT 1 ;");
-       if ($res)
-               $fields[res] = $res->info[name];
-       else
-               return NULL;
-
-       return $fields;
-}
-
-function da_sql_num_fields($fields,$config)
-{
-       if ($fields)
-               return $fields[num];
-}
-
-function da_sql_field_name($fields,$num,$config)
-{
-       if ($fields)
-               return $fields[res][$num];
-}
-
-function da_sql_error($link,$config)
-{
-       return dbx_error($link);
-}
-?>
diff --git a/dialup_admin/lib/sql/drivers/mysql/functions.php b/dialup_admin/lib/sql/drivers/mysql/functions.php
deleted file mode 100644 (file)
index 3214ed2..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-<?php
-function da_sql_limit($limit,$point,$config)
-{
-       switch($point){
-               case 0:
-                       return '';
-               case 1:
-                       return '';
-               case 2:
-                       return "LIMIT $limit";
-       }
-}
-
-function da_sql_host_connect($server,$config)
-{
-       if ($config[sql_use_http_credentials] == 'yes'){
-               global $HTTP_SERVER_VARS;
-               $SQL_user = $HTTP_SERVER_VARS["PHP_AUTH_USER"];
-               $SQL_passwd = $HTTP_SERVER_VARS["PHP_AUTH_PW"];
-       }
-       else{
-               $SQL_user = $config[sql_username];
-               $SQL_passwd = $config[sql_password];
-       }
-
-       if ($config[sql_connect_timeout] != 0)
-               @ini_set('mysql.connect_timeout',$config[sql_connect_timeout]);
-       if ($config[sql_debug] == 'true')
-               print "<b>DEBUG(SQL,MYSQL DRIVER): Connect: User=$SQL_user,Password=$SQL_passwd </b><br>\n";
-       return @mysql_connect("$server:$config[sql_port]",$SQL_user,$SQL_passwd);
-}
-
-function da_sql_connect($config)
-{
-       if ($config[sql_use_http_credentials] == 'yes'){
-               global $HTTP_SERVER_VARS;
-               $SQL_user = $HTTP_SERVER_VARS["PHP_AUTH_USER"];
-               $SQL_passwd = $HTTP_SERVER_VARS["PHP_AUTH_PW"];
-       }
-       else{
-               $SQL_user = $config[sql_username];
-               $SQL_passwd = $config[sql_password];
-       }
-
-       if ($config[sql_connect_timeout] != 0)
-               @ini_set('mysql.connect_timeout',$config[sql_connect_timeout]);
-       if ($config[sql_debug] == 'true')
-               print "<b>DEBUG(SQL,MYSQL DRIVER): Connect: User=$SQL_user,Password=$SQL_passwd </b><br>\n";
-       return @mysql_connect("$config[sql_server]:$config[sql_port]",$SQL_user,$SQL_passwd);
-}
-
-function da_sql_pconnect($config)
-{
-       if ($config[sql_use_http_credentials] == 'yes'){
-               global $HTTP_SERVER_VARS;
-               $SQL_user = $HTTP_SERVER_VARS["PHP_AUTH_USER"];
-               $SQL_passwd = $HTTP_SERVER_VARS["PHP_AUTH_PW"];
-       }
-       else{
-               $SQL_user = $config[sql_username];
-               $SQL_passwd = $config[sql_password];
-       }
-
-       if ($config[sql_connect_timeout] != 0)
-               @ini_set('mysql.connect_timeout',$config[sql_connect_timeout]);
-       if ($config[sql_debug] == 'true')
-               print "<b>DEBUG(SQL,MYSQL DRIVER): Connect: User=$SQL_user,Password=$SQL_passwd </b><br>\n";
-       return @mysql_pconnect("$config[sql_server]:$config[sql_port]",$SQL_user,$SQL_passwd);
-}
-
-function da_sql_close($link,$config)
-{
-       return @mysql_close($link);
-}
-
-function da_sql_escape_string($string)
-{
-       return @mysql_escape_string($string);
-}
-
-function da_sql_query($link,$config,$query)
-{
-       if ($config[sql_debug] == 'true')
-               print "<b>DEBUG(SQL,MYSQL DRIVER): Query: <i>$query</i></b><br>\n";
-       return @mysql_db_query($config[sql_database],$query,$link);
-}
-
-function da_sql_num_rows($result,$config)
-{
-       if ($config[sql_debug] == 'true')
-               print "<b>DEBUG(SQL,MYSQL DRIVER): Query Result: Num rows:: " . @mysql_num_rows($result) . "</b><br>\n";
-       return @mysql_num_rows($result);
-}
-
-function da_sql_fetch_array($result,$config)
-{
-       $row = array_change_key_case(@mysql_fetch_array($result,
-               MYSQL_ASSOC),CASE_LOWER);
-       if ($config[sql_debug] == 'true'){
-               print "<b>DEBUG(SQL,MYSQL DRIVER): Query Result: <pre>";
-               print_r($row);
-               print "</b></pre>\n";
-       }
-       return $row;
-}
-
-function da_sql_affected_rows($link,$result,$config)
-{
-       if ($config[sql_debug] == 'true')
-               print "<b>DEBUG(SQL,MYSQL DRIVER): Query Result: Affected rows:: " . @mysql_affected_rows($result) . "</b><br>\n";
-       return @mysql_affected_rows($link);
-}
-
-function da_sql_list_fields($table,$link,$config)
-{
-       return @mysql_list_fields($config[sql_database],$table);
-}
-
-function da_sql_num_fields($fields,$config)
-{
-       return @mysql_num_fields($fields);
-}
-
-function da_sql_field_name($fields,$num,$config)
-{
-       return @mysql_field_name($fields,$num);
-}
-
-function da_sql_error($link,$config)
-{
-       return @mysql_error($link);
-}
-?>
diff --git a/dialup_admin/lib/sql/drivers/oracle/functions.php b/dialup_admin/lib/sql/drivers/oracle/functions.php
deleted file mode 100644 (file)
index 194266f..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
-<?php
-// $Id$
-function da_sql_limit($limit,$point,$config)
-{
-       switch($point){
-               case 0:
-                       return '';
-               case 1:
-                       return "AND ROWNUM <= $limit";
-               case 2:
-                       return '';
-       }
-}
-
-function da_sql_host_connect($server,$config)
-{
-       if ($config[sql_use_http_credentials] == 'yes'){
-               global $HTTP_SERVER_VARS;
-               $SQL_user = $HTTP_SERVER_VARS["PHP_AUTH_USER"];
-               $SQL_passwd = $HTTP_SERVER_VARS["PHP_AUTH_PW"];
-       }
-       else{
-               $SQL_user = $config[sql_username];
-               $SQL_passwd = $config[sql_password];
-       }
-       $link = @ocilogon($SQL_user, $SQL_passwd, $config[sql_database]);
-        $res = @da_sql_query($link,$config,"ALTER SESSION SET NLS_TIMESTAMP_TZ_FORMAT='YYYY-MM-DD HH24:MI:SS.FF TZH:TZM'");
-       return $link;
-}
-
-function da_sql_connect($config)
-{
-       if ($config[sql_use_http_credentials] == 'yes'){
-               global $HTTP_SERVER_VARS;
-               $SQL_user = $HTTP_SERVER_VARS["PHP_AUTH_USER"];
-               $SQL_passwd = $HTTP_SERVER_VARS["PHP_AUTH_PW"];
-       }
-       else{
-               $SQL_user = $config[sql_username];
-               $SQL_passwd = $config[sql_password];
-       }
-       $link = @ocilogon($SQL_user, $SQL_passwd, $config[sql_database]);
-        $res = @da_sql_query($link,$config,"ALTER SESSION SET NLS_TIMESTAMP_TZ_FORMAT='YYYY-MM-DD HH24:MI:SS.FF TZH:TZM'");
-       return $link;
-}
-
-function da_sql_pconnect($config)
-{
-       if ($config[sql_use_http_credentials] == 'yes'){
-               global $HTTP_SERVER_VARS;
-               $SQL_user = $HTTP_SERVER_VARS["PHP_AUTH_USER"];
-               $SQL_passwd = $HTTP_SERVER_VARS["PHP_AUTH_PW"];
-       }
-       else{
-               $SQL_user = $config[sql_username];
-               $SQL_passwd = $config[sql_password];
-       }
-       $link = @ociplogon($SQL_user, $SQL_passwd, $config[sql_database]);
-        $res = @da_sql_query($link,$config,"ALTER SESSION SET NLS_TIMESTAMP_TZ_FORMAT='YYYY-MM-DD HH24:MI:SS.FF TZH:TZM'");
-       return $link;
-}
-
-function da_sql_close($link,$config)
-{
-       @ociclose($link);
-}
-
-function da_sql_escape_string($string)
-{
-       return addslashes($string);
-}
-
-function da_sql_query($link,$config,$query)
-{
-       $trimmed_query = rtrim($query, ";");
-       if ($config[sql_debug] == 'true') {
-               print "<b>DEBUG(SQL,OCI DRIVER): Query: <i>$trimmed_query</i></b><br>\n";
-       }
-       $statement = OCIParse($link,$trimmed_query);
-       OCIExecute($statement);
-       return $statement;
-}
-
-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);
-
-        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);
-        return $rows;
-}
-
-
-function da_sql_fetch_array($statement,$config)
-{
-       OCIFetchInto($statement, $temprow, OCI_ASSOC);
-       $row = array_change_key_case($temprow, CASE_LOWER);
-        if ($config[sql_debug] == 'true') {
-                print "<b>DEBUG(SQL,OCI DRIVER): Query Result: <pre>";
-                print_r($row);
-                print "</b></pre>\n";
-        }
-        return $row;
-}
-
-
-function da_sql_affected_rows($link,$statement,$config)
-{
-       if ($config[sql_debug] == 'true')
-               print "<b>DEBUG(SQL,OCI DRIVER): Query Result: Affected rows:: " . @ocirowcount($statement) . "</b><br>\n";
-       return @ocirowcount($statement);
-}
-
-function da_sql_list_fields($table,$link,$config)
-{
-        $res = @da_sql_query($link,$config,"SELECT * from $table WHERE ROWNUM <=1");
-        if ($res){
-               $fields[res]=Array();
-               for ($i = 1;$i<=ocinumcols($res);$i++) {
-                       array_push($fields[res],strtolower(OCIColumnName($res,$i)));
-               }
-                $fields[num]=@ocinumcols($res);
-        }else{
-                return NULL;
-        }
-        return $fields;
-}
-
-function da_sql_num_fields($fields,$config)
-{
-        return $fields[num];
-}
-
-function da_sql_field_name($fields,$num,$config)
-{
-       return $fields[res][$num];
-}
-
-function da_sql_error($link,$config)
-{
-       return ocierror($link);
-}
-?>
diff --git a/dialup_admin/lib/sql/drivers/pg/functions.php b/dialup_admin/lib/sql/drivers/pg/functions.php
deleted file mode 100644 (file)
index 4f85653..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-<?php
-function da_sql_limit($limit,$point,$config)
-{
-       switch($point){
-               case 0:
-                       return '';
-               case 1:
-                       return '';
-               case 2:
-                       return "LIMIT $limit";
-       }
-}
-function da_sql_host_connect($server,$config)
-{
-       if ($config[sql_use_http_credentials] == 'yes'){
-               global $HTTP_SERVER_VARS;
-               $SQL_user = $HTTP_SERVER_VARS["PHP_AUTH_USER"];
-               $SQL_passwd = $HTTP_SERVER_VARS["PHP_AUTH_PW"];
-       }
-       else{
-               $SQL_user = $config[sql_username];
-               $SQL_passwd = $config[sql_password];
-       }
-       if ($config[sql_debug] == 'true')
-               print "<b>DEBUG(SQL,PG DRIVER): Connect: User=$SQL_user,Password=$SQL_passwd </b><br>\n";
-       return @pg_connect("host=$server port=$config[sql_port]
-                       dbname=$config[sql_database] user=$SQL_user
-                       password=$SQL_passwd");
-}
-
-function da_sql_connect($config)
-{
-       if ($config[sql_use_http_credentials] == 'yes'){
-               global $HTTP_SERVER_VARS;
-               $SQL_user = $HTTP_SERVER_VARS["PHP_AUTH_USER"];
-               $SQL_passwd = $HTTP_SERVER_VARS["PHP_AUTH_PW"];
-       }
-       else{
-               $SQL_user = $config[sql_username];
-               $SQL_passwd = $config[sql_password];
-       }
-       if ($config[sql_debug] == 'true')
-               print "<b>DEBUG(SQL,PG DRIVER): Connect: User=$SQL_user,Password=$SQL_passwd </b><br>\n";
-       return @pg_connect("host=$config[sql_server] port=$config[sql_port]
-                       dbname=$config[sql_database] user=$SQL_user
-                       password=$SQL_passwd");
-}
-
-function da_sql_pconnect($config)
-{
-       if ($config[sql_use_http_credentials] == 'yes'){
-               global $HTTP_SERVER_VARS;
-               $SQL_user = $HTTP_SERVER_VARS["PHP_AUTH_USER"];
-               $SQL_passwd = $HTTP_SERVER_VARS["PHP_AUTH_PW"];
-       }
-       else{
-               $SQL_user = $config[sql_username];
-               $SQL_passwd = $config[sql_password];
-       }
-       if ($config[sql_debug] == 'true')
-               print "<b>DEBUG(SQL,PG DRIVER): Connect: User=$SQL_user,Password=$SQL_passwd </b><br>\n";
-       return @pg_pconnect("host=$config[sql_server] port=$config[sql_port]
-                       dbname=$config[sql_database] user=$SQL_user
-                       password=$SQL_passwd");
-}
-
-function da_sql_close($link,$config)
-{
-       @pg_close($link);
-}
-
-function da_sql_escape_string($string)
-{
-       return addslashes($string);
-}
-
-function da_sql_query($link,$config,$query)
-{
-       if ($config[sql_debug] == 'true')
-               print "<b>DEBUG(SQL,PG DRIVER): Query: <i>$query</i></b><br>\n";
-       return @pg_query($link,$query);
-}
-
-function da_sql_num_rows($result,$config)
-{
-       if ($config[sql_debug] == 'true')
-               print "<b>DEBUG(SQL,PG DRIVER): Query Result: Num rows:: " . @pg_numrows($result) . "</b><br>\n";
-       return @pg_numrows($result);
-}
-
-function da_sql_fetch_array($result,$config)
-{
-       $row = @pg_fetch_array($result,$config[tmp_pg_array_num][$result]++,PGSQL_ASSOC);
-       if ($row && $config[sql_debug] == 'true'){
-               print "<b>DEBUG(SQL,PG DRIVER): Query Result: <pre>";
-               print_r($row);
-               print  "</b></pre>\n";
-       }
-       if (!$row)
-               $config[tmp_pg_array_num][$result] = 0;
-       return $row;
-}
-
-function da_sql_affected_rows($link,$result,$config)
-{
-       if ($config[sql_debug] == 'true')
-               print "<b>DEBUG(SQL,PG DRIVER): Query Result: Affected rows:: " . @pg_cmdtuples($result) . "</b><br>\n";
-       return @pg_cmdtuples($result);
-}
-
-function da_sql_list_fields($table,$link,$config)
-{
-       $res = @pg_query($link,
-               "select count(*) from pg_attribute where attnum > '0' and
-               attrelid = (select oid from pg_class where relname='$table');");
-       if ($res){
-               $row = @pg_fetch_row($res,0);
-               if ($row){
-                       if (!$row[0])
-                               return NULL;
-                       $fields[num] = $row[0];
-               }
-       }
-       $res = @pg_query($link,
-               "select attname from pg_attribute where attnum > '0' and
-               attrelid = (select oid from pg_class where relname='$table');");
-       if ($res)
-               $fields[res]=$res;
-       else
-               return NULL;
-
-       return $fields;
-}
-
-function da_sql_num_fields($fields,$config)
-{
-       if ($fields)
-               return $fields[num];
-}
-
-function da_sql_field_name($fields,$num,$config)
-{
-       if ($fields){
-               $row = @pg_fetch_row($fields[res],$num);
-               if ($row)
-                       return $row[0];
-       }
-}
-
-function da_sql_error($link,$config)
-{
-       return pg_errormessage($link);
-}
-?>
diff --git a/dialup_admin/lib/sql/drivers/sqlrelay/functions.php b/dialup_admin/lib/sql/drivers/sqlrelay/functions.php
deleted file mode 100644 (file)
index 9f76451..0000000
+++ /dev/null
@@ -1,193 +0,0 @@
-<?php
-function da_sql_limit($limit,$point,$config)
-{
-       switch($point){
-               case 0:
-                       return '';
-               case 1:
-                       return '';
-               case 2:
-                       return "LIMIT $limit";
-       }
-}
-
-function da_sql_host_connect($server,$config)
-{
-       $retrytime = 0;
-
-       if ($config[sql_use_http_credentials] == 'yes'){
-               global $HTTP_SERVER_VARS;
-               $SQL_user = $HTTP_SERVER_VARS["PHP_AUTH_USER"];
-               $SQL_passwd = $HTTP_SERVER_VARS["PHP_AUTH_PW"];
-       }
-       else{
-               $SQL_user = $config[sql_username];
-               $SQL_passwd = $config[sql_password];
-       }
-
-       if ($config[sql_connect_timeout] != 0)
-               $retrytime = $config[sql_connect_timeout];
-       if ($config[sql_debug] == 'true')
-               print "<b>DEBUG(SQL,SQLRELAY DRIVER): Connect: User=$SQL_user,Password=$SQL_passwd </b><br>\n";
-       $link[con] = @sqlrcon_alloc($server,$port,'',$SQL_user,$SQL_passwd,$retrytime,1);
-       if ($link[con]){
-               $link[cur] = @sqlrcur_alloc($link[con]);
-               if ($link[cur])
-                       return $link;
-               else
-                       return 0;
-       }
-       else
-               return 0;
-}
-
-function da_sql_connect($config)
-{
-       $retrytime = 0;
-
-       if ($config[sql_use_http_credentials] == 'yes'){
-               global $HTTP_SERVER_VARS;
-               $SQL_user = $HTTP_SERVER_VARS["PHP_AUTH_USER"];
-               $SQL_passwd = $HTTP_SERVER_VARS["PHP_AUTH_PW"];
-       }
-       else{
-               $SQL_user = $config[sql_username];
-               $SQL_passwd = $config[sql_password];
-       }
-
-       if ($config[sql_connect_timeout] != 0)
-               $retrytime = $config[sql_connect_timeout];
-       if ($config[sql_debug] == 'true')
-               print "<b>DEBUG(SQL,SQLRELAY DRIVER): Connect: User=$SQL_user,Password=$SQL_passwd </b><br>\n";
-       $link[con] = @sqlrcon_alloc($config[sql_server],$config[sql_port],'',$SQL_user,$SQL_passwd,$retrytime,1);
-       if ($link[con]){
-               $link[cur] = @sqlrcur_alloc($link[con]);
-               if ($link[cur])
-                       return $link;
-               else
-                       return 0;
-       }
-       else
-               return 0;
-}
-
-function da_sql_pconnect($config)
-{
-       $retrytime = 0;
-
-
-       if ($config[sql_use_http_credentials] == 'yes'){
-               global $HTTP_SERVER_VARS;
-               $SQL_user = $HTTP_SERVER_VARS["PHP_AUTH_USER"];
-               $SQL_passwd = $HTTP_SERVER_VARS["PHP_AUTH_PW"];
-       }
-       else{
-               $SQL_user = $config[sql_username];
-               $SQL_passwd = $config[sql_password];
-       }
-
-       if ($config[sql_connect_timeout] != 0)
-               $retrytime = $config[sql_connect_timeout];
-       if ($config[sql_debug] == 'true')
-               print "<b>DEBUG(SQL,SQLRELAY DRIVER): Connect: Host=$config[sql_server],Port=$config[sql_port],User=$SQL_user,Password=$SQL_passwd </b><br>\n";
-       $link[con] = sqlrcon_alloc($config[sql_server],$config[sql_port],'',$SQL_user,$SQL_passwd,$retrytime,1);
-       if ($link[con]){
-               sqlrcon_debugOn($link[con]);
-               $link[cur] = sqlrcur_alloc($link[con]);
-               if ($link[cur]){
-                       sqlrcur_setResultSetBufferSize($link[cur], 4);
-                       sqlrcur_lowerCaseColumnNames($link[cur]);
-                       return $link;
-               }
-               else
-                       return false;
-       }
-       else{
-               return false;
-       }
-}
-
-function da_sql_close($link,$config)
-{
-       if (sqlrcur_free($link[cur]))
-               return sqlrcon_free($link[con]);
-       else
-               return 0;
-}
-
-function da_sql_escape_string($string)
-{
-       return addslashes($string);
-}
-
-function da_sql_query($link,$config,$query)
-{
-       if ($config[sql_debug] == 'true')
-               print "<b>DEBUG(SQL,SQLRELAY DRIVER): Query: <i>$query</i></b><br>\n";
-       if (sqlrcur_sendQuery($link[cur],$query)){
-               sqlrcon_endSession($link[con]);
-               $link[count] = sqlrcur_rowCount($link[cur]);
-               return $link;
-       }
-       else{
-               return false;
-       }
-}
-
-function da_sql_num_rows($result,$config)
-{
-       if ($config[sql_debug] == 'true')
-               print "<b>DEBUG(SQL,SQLRELAY DRIVER): Query Result: Num rows:: " . @sqlrcur_rowCount($result[cur]) . "</b><br>\n";
-       return sqlrcur_rowCount($result[cur]);
-       return 0;
-}
-
-function da_sql_fetch_array($result,$config)
-{
-       static $counter = 0;
-       if ($counter < $result[count]){
-               $row = sqlrcur_getRowAssoc($result[cur],$counter);
-               $counter++;
-       }
-       else{
-               $counter = 0;
-               return false;
-       }
-       if ($config[sql_debug] == 'true'){
-               print "<b>DEBUG(SQL,SQLRELAY DRIVER): Query Result: <pre>";
-       }
-       return $row;
-}
-
-function da_sql_affected_rows($link,$result,$config)
-{
-       if ($config[sql_debug] == 'true')
-               print "<b>DEBUG(SQL,SQLRELAY DRIVER): Query Result: Affected rows:: " . @sqlrcur_affectedRows($result[cur]) . "</b><br>\n";
-       return sqlrcur_affectedRows($result[cur]);
-}
-
-function da_sql_list_fields($table,$link,$config)
-{
-       if (sqlrcur_sendQuery($link[cur],"SELECT * FROM $table WHERE  1 = 0;")){
-               sqlrcon_endSession($link[con]);
-               return $link[cur];
-       }
-       else
-               return false;
-}
-
-function da_sql_num_fields($fields,$config)
-{
-       return sqlrcur_colCount($fields);
-}
-
-function da_sql_field_name($fields,$num,$config)
-{
-       return sqlrcur_getColumnName($fields,$num);
-}
-
-function da_sql_error($link,$config)
-{
-       return sqlrcur_errorMessage($link[cur]);
-}
-?>
diff --git a/dialup_admin/lib/sql/find.php b/dialup_admin/lib/sql/find.php
deleted file mode 100644 (file)
index ff2b5f1..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-<?php
-if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
-       include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
-else{
-       echo "<b>Could not include SQL library</b><br>\n";
-       exit();
-}
-
-unset($found_users);
-
-$link = @da_sql_pconnect($config);
-if ($link){
-       $search = da_sql_escape_string($search);
-       if (!is_numeric($max))
-               $max = 10;
-       if ($max > 500)
-               $max = 10;
-       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
-               lower($search_IN) LIKE '%$search%' " .
-               da_sql_limit($max,1,$config) . " " . da_sql_limit($max,2,$config) . " ;");
-               if ($res){
-                       while(($row = @da_sql_fetch_array($res,$config)))
-                               $found_users[] = $row[username];
-               }
-               else
-                       "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
-       }
-       else if ($search_IN == 'radius' && $radius_attr != ''){
-               require("../lib/sql/attrmap.php");
-               if ($attrmap["$radius_attr"] == ''){
-                       $attrmap["$radius_attr"] = $radius_attr;
-                       $attr_type["$radius_attr"] = 'replyItem';
-               }
-               $table = ($attr_type[$radius_attr] == 'checkItem') ? $config[sql_check_table] : $config[sql_reply_table];
-               $attr = $attrmap[$radius_attr];
-               $attr = da_sql_escape_string($attr);
-               $res = @da_sql_query($link,$config,
-               "SELECT " . da_sql_limit($max,0,$config) . " username FROM $table WHERE attribute = '$attr'
-               AND value LIKE '%$search%' " . da_sql_limit($max,1,$config) . " " . da_sql_limit($max,2,$config) . " ;");
-               if ($res){
-                       while(($row = @da_sql_fetch_array($res,$config)))
-                               $found_users[] = $row[username];
-               }
-               else
-                       "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
-       }
-}
-else
-       echo "<b>Could not connect to SQL database</b><br>\n";
-?>
diff --git a/dialup_admin/lib/sql/functions.php b/dialup_admin/lib/sql/functions.php
deleted file mode 100644 (file)
index 6b8711f..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
-       include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
-else{
-       echo "<b>Could not include SQL library</b><br>\n";
-       exit();
-}
-require_once('../lib/xlat.php');
-
-function connect2db($config)
-{
-       $link=@da_sql_pconnect($config);
-
-       return $link;
-}
-
-function get_user_info($link,$user,$config)
-{
-       if ($link && $config[sql_use_user_info_table] == 'true'){
-               $user = da_sql_escape_string($user);
-               $res=@da_sql_query($link,$config,
-               "SELECT name FROM $config[sql_user_info_table] WHERE username = '$user';");
-               if ($res){
-                       $row = @da_sql_fetch_array($res,$config);
-                       if ($row)
-                               return $row[name];
-               }
-       }
-}
-
-function closedb($link,$config)
-{
-       return 1;
-}
-?>
diff --git a/dialup_admin/lib/sql/group_admin.php b/dialup_admin/lib/sql/group_admin.php
deleted file mode 100644 (file)
index b83bc14..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
-       include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
-else{
-       echo "<b>Could not include SQL library</b><br>\n";
-       exit();
-}
-$link = @da_sql_pconnect($config);
-if ($link){
-       if (isset($del_members)){
-               foreach ($del_members as $del){
-                       $del = da_sql_escape_string($del);
-                       $res = @da_sql_query($link,$config,
-                       "DELETE FROM $config[sql_usergroup_table] WHERE username = '$del' AND groupname = '$login';");
-                       if (!$res)
-                               echo "<b>Could not delete user $del from group: " . da_sql_error($link,$config) . "</b><br>\n";
-               }
-       }
-       if ($new_members != ''){
-               $Members = preg_split("/[\n\s]+/",$new_members,-1,PREG_SPLIT_NO_EMPTY);
-               if (!empty($Members)){
-                       foreach ($Members as $new_member){
-                               $new_member = da_sql_escape_string($new_member);
-                               $res = @da_sql_query($link,$config,
-                               "SELECT username FROM $config[sql_usergroup_table] WHERE
-                               username = '$new_member' AND groupname = '$login';");
-                               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{
-                                               $res = @da_sql_query($link,$config,
-                                               "INSERT INTO $config[sql_usergroup_table] (groupname,username)
-                                               VALUES ('$login','$new_member');");
-                                               if (!$res)
-                                                       echo "<b>Error while adding user $new_member to group: " . da_sql_error($link,$config) . "</b><br>\n";
-                                       }
-                               }
-                               else
-                                       echo "<b>Could not add new member $new_member: " . da_sql_error($link,$config) . "</b><br>\n";
-                       }
-               }
-       }
-}
-else
-       echo "<b>Could not connect to SQL database</b><br>\n";
-?>
diff --git a/dialup_admin/lib/sql/group_change.php b/dialup_admin/lib/sql/group_change.php
deleted file mode 100644 (file)
index 485bb1f..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
-       include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
-else{
-       echo "<b>Could not include SQL library</b><br>\n";
-       exit();
-}
-$link = @da_sql_pconnect($config);
-if ($link){
-       if (isset($member_groups) && isset($edited_groups)){
-               $del_groups = array_diff($member_groups,$edited_groups);
-               if (isset($del_groups)){
-                       foreach ($del_groups as $del){
-                               $del = da_sql_escape_string($del);
-                               $res = @da_sql_query($link,$config,
-                       "DELETE FROM $config[sql_usergroup_table] WHERE username = '$login' AND groupname = '$del';");
-                               if (!$res)
-                                       echo "<b>Could not delete user $login from group $del: " . da_sql_error($link,$config) . "</b><br>\n";
-                               else
-                                       echo "<b>User $login deleted from group $del</b><br>\n";
-                       }
-               }
-               $new_groups = array_diff($edited_groups,$member_groups);
-               if (isset($new_groups)){
-                       foreach($new_groups as $new){
-                               $new = da_sql_escape_string($new);
-                               $res = @da_sql_query($link,$config,
-                               "INSERT INTO $config[sql_usergroup_table] (groupname,username)
-                               VALUES ('$new','$login');");
-                               if (!$res)
-                                       echo "<b>Error while adding user $login to group $login: " . da_sql_error($link,$config) . "</b><br>\n";
-                               else
-                                       echo "<b>User $login added to group $new</b><br>\n";
-                       }
-               }
-       }
-}
-else
-       echo "<b>Could not connect to SQL database</b><br>\n";
-?>
diff --git a/dialup_admin/lib/sql/group_info.php b/dialup_admin/lib/sql/group_info.php
deleted file mode 100644 (file)
index d7c18ad..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-<?php
-require('../lib/sql/attrmap.php');
-if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
-       include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
-else{
-       echo "<b>Could not include SQL library</b><br>\n";
-       exit();
-}
-if ($config[sql_use_operators] == 'true'){
-       $op = ',op';
-       $use_op = 1;
-}else{
-       $op = "";
-       $use_op = 0;
-}
-$group_exists = 'no';
-$link = @da_sql_pconnect($config);
-if ($link){
-       if ($login == ''){
-               unset($existing_groups);
-
-               $res = @da_sql_query($link,$config,
-               "SELECT COUNT(*) as counter,groupname FROM $config[sql_usergroup_table]
-               GROUP BY groupname;");
-               if ($res){
-                       while(($row = @da_sql_fetch_array($res,$config))){
-                               $name = $row[groupname];
-                               $existing_groups["$name"] = $row[counter];
-                       }
-                       if (isset($existing_groups))
-                               ksort($existing_groups);
-               }
-               else
-                       echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
-       }
-       else{
-               unset($item_vals);
-               unset($tmp);
-               unset($group_members);
-               unset($existing_groups);
-
-               $res = @da_sql_query($link,$config,
-               "SELECT attribute,value $op FROM $config[sql_groupcheck_table] WHERE groupname = '$login';");
-               if ($res){
-                       if (@da_sql_num_rows($res,$config))
-                               $group_exists = 'yes';
-                       while(($row = @da_sql_fetch_array($res,$config))){
-                               $attr = $row[attribute];
-                               $val = $row[value];
-                               if ($use_op){
-                                       $oper = $row[op];
-                                       $tmp["$attr"][operator][]="$oper";
-                               }
-                               $tmp["$attr"][]="$val";
-                               $tmp["$attr"][count]++;
-                       }
-                       $res = @da_sql_query($link,$config,
-                       "SELECT attribute,value $op FROM $config[sql_groupreply_table] WHERE groupname = '$login';");
-                       if ($res){
-                               if (@da_sql_num_rows($res,$config))
-                                       $group_exists = 'yes';
-                               while(($row = @da_sql_fetch_array($res,$config))){
-                                       $attr = $row[attribute];
-                                       $val = $row[value];
-                                       if ($use_op){
-                                               $oper = $row[op];
-                                               $tmp["$attr"][operator][]="$oper";
-                                       }
-                                       $tmp["$attr"][] = "$val";
-                                       $tmp["$attr"][count]++;
-                               }
-                       }
-                       else
-                               echo "<b>Database query failed partially: " . da_sql_error($link,$config) . "</b><br>\n";
-                       $res = @da_sql_query($link,$config,
-                       "SELECT username FROM $config[sql_usergroup_table] WHERE groupname = '$login' ORDER BY username;");
-                       if ($res){
-                               if (@da_sql_num_rows($res,$config))
-                                       $group_exists = 'yes';
-                               while(($row = @da_sql_fetch_array($res,$config))){
-                                       $member = $row[username];
-                                       $group_members[] = "$member";
-                               }
-                       }
-                       else
-                               echo "<b>Database query failed partially: " . da_sql_error($link,$config) . "</b><br>\n";
-                       if (isset($tmp)){
-                               foreach(array_keys($tmp) as $val){
-                                       if ($val == '')
-                                               continue;
-                                       $key = $rev_attrmap["$val"];
-                                       if ($key == ''){
-                                               $key = $val;
-                                               $attrmap["$key"] = $val;
-                                               $attr_type["$key"] = 'replyItem';
-                                               $rev_attrmap["$val"] = $key;
-                                       }
-                                       $item_vals["$key"] = $tmp[$val];
-                                       $item_vals["$key"][count] = $tmp[$val][count];
-                                       if ($use_op)
-                                               $item_vals["$key"][operator] = $tmp[$val][operator];
-                               }
-                       }
-               }
-               else
-                       echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
-       }
-}
-else
-       echo "<b>Could not connect to SQL database</b><br>\n";
-?>
diff --git a/dialup_admin/lib/sql/nas_list.php b/dialup_admin/lib/sql/nas_list.php
deleted file mode 100644 (file)
index 43e0547..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-<?php
-require('../conf/config.php');
-require_once('../lib/functions.php');
-
-unset($da_name_cache);
-if (isset($_SESSION['da_name_cache']))
-       $da_name_cache = $_SESSION['da_name_cache'];
-if ($config[sql_nas_table] != ''){
-
-       if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
-               include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
-       else{
-               echo "<b>Could not include SQL library</b><br>\n";
-               exit();
-       }
-       $link = @da_sql_pconnect($config);
-       if ($link){
-               $auth_user = $_SERVER["PHP_AUTH_USER"];
-               $extra = '';
-               if (isset($mappings[$auth_user][nasdb])){
-                       $NAS_ARR = array();
-                       $NAS_ARR = preg_split('/,/',$mappings[$auth_user][nasdb]);
-                       $extra = 'WHERE nasname IN (';
-                       foreach ($NAS_ARR as $nas)
-                               $extra .= "'$nasname',";
-                       unset($NAS_ARR);
-                       $extra = rtrim($extra,",");
-                       $extra .= ')';
-               }
-               $search = @da_sql_query($link,$config,
-               "SELECT * FROM $config[sql_nas_table] $extra;");
-               if ($search){
-                       while($row = @da_sql_fetch_array($search,$config)){
-                               $num = 0;
-                               $my_nas_name = $row['nasname'];
-                               if ($my_nas_name != ''){
-                                       $nas_list[$my_nas_name]['name'] = $my_nas_name;
-                                       $nas_server = $da_name_cache[$my_nas_name];
-                                       if (!isset($nas_server)){
-                                               if (!check_ip($my_nas_name))
-                                                       $nas_server = @gethostbyname($my_nas_name);
-                                               else
-                                                       $nas_server = $my_nas_name;
-                                               if (!isset($da_name_cache) && $config[general_use_session] == 'yes'){
-                                                       $da_name_cache[$my_nas_name] = $nas_server;
-                                                       session_register('da_name_cache');
-                                               }
-                                       }
-                                       if ($nas_server != $my_nas_name || check_ip($nas_server))
-                                               $nas_list[$my_nas_name]['ip'] = $nas_server;
-                                       $nas_list[$my_nas_name]['port_num'] = $row['ports'];
-                                       $nas_list[$my_nas_name]['community'] = $row['community'];
-                                       $nas_list[$my_nas_name]['model'] = $row['description'];
-                               }
-                       }
-               }
-       }
-       else
-               echo "<b>Could not connect to SQL database</b><br>\n";
-}
-
-?>
diff --git a/dialup_admin/lib/sql/password_check.php b/dialup_admin/lib/sql/password_check.php
deleted file mode 100644 (file)
index e19dde5..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-require('password.php');
-if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
-       include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
-else{
-       echo "<b>Could not include SQL library</b><br>\n";
-       exit();
-}
-
-if ($action == 'checkpass'){
-       $link = @da_sql_pconnect($config);
-       if ($link){
-               $res = @da_sql_query($link,$config,
-                       "SELECT attribute,value FROM $config[sql_check_table] WHERE username = '$login'
-                       AND attribute = '$config[sql_password_attribute]';");
-               if ($res){
-                       $row = @da_sql_fetch_array($res,$config);
-                       if (is_file("../lib/crypt/$config[general_encryption_method].php")){
-                               include("../lib/crypt/$config[general_encryption_method].php");
-                               $enc_passwd = $row[value];
-                               $passwd = da_encrypt($passwd,$enc_passwd);
-                               if ($passwd == $enc_passwd)
-                                       $msg = '<font color=blue><b>YES It is that</b></font>';
-                               else
-                                       $msg = '<font color=red><b>NO It is wrong</b></font>';
-                       }
-                       else
-                               echo "<b>Could not open encryption library file</b><br>\n";
-               }
-       }
-       echo "<tr><td colspan=3 align=center>$msg</td></tr>\n";
-}
-?>
-</form>
diff --git a/dialup_admin/lib/sql/user_info.php b/dialup_admin/lib/sql/user_info.php
deleted file mode 100644 (file)
index b86ff8b..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-<?php
-require('../lib/sql/attrmap.php');
-if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
-       include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
-else{
-       echo "<b>Could not include SQL library</b><br>\n";
-       exit();
-}
-if ($config[sql_use_operators] == 'true'){
-       $op = ',op';
-       $use_op = 1;
-}else{
-       $op = "";
-       $use_op = 0;
-}
-$user_exists = 'no';
-
-$cn = '-';
-$cn_lang = '-';
-$address = '-';
-$address_lang = '-';
-$homeaddress = '-';
-$homeaddress_lang = '-';
-$fax = '-';
-$url = '-';
-$ou = '-';
-$ou_lang = '-';
-$title = '-';
-$title_lang = '-';
-$telephonenumber = '-';
-$homephone = '-';
-$mobile = '-';
-$mail = '-';
-$mailalt = '-';
-$user_password_exists = 'no';
-
-unset($item_vals);
-unset($tmp);
-$link = @da_sql_pconnect($config);
-if ($link){
-       $res = @da_sql_query($link,$config,
-       "SELECT attribute,value $op FROM $config[sql_check_table] WHERE username = '$login';");
-       if ($res){
-               if (@da_sql_num_rows($res,$config))
-                       $user_exists = 'yes';
-               while(($row = @da_sql_fetch_array($res,$config))){
-                       $attr = $row[attribute];
-                       $val = $row[value];
-                       if ($attr == $config[sql_password_attribute] && $val != '')
-                               $user_password_exists = 'yes';
-                       if ($use_op){
-                               $oper = $row[op];
-                               $tmp["$attr"][operator][]="$oper";
-                       }
-                       $tmp["$attr"][]="$val";
-                       $tmp["$attr"][count]++;
-               }
-               $res = @da_sql_query($link,$config,
-               "SELECT attribute,value $op FROM $config[sql_reply_table] WHERE username = '$login';");
-               if ($res){
-                       if (@da_sql_num_rows($res,$config))
-                               $user_exists = 'yes';
-                       while(($row = @da_sql_fetch_array($res,$config))){
-                               $attr = $row[attribute];
-                               $val = $row[value];
-                               if ($use_op){
-                                       $oper = $row[op];
-                                       $tmp["$attr"][operator][]="$oper";
-                               }
-                               $tmp["$attr"][] = "$val";
-                               $tmp["$attr"][count]++;
-                       }
-                       if ($config[sql_use_user_info_table] == 'true'){
-                               $res = @da_sql_query($link,$config,
-                               "SELECT * FROM $config[sql_user_info_table] WHERE username = '$login';");
-                               if ($res){
-                                       if (@da_sql_num_rows($res,$config)){
-                                               $user_exists = 'yes';
-                                               $user_info = 1;
-                                       }
-                                       if (($row = @da_sql_fetch_array($res,$config))){
-                                               $cn = ($row[name] != '') ? $row[name] : '-';
-                                               $telephonenumber = ($row[workphone] != '') ? $row[workphone] : '-';
-                                               $homephone = ($row[homephone] != '') ? $row[homephone] : '-';
-                                               $ou = ($row[department] != '') ? $row[department] : '-';
-                                               $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";
-                       }
-               }
-               else
-                       echo "<b>Database query failed partially: " . da_sql_error($link,$config) . "</b><br>\n";
-               if (isset($tmp)){
-                       foreach(array_keys($tmp) as $val){
-                               if ($val == '')
-                                       continue;
-                               $key = $rev_attrmap["$val"];
-                               if ($key == ''){
-                                       $key = $val;
-                                       $attrmap["$key"] = $val;
-                                       $attr_type["$key"] = 'replyItem';
-                                       $rev_attrmap["$val"] = $key;
-                               }
-                               $item_vals["$key"] = $tmp[$val];
-                               $item_vals["$key"][count] = $tmp[$val][count];
-                               if ($use_op)
-                                       $item_vals["$key"][operator] = $tmp[$val][operator];
-                       }
-               }
-
-       }
-       else
-               echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
-}
-else
-       echo "<b>Could not connect to SQL database</b><br>\n";
-?>
diff --git a/dialup_admin/lib/xlat.php b/dialup_admin/lib/xlat.php
deleted file mode 100644 (file)
index ac282ee..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php
-function xlat($filter,$login,$config)
-{
-       $string = $filter;
-       if ($filter != ''){
-               $string = preg_replace('/%u/',$login,$string);
-               $string = preg_replace('/%U/',$_SERVER["PHP_AUTH_USER"],$string);
-               $string = preg_replace('/%ma/',$mappings[$http_user][accounting],$string);
-               $string = preg_replace('/%mu/',$mappings[$http_user][userdb],$string);
-               $string = preg_replace('/%mn/',$mappings[$http_user][nasdb],$string);
-               $string = preg_replace('/%mN/',$mappings[$http_user][nasadmin],$string);
-       }
-
-       return $string;
-}
-?>
diff --git a/dialup_admin/sql/mysql/badusers.sql b/dialup_admin/sql/mysql/badusers.sql
deleted file mode 100644 (file)
index 286416d..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# Table structure for table 'badusers'
-#
-CREATE TABLE badusers (
-  id int(10) NOT NULL auto_increment,
-  UserName varchar(30),
-  IncidentDate datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
-  Reason varchar(200),
-  Admin varchar(30) DEFAULT '-',
-  PRIMARY KEY (id),
-  KEY UserName (UserName),
-  KEY IncidentDate (IncidentDate)
-);
diff --git a/dialup_admin/sql/mysql/mtotacct.sql b/dialup_admin/sql/mysql/mtotacct.sql
deleted file mode 100644 (file)
index b504947..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-CREATE TABLE mtotacct (
-  MTotAcctId bigint(21) NOT NULL auto_increment,
-  UserName varchar(64) NOT NULL default '',
-  AcctDate date NOT NULL default '0000-00-00',
-  ConnNum bigint(12) default NULL,
-  ConnTotDuration bigint(12) default NULL,
-  ConnMaxDuration bigint(12) default NULL,
-  ConnMinDuration bigint(12) default NULL,
-  InputOctets bigint(12) default NULL,
-  OutputOctets bigint(12) default NULL,
-  NASIPAddress varchar(15) default NULL,
-  PRIMARY KEY  (MTotAcctId),
-  KEY UserName (UserName),
-  KEY AcctDate (AcctDate),
-  KEY UserOnDate (UserName,AcctDate),
-  KEY NASIPAddress (NASIPAddress)
-);
diff --git a/dialup_admin/sql/mysql/totacct.sql b/dialup_admin/sql/mysql/totacct.sql
deleted file mode 100644 (file)
index e1cb448..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-CREATE TABLE totacct (
-  TotAcctId bigint(21) NOT NULL auto_increment,
-  UserName varchar(64) NOT NULL default '',
-  AcctDate date NOT NULL default '0000-00-00',
-  ConnNum bigint(12) default NULL,
-  ConnTotDuration bigint(12) default NULL,
-  ConnMaxDuration bigint(12) default NULL,
-  ConnMinDuration bigint(12) default NULL,
-  InputOctets bigint(12) default NULL,
-  OutputOctets bigint(12) default NULL,
-  NASIPAddress varchar(15) default NULL,
-  PRIMARY KEY  (TotAcctId),
-  KEY UserName (UserName),
-  KEY AcctDate (AcctDate),
-  KEY UserOnDate (UserName,AcctDate),
-  KEY NASIPAddress (NASIPAddress),
-  KEY NASIPAddressOnDate (AcctDate,NASIPAddress)
-);
diff --git a/dialup_admin/sql/mysql/userinfo.sql b/dialup_admin/sql/mysql/userinfo.sql
deleted file mode 100644 (file)
index ba9d721..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#
-# Table structure for table 'userinfo'
-#
-CREATE TABLE userinfo (
-  id int(10) DEFAULT '0' NOT NULL auto_increment,
-  UserName varchar(30),
-  Name varchar(200),
-  Mail varchar(200),
-  Department varchar(200),
-  WorkPhone varchar(200),
-  HomePhone varchar(200),
-  Mobile varchar(200),
-  PRIMARY KEY (id),
-  KEY UserName (UserName),
-  KEY Department (Department)
-);
diff --git a/dialup_admin/sql/oracle/badusers.sql b/dialup_admin/sql/oracle/badusers.sql
deleted file mode 100644 (file)
index 06b0820..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * $Id$
- *
- */
-
-/*
- * Table structure for table 'radcheck'
- */
-
-CREATE TABLE badusers (
-       id              INT PRIMARY KEY,
-       username        VARCHAR(30) DEFAULT '' NOT NULL,
-       incidentdate    TIMESTAMP WITH TIME ZONE DEFAULT sysdate NOT NULL,
-       reason          VARCHAR(128) DEFAULT '' NOT NULL,
-       admin           VARCHAR(128) DEFAULT '-' NOT NULL
-);
-CREATE SEQUENCE badusers_seq START WITH 1 INCREMENT BY 1;
-CREATE INDEX badusers_incidentdate_idx ON badusers (incidentdate);
-CREATE INDEX badusers_username_idx ON badusers (username);
-
-/* Trigger to emulate a serial # on the primary key */
-CREATE OR REPLACE TRIGGER badusers_serialnumber
-        BEFORE INSERT OR UPDATE OF id ON badusers
-        FOR EACH ROW
-        BEGIN
-                if ( :new.id = 0 or :new.id is null ) then
-                        SELECT badusers_seq.nextval into :new.id from dual;
-                end if;
-        END;
-/
-
diff --git a/dialup_admin/sql/oracle/mtotacct.sql b/dialup_admin/sql/oracle/mtotacct.sql
deleted file mode 100644 (file)
index b623ece..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * $Id$
- *
- */
-
-
-/*
- * Table structure for table 'mtotacct'
- */
-CREATE TABLE mtotacct (
-       mtotacctid      INT PRIMARY KEY,
-       username        varchar(64) DEFAULT '' NOT NULL,
-       acctdate        DATE DEFAULT sysdate NOT NULL,
-       connnum         NUMERIC(12),
-       conntotduration NUMERIC(12),
-       connmaxduration NUMERIC(12),
-       connminduration NUMERIC(12),
-       inputoctets     NUMERIC(12),
-       outputoctets    NUMERIC(12),
-       nasipaddress    varchar(15) default NULL
-);
-
-CREATE INDEX mtotacct_acctdate_idx ON mtotacct (acctdate);
-CREATE INDEX mtotacct_nasipaddress_idx ON mtotacct (nasipaddress);
-CREATE INDEX mtotacct_username_idx ON mtotacct (username);
-CREATE INDEX mtotacct_userondate_idx ON mtotacct (username, acctdate);
-
-CREATE SEQUENCE mtotacct_seq START WITH 1 INCREMENT BY 1;
-
-/* Trigger to emulate a serial # on the primary key */
-CREATE OR REPLACE TRIGGER mtotacct_serialnumber
-        BEFORE INSERT OR UPDATE OF mtotacctid ON mtotacct
-        FOR EACH ROW
-        BEGIN
-                if ( :new.mtotacctid = 0 or :new.mtotacctid is null ) then
-                        SELECT mtotacct_seq.nextval into :new.mtotacctid from dual;
-                end if;
-        END;
-/
-
diff --git a/dialup_admin/sql/oracle/totacct.sql b/dialup_admin/sql/oracle/totacct.sql
deleted file mode 100644 (file)
index 144c2f4..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * $Id$
- *
- */
-
-
-/*
- * Table structure for table 'totacct'
- */
-CREATE TABLE totacct (
-        totacctid      INT PRIMARY KEY,
-        username        varchar(64) DEFAULT '' NOT NULL,
-        acctdate        DATE DEFAULT sysdate NOT NULL,
-        connnum         NUMERIC(12),
-        conntotduration NUMERIC(12),
-        connmaxduration NUMERIC(12),
-        connminduration NUMERIC(12),
-        inputoctets     NUMERIC(12),
-        outputoctets    NUMERIC(12),
-        nasipaddress    varchar(15) default NULL
-);
-CREATE INDEX totacct_acctdate_idx ON totacct (acctdate);
-CREATE INDEX totacct_nasipaddress_idx ON totacct (nasipaddress);
-CREATE INDEX totacct_nasondate_idx ON totacct (acctdate, nasipaddress);
-CREATE INDEX totacct_username_idx ON totacct (username);
-CREATE INDEX totacct_userondate_idx ON totacct (username, acctdate);
-
-CREATE SEQUENCE totacct_seq START WITH 1 INCREMENT BY 1;
-
-/* Trigger to emulate a serial # on the primary key */
-CREATE OR REPLACE TRIGGER totacct_serialnumber
-        BEFORE INSERT OR UPDATE OF totacctid ON totacct
-        FOR EACH ROW
-        BEGIN
-                if ( :new.totacctid = 0 or :new.totacctid is null ) then
-                        SELECT totacct_seq.nextval into :new.totacctid from dual;
-                end if;
-        END;
-/
-
diff --git a/dialup_admin/sql/oracle/userinfo.sql b/dialup_admin/sql/oracle/userinfo.sql
deleted file mode 100644 (file)
index 7ecd6cc..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * $Id$
- *
- */
-
-/*
- * Table structure for table 'userinfo'
- */
-
-CREATE TABLE userinfo (
-       id              INT PRIMARY KEY,
-       username        VARCHAR(128) DEFAULT '' NOT NULL,
-       name            VARCHAR(128) DEFAULT '' NOT NULL,
-       mail            VARCHAR(128) DEFAULT '' NOT NULL,
-       department      VARCHAR(128) DEFAULT '' NOT NULL,
-       workphone       VARCHAR(128) DEFAULT '' NOT NULL,
-       homephone       VARCHAR(128) DEFAULT '' NOT NULL,
-       mobile          VARCHAR(128) DEFAULT '' NOT NULL 
-);
-CREATE INDEX userinfo_department_idx ON userinfo (department);
-CREATE INDEX userinfo_username_idx ON userinfo (username);
-CREATE SEQUENCE userinfo_seq START WITH 1 INCREMENT BY 1;
-
-
-/* Trigger to emulate a serial # on the primary key */
-CREATE OR REPLACE TRIGGER userinfo_serialnumber
-        BEFORE INSERT OR UPDATE OF id ON userinfo
-        FOR EACH ROW
-        BEGIN
-                if ( :new.id = 0 or :new.id is null ) then
-                        SELECT userinfo_seq.nextval into :new.id from dual;
-                end if;
-        END;
-/
diff --git a/dialup_admin/sql/postgresql/badusers.sql b/dialup_admin/sql/postgresql/badusers.sql
deleted file mode 100644 (file)
index 93e5ca0..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-SET search_path = public, pg_catalog;
-
---Table structure for table 'badusers'
---
-CREATE TABLE badusers (
-    id BIGSERIAL PRIMARY KEY,
-    username TEXT NOT NULL,
-    incidentdate timestamp with time zone DEFAULT 'now' NOT NULL,
-    reason TEXT,
-    admin TEXT DEFAULT '-'
-);
-CREATE INDEX badusers_incidentdate_idx ON badusers USING btree (incidentdate);
-CREATE INDEX badusers_username_idx ON badusers USING btree (username);
diff --git a/dialup_admin/sql/postgresql/mtotacct.sql b/dialup_admin/sql/postgresql/mtotacct.sql
deleted file mode 100644 (file)
index f8502e1..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-SET search_path = public, pg_catalog;
-
---
--- Table structure for table 'mtotacct'
---
-CREATE TABLE mtotacct (
-    mtotacctid BIGSERIAL PRIMARY KEY,
-    username TEXT DEFAULT '' NOT NULL,
-    acctdate DATE DEFAULT 'now' NOT NULL,
-    connnum BIGINT,
-    conntotduration BIGINT,
-    connmaxduration BIGINT,
-    connminduration BIGINT,
-    inputoctets BIGINT,
-    outputoctets BIGINT,
-    nasipaddress INET
-);
-CREATE INDEX mtotacct_acctdate_idx ON mtotacct USING btree (acctdate);
-CREATE INDEX mtotacct_nasipaddress_idx ON mtotacct USING btree
-(nasipaddress);
-CREATE INDEX mtotacct_username_idx ON mtotacct USING btree (username);
-CREATE INDEX mtotacct_userondate_idx ON mtotacct USING btree (username,
-acctdate);
diff --git a/dialup_admin/sql/postgresql/totacct.sql b/dialup_admin/sql/postgresql/totacct.sql
deleted file mode 100644 (file)
index 373aae4..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-SET search_path = public, pg_catalog;
-
---
--- Table structure for table 'totacct'
---
-CREATE TABLE totacct (
-    totacctid bigSERIAL PRIMARY KEY,
-    username TEXT DEFAULT '' NOT NULL,
-    acctdate DATE DEFAULT 'now' NOT NULL,
-    connnum BIGINT,
-    conntotduration BIGINT,
-    connmaxduration BIGINT,
-    connminduration BIGINT,
-    inputoctets BIGINT,
-    outputoctets BIGINT,
-    nasipaddress INET
-);
-CREATE INDEX totacct_acctdate_idx ON totacct USING btree (acctdate);
-CREATE INDEX totacct_nasipaddress_idx ON totacct USING btree (nasipaddress);
-CREATE INDEX totacct_nasondate_idx ON totacct USING btree (acctdate,
-nasipaddress);
-CREATE INDEX totacct_username_idx ON totacct USING btree (username);
-CREATE INDEX totacct_userondate_idx ON totacct USING btree (username,
-acctdate);
diff --git a/dialup_admin/sql/postgresql/userinfo.sql b/dialup_admin/sql/postgresql/userinfo.sql
deleted file mode 100644 (file)
index 644bc95..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-SET search_path = public, pg_catalog;
-
---
--- Table structure for table 'userinfo'
---
-CREATE TABLE userinfo (
-    id SERIAL PRIMARY KEY,
-    username TEXT,
-    name TEXT,
-    mail TEXT,
-    department TEXT,
-    workphone TEXT,
-    homephone TEXT,
-    mobile TEXT
-);
-CREATE INDEX userinfo_department_idx ON userinfo USING btree (department);
-CREATE INDEX userinfo_username_idx ON userinfo USING btree (username);
-
-
index 4df784e..ed3d075 100644 (file)
 
   debian/      Files to build a "freeradius" Debian Linux package.
 
-  dialup_admin/        A PHP web front-end to manage an SQL database associated
-               with the server.
-
   doc/         Various snippets of documentation
   doc/rfc/     Copies of the RFC's.  If you have Perl, do a 'make' in
                that directory, and look at the HTML output.
index 7b6f1c2..e7c8595 100644 (file)
@@ -206,9 +206,6 @@ rm -rf $RPM_BUILD_ROOT/%{_libdir}/freeradius/*.a
 rm -rf $RPM_BUILD_ROOT/%{_libdir}/freeradius/*.la
 rm -rf $RPM_BUILD_ROOT/%{_sysconfdir}/raddb/sql/mssql
 rm -rf $RPM_BUILD_ROOT/%{_sysconfdir}/raddb/sql/oracle
-rm -rf $RPM_BUILD_ROOT/%{_datadir}/dialup_admin/sql/oracle
-rm -rf $RPM_BUILD_ROOT/%{_datadir}/dialup_admin/lib/sql/oracle
-rm -rf $RPM_BUILD_ROOT/%{_datadir}/dialup_admin/lib/sql/drivers/oracle
 
 # remove header files, we don't ship a devel package and the 
 # headers have multilib conflicts
diff --git a/suse/admin-httpd.conf b/suse/admin-httpd.conf
deleted file mode 100644 (file)
index 53b71cb..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-Alias /radius/ /usr/share/dialup_admin/htdocs/
-<Directory /usr/share/dialup_admin/htdocs/>
-   Options None
-   order deny,allow
-   deny from all
-   allow from 127.0.0.1
-</Directory>
-
-# RECOMMENDED
-# For SSL-servers and user authentication
-#<Directory /usr/share/dialup_admin/htdocs/>
-#   Options None
-#   SSLRequireSSL
-#   order deny,allow
-#   deny from all
-#   AuthType Basic
-#   AuthUserFile /site/cfg/passwd
-#   AuthGroupFile /site/cfg/group
-#   AuthName "Radius"
-#   require group radius
-#   Satisfy Any
-#</Directory>
-
index 6200f3c..283dfe8 100644 (file)
@@ -130,33 +130,6 @@ of the server, and let you decide if they satisfy your needs.
 Support for RFC and VSA Attributes Additional server configuration
 attributes Selecting a particular configuration Authentication methods
 
-%package dialupadmin
-Group:         Productivity/Networking/Radius/Servers
-Summary:       Web management for FreeRADIUS
-Requires:      http_daemon
-Requires:      perl-DateManip
-%if 0%{?suse_version} > 1000
-Requires:      apache2-mod_php5
-Requires:      php5
-Requires:      php5-ldap
-Requires:      php5-mysql
-Requires:      php5-pgsql
-%else
-Requires:      apache2-mod_php4
-Requires:      php4
-Requires:      php4-ldap
-Requires:      php4-mysql
-Requires:      php4-pgsql
-Requires:      php4-session
-%endif
-Autoreqprov:   off
-
-%description dialupadmin
-Dialup Admin supports users either in SQL (MySQL or PostgreSQL are
-supported) or in LDAP. Apart from the web pages, it also includes a
-number of scripts to make the administrator's life a lot easier.
-
-
 %package devel
 Group:        Development/Libraries/C and C++
 Summary:      FreeRADIUS Development Files (static libs)
@@ -246,17 +219,6 @@ cp $RPM_BUILD_ROOT/usr/sbin/radiusd $RPM_BUILD_ROOT/usr/sbin/radrelay
 install    -m 744 suse/rcradius-relayd $RPM_BUILD_ROOT%{_sysconfdir}/init.d/freeradius-relay
 ln -sf ../../etc/init.d/freeradius-relay $RPM_BUILD_ROOT/usr/sbin/rcfreeradius-relay
 mv -v doc/README doc/README.doc
-# install dialup_admin
-DIALUPADMIN=$RPM_BUILD_ROOT%{_datadir}/dialup_admin
-mkdir -p $DIALUPADMIN
-cp -r dialup_admin/* $RPM_BUILD_ROOT%{_datadir}/dialup_admin
-perl -i -pe 's/^#general_base_dir\:.*$/general_base_dir\: \/usr\/share\/freeradius-dialupadmin/'   $DIALUPADMIN/conf/admin.conf
-perl -i -pe 's/^#general_radiusd_base_dir\:.*$/general_radiusd_base_dir\: \//'   $DIALUPADMIN/conf/admin.conf
-perl -i -pe 's/^#general_snmpwalk_command\:.*$/general_snmpwalk_command\: \/usr\/bin\/snmpwalk/'   $DIALUPADMIN/conf/admin.conf
-perl -i -pe 's/^#general_snmpget_command\:.*$/general_snmpget_command\: \/usr\/bin\/snmpget/'   $DIALUPADMIN/conf/admin.conf
-# apache2 config
-install -d -m 755 $RPM_BUILD_ROOT%{apache2_sysconfdir}/conf.d
-install -m 644 suse/admin-httpd.conf $RPM_BUILD_ROOT%{apache2_sysconfdir}/conf.d/radius.conf
 # remove unneeded stuff
 rm -rf doc/00-OLD
 rm -f $RPM_BUILD_ROOT/usr/sbin/rc.radiusd
@@ -375,22 +337,6 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_libdir}/freeradius/rlm_sql_oracle*.so*
 %endif
 
-%files dialupadmin
-%defattr(-,root,root)
-%dir %{_datadir}/dialup_admin/
-%{_datadir}/dialup_admin/Makefile
-%{_datadir}/dialup_admin/bin/
-%{_datadir}/dialup_admin/doc/
-%{_datadir}/dialup_admin/htdocs/
-%{_datadir}/dialup_admin/html/
-%{_datadir}/dialup_admin/lib/
-%{_datadir}/dialup_admin/sql/
-%dir %{_datadir}/dialup_admin/conf/
-%config(noreplace) %{_datadir}/dialup_admin/conf/*
-%config(noreplace) %{apache2_sysconfdir}/conf.d/radius.conf
-%{_datadir}/dialup_admin/Changelog
-%{_datadir}/dialup_admin/README
-
 %files devel
 %defattr(-,root,root)
 %attr(644,root,root) %{_libdir}/freeradius/*.a