Example #1
0
     }
     echo '[{"text" : "' . $texte . '</table>" , "pdf" : "' . $textPdf . '"}]';
     break;
     /**
      * CASE generating the pdf of items to rennew
      */
 /**
  * CASE generating the pdf of items to rennew
  */
 case "generate_renewal_pdf":
     //Prepare the PDF file
     include $_SESSION['settings']['cpassman_dir'] . '/includes/libraries/Pdf/Tfpdf/tfpdf.class.php';
     $pdf = new tFPDF();
     //Add font for utf-8
     $pdf->AddFont('DejaVu', '', 'DejaVuSansCondensed.ttf', true);
     $pdf->aliasNbPages();
     $pdf->addPage();
     $pdf->SetFont('DejaVu', '', 16);
     $pdf->Cell(0, 10, $LANG['renewal_needed_pdf_title'], 0, 1, 'C', false);
     $pdf->SetFont('DejaVu', '', 12);
     $pdf->Cell(0, 10, $LANG['pdf_del_date'] . date($_SESSION['settings']['date_format'] . " " . $_SESSION['settings']['time_format'], time()), 0, 1, 'C', false);
     $pdf->SetFont('DejaVu', '', 10);
     $pdf->SetFillColor(192, 192, 192);
     $pdf->cell(70, 6, $LANG['label'], 1, 0, "C", 1);
     $pdf->cell(25, 6, $LANG['creation_date'], 1, 0, "C", 1);
     $pdf->cell(25, 6, $LANG['expiration_date'], 1, 0, "C", 1);
     $pdf->cell(45, 6, $LANG['group'], 1, 0, "C", 1);
     $pdf->cell(25, 6, $LANG['author'], 1, 1, "C", 1);
     $pdf->SetFont('DejaVu', '', 9);
     foreach (explode('@|@', addslashes($_POST['text'])) as $line) {
         $elem = explode('@;@', $line);