forked from science-ation/science-ation
Add ability to get registration list for previous years (only via appending &year=year to the URL) there is currently no user interface to access this feature. Also add the school board in brackets after the school name
This commit is contained in:
parent
4b9d67fffe
commit
6a2683d92d
@ -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 "</select>";
|
||||
echo "</form>";
|
||||
|
||||
$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 "<td>$schools</td>";
|
||||
echo "<td>$students</td>";
|
||||
echo "<td align=\"center\">";
|
||||
if($year==$config['FAIRYEAR']) {
|
||||
echo "<a href=\"registration_list.php?action=delete&delete=$r->reg_id\" onclick=\"return confirmClick('".i18n("Are you sure you want to completely delete this registration?")."');\">";
|
||||
echo "<img src=\"".$config['SFIABDIRECTORY']."/images/16/button_cancel.".$config['icon_extension']."\" border=0>";
|
||||
echo "</a>";
|
||||
}
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user