From 331bedc7e71e4be9147aa411a3f37b7bccb5ad12 Mon Sep 17 00:00:00 2001 From: dave Date: Sun, 18 Mar 2007 07:12:49 +0000 Subject: [PATCH] - Delete reports that the new report generator now duplicates --- admin/reports_checkin.php | 126 ------------------------ admin/reports_emergencycontact.php | 115 --------------------- admin/reports_projects_requirements.php | 95 ------------------ admin/reports_schoolprojects.php | 124 ----------------------- 4 files changed, 460 deletions(-) delete mode 100644 admin/reports_checkin.php delete mode 100644 admin/reports_emergencycontact.php delete mode 100644 admin/reports_projects_requirements.php delete mode 100644 admin/reports_schoolprojects.php diff --git a/admin/reports_checkin.php b/admin/reports_checkin.php deleted file mode 100644 index 32e8e7a6..00000000 --- a/admin/reports_checkin.php +++ /dev/null @@ -1,126 +0,0 @@ - - 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. -*/ -?> -category), - $_SERVER['DOCUMENT_ROOT'].$config['SFIABDIRECTORY']."/data/logo-200.gif" - ); - - $rep->newPage(); - $rep->setFontSize(11); - } - else if($type=="csv") - { - $rep=new lcsv(i18n("Checkin List")." - ".i18n($catr->category)); - } - $q=mysql_query("SELECT registrations.id AS reg_id, - registrations.num AS reg_num, - registrations.status, - projects.title, - projects.projectnumber, - projects.projectdivisions_id - FROM - registrations - left outer join projects on projects.registrations_id=registrations.id - WHERE - registrations.year='".$config['FAIRYEAR']."' - AND ( registrations.status='complete' OR registrations.status='paymentpending' ) - AND projects.projectcategories_id='$catr->id' - ORDER BY - projects.title - "); - echo mysql_error(); - - $table=array(); - - //only show the 'paid' column if the regfee > 0. if registration is fee, then we dont care about the 'paid' column! - if($config['regfee']>0) - { - $table['header']=array(i18n("Paid?"),i18n("Proj #"),i18n("Project Title"),i18n("Student(s)"),i18n("Div")); - $table['widths']=array(0.5, 0.6, 3.5, 2.4, 0.5); - $table['dataalign']=array("center","left","left","left","center"); - } - else - { - $table['header']=array(i18n("Proj #"),i18n("Project Title"),i18n("Student(s)"),i18n("Div")); - $table['widths']=array( 0.6, 3.7, 2.7, 0.5); - $table['dataalign']=array("left","left","left","center"); - - } - while($r=mysql_fetch_object($q)) - { - $divq=mysql_query("SELECT division,division_shortform FROM projectdivisions WHERE year='".$config['FAIRYEAR']."' AND id='".$r->projectdivisions_id."'"); - $divr=mysql_fetch_object($divq); - - $sq=mysql_query("SELECT students.firstname, - students.lastname - FROM - students - WHERE - students.registrations_id='$r->reg_id' - "); - - $students=""; - $studnum=0; - while($studentinfo=mysql_fetch_object($sq)) - { - if($studnum>0) $students.=", "; - $students.="$studentinfo->firstname $studentinfo->lastname"; - $studnum++; - } - - //only show the paid column if regfee >0 - if($config['regfee']>0) - { - switch($r->status) - { - case "paymentpending": $status_text="No"; break; - case "complete": $status_text=""; break; - } - $status_text=i18n($status_text); - - $table['data'][]=array($status_text,$r->projectnumber,$r->title,$students,i18n($divr->division_shortform)); - } - else - $table['data'][]=array($r->projectnumber,$r->title,$students,i18n($divr->division_shortform)); - - } - - $rep->addTable($table); - $rep->output(); -} -?> diff --git a/admin/reports_emergencycontact.php b/admin/reports_emergencycontact.php deleted file mode 100644 index f39c778b..00000000 --- a/admin/reports_emergencycontact.php +++ /dev/null @@ -1,115 +0,0 @@ - - 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. -*/ -?> -newPage(); - $rep->setFontSize(10); - } - else if($type=="csv") - { - $rep=new lcsv(i18n("Emergency Contact")." - ".i18n($catr->category)); - } - $q=mysql_query("SELECT students.firstname, - students.lastname, - emergencycontact.firstname AS emerg_firstname, - emergencycontact.lastname AS emerg_lastname, - emergencycontact.relation, - emergencycontact.phone1, - emergencycontact.phone2, - emergencycontact.phone3, - emergencycontact.phone4, - emergencycontact.email, - registrations.status, - projects.title, - projects.projectnumber - FROM - students - left outer join emergencycontact ON students.id=emergencycontact.students_id - left outer join registrations ON students.registrations_id=registrations.id - left outer join projects ON projects.registrations_id=registrations.id - WHERE - registrations.year='".$config['FAIRYEAR']."' - AND ( registrations.status='complete' OR registrations.status='paymentpending' ) - ORDER BY - students.lastname, - students.firstname - "); - echo mysql_error(); - - $table=array(); - - //if its a PDF we'll put each additional phone number on a new line, for CSV, we'll have a column for each - if($type=="pdf") - { - $table['header']=array(i18n("First Name"),i18n("Last Name"),i18n("Emerg First"),i18n("Emerg Last"), i18n("Relation"), i18n("Emerg Phone")); - $table['widths']=array( 1.25, 1.25, 1.25, 1.25, 1, 1.25); - $table['dataalign']=array("left","left","left","left","left","left"); - } - else if($type=="csv") - { - $table['header']=array(i18n("First Name"),i18n("Last Name"),i18n("Emerg First"),i18n("Emerg Last"), i18n("Relation"), i18n("Emerg Phone 1"),i18n("Emerg Phone 2"),i18n("Emerg Phone 3"),i18n("Emerg Phone 4")); - //.widths mean nothing for csv - $table['widths']=array( 1.25, 1.25, 1.25, 1.25, 1, 1.25,1.25,1.25,1.25); - $table['dataalign']=array("left","left","left","left","left","left","left","left","left"); - - } - - while($r=mysql_fetch_object($q)) - { - //put each phone number on a new line, if it exists - if($type=="pdf") - { - $table['data'][]=array($r->firstname,$r->lastname,$r->emerg_firstname,$r->emerg_lastname,$r->relation,$r->phone1); - if($r->phone2) - $table['data'][]=array('','','','','',$r->phone2); - if($r->phone3) - $table['data'][]=array('','','','','',$r->phone3); - if($r->phone4) - $table['data'][]=array('','','','','',$r->phone4); - } - //put all phone numbers on the same line, in their own columns - else if($type=="csv") - { - $table['data'][]=array($r->firstname,$r->lastname,$r->emerg_firstname,$r->emerg_lastname,$r->relation,$r->phone1,$r->phone2,$r->phone3,$r->phone4); - } - - } - - $rep->addTable($table); - $rep->output(); -?> diff --git a/admin/reports_projects_requirements.php b/admin/reports_projects_requirements.php deleted file mode 100644 index 0df8d960..00000000 --- a/admin/reports_projects_requirements.php +++ /dev/null @@ -1,95 +0,0 @@ - - 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. -*/ -?> -newPage(); - $rep->setFontSize(11); - } - else if($type=="csv") - { - $rep=new lcsv(i18n("Project Logistical Requirements")); - } - - $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, - projects.summary, - projects.req_electricity, - projects.req_table, - projects.req_special, - projects.language, - 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(); - - $totalprojects=mysql_num_rows($projq); - $projectcount=0; - - $table=array(); - $table['header']=array(i18n("Proj #"),i18n("Project Title"),i18n("Elec"),i18n("Table"),i18n("Special")); - $table['widths']=array( 0.70, 3, 0.5, .5, 1.75); - while($proj=mysql_fetch_object($projq)) - { - $table['dataalign']=array("center","left","center","center","left"); - $table['data'][]=array($proj->projectnumber,$proj->title,$proj->req_electricity,$proj->req_table,$proj->req_special); - } - - $rep->addTable($table); - unset($table); - $rep->output(); -?> diff --git a/admin/reports_schoolprojects.php b/admin/reports_schoolprojects.php deleted file mode 100644 index 90ed0c1f..00000000 --- a/admin/reports_schoolprojects.php +++ /dev/null @@ -1,124 +0,0 @@ - - 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. -*/ -?> -newPage(); - $rep->setFontSize(11); - } - else if($type=="csv") - { - $rep=new lcsv(i18n("School Projects")); - } - - $projq=mysql_query("SELECT - schools.school, - projects.title, - projects.projectnumber, - registrations.id AS reg_id - FROM - schools, - projects, - registrations, - students - WHERE - projects.registrations_id=registrations.id - AND students.registrations_id=registrations.id - AND students.schools_id=schools.id - AND registrations.year='".$config['FAIRYEAR']."' - AND ( registrations.status='complete' - OR registrations.status='paymentpending' ) - ORDER BY school,projectnumber - "); - - echo mysql_Error(); - $oldschool="nothing"; - $first=true; - $havealready=array(); - while($proj=mysql_fetch_object($projq)) - { - if(in_array($proj->reg_id,$havealready)) - continue; - else - $havealready[]=$proj->reg_id; - - $sq=mysql_query("SELECT students.firstname, - students.lastname - FROM - students - WHERE - students.registrations_id='$proj->reg_id' - "); - - $students=""; - $studnum=0; - while($studentinfo=mysql_fetch_object($sq)) - { - if($studnum>0) $students.=", "; - $students.="$studentinfo->firstname $studentinfo->lastname"; - $studnum++; - } - if($oldschool!=$proj->school) - { - if(!$first) - { - $rep->addTable($table); - unset($table); - $rep->newPage(); - } - - $rep->heading($proj->school); - $rep->nextline(); - $oldschool=$proj->school; - $table=array(); - $table['header']=array(i18n("Proj Num"),i18n("Project Title"),i18n("Students")); - $table['widths']=array( 0.8, 3.75, 2.75); - $table['dataalign']=array("left","left","left"); - $first=false; - } - - $table['data'][]=array($proj->projectnumber,$proj->title,$students); - } - //we only add the table if there something to add, otherwise, the report must still be blank - if(is_array($table)) - { - $rep->addTable($table); - unset($table); - } - - $rep->output(); -?>