From 89bcf64399b4a1e94bb9789a2a797da8b367192a Mon Sep 17 00:00:00 2001 From: james Date: Thu, 17 Mar 2011 22:22:20 +0000 Subject: [PATCH] UPdate to custom mailing label generator, been holding this for over a year in my tree -dont think its even used anymore, but it was useful for ottawa --- admin/reports_mailinglabels_generator.php | 25 +++++++++++++++-------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/admin/reports_mailinglabels_generator.php b/admin/reports_mailinglabels_generator.php index 8580134..5b585fc 100644 --- a/admin/reports_mailinglabels_generator.php +++ b/admin/reports_mailinglabels_generator.php @@ -68,6 +68,7 @@ if($report) case "schools": $q=mysql_query("SELECT schools.school AS name, + schools.board AS board, schools.schoollang, schools.sciencehead AS co, schools.address AS address, @@ -153,17 +154,23 @@ if($report) $coname=i18n("Science Department Head",array(),array(),$r->schoollang); $co=i18n("C/O %1",array($coname),array("Name of person"),$r->schoollang); - } - else $co="C/O $r->co"; - if($_GET['type']=="pdf") - { - $rep->newLabel(); - $rep->mailingLabel($r->name,$co,$r->address,$r->city,$r->province,$r->postalcode); + + $name=$r->name; + if($r->board) + $name.=" [".$r->board."]"; } - else if($_GET['type']=="csv") - { - $table['data'][]=array($r->name,$co,$r->address,$r->city,$r->province,$r->postalcode); + else { + $co="C/O $r->co"; + $name=$r->name; + } + + if($_GET['type']=="pdf") { + $rep->newLabel(); + $rep->mailingLabel($name,$co,$r->address,$r->city,$r->province,$r->postalcode); + } + else if($_GET['type']=="csv") { + $table['data'][]=array($name,$co,$r->address,$r->city,$r->province,$r->postalcode); } }