From 6893a222760fa72ba15fc6642344e6f80d5d28bb Mon Sep 17 00:00:00 2001 From: jacob Date: Fri, 10 Feb 2012 20:19:19 +0000 Subject: [PATCH] Updated code to allow invitaiton of committee members. --- admin/committees.php | 11 ++++++++--- user_invite.php | 14 ++++++++++---- 2 files changed, 18 insertions(+), 7 deletions(-) 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 "";