Ejemplo n.º 1
0
 public function preparePdf()
 {
     $genPdf = new FPDF();
     $recipients = Campaign::getRecipients($this->group);
     $genPdf->AddPage();
     $genPdf->SetFont('Arial', 'B', "9px");
     foreach ($recipients as &$recipient) {
         if (!is_null($recipient->getHash($this->id))) {
             $genPdf->Cell("100%", "12px", $this->name . " Voter: " . $recipient->getName(), "LBT", 0);
             $genPdf->Cell("95%", "12px", "Hash: " . $recipient->getHash($this->getId()), "RBT", 1, 'R');
         }
     }
     $genPdf->Output();
     $genPdf->Close();
 }
Ejemplo n.º 2
0
 public function recipTopLevelAdmin()
 {
     if ($this->user->hasPerm('viewcampaign')) {
         $recipients = Campaign::getRecipients($this->user->getAuthGroup());
         $this->smarty->assign('recipients', $recipients);
         return $this->smarty->fetch('admin/campaign_recips.tpl');
     }
     return $this->smarty->fetch('../../../cms/templates/error.tpl');
 }