<?php
if($modele['textup']==0) { $bctab .= ' '; }
else if($modele['textup']==1) { $bctab .= $ele_nom[$k].' '.$ele_prenom[$k]; }
else if($modele['textup']==4) { $bctab .= $ele_nom[$k].' '.$ele_prenom[$k].' - '.$ele_div[$k]; }
else if($modele['textup']==2) { $bctab .= $etab_bc; }
else if($modele['textup']==3) { 
	$textep = $modele['textspe'];
	$textep = str_replace(array_keys(BARCODELEMS), array_values(BARCODELEMS), $textep);
	$replacements = [
        '[NAME]'    => $ele_nom[$k],
        '[FORNAME]' => $ele_prenom[$k],        
    ];
    $textep = str_replace(array_keys($replacements), array_values($replacements), $textep);
	$textep = str_replace('[div]',$ele_div[$k],$textep);
	$textep = str_replace('[etab]',$etab_bc,$textep);
	$textep = str_replace('[br]','<br>',$textep);
	$textep = htmlspecialchars_decode($textep, ENT_QUOTES);
	$bctab .= stripslashes($textep); } 
if($modele['type']=='C128B'||$modele['type']=='EAN128B'||$modele['type']=='EAN13'||$modele['type']=='QR') {
	$bctab .= '<br>';
	$bctab .= '<barcode code="'.$ele_cod[$k].'" type="'.$modele['type'].'" class="barcode" />';
	if($modele['type']!='EAN13') {
		$bctab .= '<br>'.$ele_cod[$k];
	}
}
else if($modele['type']=='codeseul') {
	$bctab .= '<br>'.$ele_cod[$k];
}
?>