diff --git a/admin/committee_reports.php b/admin/committee_reports.php deleted file mode 100644 index 958f9c3..0000000 --- a/admin/committee_reports.php +++ /dev/null @@ -1,300 +0,0 @@ - - Copyright (C) 2005 James Grant - Copyright (C) 2007 David Grant - - 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. -*/ -?> - "committee_main.php") - ); - } else { - send_header("Edit My Reports", - array("Committee Main" => "committee_main.php", - "My Reports" => "admin/committee_reports.php") - ); - } - - /* Load all the users reports */ - $q = mysql_query("SELECT reports_committee.*,reports.name - FROM reports_committee - LEFT JOIN reports ON reports.id=reports_committee.reports_id - WHERE users_id='{$_SESSION['users_id']}' - ORDER BY category,id"); - echo mysql_error(); - if(mysql_num_rows($q) == 0) { - echo i18n('You have no reports saved'); - } else { - /* List each report with info */ - - if($edit_mode == true) { - echo i18n('Deleting all the reports from a category will also delete the category.'); - echo '
'; - echo '
'; - echo ''.i18n('Click here when you are finished editing your report list').''; - echo '
'; - echo '
'; - } - - echo ''; - $last_category = ''; - $x=0; - while($i = mysql_fetch_object($q)) { - $trclass = ($x % 2 == 0) ? "even" : "odd"; - $x++; - if($last_category != $i->category) { - /* New category */ - echo '

'; - if($edit_mode == true) echo i18n('Category').': '; - echo "{$i->category}

"; - $last_category = $i->category; - } - - if($i->reports_id > 0) { - $name = $i->name; - $url = "admin/reports_gen.php?id={$i->reports_id}&show_options=1"; - } else { - $name = $report_custom[-$i->reports_id]['name']; - $url = $report_custom[-$i->reports_id]['custom_url']; - } - - if($edit_mode == false) - $name = "$name"; - - echo "
"; - - echo "'; - -/* - if($i->reports_id > 0) { - echo ''; - } -*/ - - echo ""; - echo "
"; - if($edit_mode == true) - echo "id}\">\"Remove "; - echo $name.'
'; - echo ''; - echo i18n('Format').": {$i->format}, "; - echo i18n('Paper').": {$report_stock[$i->stock]['name']}, "; - echo i18n('Year').": {$config['FAIRYEAR']}"; - echo ''; - echo '
{$i->comment}
"; - } - - } - - /* Load available reports */ - $reports = report_load_all(); - - if($edit_mode == false) { - echo '
'; - echo ''.i18n('Click here to edit your Report List').''; - - echo '
'; - echo "

".i18n("All Reports")."

"; - - /* Print all the reports in a pulldown menu for generation */ - echo "
"; - echo ""; - echo ""; - echo "
"; - echo "
"; - - send_footer(); - exit; - } - - echo '
'; - - ?> - - '.i18n('Add a Report to your Report List').''; - echo "
"; - echo ""; - echo "\n"; - echo '"; - - echo ""; - - /* Load the full specific report */ - if($reports_id > 0) $report = report_load($reports_id); - $option_keys = array('type','stock'); - foreach($report_options as $ok=>$o) { - if(!in_array($ok, $option_keys)) continue; - echo ""; - echo ""; - } - echo ""; - echo ""; - - - echo '
'; - echo "
Category:"; - $q = mysql_query("SELECT DISTINCT category FROM reports_committee - WHERE users_id='{$_SESSION['users_id']}' - ORDER BY category"); - - echo "Existing Category:
"; - echo "OR New Category: "; - echo "
{$o['desc']}:
Comments:"; - echo "
'; - - - - echo '
'; - echo '

Descriptions for All Reports

'; - echo i18n('Click on the report number to try the report with the default report options before you add it to your Report List'); - echo '

'; - echo "\n"; - $x=0; - foreach(array_merge($reports, $report_custom) as $r) { - $trclass = ($x % 2 == 0) ? "even" : "odd"; - $x++; - echo ""; - if($r['custom_url'] == '') { - $url = "admin/reports_gen.php?id={$r['id']}"; - } else { - $url = $r['custom_url']; - } - echo ""; - echo ""; - } - -echo "
$x."; - - echo ""; - echo ""; - echo ""; - echo "
{$r['name']}Created By: {$r['creator']}
{$r['desc']}
"; - - echo "
"; - -send_footer(); -?> diff --git a/admin/index.php b/admin/index.php index 063537e..8ae9da9 100644 --- a/admin/index.php +++ b/admin/index.php @@ -34,6 +34,7 @@ echo "
"; echo "".i18n("Participant Registration")."
"; echo "".i18n("Print / Export Reports")."
"; + echo "".i18n("Print Award Ceremony Scripts")."
"; echo "
"; echo "".i18n("Committee Management")."
"; echo "".i18n("Awards Management")."
"; diff --git a/admin/reports.inc.php b/admin/reports.inc.php index 9cf54b3..4d7311f 100644 --- a/admin/reports.inc.php +++ b/admin/reports.inc.php @@ -250,6 +250,16 @@ foreach($report_stock as $n=>$v) { 'desc' => 'Award Winners', 'custom_url' => 'admin/reports_acpresentation.php?type=csv', 'creator' => 'The Grant Brothers'); + $x++; + $report_custom[$x] = array('id' => $x, 'name' => 'Custom -- Available Tours (CSV)', + 'desc' => 'Available Tours', + 'custom_url' => 'admin/reports_tours.php?type=csv', + 'creator' => 'The Grant Brothers'); + $x++; + $report_custom[$x] = array('id' => $x, 'name' => 'Custom -- Participant Tour Choices (CSV)', + 'desc' => 'Participant Tour Choices', + 'custom_url' => 'admin/reports_tour_selection.php?type=csv', + 'creator' => 'The Grant Brothers'); function report_save_field($report, $type, $loc) { diff --git a/admin/reports.php b/admin/reports.php index b77b22a..fcf89af 100644 --- a/admin/reports.php +++ b/admin/reports.php @@ -5,6 +5,7 @@ Copyright (C) 2005 Sci-Tech Ontario Inc Copyright (C) 2005 James Grant + Copyright (C) 2007 David Grant This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public @@ -22,163 +23,284 @@ */ ?> 'committee_main.php', - 'Administration' => 'admin/index.php') - ); - echo "
"; + require_once("reports.inc.php"); - $id = intval($_POST['id']); - echo "

".i18n("All Reports")."

"; - echo "
"; - echo ""; + echo ""; + echo "
"; + echo "
"; + + send_footer(); + exit; + } + + echo '
'; + + ?> + + '.i18n('Add a Report to your Report List').''; + echo "
"; + echo ""; + echo "\n"; + echo '"; -//lets split this up by age category, -/* -$catq=mysql_query("SELECT * FROM projectcategories WHERE year='".$config['FAIRYEAR']."' ORDER BY id"); -while($catr=mysql_fetch_object($catq)) -{ - echo ""; -} -*/ - echo "
"; - echo i18n("Mailing Labels").": "; - echo "".i18n("Mailing Label Generator").""; + echo ""; - echo "
"; - echo i18n("Student Emergency Contact Names/Numbers").": "; - echo "PDF   "; - echo "CSV   "; - echo "
"; - echo i18n("Students/Projects From Each School").": "; - echo "PDF   "; - echo "CSV   "; - - echo "
"; - echo i18n("Project Logistical Requirements (tables, electricity)").": "; - echo "PDF   "; - echo "CSV   "; - echo "
"; - - echo i18n("Project Table Labels").": "; - echo "PDF   "; - echo "
"; - - echo i18n("Project Summary Details").": "; - echo "PDF   "; - echo "
"; - echo i18n("Nametags").": "; - echo "Students PDF   "; - echo "Students CSV   "; - echo "Judges PDF   "; - echo "Judges CSV   "; - echo "Committee PDF   "; - echo "Committee CSV   "; - - echo "
"; - echo "
"; - echo i18n("Judges List").": "; - echo "Judge List (CSV)   "; - - echo "
"; - echo i18n("Judging Teams").": "; - echo "List (CSV)   "; - echo "List (PDF)   "; - echo "Team Awards (CSV)   "; - echo "Team Awards (PDF)   "; - - echo "
"; - echo i18n("Judging Teams Project Assignments").": "; - echo "CSV   "; - echo "PDF   "; - - echo "
"; - echo i18n("Projects Judging Team Assignments").": "; - echo "CSV   "; - echo "PDF   "; - - echo "
"; - echo i18n("Project Identification Labels (for judging sheets)").": "; - echo "PDF   "; - echo "
"; - echo "
"; + /* Load the full specific report */ + if($reports_id > 0) $report = report_load($reports_id); + $option_keys = array('type','stock'); + foreach($report_options as $ok=>$o) { + if(!in_array($ok, $option_keys)) continue; + echo ""; + echo ""; + } + echo ""; + echo ""; - echo i18n("Awards list for Program").": "; - echo "CSV   "; - - - echo "
"; - echo i18n("Award Ceremony Script").": "; - echo "FULL PDF  "; - echo "(Divisional)   "; - echo "(Special)   "; - echo "(Interdisciplinary)   "; - echo "(Other)   "; - echo "(Grand)   "; - echo "
"; - echo i18n("Award Ceremony Script").": "; - echo "CSV   "; - echo "
"; - echo "Award Winners CSV   "; - echo "
"; - -if($config['tours_enable'] == 'yes') { - echo "
"; - echo "
"; - echo i18n("Available Tours").": "; - echo "CSV   "; - echo "
"; - echo i18n("Participant Tour Choices").": "; - echo "CSV   "; - echo "
"; -// echo i18n("Tour Volunteers").": "; -// echo "CSV   "; -// echo "
"; -} + echo '
'; + echo ""; - echo ""; - echo ""; - echo ""; - echo "
"; - echo "
"; - - - echo "

".i18n("Custom Reports")."

"; -/* - echo i18n("Day of Fair Registration/Checkin Forms (All Categories)").": "; - echo "PDF   "; - echo "CSV   "; - */ + echo "
"; - echo "id\">$catr->category (PDF)   "; - echo "
"; - echo "id\">$catr->category (CSV)   "; - echo "
Category:"; + $q = mysql_query("SELECT DISTINCT category FROM reports_committee + WHERE users_id='{$_SESSION['users_id']}' + ORDER BY category"); - echo "
"; - echo "
"; - echo i18n("School Access Codes").": "; - echo "PDF   "; - echo "CSV   "; -// echo "PDF   "; -// echo "CSV   "; + echo "Existing Category:
"; + echo "OR New Category: "; + echo "
{$o['desc']}:
Comments:"; + echo "
'; - send_footer(); + + echo '
'; + echo '

Descriptions for All Reports

'; + echo i18n('Click on the report number to try the report with the default report options before you add it to your Report List'); + echo '

'; + echo "\n"; + $x=0; + foreach(array_merge($reports, $report_custom) as $r) { + $trclass = ($x % 2 == 0) ? "even" : "odd"; + $x++; + echo ""; + if($r['custom_url'] == '') { + $url = "admin/reports_gen.php?id={$r['id']}"; + } else { + $url = $r['custom_url']; + } + echo ""; + echo ""; + } + +echo "
$x."; + + echo ""; + echo ""; + echo ""; + echo "
{$r['name']}Created By: {$r['creator']}
{$r['desc']}
"; + + echo "
"; + +send_footer(); ?> diff --git a/admin/reports_old.php b/admin/reports_old.php new file mode 100644 index 0000000..322c9db --- /dev/null +++ b/admin/reports_old.php @@ -0,0 +1,185 @@ + + Copyright (C) 2005 James Grant + + 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. +*/ +?> + 'committee_main.php', + 'Administration' => 'admin/index.php') + ); + echo "
"; + echo error('This page will no longer be available after Summer 2008. Please use the new \'My Reports\' interface. '); + + $id = intval($_POST['id']); + echo "

".i18n("All Reports")."

"; + echo "
"; + echo ""; + echo ""; + echo ""; + echo "
"; + echo "
"; + echo "
"; + + + echo "

".i18n("Custom Reports")."

"; + +/* + echo i18n("Day of Fair Registration/Checkin Forms (All Categories)").": "; + echo "PDF   "; + echo "CSV   "; + */ + +//lets split this up by age category, +/* +$catq=mysql_query("SELECT * FROM projectcategories WHERE year='".$config['FAIRYEAR']."' ORDER BY id"); +while($catr=mysql_fetch_object($catq)) +{ + echo ""; + echo "id\">$catr->category (PDF)   "; + echo "
"; + echo "id\">$catr->category (CSV)   "; + echo ""; +} +*/ + echo "
"; + echo i18n("Mailing Labels").": "; + echo "".i18n("Mailing Label Generator").""; + + echo "
"; + echo "
"; + echo i18n("School Access Codes").": "; + echo "PDF   "; + echo "CSV   "; +// echo "PDF   "; +// echo "CSV   "; + + echo "
"; + echo i18n("Student Emergency Contact Names/Numbers").": "; + echo "PDF   "; + echo "CSV   "; + echo "
"; + echo i18n("Students/Projects From Each School").": "; + echo "PDF   "; + echo "CSV   "; + + echo "
"; + echo i18n("Project Logistical Requirements (tables, electricity)").": "; + echo "PDF   "; + echo "CSV   "; + echo "
"; + + echo i18n("Project Table Labels").": "; + echo "PDF   "; + echo "
"; + + echo i18n("Project Summary Details").": "; + echo "PDF   "; + echo "
"; + echo i18n("Nametags").": "; + echo "Students PDF   "; + echo "Students CSV   "; + echo "Judges PDF   "; + echo "Judges CSV   "; + echo "Committee PDF   "; + echo "Committee CSV   "; + + echo "
"; + echo "
"; + echo i18n("Judges List").": "; + echo "Judge List (CSV)   "; + + echo "
"; + echo i18n("Judging Teams").": "; + echo "List (CSV)   "; + echo "List (PDF)   "; + echo "Team Awards (CSV)   "; + echo "Team Awards (PDF)   "; + + echo "
"; + echo i18n("Judging Teams Project Assignments").": "; + echo "CSV   "; + echo "PDF   "; + + echo "
"; + echo i18n("Projects Judging Team Assignments").": "; + echo "CSV   "; + echo "PDF   "; + + echo "
"; + echo i18n("Project Identification Labels (for judging sheets)").": "; + echo "PDF   "; + echo "
"; + echo "
"; + + + echo i18n("Awards list for Program").": "; + echo "CSV   "; + + + echo "
"; + echo i18n("Award Ceremony Script").": "; + echo "FULL PDF  "; + echo "(Divisional)   "; + echo "(Special)   "; + echo "(Interdisciplinary)   "; + echo "(Other)   "; + echo "(Grand)   "; + echo "
"; + echo i18n("Award Ceremony Script").": "; + echo "CSV   "; + echo "
"; + echo "Award Winners CSV   "; + echo "
"; + +if($config['tours_enable'] == 'yes') { + echo "
"; + echo "
"; + echo i18n("Available Tours").": "; + echo "CSV   "; + echo "
"; + echo i18n("Participant Tour Choices").": "; + echo "CSV   "; + echo "
"; +// echo i18n("Tour Volunteers").": "; +// echo "CSV   "; +// echo "
"; +} + + + send_footer(); +?> diff --git a/committee_main.php b/committee_main.php index 2248420..2f53450 100644 --- a/committee_main.php +++ b/committee_main.php @@ -52,7 +52,7 @@ echo '