From e7d436e409266d077c9f3d28eac0e34a8d4243ad Mon Sep 17 00:00:00 2001 From: james Date: Wed, 9 Jan 2008 17:25:30 +0000 Subject: [PATCH] Add ability to communicate (send emails to) - school principals (via schools.schoolemail) - school science heads (via schools.scienceheademail) - teachers (via students.teacheremail) - this year, last year, or all years --- admin/communication.inc.php | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/admin/communication.inc.php b/admin/communication.inc.php index 22d13af..0421f08 100644 --- a/admin/communication.inc.php +++ b/admin/communication.inc.php @@ -1,6 +1,6 @@ array("name"=>"Committee Members (all)","query"=> + "committee_all"=>array("name"=>"Committee members (all)","query"=> "SELECT firstname, lastname, organization, email FROM users WHERE types LIKE '%committee' AND deleted='no'"), "judges_all"=>array("name"=>"Judges from all years","query"=> @@ -27,14 +27,23 @@ "participants_notcomplete_thisyear"=>array("name"=>"Participants not 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' AND registrations.status!='new' ORDER BY students.email"), - "special_award_sponsors_confirmed"=>array("name"=>"Special Award Sponsors (confirmed only)","query"=> + "special_award_sponsors_confirmed"=>array("name"=>"Special award sponsors (confirmed only)","query"=> "SELECT DISTINCT(award_sponsors.id), organization, firstname, lastname, award_contacts.email FROM award_sponsors, award_awards, award_contacts WHERE award_awards.award_sponsors_id=award_sponsors.id AND award_contacts.award_sponsors_id=award_sponsors.id AND award_sponsors.confirmed='yes' AND award_awards.award_types_id='2'"), - "special_award_sponsors_unconfirmed"=>array("name"=>"Special Award Sponsors (unconfirmed only)","query"=> + "special_award_sponsors_unconfirmed"=>array("name"=>"Special award sponsors (unconfirmed only)","query"=> "SELECT DISTINCT(award_sponsors.id), organization, firstname, lastname, award_contacts.email FROM award_sponsors, award_awards, award_contacts WHERE award_awards.award_sponsors_id=award_sponsors.id AND award_contacts.award_sponsors_id=award_sponsors.id AND award_sponsors.confirmed='no' AND award_awards.award_types_id='2'"), - "special_award_sponsors_all"=>array("name"=>"Special Award Sponsors (all)","query"=> + "special_award_sponsors_all"=>array("name"=>"Special award sponsors (all)","query"=> "SELECT DISTINCT(award_sponsors.id), organization, firstname, lastname, award_contacts.email FROM award_sponsors, award_awards, award_contacts WHERE award_awards.award_sponsors_id=award_sponsors.id AND award_contacts.award_sponsors_id=award_sponsors.id AND award_awards.award_types_id='2'"), - + "school_principals"=>array("name"=>"School principals","query"=> + "SELECT school, principal AS name, schoolemail AS email FROM schools WHERE schools.year='".$config['FAIRYEAR']."' AND schoolemail!=''"), + "school_scienceheads"=>array("name"=>"School science heads","query"=> + "SELECT school, sciencehead AS name, scienceheademail AS email FROM schools WHERE schools.year='".$config['FAIRYEAR']."' AND scienceheademail!=''"), + "school_teachers_thisyear"=>array("name"=>"Teachers (as entered by students) this year","query"=> + "SELECT DISTINCT(teacheremail) AS email, teachername AS name FROM students WHERE year='".$config['FAIRYEAR']."' AND teacheremail!=''"), + "school_teachers_lastyear"=>array("name"=>"Teachers (as entered by students) last year","query"=> + "SELECT DISTINCT(teacheremail) AS email, teachername AS name FROM students WHERE year='".($config['FAIRYEAR']-1)."' AND teacheremail!=''"), + "school_teachers_allyears"=>array("name"=>"Teachers (as entered by students) all years","query"=> + "SELECT DISTINCT(teacheremail) AS email, teachername AS name FROM students WHERE teacheremail!=''"), ); ?>