2 require('../conf/config.php3');
7 if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php3"))
8 include_once("../lib/sql/drivers/$config[sql_type]/functions.php3");
11 <title>User Groups</title>
12 <meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
13 <link rel="stylesheet" href="style.css">
15 <body bgcolor="#80a040" background="images/greenlines1.gif" link="black" alink="black">
17 <b>Could not include SQL library functions. Aborting</b>
25 <title>User Groups</title>
26 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $config[general_charset]?>">
27 <link rel="stylesheet" href="style.css">
29 <body bgcolor="#80a040" background="images/greenlines1.gif" link="black" alink="black">
31 <table border=0 width=550 cellpadding=0 cellspacing=0>
33 <td align=center><img src="images/title2.gif"></td>
38 <table border=0 width=540 cellpadding=1 cellspacing=1>
41 <td bgcolor="black" width=45%>
42 <table border=0 width=100% cellpadding=2 cellspacing=0>
43 <tr bgcolor="#907030" align=right valign=top><th>
44 <font color="white">User Groups</font>
48 <tr bgcolor="black" valign=top><td colspan=2>
49 <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
52 <table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
53 <tr bgcolor="#d0ddb0">
54 <th>#</th><th>group</th><th># of members</th>
58 $link = @da_sql_pconnect($config);
60 $search = @da_sql_query($link,$config,
61 "SELECT COUNT(*) as counter,groupname,MAX(username) AS usersample FROM $config[sql_usergroup_table] GROUP BY groupname;");
63 if (@da_sql_num_rows($search,$config)){
64 while( $row = @da_sql_fetch_array($search,$config) ){
66 $group = $row[groupname];
67 $num_members = $row[counter];
68 if ($row[usersample] == "") $num_members--;
72 <td><a href="group_admin.php3?login=$group" title="Edit group $group">$group</a></td>
79 echo "<b>Could not find any groups</b><br>\n";
82 echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
85 echo "<b>Could not connect to SQL database</b><br>\n";