diff --git a/admin/committees.php b/admin/committees.php index 53a426a..0989916 100644 --- a/admin/committees.php +++ b/admin/committees.php @@ -184,7 +184,7 @@ if($_GET['unlinkmember'] && $_GET['unlinkcommittee']) { echo happy(i18n("Committee member unlinked from committee")); } - + echo 'Create a new member
'; echo "Manage Committees
"; echo "
\n"; echo ""; @@ -197,12 +197,17 @@ if($_GET['unlinkmember'] && $_GET['unlinkcommittee']) { echo ""; echo "
"; - $q=mysql_query("SELECT accounts_id,MAX(year),firstname,lastname,email,deleted FROM users WHERE types LIKE '%committee%' GROUP BY accounts_id ORDER BY firstname"); + $query = " + SELECT accounts_id, firstname, lastname, email, deleted FROM users WHERE accounts_id IN( + SELECT accounts_id FROM user_roles JOIN roles ON user_roles.roles_id = roles.id WHERE roles.type = 'committee' + ) + AND conferences_id = " . $conference['id']; + $q = mysql_query($query); echo "
"; echo i18n("Enter an Email: "); echo "";