forked from science-ation/science-ation
- Add active and delete checks to the judges/volunteers
This commit is contained in:
parent
288410457d
commit
411361e351
@ -1,22 +1,22 @@
|
||||
<?
|
||||
$mailqueries=array(
|
||||
"committee_all"=>array("name"=>"Committee members (all)","query"=>
|
||||
"SELECT firstname, lastname, organization, email FROM users WHERE types LIKE '%committee' AND deleted='no'"),
|
||||
"SELECT firstname, lastname, organization, email FROM users WHERE types LIKE '%committee%' AND deleted='no' AND year='{$config['FAIRYEAR']}' "),
|
||||
|
||||
"judges_all"=>array("name"=>"Judges from all years","query"=>
|
||||
"SELECT firstname, lastname, email FROM judges ORDER BY email"),
|
||||
"judges_all"=>array("name"=>"(BROKEN, DO NOT USE) Judges from all years","query"=>
|
||||
"SELECT firstname, lastname, email FROM users WHERE 0 ORDER BY email"),
|
||||
|
||||
"judges_active_thisyear"=>array("name"=>"Judges 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']}' ORDER BY email"),
|
||||
"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_inactive"=>array("name"=>"(BROKEN, DO NOT USE) Judges not active for this year", "query"=>
|
||||
"SELECT DISTINCT(judges.id), firstname, lastname, email FROM judges LEFT JOIN judges_years ON judges_years.judges_id=judges.id WHERE judges_years.year!='".$config['FAIRYEAR']."' ORDER BY email"),
|
||||
|
||||
"judges_active_complete_thisyear"=>array("name"=>"Judges active for this year and complete", "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 users_judge.judge_complete='yes' ORDER BY email"),
|
||||
"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 users_judge.judge_complete='yes' AND deleted='no' AND users_judge.judge_active='yes' ORDER BY email"),
|
||||
|
||||
"judges_active_incomplete_thisyear"=>array("name"=>"Judges active for this year but not complete", "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 users_judge.judge_complete='no' ORDER BY email"),
|
||||
"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 users_judge.judge_complete='no' AND deleted='no' AND users_judge.judge_active='yes' ORDER BY email"),
|
||||
|
||||
"participants_complete_thisyear"=>array("name"=>"Participants complete this year","query"=>
|
||||
"SELECT firstname, lastname, students.email FROM students,registrations WHERE students.registrations_id=registrations.id AND registrations.year='".$config['FAIRYEAR']."' AND ( registrations.status='complete' OR registrations.status='paymentpending') ORDER BY students.email"),
|
||||
@ -53,10 +53,10 @@
|
||||
"SELECT DISTINCT(teacheremail) AS email, teachername AS firstname FROM students WHERE teacheremail!=''"),
|
||||
/* Volunteers */
|
||||
"volunteers_active_complete_thisyear"=>array("name"=>"Volunteers active for this year and complete", "query"=>
|
||||
"SELECT id, firstname, lastname, email FROM users LEFT JOIN users_volunteer ON users_volunteer.users_id=users.id WHERE users.year='{$config['FAIRYEAR']}' AND users_volunteer.volunteer_complete='yes' AND users.types LIKE '%volunteer%' ORDER BY email"),
|
||||
"SELECT id, firstname, lastname, email FROM users LEFT JOIN users_volunteer ON users_volunteer.users_id=users.id WHERE users.year='{$config['FAIRYEAR']}' AND users_volunteer.volunteer_complete='yes' AND users_volunteer.volunteer_active='yes' AND users.deleted='no' AND types LIKE '%volunteer%' ORDER BY email"),
|
||||
|
||||
"volunteers_active_incomplete_thisyear"=>array("name"=>"Volunteers active for this year but not complete", "query"=>
|
||||
"SELECT id, firstname, lastname, email FROM users LEFT JOIN users_volunteer ON users_volunteer.users_id=users.id WHERE users.year='{$config['FAIRYEAR']}' AND users_volunteer.volunteer_complete='no' AND users.types LIKE '%volunteer%' ORDER BY email"),
|
||||
"SELECT id, firstname, lastname, email FROM users LEFT JOIN users_volunteer ON users_volunteer.users_id=users.id WHERE users.year='{$config['FAIRYEAR']}' AND users_volunteer.volunteer_complete='no' AND users_volunteer.volunteer_active='yes' AND users.deleted='no' AND users.types LIKE '%volunteer%' ORDER BY email"),
|
||||
|
||||
);
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user