";
foreach($options as $ok=>$o) {
diff --git a/admin/reports_judges.inc.php b/admin/reports_judges.inc.php
index 79407749..0c3a876d 100644
--- a/admin/reports_judges.inc.php
+++ b/admin/reports_judges.inc.php
@@ -104,7 +104,7 @@ $report_judges_fields = array(
'width' => 0.75,
'table' => "GROUP_CONCAT(judges_languages.languages_lang ORDER BY judges_languages.languages_lang SEPARATOR ' ')",
'group_by' => array('judges.id'),
- 'select_component' => array('languages')),
+ 'components' => array('languages')),
'captain' => array(
'name' => 'Judge Team -- Captain?',
@@ -112,21 +112,21 @@ $report_judges_fields = array(
'width' => 0.5,
'table' => 'judges_teams_link.captain',
'value_map' => array ('no' => 'No', 'yes' => 'Yes'),
- 'select_component' => array('teams')),
+ 'components' => array('teams')),
'team' => array(
'name' => 'Judge Team -- Name',
'header' => 'Team Name',
'width' => 3.0,
'table' => 'judges_teams.name',
- 'select_component' => array('teams')),
+ 'components' => array('teams')),
'teamnum' => array(
'name' => 'Judge Team -- Team Number',
'header' => 'Team',
'width' => 0.5,
'table' => 'judges_teams.num',
- 'select_component' => array('teams')),
+ 'components' => array('teams')),
'complete' => array(
'name' => 'Judge -- Registration Complete',
diff --git a/admin/reports_judges_new.php b/admin/reports_judges_new.php
deleted file mode 100644
index bec71ef3..00000000
--- a/admin/reports_judges_new.php
+++ /dev/null
@@ -1,258 +0,0 @@
-
-/*
- This file is part of the 'Science Fair In A Box' project
- SFIAB Website: http://www.sfiab.ca
-
- Copyright (C) 2005 Sci-Tech Ontario Inc
- 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.
-*/
-?>
-
- require("../common.inc.php");
- auth_required('admin');
- require("../lpdf.php");
- require("../ltxt.php");
- require("../lcsv.php");
- require("../questions.inc.php");
-
-
-$fields = array( 'id' => i18n('Judge ID'),
- 'firstname' => i18n("Last Name"),
- 'lastname' => i18n("First Name"),
- 'email' => i18n("Email"),
- 'homephone' => i18n("Phone Home"),
- 'workphone' => i18n("Phone Work"),
- 'workphoneext' => i18n("Phone Work Ext"),
- 'cellphone' => i18n("Phone Cell"),
- 'languages' => i18n("Languages"),
- 'organization' => i18n("Organization"),
- 'address' => i18n("Address"),
- 'city' => i18n("City"),
- 'province' => i18n("Province"),
- 'postalcode' => i18n("Postal Code"),
- 'questions' => i18n("Judging Questions Responses"),
- 'expertise_other' => i18n("Expertise Other")
- );
-
-
-
-if(!$_GET['type']) $type="csv";
-else $type=$_GET['type'];
-
-if($type=="pdf")
-{
- $rep=new lpdf( i18n($config['fairname']),
- i18n("Judge List"),
- $_SERVER['DOCUMENT_ROOT'].$config['SFIABDIRECTORY']."/data/logo-200.gif"
- );
-
- $rep->newPage();
- $rep->setFontSize(11);
-}
-else if($type=="csv")
-{
- $rep=new lcsv(i18n("Judge List"));
-}
-else if($type=="txt")
-{
- $rep = new ltxt(i18n("Judge List"));
-}
-
-$table=array();
-$table['header']=array( i18n("ID"),
- i18n("Last Name"),
- i18n("First Name"),
- i18n("Email"),
- i18n("Phone Home"),
- i18n("Phone Work"),
- i18n("Phone Work Ext"),
- i18n("Phone Cell"),
- i18n("Languages"),
- i18n("Organization"),
- i18n("Address 1"),
- i18n("Address 2"),
- i18n("City"),
- i18n("Province"),
- i18n("Postal Code"),
- i18n("Highest PostSecDeg"),
- i18n("Professional Quals"),
- i18n("Expertise Other"));
-
-/* Append headers for all the custom questions */
-$qs=questions_load_questions('judgereg', $config['FAIRYEAR']);
-$keys = array_keys($qs);
-foreach($keys as $qid) {
- $table['header'][] = i18n($qs[$qid]['db_heading']);
-}
-
-
-//grab the list of divisions, because the last fields of the table will be the sub-divisions
-$q=mysql_query("SELECT * FROM projectcategories WHERE year='".$config['FAIRYEAR']."' ORDER BY id");
-$numcats=mysql_num_rows($q);
-$catheadings=array();
-while($r=mysql_fetch_object($q))
-{
- $cats[]=$r->id;
- $catheadings[]="$r->category (out of 5)";
-}
-//grab the list of divisions, because the last fields of the table will be the sub-divisions
-$q=mysql_query("SELECT * FROM projectdivisions WHERE year='".$config['FAIRYEAR']."' ORDER BY id");
-$divheadings=array();
-while($r=mysql_fetch_object($q))
-{
- $divs[]=$r->id;
- $divheadings[]="$r->division (out of 5)";
- $divheadings[]="$r->division subdivisions";
-}
-
-//now append the arrays together
-$table['header']=array_merge($table['header'],array_merge($catheadings,$divheadings));
-
-
-//fill these in if we ever make this PDFable
-$table['widths']=array();
-$table['dataalign']=array();
-
-$q=mysql_query("SELECT
- judges.*
- FROM
- judges,
- judges_years
- WHERE
- judges.complete='yes' AND
- judges_years.year='".$config['FAIRYEAR']."' AND
- judges.id=judges_years.judges_id
- ORDER BY
- lastname,
- firstname");
-while($r=mysql_fetch_object($q))
-{
- $expertise_other=str_replace("\n"," ",$r->expertise_other);
- $expertise_other=str_replace("\r","",$expertise_other);
-
- $subdivq=mysql_query("SELECT judges_expertise.*,
- projectsubdivisions.subdivision,
- projectsubdivisions.projectdivisions_id AS parent_id
- FROM judges_expertise
- LEFT JOIN projectsubdivisions ON judges_expertise.projectsubdivisions_id=projectsubdivisions.id
- WHERE
- judges_id='$r->id' AND
- judges_expertise.year='".$config['FAIRYEAR']."'
- ORDER BY
- projectdivisions_id,
- projectsubdivisions_id");
- if(isset($judge_divs)) unset($judge_divs); $judge_divs=array();
- if(isset($judge_subdivs)) unset($judge_subdivs); $judge_subdivs=array();
- if(isset($divdata)) unset($divdata); $divdata=array();
- if(isset($catdata)) unset($catdata); $catdata=array();
-
- while($subdivr=mysql_fetch_object($subdivq))
- {
- if($subdivr->projectdivisions_id)
- {
- $judge_divs[$subdivr->projectdivisions_id]=$subdivr->val;
- }
- else
- $judge_subdivs[$subdivr->parent_id][]=$subdivr->subdivision;
- }
-
-
- foreach($divs as $div)
- {
- $divdata[]=$judge_divs[$div];
- if(count($judge_subdivs[$div]))
- $divdata[]=implode(",",$judge_subdivs[$div]);
- else
- $divdata[]="";
- }
-
-
- $catprefq=mysql_query("SELECT judges_catpref.rank, projectcategories.category
- FROM judges_catpref,
- projectcategories
- WHERE
- projectcategories.year='".$config['FAIRYEAR']."' AND
- judges_catpref.year='".$config['FAIRYEAR']."' AND
- judges_catpref.judges_id='".$r->id."' AND
- judges_catpref.projectcategories_id=projectcategories.id
- ORDER BY
- judges_catpref.projectcategories_id");
- if(mysql_num_rows($catprefq)!=$numcats)
- {
- //somethings messed up, we're missing data or have too much, so we really cant draw any conclusions from the data we have
- //so instead, we will simply blank these out to 0
- for($x=0;$x<$numcats;$x++)
- $catdata[]=0;
-
- }
- else
- {
- while($cr=mysql_fetch_object($catprefq))
- {
- //this is stored in teh db as -2 ... +2 so if we add 2 we get a nice 0 ... 5
- $catdata[]=$cr->rank+2;
- }
- }
-
- $languages="";
- //and finally, grab their languages
- $langq=mysql_query("SELECT * FROM judges_languages WHERE judges_id='".$r->id."' ORDER BY languages_lang");
- while($langr=mysql_fetch_object($langq))
- $languages.=$langr->languages_lang."/";
- //stip off the last /
- $languages=substr($languages,0,-1);
-
-// print_r($judge_divs);
-// print_r($judge_subdivs);
-
- $qarray = array();
- $qans = questions_load_answers('judgereg', $r->id, $config['FAIRYEAR']);
- $keys = array_keys($qans);
- foreach($keys as $qid) {
- $qarray[] = $qans[$qid];
- }
-
- $tmp=array(
- $r->id,
- $r->lastname,
- $r->firstname,
- $r->email,
- $r->phonehome,
- $r->phonework,
- $r->phoneworkext,
- $r->phonecell,
- $languages,
- $r->organization,
- $r->address,
- $r->address2,
- $r->city,
- $r->province,
- $r->postalcode,
- $r->highest_psd,
- $r->professional_quals,
- $expertise_other
- );
- $tmp = array_merge($tmp, $qarray);
-
- $extradata=array_merge($catdata,$divdata);
- $table['data'][]=array_merge($tmp,$extradata);
-}
-
-$rep->addTable($table);
-$rep->output();
-
-?>
diff --git a/admin/reports_nametags_committee.php b/admin/reports_nametags_committee.php
deleted file mode 100644
index dbeba48d..00000000
--- a/admin/reports_nametags_committee.php
+++ /dev/null
@@ -1,132 +0,0 @@
-
-/*
- This file is part of the 'Science Fair In A Box' project
- SFIAB Website: http://www.sfiab.ca
-
- Copyright (C) 2005 Sci-Tech Ontario Inc
- 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.
-*/
-?>
-
- require("../common.inc.php");
- auth_required('admin');
- require("../lpdf.php");
- require("../lcsv.php");
-
- if($type=="pdf")
- {
- $card_width=4;
- $card_height=3;
-
- $rep=new lpdf( i18n($config['fairname']),
- "Committee Nametags",
- $_SERVER['DOCUMENT_ROOT'].$config['SFIABDIRECTORY']."/data/logo-200.gif"
- );
-
- $rep->setPageStyle("nametags");
- $rep->newPage(8.5,11);
- $rep->setNametagDimensions($card_width,$card_height);
- $rep->setFontSize(11);
- }
- else if($type=="csv") {
- $rep=new lcsv(i18n("Committee Nametags"));
- }
- $q=mysql_query("SELECT
- name,
- organization
- FROM
- committees_members
- WHERE
- deleted='N'
- ORDER BY
- name
- ");
-//
-/*
- this is 4x3" on my screen, so i'll use it to figure
- out what it should look like in a semi-proporational
- layout.
-
-***********************************************************
-* *
-* -------- *
-* | | [ NAME OF THE SCIENCE FAIR GOES HERE ] *
-* | logo | *
-* | | [ NAME OF THE FAIR IN FRENCH GOES HERE ] *
-* | | *
-* -------- *
-* *
-* *
-* [ ] *
-* [ THE STUDENTS NAME IN BIG LETTERS ] *
-* [ ] *
-* *
-* *
-* [ ] *
-* [ PROJECT TITLE GOES HERE ALSO FAIRLY BIG ] *
-* [ ] *
-* *
-* *
-* [ CATEGORY / DIVISION ] *
-* *
-* *
-* PROJECT NUMBER *
-* *
-* *
-***********************************************************
-
-
-on the page we have tagnum layout like this:
-
- 1 2
- 3 4
- 5 6
-
-*/
-
- if($type=="csv")
- {
- $table=array();
- $table['header'] = array(i18n("Name"),i18n("Organization"));
- }
-
- while($r=mysql_fetch_object($q))
- {
- if($type=="pdf")
- {
- $rep->newNametag();
- $rep->setFontSize(18);
- $rep->addNametagText(0.25,"$r->name");
- $rep->setFontSize(14);
- $rep->addNametagText(0.90,"Committee");
- $rep->setFontSize(12);
- $rep->addNametagText(1.5,$r->organization);
- }
- else if($type=="csv")
- {
- $table['data'][]=array($r->name, $r->organization);
- }
- }
-
- if($type=="csv")
- {
- $rep->addTable($table);
- }
-
- $rep->output();
-
-?>
diff --git a/admin/reports_nametags_judges.php b/admin/reports_nametags_judges.php
deleted file mode 100644
index 1593baff..00000000
--- a/admin/reports_nametags_judges.php
+++ /dev/null
@@ -1,139 +0,0 @@
-
-/*
- This file is part of the 'Science Fair In A Box' project
- SFIAB Website: http://www.sfiab.ca
-
- Copyright (C) 2005 Sci-Tech Ontario Inc
- 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.
-*/
-?>
-
- require("../common.inc.php");
- auth_required('admin');
- require("../lpdf.php");
- require("../lcsv.php");
-
- if($type=="pdf")
- {
- $card_width=4;
- $card_height=3;
-
- $rep=new lpdf( i18n($config['fairname']),
- "Judge Nametags",
- $_SERVER['DOCUMENT_ROOT'].$config['SFIABDIRECTORY']."/data/logo-200.gif"
- );
-
- $rep->setPageStyle("nametags");
- $rep->newPage(8.5,11);
- $rep->setNametagDimensions($card_width,$card_height);
- $rep->setFontSize(11);
-
- }
- else if($type=="csv")
- {
- $rep=new lcsv(i18n("Judge Nametags"));
- }
- $q=mysql_query("SELECT
- judges.firstname,
- judges.lastname,
- judges.organization
- FROM
- judges,
- judges_years
- WHERE
- judges.complete='yes' AND
- judges_years.year='".$config['FAIRYEAR']."' AND
- judges.id=judges_years.judges_id
- ORDER BY
- judges.lastname, judges.firstname
- ");
-//
-/*
- this is 4x3" on my screen, so i'll use it to figure
- out what it should look like in a semi-proporational
- layout.
-
-***********************************************************
-* *
-* -------- *
-* | | [ NAME OF THE SCIENCE FAIR GOES HERE ] *
-* | logo | *
-* | | [ NAME OF THE FAIR IN FRENCH GOES HERE ] *
-* | | *
-* -------- *
-* *
-* *
-* [ ] *
-* [ THE STUDENTS NAME IN BIG LETTERS ] *
-* [ ] *
-* *
-* *
-* [ ] *
-* [ PROJECT TITLE GOES HERE ALSO FAIRLY BIG ] *
-* [ ] *
-* *
-* *
-* [ CATEGORY / DIVISION ] *
-* *
-* *
-* PROJECT NUMBER *
-* *
-* *
-***********************************************************
-
-
-on the page we have tagnum layout like this:
-
- 1 2
- 3 4
- 5 6
-
-*/
-
- if($type=="csv")
- {
- $table=array();
- $table['header'] = array(i18n("First Name"),i18n("Last Name"),i18n("Organization"));
- }
-
- while($r=mysql_fetch_object($q))
- {
- if($type=="pdf")
- {
- $rep->newNametag();
- $rep->setFontSize(18);
- $rep->addNametagText(0.25,"$r->firstname $r->lastname");
- $rep->setFontSize(14);
- $rep->addNametagText(0.90,"Judge");
- $rep->setFontSize(12);
- $rep->addNametagText(1.5,$r->organization);
- }
- else if($type=="csv")
- {
- $table['data'][]=array($r->firstname, $r->lastname, $r->organization);
- }
-
- }
-
- if($type=="csv")
- {
- $rep->addTable($table);
- }
-
- $rep->output();
-
-?>
diff --git a/admin/reports_nametags_students.php b/admin/reports_nametags_students.php
deleted file mode 100644
index 6ebcb585..00000000
--- a/admin/reports_nametags_students.php
+++ /dev/null
@@ -1,258 +0,0 @@
-
-/*
- This file is part of the 'Science Fair In A Box' project
- SFIAB Website: http://www.sfiab.ca
-
- Copyright (C) 2005 Sci-Tech Ontario Inc
- 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.
-*/
-?>
-
- require("../common.inc.php");
- auth_required('admin');
- require("../lpdf.php");
- require("../lcsv.php");
-
- $type=$_POST['type'];
- if($type == "")
- {
- $type = $_GET['type'];
- }
-
- $title=$_POST['title'];
- $projectnumber=$_POST['projectnumber'];
- $firstname=$_POST['firstname'];
- $lastname=$_POST['lastname'];
- $category=$_POST['category'];
- $division=$_POST['division'];
-
- if($title == "" && $projectnumber == "" && $firstname == "" && $lastnmae == "" && $category == "" && $division == "")
- {
-
- send_header("Administration - Reports");
- echo "<< ".i18n("Back to Administration")." ";
- echo "<< ".i18n("Back to Reports")." ";
- echo " ";
- echo "
";
- echo i18n("Please select which fields you would like displayed on the name tags").": ";
- echo "
";
-
- /*
- We need to prompt them for the fields. We will display check boxes for
- every field. By default all of the fields are checked.
- */
- echo "\n\n";
- echo "\n";
-
- send_footer();
-
-
- }
- else
- {
- if($type=="pdf")
- {
- $card_width=4;
- $card_height=3;
-
- $rep=new lpdf( i18n($config['fairname']),
- "Student Nametags",
- $_SERVER['DOCUMENT_ROOT'].$config['SFIABDIRECTORY']."/data/logo-200.gif"
- );
-
- $rep->setPageStyle("nametags");
- $rep->newPage(8.5,11);
- $rep->setNametagDimensions($card_width,$card_height);
- $rep->setFontSize(11);
- }
- else if($type=="csv")
- {
- $rep=new lcsv(i18n("Student Nametags"));
- }
- $q=mysql_query("SELECT
- registrations.id AS reg_id,
- registrations.num AS reg_num,
- projects.id,
- projects.title,
- projects.projectnumber,
- projects.projectdivisions_id,
- projects.projectcategories_id,
- projectdivisions.division,
- projectcategories.category,
- students.firstname,
- students.lastname
- FROM
- registrations
- LEFT JOIN projects on projects.registrations_id=registrations.id
- LEFT JOIN projectdivisions ON projectdivisions.id=projects.projectdivisions_id
- LEFT JOIN projectcategories ON projectcategories.id=projects.projectcategories_id
- LEFT JOIN students ON students.registrations_id=registrations.id
-
- WHERE
- projects.year='".$config['FAIRYEAR']."'
- AND projectdivisions.year='".$config['FAIRYEAR']."'
- AND projectcategories.year='".$config['FAIRYEAR']."'
- AND ( registrations.status='complete' OR registrations.status='paymentpending' )
- ORDER BY
- projects.projectnumber
- ");
- echo mysql_error();
-//
-/*
- this is 4x3" on my screen, so i'll use it to figure
- out what it should look like in a semi-proporational
- layout.
-
-***********************************************************
-* *
-* -------- *
-* | | [ NAME OF THE SCIENCE FAIR GOES HERE ] *
-* | logo | *
-* | | [ NAME OF THE FAIR IN FRENCH GOES HERE ] *
-* | | *
-* -------- *
-* *
-* *
-* [ ] *
-* [ THE STUDENTS NAME IN BIG LETTERS ] *
-* [ ] *
-* *
-* *
-* [ ] *
-* [ PROJECT TITLE GOES HERE ALSO FAIRLY BIG ] *
-* [ ] *
-* *
-* *
-* [ CATEGORY / DIVISION ] *
-* *
-* *
-* PROJECT NUMBER *
-* *
-* *
-***********************************************************
-
-
-on the page we have tagnum layout like this:
-
- 1 2
- 3 4
- 5 6
-
-*/
- if($type=="csv")
- {
- $table=array();
- $table['header'] = array(i18n("First Name"),i18n("Last Name"),i18n("Project Title"),i18n("Category"),i18n("Division"),i18n("Project Number"));
- }
-
- while($r=mysql_fetch_object($q))
- {
- if($type=="pdf")
- {
- $rep->newNametag();
- $rep->setFontSize(18);
- $studentName = " ";
- if($firstname && $lastname)
- $studentName = "$r->firstname $r->lastname";
- else if($firstname)
- $studentName = "$r->firstname";
- else if($lastname)
- $studentName = "$r->lastname";
-
- $rep->addNametagText(0.0,"$studentName");
- $rep->setFontSize(14);
-
- if($title)
- $rep->addNametagText(0.75,"$r->title");
- else
- $rep->addNametagText(0.75," ");
-
- $rep->setFontSize(12);
-
- $categoryDivision = " ";
- if($category && $division)
- $categoryDivision = $r->category." - ".$r->division;
- else if($category)
- $categoryDivision = $r->category;
- else if($division)
- $categoryDivision = $r->division;
-
- $rep->addNametagText(1.5,$categoryDivision);
-
- $rep->setFontSize(16);
- if($projectnumber)
- $rep->addNametagText(1.75,"# $r->projectnumber");
- else
- $rep->addNametagText(1.75," ");
-
- }
- else if($type=="csv")
- {
- $table['data'][]=array($r->firstname, $r->lastname, $r->title, $r->category, $r->division, $r->projectnumber);
- }
-
- }
- if($type=="csv")
- {
- $rep->addTable($table);
- }
-
- $rep->output();
-
- } // Close the if-statement that governs whether or not to display the fields
-
-?>
diff --git a/admin/reports_projects_judgingstickers.php b/admin/reports_projects_judgingstickers.php
deleted file mode 100644
index 5b60bcdf..00000000
--- a/admin/reports_projects_judgingstickers.php
+++ /dev/null
@@ -1,111 +0,0 @@
-
-/*
- This file is part of the 'Science Fair In A Box' project
- SFIAB Website: http://www.sfiab.ca
-
- Copyright (C) 2007 Sci-Tech Ontario Inc
- Copyright (C) 2007 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.
-*/
-?>
-
- require("../common.inc.php");
- auth_required('admin');
- require("../lpdf.php");
- require("../lcsv.php");
-
-
-$type="pdf";
-
-$reportname="Project Identification Labels";
-
- if($type=="pdf")
- {
- $card_width=4;
- $card_height=1;
- $xspacer=0.08;
- $yspacer=0.08;
- $fontsize=12;
- $rep=new lpdf( i18n($config['fairname']),
- "$reportname",
- $_SERVER['DOCUMENT_ROOT'].$config['SFIABDIRECTORY']."/data/logo-200.gif"
- );
-
- $rep->setPageStyle("labels");
- $rep->newPage(8.5,11);
- $rep->setLabelDimensions($card_width,$card_height,$xspacer,$yspacer,$fontsize);
- }
- else if($type=="csv") {
- $rep=new lcsv(i18n("$reportname "));
- }
-
- $projq=mysql_query("SELECT
- registrations.id AS reg_id,
- registrations.num AS reg_num,
- projects.id,
- projects.title,
- projects.projectnumber,
- projects.projectdivisions_id,
- projects.projectcategories_id,
- projectdivisions.division,
- projectcategories.category
- FROM
- registrations
- LEFT JOIN projectdivisions ON projectdivisions.id=projects.projectdivisions_id
- LEFT JOIN projectcategories ON projectcategories.id=projects.projectcategories_id
- LEFT JOIN projects on projects.registrations_id=registrations.id
-
- WHERE
- projects.year='".$config['FAIRYEAR']."'
- AND projectdivisions.year='".$config['FAIRYEAR']."'
- AND projectcategories.year='".$config['FAIRYEAR']."'
- AND ( registrations.status='complete' OR registrations.status='paymentpending' )
- ORDER BY
- projects.projectnumber
- ");
- echo mysql_error();
-
- if($type=="csv")
- {
- $table=array();
- $table['header'] = array(
- i18n("Project Number"),
- i18n("Project Title"),
- i18n("Division"),
- i18n("Category"));
- }
-
- while($proj=mysql_fetch_object($projq))
- {
- if($type=="pdf")
- {
- $rep->newLabel();
- $rep->addLabelText(.05,$proj->projectnumber);
- $rep->addLabelText(.300,$proj->category." / ".$proj->division);
- $rep->addLabelText(.500,$proj->title);
-
- }
- else if($type=="csv")
- {
- $table['data'][]=array($proj->projectnumber,$proj->title,$proj->division,$proj->category);
- }
- }
-
- if($type=="csv")
- $rep->addTable($table);
-
- $rep->output();
-?>
diff --git a/admin/reports_projects_tablelabels.php b/admin/reports_projects_tablelabels.php
deleted file mode 100644
index 45d7e9d2..00000000
--- a/admin/reports_projects_tablelabels.php
+++ /dev/null
@@ -1,206 +0,0 @@
-
-/*
- This file is part of the 'Science Fair In A Box' project
- SFIAB Website: http://www.sfiab.ca
-
- Copyright (C) 2005 Sci-Tech Ontario Inc
- 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.
-*/
-?>
-
- require("../common.inc.php");
- auth_required('admin');
- require("../lpdf.php");
- require("../lcsv.php");
-
- $type=$_POST['type'];
- $title=$_POST['title'];
- $projectnumber=$_POST['projectnumber'];
- $firstname=$_POST['firstname'];
- $lastname=$_POST['lastname'];
- $category=$_POST['category'];
- $division=$_POST['division'];
-
- if($title == "" && $projectnumber == "" && $firstname == "" && $lastnmae == "" && $category == "" && $division == "")
- {
-
- send_header("Administration - Reports - Table Labels");
- echo "<< ".i18n("Back to Administration")." ";
- echo "<< ".i18n("Back to Reports")." ";
- echo " ";
- echo "
";
- echo i18n("Please select what fields you would like to display on the table labels").": ";
- echo "