First commit
This commit is contained in:
commit
c6e2478c40
13918 changed files with 2303184 additions and 0 deletions
63
sites/all/modules/civicrm/CRM/Event/Badge/Logo.php
Normal file
63
sites/all/modules/civicrm/CRM/Event/Badge/Logo.php
Normal file
|
@ -0,0 +1,63 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Class CRM_Event_Badge_Logo
|
||||
*/
|
||||
class CRM_Event_Badge_Logo extends CRM_Event_Badge {
|
||||
/**
|
||||
*/
|
||||
public function __construct() {
|
||||
parent::__construct();
|
||||
// A4
|
||||
$pw = 210;
|
||||
$ph = 297;
|
||||
$h = 50;
|
||||
$w = 75;
|
||||
$this->format = array(
|
||||
'name' => 'Sigel 3C',
|
||||
'paper-size' => 'A4',
|
||||
'metric' => 'mm',
|
||||
'lMargin' => ($pw - $w * 2) / 2,
|
||||
'tMargin' => ($ph - $h * 5) / 2,
|
||||
'NX' => 2,
|
||||
'NY' => 5,
|
||||
'SpaceX' => 0,
|
||||
'SpaceY' => 0,
|
||||
'width' => $w,
|
||||
'height' => $h,
|
||||
'font-size' => 12,
|
||||
);
|
||||
$this->lMarginLogo = 20;
|
||||
$this->tMarginName = 20;
|
||||
// $this->setDebug ();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $participant
|
||||
*/
|
||||
public function generateLabel($participant) {
|
||||
$x = $this->pdf->GetAbsX();
|
||||
$y = $this->pdf->GetY();
|
||||
$this->printBackground(TRUE);
|
||||
$this->pdf->SetLineStyle(array(
|
||||
'width' => 0.1,
|
||||
'cap' => 'round',
|
||||
'join' => 'round',
|
||||
'dash' => '2,2',
|
||||
'color' => array(0, 0, 200),
|
||||
));
|
||||
|
||||
$this->pdf->SetFontSize(8);
|
||||
$this->pdf->MultiCell($this->pdf->width - $this->lMarginLogo, 0, $participant['event_title'], $this->border, "L", 0, 1, $x + $this->lMarginLogo, $y);
|
||||
|
||||
$this->pdf->SetXY($x, $y + $this->pdf->height - 5);
|
||||
$date = CRM_Utils_Date::customFormat($participant['event_start_date'], "%e %b");
|
||||
$this->pdf->Cell($this->pdf->width, 0, $date, $this->border, 2, "R");
|
||||
|
||||
$this->pdf->SetFontSize(15);
|
||||
$this->pdf->MultiCell($this->pdf->width, 10, $participant['display_name'], $this->border, "C", 0, 1, $x, $y + $this->tMarginName);
|
||||
$this->pdf->SetFontSize(10);
|
||||
$this->pdf->MultiCell($this->pdf->width, 0, $participant['current_employer'], $this->border, "C", 0, 1, $x, $this->pdf->getY());
|
||||
}
|
||||
|
||||
}
|
63
sites/all/modules/civicrm/CRM/Event/Badge/Logo5395.php
Normal file
63
sites/all/modules/civicrm/CRM/Event/Badge/Logo5395.php
Normal file
|
@ -0,0 +1,63 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Class CRM_Event_Badge_Logo5395
|
||||
*/
|
||||
class CRM_Event_Badge_Logo5395 extends CRM_Event_Badge {
|
||||
/**
|
||||
*/
|
||||
public function __construct() {
|
||||
parent::__construct();
|
||||
// A4
|
||||
$pw = 210;
|
||||
$ph = 297;
|
||||
$h = 59.2;
|
||||
$w = 85.7;
|
||||
$this->format = array(
|
||||
'name' => 'Avery 5395',
|
||||
'paper-size' => 'A4',
|
||||
'metric' => 'mm',
|
||||
'lMargin' => 13.5,
|
||||
'tMargin' => 3,
|
||||
'NX' => 2,
|
||||
'NY' => 4,
|
||||
'SpaceX' => 15,
|
||||
'SpaceY' => 8.5,
|
||||
'width' => $w,
|
||||
'height' => $h,
|
||||
'font-size' => 12,
|
||||
);
|
||||
$this->lMarginLogo = 20;
|
||||
$this->tMarginName = 20;
|
||||
// $this->setDebug ();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $participant
|
||||
*/
|
||||
public function generateLabel($participant) {
|
||||
$x = $this->pdf->GetAbsX();
|
||||
$y = $this->pdf->GetY();
|
||||
$this->printBackground(TRUE);
|
||||
$this->pdf->SetLineStyle(array(
|
||||
'width' => 0.1,
|
||||
'cap' => 'round',
|
||||
'join' => 'round',
|
||||
'dash' => '2,2',
|
||||
'color' => array(0, 0, 200),
|
||||
));
|
||||
|
||||
$this->pdf->SetFontSize(9);
|
||||
$this->pdf->MultiCell($this->pdf->width - $this->lMarginLogo, 0, $participant['event_title'], $this->border, "L", 0, 1, $x + $this->lMarginLogo, $y);
|
||||
|
||||
$this->pdf->SetXY($x, $y + $this->pdf->height - 5);
|
||||
$date = CRM_Utils_Date::customFormat($participant['event_start_date'], "%e %b");
|
||||
$this->pdf->Cell($this->pdf->width, 0, $date, $this->border, 2, "R");
|
||||
|
||||
$this->pdf->SetFontSize(20);
|
||||
$this->pdf->MultiCell($this->pdf->width, 10, $participant['display_name'], $this->border, "C", 0, 1, $x, $y + $this->tMarginName);
|
||||
$this->pdf->SetFontSize(15);
|
||||
$this->pdf->MultiCell($this->pdf->width, 0, $participant['current_employer'], $this->border, "C", 0, 1, $x, $this->pdf->getY());
|
||||
}
|
||||
|
||||
}
|
99
sites/all/modules/civicrm/CRM/Event/Badge/NameTent.php
Normal file
99
sites/all/modules/civicrm/CRM/Event/Badge/NameTent.php
Normal file
|
@ -0,0 +1,99 @@
|
|||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM 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 Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Copyright (C) 2010 Tech To The People
|
||||
* Licensed to CiviCRM under the Academic Free License version 3.0.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @package CRM
|
||||
*
|
||||
*/
|
||||
class CRM_Event_Badge_NameTent extends CRM_Event_Badge {
|
||||
/**
|
||||
*/
|
||||
public function __construct() {
|
||||
parent::__construct();
|
||||
// A4
|
||||
$pw = 297;
|
||||
$ph = 210;
|
||||
$this->lMargin = 10;
|
||||
$this->tMargin = 0;
|
||||
$w = $pw - 2 * $this->lMargin;
|
||||
$h = $ph - 2 * $this->tMargin;
|
||||
$this->format = array(
|
||||
'name' => 'A4 horiz',
|
||||
'paper-size' => 'A4',
|
||||
'metric' => 'mm',
|
||||
'lMargin' => 0,
|
||||
'tMargin' => 0,
|
||||
'NX' => 1,
|
||||
'NY' => 1,
|
||||
'SpaceX' => 0,
|
||||
'SpaceY' => 0,
|
||||
'width' => $w,
|
||||
'height' => $h,
|
||||
'font-size' => 36,
|
||||
);
|
||||
// $this->setDebug ();
|
||||
}
|
||||
|
||||
public function pdfExtraFormat() {
|
||||
$this->pdf->setPageFormat('A4', 'L');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $participant
|
||||
*/
|
||||
protected function writeOneSide(&$participant) {
|
||||
$this->pdf->SetXY(0, $this->pdf->height / 2);
|
||||
$this->printBackground(TRUE);
|
||||
$txt = $participant['display_name'];
|
||||
$this->pdf->SetXY(0, $this->pdf->height / 2 + 20);
|
||||
$this->pdf->SetFontSize(54);
|
||||
$this->pdf->Write(0, $txt, NULL, NULL, 'C');
|
||||
$this->pdf->SetXY(0, $this->pdf->height / 2 + 50);
|
||||
$this->pdf->SetFontSize(36);
|
||||
$this->pdf->Write(0, $participant['current_employer'], NULL, NULL, 'C');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $participant
|
||||
*/
|
||||
public function generateLabel($participant) {
|
||||
$this->writeOneSide($participant);
|
||||
$this->pdf->StartTransform();
|
||||
$this->pdf->Rotate(180, $this->pdf->width / 2 + $this->pdf->marginLeft, $this->pdf->height / 2);
|
||||
$this->writeOneSide($participant);
|
||||
$this->pdf->StopTransform();
|
||||
}
|
||||
|
||||
}
|
62
sites/all/modules/civicrm/CRM/Event/Badge/Simple.php
Normal file
62
sites/all/modules/civicrm/CRM/Event/Badge/Simple.php
Normal file
|
@ -0,0 +1,62 @@
|
|||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM 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 Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Copyright (C) 2010 Tech To The People
|
||||
* Licensed to CiviCRM under the Academic Free License version 3.0.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @package CRM
|
||||
*
|
||||
*/
|
||||
class CRM_Event_Badge_Simple extends CRM_Event_Badge {
|
||||
|
||||
/**
|
||||
* @param $participant
|
||||
*/
|
||||
public function generateLabel($participant) {
|
||||
$date = CRM_Utils_Date::customFormat($participant['event_start_date'], "%e %b");
|
||||
$this->pdf->SetFontSize(8);
|
||||
$y = $this->pdf->GetY();
|
||||
$x = $this->pdf->GetAbsX();
|
||||
$this->pdf->Cell($this->pdf->width, $this->pdf->lineHeight, $participant['event_title'], 0, 1, "L");
|
||||
$this->pdf->SetXY($x, $y + 4);
|
||||
$this->pdf->Cell($this->pdf->width, $this->pdf->lineHeight, $date, 0, 2, "R");
|
||||
$this->pdf->SetFontSize(12);
|
||||
$this->pdf->SetXY($x, $this->pdf->GetY() + 5);
|
||||
$this->pdf->Cell($this->pdf->width, $this->pdf->lineHeight, $participant['display_name'], 0, 2, "C");
|
||||
$this->pdf->SetFontSize(10);
|
||||
$this->pdf->SetXY($x, $this->pdf->GetY() + 2);
|
||||
$this->pdf->Cell($this->pdf->width, $this->pdf->lineHeight, $participant['current_employer'], 0, 2, "C");
|
||||
//$this->pdf->MultiCell ($this->pdf->width, $this->pdf->lineHeight, $txt,1,"L");
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue