diff --git a/admin/communication.inc.php b/admin/communication.inc.php index 99c3cb31..e483ba8a 100644 --- a/admin/communication.inc.php +++ b/admin/communication.inc.php @@ -14,9 +14,15 @@ "SELECT firstname, lastname, email, deleted, MAX(year) FROM users WHERE types LIKE '%judge%' GROUP BY uid HAVING deleted='no' ORDER BY email"), - "judges_active_thisyear"=>array("name"=>"Judges active for this year", "query"=> + "judges_active_thisyear"=>array("name"=>"Judges (all) active for this year", "query"=> "SELECT firstname, lastname, email FROM users LEFT JOIN users_judge ON users_judge.users_id=users.id WHERE types LIKE '%judge%' AND year='{$config['FAIRYEAR']}' AND deleted='no' AND users_judge.judge_active='yes' ORDER BY email"), + "judges_div_active_thisyear"=>array("name"=>"Judges (regular judges only) active for this year", "query"=> + "SELECT firstname, lastname, email FROM users LEFT JOIN users_judge ON users_judge.users_id=users.id WHERE types LIKE '%judge%' AND year='{$config['FAIRYEAR']}' AND deleted='no' AND users_judge.judge_active='yes' AND (users_judge.special_award_only='no' OR users_judge.special_award_only='' OR users_judge.special_award_only IS NULL) ORDER BY email"), + + "judges_spec_active_thisyear"=>array("name"=>"Judges (special award judges only) active for this year", "query"=> + "SELECT firstname, lastname, email FROM users LEFT JOIN users_judge ON users_judge.users_id=users.id WHERE types LIKE '%judge%' AND year='{$config['FAIRYEAR']}' AND deleted='no' AND users_judge.judge_active='yes' AND users_judge.special_award_only='yes' ORDER BY email"), + "judges_inactive"=>array("name"=>"Judges not active for this year", "query"=> "SELECT firstname, lastname, email, judge_active, deleted, MAX(year) FROM users LEFT JOIN users_judge ON users_judge.users_id=users.id