~ubuntu-branches/ubuntu/natty/freeradius/natty-updates

« back to all changes in this revision

Viewing changes to dialup_admin/htdocs/show_groups.php3

  • Committer: Bazaar Package Importer
  • Author(s): Paul Hampson
  • Date: 2006-01-15 13:34:13 UTC
  • mto: (3.1.3 dapper) (4.1.3 sid) (1.1.14 upstream)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20060115133413-zo1dslttvdoalqym
Tags: upstream-1.1.0
ImportĀ upstreamĀ versionĀ 1.1.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
$link = @da_sql_pconnect($config);
59
59
if ($link){
60
60
        $search = @da_sql_query($link,$config,
61
 
        "SELECT COUNT(*) as counter,groupname FROM $config[sql_usergroup_table] GROUP BY groupname;");
 
61
        "SELECT COUNT(*) as counter,groupname,MAX(username) AS usersample FROM $config[sql_usergroup_table] GROUP BY groupname;");
62
62
        if ($search){
63
63
                if (@da_sql_num_rows($search,$config)){
64
64
                        while( $row = @da_sql_fetch_array($search,$config) ){
65
65
                                $num++;
66
66
                                $group = $row[groupname];
67
67
                                $num_members = $row[counter];
 
68
                                if ($row[usersample] == "") $num_members--;
68
69
                                echo <<<EOM
69
70
                <tr align=center>
70
71
                        <td>$num</td>