diff --git a/admin/registration_list.php b/admin/registration_list.php index 841a648..ec91c8a 100644 --- a/admin/registration_list.php +++ b/admin/registration_list.php @@ -27,6 +27,9 @@ user_auth_required('committee', 'admin'); require("../register_participants.inc.php"); + if($_GET['year']) $year=$_GET['year']; + else $year=$config['FAIRYEAR']; + send_header("Registration List and Statistics", array('Committee Main' => 'committee_main.php', 'Administration' => 'admin/index.php', @@ -81,11 +84,11 @@ function openstudentinfo(id) echo ""; echo ""; -$q=mysql_query("SELECT * FROM projectcategories WHERE year='".$config['FAIRYEAR']."' ORDER BY id"); +$q=mysql_query("SELECT * FROM projectcategories WHERE year='$year' ORDER BY id"); while($r=mysql_fetch_object($q)) $cats[$r->id]=$r->category; -$q=mysql_query("SELECT * FROM projectdivisions WHERE year='".$config['FAIRYEAR']."' ORDER BY id"); +$q=mysql_query("SELECT * FROM projectdivisions WHERE year='$year' ORDER BY id"); while($r=mysql_fetch_object($q)) $divs[$r->id]=$r->division; @@ -116,7 +119,7 @@ else $wherestatus=""; left outer join projects on projects.registrations_id=registrations.id WHERE 1 - AND registrations.year='".$config['FAIRYEAR']."' + AND registrations.year='$year' $wherestatus ORDER BY $ORDERBY @@ -177,6 +180,7 @@ else $wherestatus=""; students.lastname, students.id, schools.school, + schools.board, schools.id AS schools_id FROM students,schools @@ -197,7 +201,7 @@ else $wherestatus=""; $stats_totalstudents++; $stats_students_catdiv[$r->projectcategories_id][$r->projectdivisions_id]++; $stats_students_schools[$r->projectcategories_id][$studentinfo->schools_id]++; - $schools_names[$studentinfo->schools_id]=$studentinfo->school; + $schools_names[$studentinfo->schools_id]=$studentinfo->school." ($studentinfo->board)"; $lastschoolid=$studentinfo->schools_id; } //this really isnt right, its only taking the school from the last student in the project to count towards the school's project totals @@ -206,9 +210,11 @@ else $wherestatus=""; echo "