\n"; } if ($affiche) { debut_cadre_enfonce(); echo $affiche; fin_cadre_enfonce(); } } // recupere les valeurs postees pour reconstituer l'extra function extra_recup_saisie($type) { $champs = $GLOBALS['champs_extra'][$type]; if (is_array($champs)) { $extra = Array(); while(list($champ,)=each($champs)) $extra[$champ]=$GLOBALS["suppl_$champ"]; return serialize($extra); } else return ''; } // Retourne la liste des filtres a appliquer pour un champ extra particulier function extra_filtres($type, $nom_champ) { $champ = $GLOBALS['champs_extra'][$type][$nom_champ]; if (!$champ) return array();; list(, $filtre, ) = explode("|", $champ); if ($filtre && $filtre != 'brut' && function_exists($filtre)) return array($filtre); return array(); } function extra_champ_valide($type, $nom_champ) { return isset($GLOBALS['champs_extra'][$type][$nom_champ]); } // a partir de la liste des champs, generer l'affichage function extra_affichage($extra, $type) { $extra = unserialize ($extra); if (!is_array($extra)) return; $champs = $GLOBALS['champs_extra'][$type]; while (list($nom,$contenu) = each($extra)) { list($type, $filtre, $prettyname) = explode("|", $champs[$nom]); if ($filtre != 'brut' AND function_exists($filtre)) $contenu = $filtre($contenu); if (!$prettyname) $prettyname = ucfirst($nom); if ($contenu) $affiche .= "