From: kkalev Date: Sat, 10 May 2003 13:49:46 +0000 (+0000) Subject: Add a usage_summary parameter in user_finger. If it is passed then we only output... X-Git-Url: https://git.entuzijast.net/?a=commitdiff_plain;h=c60d2859fdc41876830b660e622488b43629b4df;p=freeradius-dialup-admin.git Add a usage_summary parameter in user_finger. If it is passed then we only output a text like: "Online: Free: " which can be used in outside pages --- diff --git a/Changelog b/Changelog index 59a81c4..fedc09d 100644 --- a/Changelog +++ b/Changelog @@ -23,6 +23,8 @@ Ver 1.63: * 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: Free: " which can be used in outside pages 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 diff --git a/README b/README index 0879efd..cc04c8e 100644 --- a/README +++ b/README @@ -82,6 +82,8 @@ htdocs:: user_state.php3 => htdocs:: user_finger.php3 => 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: Free: " which can be used by other pages html:: Contains the html code for a few pages html::user_admin.html.php3 => diff --git a/htdocs/user_finger.php3 b/htdocs/user_finger.php3 index 99d83d7..3663387 100644 --- a/htdocs/user_finger.php3 +++ b/htdocs/user_finger.php3 @@ -1,6 +1,7 @@ +if (!isset($usage_summary)){ + echo << @@ -8,8 +9,9 @@ require('../conf/config.php3'); User Finger Facility +EOM; +} -Could not connect to SQL database
\n"; +if (isset($usage_summary)){ + echo "Online: $tot_in Free: $tot_rem\n"; + exit(); +} ?>