diff --git a/admin/reports_acscript.php b/admin/reports_acscript.php index 8ef766cd..0df978bf 100644 --- a/admin/reports_acscript.php +++ b/admin/reports_acscript.php @@ -18,6 +18,18 @@ if($_GET['show_unawarded_prizes']=="on") $show_unawarded_prizes="yes"; else $show_unawarded_prizes="no"; + $show_pronunciation= ($_GET['show_pronunciation'] == 'on') ? TRUE : FALSE; + + if(is_array($_GET['show_category'])) { + $show_category = array(); + foreach($_GET['show_category'] as $id=>$val) { + $show_category[] = "projects.projectcategories_id='$id'"; + } + $and_categories = join(' OR ', $show_category); + } else { + $and_categories = '1'; + } + $type=$_GET['type']; if(!$type) $type="pdf"; @@ -72,6 +84,7 @@ winners.projects_id, projects.projectnumber, projects.title, + projects.projectcategories_id, projects.registrations_id AS reg_id FROM award_prizes @@ -81,6 +94,7 @@ award_awards_id='$r->id' AND award_prizes.year='$foryear' AND award_prizes.excludefromac='0' + AND ($and_categories) ORDER BY `order`"); echo mysql_error(); @@ -142,6 +156,7 @@ $sq=mysql_query("SELECT students.firstname, students.lastname, + students.pronunciation, students.schools_id, schools.school FROM @@ -154,17 +169,25 @@ $students=" Students: "; $studnum=0; + $pronounce = ""; while($studentinfo=mysql_fetch_object($sq)) { if($studnum>0) $students.=", "; $students.="$studentinfo->firstname $studentinfo->lastname"; + + if($studnum>0) $pronounce .= ", "; + $pronounce .= "\"{$studentinfo->pronunciation}\""; + $studnum++; //we will assume that they are coming from the same school, so lets just grab the last students school //and use it. $school=$studentinfo->school; } + $rep->addText($students); + if(trim($pronounce) != '' && $show_pronunciation == TRUE) + $rep->addText("Pronunciation: $pronounce"); $rep->addText(" School: $school"); } else diff --git a/admin/reports_ceremony.php b/admin/reports_ceremony.php index bf43a961..ac99ec22 100644 --- a/admin/reports_ceremony.php +++ b/admin/reports_ceremony.php @@ -68,6 +68,17 @@ echo ""; echo "".i18n("Show prizes without winners").":"; echo ""; + echo "".i18n("Show student name pronunciation").":"; + echo ""; + + echo "".i18n("Include the following age categories").":"; + echo ""; + $q=mysql_query("SELECT * FROM projectcategories WHERE year='{$config['FAIRYEAR']}' ORDER BY id"); + while($r=mysql_fetch_object($q)) { + echo "id}]\" type=\"checkbox\" checked=\"checked\" />"; + echo "".i18n($r->category)."
"; + } + echo ""; echo "";