This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ?> num; echo i18n("Number of schools: %1",array($numberofschools))."
"; //number of schools $q=mysql_query("SELECT DISTINCT(students.schools_id) AS sid FROM students,registrations WHERE students.registrations_id=registrations.id AND students.year='$year' AND registrations.year='$year' AND (registrations.status='complete' OR registrations.status='paymentpending')"); echo mysql_error(); $numberofactiveschools=mysql_num_rows($q); echo i18n("Number of active schools: %1",array($numberofactiveschools))."
"; //total number of students: $q=mysql_query("SELECT COUNT(students.id) AS num FROM students,registrations WHERE students.registrations_id=registrations.id AND students.year='$year' AND registrations.year='$year' AND (registrations.status='complete' OR registrations.status='paymentpending')"); $r=mysql_fetch_object($q); $numberofstudents=$r->num; echo i18n("Number of students: %1",array($numberofstudents))."
"; echo mysql_error(); //number of students per grade per gender $q=mysql_query("SELECT COUNT(students.id) AS num, students.grade, students.sex FROM students,registrations WHERE students.registrations_id=registrations.id AND students.year='$year' AND registrations.year='$year' AND (registrations.status='complete' OR registrations.status='paymentpending') GROUP BY students.grade, students.sex"); echo mysql_error(); while($r=mysql_fetch_object($q)) { if($r->grade<=6) $nums["6down"][$r->sex]+=$r->num; else if($r->grade>6&&$r->grade<=8) $nums["78"][$r->sex]+=$r->num; else if($r->grade>8&&$r->grade<=10) $nums["910"][$r->sex]+=$r->num; else if($r->grade>10) $nums["11up"][$r->sex]+=$r->num; } echo "Student participation (by age group/gender)
"; echo i18n("K-6 Male: %1",array($nums["6down"]["male"]?$nums["6down"]["male"]:0))."
"; echo i18n("K-6 Female: %1",array($nums["6down"]["female"]?$nums["6down"]["female"]:0))."
"; if($nums["6down"][""]>0) echo i18n("K-6 Unknown: %1",array($nums["6down"][""]?$nums["6down"][""]:0))."
"; echo "
"; echo i18n("7-8 Male: %1",array($nums["78"]["male"]?$nums["78"]["male"]:0))."
"; echo i18n("7-8 Female: %1",array($nums["78"]["female"]?$nums["78"]["female"]:0))."
"; if($nums["78"][""]>0) echo i18n("7-8 Unknown: %1",array($nums["78"][""]?$nums["78"][""]:0))."
"; echo "
"; echo i18n("9-10 Male: %1",array($nums["910"]["male"]?$nums["910"]["male"]:0))."
"; echo i18n("9-10 Female: %1",array($nums["910"]["female"]?$nums["910"]["female"]:0))."
"; if($nums["910"][""]>0) echo i18n("9-10 Unknown: %1",array($nums["910"][""]?$nums["910"][""]:0))."
"; echo "
"; echo i18n("11 up Male: %1",array($nums["11up"]["male"]?$nums["11up"]["male"]:0))."
"; echo i18n("11 up Female: %1",array($nums["11up"]["female"]?$nums["11up"]["female"]:0))."
"; if($nums["11up"][""]>0) echo i18n("11 up Unknown: %1",array($nums["11up"][""]?$nums["11up"][""]:0))."
"; echo "
"; send_footer(); ?>