} if (empty($model) || $model == '-1') { $mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DescADHERENT_CARD_TYPE")); } if (!$mesg) { $result = members_card_pdf_create($db, $arrayofmembers, $model, $outputlangs); } } elseif ($mode == 'label') { if (!count($arrayofmembers)) { $mesg = $langs->trans("ErrorRecordNotFound"); } if (empty($modellabel) || $modellabel == '-1') { $mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DescADHERENT_ETIQUETTE_TYPE")); } if (!$mesg) { $result = members_label_pdf_create($db, $arrayofmembers, $modellabel, $outputlangs); } } if ($result <= 0) { dol_print_error('', $result); } } else { dol_print_error($db); } if (!$mesg) { $db->close(); exit; } } /* * View
for ($i = 0; $i < $numberofsticker; $i++) { $arrayofmembers[] = array('textleft' => $textleft, 'textheader' => $textheader, 'textfooter' => $textfooter, 'textright' => $textright, 'code' => $code, 'encoding' => $encoding, 'is2d' => $is2d, 'photo' => $barcodeimage); } } $i++; $mesg = ''; // Build and output PDF if ($mode == 'label') { if (!count($arrayofmembers)) { $mesg = $langs->trans("ErrorRecordNotFound"); } if (empty($modellabel) || $modellabel == '-1') { $mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DescADHERENT_ETIQUETTE_TYPE")); } if (!$mesg) { $result = members_label_pdf_create($db, $arrayofmembers, $modellabel, $outputlangs, $diroutput, $template); } } if ($result <= 0) { dol_print_error('', $result); } if (!$mesg) { $db->close(); exit; } } } /* * View */ if (empty($conf->barcode->enabled)) {