- Add the fields for the school access report

- Change the report generator to accept an 'sid' (system report id)
- Use the sid, not the report id, for the custom reports that aren't custom
  reports anymore.
- Use the generator's school access report, not the custom one.
This commit is contained in:
dave 2007-12-08 00:00:26 +00:00
parent 4029fcf563
commit e6b7b3beb0
3 changed files with 44 additions and 42 deletions

View File

@ -82,53 +82,40 @@ while($catr=mysql_fetch_object($catq))
echo "<br />";
echo "<br />";
echo i18n("School Access Codes").": ";
echo "<a href=\"reports_schoolaccesscodes.php?type=pdf\">PDF</a> &nbsp; ";
echo "<a href=\"reports_schoolaccesscodes.php?type=csv\">CSV</a> &nbsp; ";
echo "<a href=\"reports_gen.php?sid=36&type=pdf\">PDF</a> &nbsp; ";
echo "<a href=\"reports_gen.php?sid=36&type=csv\">CSV</a> &nbsp; ";
// echo "<a href=\"reports_schoolaccesscodes.php?type=pdf\">PDF</a> &nbsp; ";
// echo "<a href=\"reports_schoolaccesscodes.php?type=csv\">CSV</a> &nbsp; ";
echo "<br />";
echo i18n("Student Emergency Contact Names/Numbers").": ";
echo "<a href=\"reports_gen.php?id=17&type=pdf\">PDF</a> &nbsp; ";
echo "<a href=\"reports_gen.php?id=17&type=csv\">CSV</a> &nbsp; ";
// echo "<a href=\"reports_emergencycontact.php?type=pdf\">PDF</a> &nbsp; ";
// echo "<a href=\"reports_emergencycontact.php?type=csv\">CSV</a> &nbsp; ";
echo "<a href=\"reports_gen.php?sid=17&type=pdf\">PDF</a> &nbsp; ";
echo "<a href=\"reports_gen.php?sid=17&type=csv\">CSV</a> &nbsp; ";
echo "<br />";
echo i18n("Students/Projects From Each School").": ";
echo "<a href=\"reports_gen.php?id=19&type=pdf\">PDF</a> &nbsp; ";
echo "<a href=\"reports_gen.php?id=19&type=csv\">CSV</a> &nbsp; ";
//cho "<a href=\"reports_schoolprojects.php?type=pdf\">PDF</a> &nbsp; ";
//cho "<a href=\"reports_schoolprojects.php?type=csv\">CSV</a> &nbsp; ";
echo "<a href=\"reports_gen.php?sid=19&type=pdf\">PDF</a> &nbsp; ";
echo "<a href=\"reports_gen.php?sid=19&type=csv\">CSV</a> &nbsp; ";
echo "<br />";
echo i18n("Project Logistical Requirements (tables, electricity)").": ";
echo "<a href=\"reports_gen.php?id=16&type=pdf\">PDF</a> &nbsp; ";
echo "<a href=\"reports_gen.php?id=16&type=csv\">CSV</a> &nbsp; ";
// echo "<a href=\"reports_projects_requirements.php?type=pdf\">PDF</a> &nbsp; ";
// echo "<a href=\"reports_projects_requirements.php?type=csv\">CSV</a> &nbsp; ";
echo "<a href=\"reports_gen.php?sid=16&type=pdf\">PDF</a> &nbsp; ";
echo "<a href=\"reports_gen.php?sid=16&type=csv\">CSV</a> &nbsp; ";
echo "<br />";
echo i18n("Project Table Labels").": ";
echo "<a href=\"reports_gen.php?id=30\">PDF</a> &nbsp; ";
//echo "<a href=\"reports_projects_tablelabels.php?type=pdf\">PDF</a> &nbsp; ";
echo "<a href=\"reports_gen.php?sid=30\">PDF</a> &nbsp; ";
echo "<br />";
echo i18n("Project Summary Details").": ";
echo "<a href=\"reports_projects_details.php?type=pdf\">PDF</a> &nbsp; ";
echo "<br />";
echo i18n("Nametags").": ";
echo "<a href=\"reports_gen.php?id=26\">Students PDF</a> &nbsp; ";
echo "<a href=\"reports_gen.php?id=26&type=csv\">Students CSV</a> &nbsp; ";
echo "<a href=\"reports_gen.php?id=27\">Judges PDF</a> &nbsp; ";
echo "<a href=\"reports_gen.php?id=27&type=csv\">Judges CSV</a> &nbsp; ";
echo "<a href=\"reports_gen.php?id=28\">Committee PDF</a> &nbsp; ";
echo "<a href=\"reports_gen.php?id=28&type=csv\">Committee CSV</a> &nbsp; ";
// echo "<a href=\"reports_nametags_students.php?type=pdf\">Students PDF</a> &nbsp; ";
// echo "<a href=\"reports_nametags_students.php?type=csv\">Students CSV</a> &nbsp; ";
// echo "<a href=\"reports_nametags_judges.php?type=pdf\">Judges PDF</a> &nbsp; ";
// echo "<a href=\"reports_nametags_judges.php?type=csv\">Judges CSV</a> &nbsp; ";
// echo "<a href=\"reports_nametags_committee.php?type=pdf\">Committee PDF</a> &nbsp; ";
// echo "<a href=\"reports_nametags_committee.php?type=csv\">Committee CSV</a> &nbsp; ";
echo "<a href=\"reports_gen.php?sid=26\">Students PDF</a> &nbsp; ";
echo "<a href=\"reports_gen.php?sid=26&type=csv\">Students CSV</a> &nbsp; ";
echo "<a href=\"reports_gen.php?sid=27\">Judges PDF</a> &nbsp; ";
echo "<a href=\"reports_gen.php?sid=27&type=csv\">Judges CSV</a> &nbsp; ";
echo "<a href=\"reports_gen.php?sid=28\">Committee PDF</a> &nbsp; ";
echo "<a href=\"reports_gen.php?sid=28&type=csv\">Committee CSV</a> &nbsp; ";
echo "<br />";
echo "<br />";
@ -137,14 +124,10 @@ while($catr=mysql_fetch_object($catq))
echo "<br />";
echo i18n("Judging Teams").": ";
echo "<a href=\"reports_gen.php?id=21&type=csv\">List (CSV)</a> &nbsp; ";
echo "<a href=\"reports_gen.php?id=21&type=pdf\">List (PDF)</a> &nbsp; ";
echo "<a href=\"reports_gen.php?id=22&type=csv\">Team Awards (CSV)</a> &nbsp; ";
echo "<a href=\"reports_gen.php?id=22&type=pdf\">Team Awards (PDF)</a> &nbsp; ";
//cho "<a href=\"reports_judges_teams.php?type=csv\">List (CSV)</a> &nbsp; ";
//cho "<a href=\"reports_judges_teams.php?type=pdf\">List (PDF)</a> &nbsp; ";
// echo "<a href=\"reports_judges_teams_view.php?type=csv\">Team View (CSV)</a> &nbsp; ";
// echo "<a href=\"reports_judges_teams_view.php?type=pdf\">Team View (PDF)</a> &nbsp; ";
echo "<a href=\"reports_gen.php?sid=21&type=csv\">List (CSV)</a> &nbsp; ";
echo "<a href=\"reports_gen.php?sid=21&type=pdf\">List (PDF)</a> &nbsp; ";
echo "<a href=\"reports_gen.php?sid=22&type=csv\">Team Awards (CSV)</a> &nbsp; ";
echo "<a href=\"reports_gen.php?sid=22&type=pdf\">Team Awards (PDF)</a> &nbsp; ";
echo "<br />";
echo i18n("Judging Teams Project Assignments").": ";
@ -158,8 +141,7 @@ while($catr=mysql_fetch_object($catq))
echo "<br />";
echo i18n("Project Identification Labels (for judging sheets)").": ";
echo "<a href=\"reports_gen.php?id=29\">PDF</a> &nbsp; ";
// echo "<a href=\"reports_projects_judgingstickers.php?type=pdf\">PDF</a> &nbsp; ";
echo "<a href=\"reports_gen.php?sid=29\">PDF</a> &nbsp; ";
echo "<br />";
echo "<br />";

View File

@ -30,10 +30,18 @@
require_once('reports.inc.php');
$id = intval($_GET['id']);
$sid = intval($_GET['sid']);
$format = stripslashes($_GET['type']);
$year = intval($_GET['year']);
if($year < 1000) $year = $config['FAIRYEAR'];
/* If it's a system report, turn that into the actual report id */
if($sid > 0) {
$q = mysql_query("SELECT id FROM reports WHERE system_report_id='$sid'");
$r = mysql_fetch_assoc($q);
$id = $r['id'];
}
if($format == '') $format = NULL;
if($id && $year)

View File

@ -84,8 +84,8 @@ $report_schools_fields = array(
'school_board' => array(
'name' => 'School -- Board ID',
'header' => 'Board',
'width' => 0.75,
'header' => 'School Board',
'width' => 1.0,
'table' => 'schools.board' ),
'school_principal' => array(
@ -133,6 +133,18 @@ $report_schools_fields = array(
'table' => "IF(schools.phone='',schools.scienceheademail,schools.schoolemail)",
'table_sort' => 'schools.schoolemail' ),
'school_accesscode' => array(
'name' => 'School -- Access Code',
'header' => 'Access Code',
'width' => 1.1,
'table' => 'schools.accesscode' ),
'school_registration_password' => array(
'name' => 'School -- Registration Password',
'header' => 'Reg Pass',
'width' => 0.75,
'table' => 'schools.registration_password' ),
);
function report_schools_fromwhere($report, $components)