Filename : /home/admin/www/dansemusique.net/statique/util/dyna/init_title_arrays.php
<?php
 
//! @ Remplit les tableaux
function add_in_title_arrays(&$ordered, &$T, &$csv_title, &$f, $n, $m)
{
	$ordered[$f] = $n; $T[$ordered[$f]] = -1; $csv_title[$f++] = $m;
 
	return $f;
}
// Attenion : Si on ajoute un champ, il faut aussi le mettre :
//  * \statique\util\dyna\init_title_arrays.php
//  * \statique\util\dyna\generate_xml_from_csv.php
//  * \statique\util\dyna\uniq_adherents_xslt.php
 
//! @return renvoie le nombre de colonnes
function init_title_arrays(&$ordered, &$T, &$csv_title)
{
   // Traitement de la ligne des titres... 
   $ordered   = array();
   $T         = array();
   $csv_title = array();
 
   // Définition des titres <$csv_title[]> dans le fichier Excel associé à chaque champ <$ordered[]> - \x27
   $f = 1;
 
   $ordered[$f] = 'nom_adherent'               ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Nom de l&rsquo;adh&eacute;rent';
   $ordered[$f] = 'prenom_adherent'            ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Pr&eacute;nom de l&rsquo;adh&eacute;rent';
   $ordered[$f] = 'genre_responsable'          ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Genre';
   $ordered[$f] = 'nom_responsable'            ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Nom du responsable';
   $ordered[$f] = 'prenom_responsable'         ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Pr&eacute;nom du responsable';
   $ordered[$f] = 'date_naissance'             ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'date naissance';
   $ordered[$f] = 'adresse'                    ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Adresse';
   $ordered[$f] = 'code_postal'                ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Code postal';
   $ordered[$f] = 'ville'                      ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Ville';
   $ordered[$f] = 'qualite'                    ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Qualit&eacute;';
   $ordered[$f] = 'tel_fixe'                   ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'T&eacute;l&eacute;phone fixe';
   $ordered[$f] = 'tel_portable_1'             ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'T&eacute;l&eacute;phone portable p&egrave;re';
   $ordered[$f] = 'tel_portable_2'             ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'T&eacute;l&eacute;phone portable m&egrave;re';
   $ordered[$f] = 'tel_portable_adh'           ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'T&eacute;l&eacute;phone portable adh&eacute;rent';
   $ordered[$f] = 'e_mail_1'                   ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'adresse mail';
   $ordered[$f] = 'e_mail_2'                   ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'adresse mail 2';
   $ordered[$f] = 'formule_cours'              ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Formule cours';
   $ordered[$f] = 'duree_cours'                ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Dur&eacute;e du cours';
   $ordered[$f] = 'professeur_cours'           ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Professeur';
   $ordered[$f] = 'cours'                      ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Cours';
   $ordered[$f] = 'salle_cours'                ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'SALLES';
   $ordered[$f] = 'jours_de_cours'             ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'JOURS DE COURS';
   $ordered[$f] = 'creneau_horaire'            ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'CRENEAU HORAIRE1';
   $ordered[$f] = 'rentree_2012_2013'          ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Rentr&eacute;e 2012-2013';
   $ordered[$f] = 'creneau_fm'                 ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Cr&eacute;neau FM';
   $ordered[$f] = 'professeur_fm'              ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Professeur';
   $ordered[$f] = 'creneau_vocal'              ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Cr&eacute;neau Vocal';
   $ordered[$f] = 'professeur_vocal'           ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Professeur';
   $ordered[$f] = 'atelier_1'                  ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Atelier 1';
   $ordered[$f] = 'atelier_2'                  ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Atelier 2';
   $ordered[$f] = 'professeur_atelier'         ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Professeur';
 
   // PAIEMENT
 
   $ordered[$f] = 'mode_paiement_adhesion'     ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Mode'; //'Mode de paiement adh&eacute;sion';
   $ordered[$f] = 'montant_adhesion'           ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Montant adh&eacute;sion';
   $ordered[$f] = 'numero_remise_cheque'       ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'N&deg; de remise'; // 'N&deg; de remise de ch&egrave;ques';
   $ordered[$f] = 'prelevement'                ; $T[$ordered[$f]] = -1; $csv_title[$f++] = '10&euro; prelevement';
   $ordered[$f] = 'formule_paiement_cotisation'; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Formule'; // 'Formule de paiement COTISATION';
   $ordered[$f] = 'montant_cours'              ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Montant cours';
   $ordered[$f] = 'percent_ristoune'           ; $T[$ordered[$f]] = -1; $csv_title[$f++] = '% ristourne'; // ADDED
   $ordered[$f] = 'montant_a_payer'            ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Mt &agrave; payer'; // ADDED
   $ordered[$f] = 'nombre_echeance'            ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'nb &eacute;ch&eacute;ances'; // 'nb &eacute;ch&eacute;ances';
   $ordered[$f] = 'montant_echeance_1'         ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Mt 1'; // 'Montant &eacute;ch&eacute;ance 1';
   $ordered[$f] = 'numero_remise_cheque_1'     ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'N&deg; remise 1'; // 'N&deg; remise &eacute;ch&eacute;ance 1';
   $ordered[$f] = 'montant_echeance_2'         ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Mt 2'; // 'Montant &eacute;ch&eacute;ance 2';
   $ordered[$f] = 'numero_remise_cheque_2'     ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'N&deg; remise 2'; // 'N&deg; remise &eacute;ch&eacute;ance 2';
   $ordered[$f] = 'montant_echeance_3'         ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Mt 3'; // 'Montant &eacute;ch&eacute;ance 3';
   $ordered[$f] = 'numero_remise_cheque_3'     ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'N&deg; remise 3'; // 'N&deg; remise &eacute;ch&eacute;ance 3';
   $ordered[$f] = 'montant_echeance_4'         ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Mt 4'; // 'montant &eacute;ch&eacute;ance 4';
   $ordered[$f] = 'numero_remise_cheque_4'     ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'N&deg; remise 4'; // 'N&deg; remise &eacute;ch&eacute;ance 4';
   $ordered[$f] = 'montant_echeance_5'         ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Mt 5'; 
   $ordered[$f] = 'numero_remise_cheque_5'     ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'N&deg; remise 5'; 
   $ordered[$f] = 'montant_echeance_6'         ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Mt 6'; 
   $ordered[$f] = 'numero_remise_cheque_6'     ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'N&deg; remise 6'; 
   $ordered[$f] = 'montant_echeance_7'         ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Mt 7'; 
   $ordered[$f] = 'numero_remise_cheque_7'     ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'N&deg; remise 7'; 
   $ordered[$f] = 'montant_echeance_8'         ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Mt 8'; 
   $ordered[$f] = 'numero_remise_cheque_8'     ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'N&deg; remise 8'; 
   $ordered[$f] = 'montant_echeance_9'         ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Mt 9'; 
   $ordered[$f] = 'numero_remise_cheque_9'     ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'N&deg; remise 9'; 
   $ordered[$f] = 'montant_echeance_10'         ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Mt 10'; 
   $ordered[$f] = 'numero_remise_cheque_10'     ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'N&deg; remise 10'; 
   $ordered[$f] = 'formule_paiement_complement'; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Formule de paiement COMPLEMENT.';
   $ordered[$f] = 'montant'                    ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Montant';
   $ordered[$f] = 'nombre_echeances'           ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'nombre &eacute;ch&eacute;ance'; // 'nombre  &eacute;ch&eacute;ance';
   $ordered[$f] = 'etat_reglement'             ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'ETAT DE REGLEMENT';
   $ordered[$f] = 'commentaires'               ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'COMMENTAIRES';
   $ordered[$f] = 'adhesion'                   ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Adh&eacute;sion';
   $ordered[$f] = 'reglement_interieur'        ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'R&egrave;glt int&eacute;rieur';
   $ordered[$f] = 'certif'                     ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Certif';
   $ordered[$f] = 'assurance'                  ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Assurance';
   $ordered[$f] = 'photo'                      ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Photo';
   $ordered[$f] = 'enveloppes'                 ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Enveloppes';
   $ordered[$f] = 'statut'                     ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Statut';
   // Nouveaux champs 2012-2013
   $ordered[$f] = 'professeur_danse'           ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Professeur de danse';
   $ordered[$f] = 'duree_danse'                ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Dur&eacute;e';
   $ordered[$f] = 'cours_danse'                ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Type de danse';
   $ordered[$f] = 'niveau_cours_danse_1'       ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Niveau cours danse 1';
   $ordered[$f] = 'jour_de_cours_danse_1'      ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Jour 1 de cours';
   $ordered[$f] = 'creneau_horaire_danse_1'    ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Cr&eacute;neau horaire 1';
   $ordered[$f] = 'niveau_cours_danse_2'       ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Niveau cours danse 2';
   $ordered[$f] = 'jour_de_cours_danse_2'      ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Jour 2 de cours';
   $ordered[$f] = 'creneau_horaire_danse_2'    ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Cr&eacute;neau horaire 2';
   $ordered[$f] = 'costume'                    ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Costume';
   $ordered[$f] = 'licence'                    ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Li cen ce'; 
   $ordered[$f] = 'fiche'                      ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Fiche'; 
   $ordered[$f] = 'engagements'                ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Engagemts'; 
   $ordered[$f] = 'droit_image'                ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Droit image'; 
   $ordered[$f] = 'depart_seul'                ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'D&eacute;part seul';
   $ordered[$f] = 'timbres'                    ; $T[$ordered[$f]] = -1; $csv_title[$f++] = '3 timbres';
   // Nouveaux champs 2013-2014
   $ordered[$f] = 'mode_paiement_cotisation'   ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Mode Paiement'; 
   $ordered[$f] = 'cheque_vacance'             ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Chq vac'; 
   $ordered[$f] = 'manque'                     ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Manque';
   $ordered[$f] = 'liste_adultes'              ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'liste adultes';
   // Nouveaux champs 2014-2015
   $ordered[$f] = 'genre_adherent'             ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'G/F';
   $ordered[$f] = 'age'                        ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Age';
   $ordered[$f] = 'stjean_ext'                 ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Saint-Jean ou Ext&eacute;rieur';
   $ordered[$f] = 'e_mail_ancien'              ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'adresse mail anciens adh&eacute;rents';
   $ordered[$f] = 'niveau'                     ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Niveau';
   $ordered[$f] = 'prix_livre_fm'              ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Prix livre FM'; 
   $ordered[$f] = 'prix_cahier_fm'             ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Prix cahier FM'; 
   $ordered[$f] = 'montant_regle'              ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Mon-tant r&eacute;gl&eacute;';
   $ordered[$f] = 'taille_justau_corps'        ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Taille Justau-corps'; 
   $ordered[$f] = 'taille_1_2_pointes'         ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Taille 1/2 pointes'; 
   $ordered[$f] = 'prix_tenue'                 ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Tarif tenue'; 
   $ordered[$f] = 'musique_danse'              ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'MD'; 
 
   $ordered[$f] = 'next_year_rentree'          ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Rentr&eacute;e 2015-2016';
   $ordered[$f] = 'next_year_jour'             ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Jour 2015-2016';
   $ordered[$f] = 'next_year_horaire_danse'    ; $T[$ordered[$f]] = -1; $csv_title[$f++] = 'Horaire danse 2015-2016';
 
   return $f - 1;
}
 
function debug__csv_title__nb_titles(&$csv_title, &$ordered, $nb_titles)
{
	$hw = fopen("global.csv", "wb");
	//
	fwrite($hw, "1 -> nb_titles=" . $nb_titles . "\r\n");
	//
	for ($c = 1; $c <= $nb_titles; $c++)
	  fwrite($hw, "ordered[" . $c . "]='" . $ordered[$c] . "'; csv_title[" . $c . "]='" . $csv_title[$c] . "'" . "\r\n");
	//
	fclose($hw);
}
 
 
function debug__T_ordered__csv_title__nb_titles(&$T, &$ordered, &$csv_title, $nb_titles)
{
	$hw = fopen("title_array.csv", "wb");
	//
	fwrite($hw, "1 -> nb_titles=" . $nb_titles . "\r\n");
	fwrite($hw, "nb_col=" . $nb_col . "\r\n");
	//
	for ($c = 1; $c <= $nb_titles; $c++)
	  fwrite($hw, "ordered[" . $c . "]=" . $ordered[$c] . "; csv_title[" . $c . "]=" . $csv_title[$c] . "; T[ordered[c]]=" . $T[$ordered[$c]] . "\r\n");
	//
	fclose($hw);
}
 
function debug__row__nb_col(&$row, $nb_col)
{
	$hw = fopen("titres.csv", "wb");
	//
	fwrite($hw, "0 -> < nb_col=" . $nb_col . "\r\n");
	//        
	for ($i = 0; $i < $nb_col; $i++)
	  fwrite($hw, "row[" . $i . "] = " . $row[$i] . "\r\n");
	//
	fclose($hw);
}
 
// 
function get_title_cell_change($trim_cell)
{
// à gauche, toutes les cell (à gauche) pour le title (unique) à droîte qui peut aparaître plusieurs fois.
$local_lut_cell = array(
 
// Modifs Céline 2012-2013 :
'Nom adh&eacute;rent'           => 'Nom de l&rsquo;adh&eacute;rent'          , // nom_adherent 
'Pr&eacute;nom adh&eacute;rent' => 'Pr&eacute;nom de l&rsquo;adh&eacute;rent', // prenom_adherent    
'Nom responsable'               => 'Nom du responsable'                      , // nom_responsable    
'Pr&eacute;nom responsable'     => 'Pr&eacute;nom du responsable'            , // prenom_responsable 
'Formule cours musique'         => 'Formule cours'                           , // formule_cours      
'Jour de cours'                 => 'JOURS DE COURS'                          , // jours_de_cours     
'Cr&eacute;neau horaire'        => 'CRENEAU HORAIRE1'                        , // creneau_horaire   
'Atelier Christophe mardi'      => 'Atelier 1'                               , // atelier_1
'Rentr&eacute;e 2013-2014'      => 'Rentr&eacute;e 2012-2013'                , // rentree_2012_2013 -> rentree_prochaine
'Adh&eacute; sion'              => 'Adh&eacute;sion'                         , // adhesion
'Mode Adh'                      => 'Mode'                                    , // mode_paiement_adhesion
'Mon tant cours'                => 'Montant cours'                           , // montant_cours
'Mode Crs'                      => 'Formule'                                 , // formule_paiement_cotisation
'ETAT'                          => 'ETAT DE REGLEMENT'                       , // etat_reglement
'3 envel.'                      => 'Enveloppes'                              , // enveloppes     
// Modifs Céline 2013-2014 :
'Mode Paie ment'                => 'Mode Paiement'                           , // mode_paiement_cotisation
'Mode Paie-ment'                => 'Mode Paiement'                           , // mode_paiement_cotisation
'Man-que'                       => 'Manque'                                  , // manque
// Modifs Céline 2014-2015 :
'T&eacute;l&eacute;phone portable 1' => 'T&eacute;l&eacute;phone portable p&egrave;re', // tel_portable_pere
'T&eacute;l&eacute;phone portable 2' => 'T&eacute;l&eacute;phone portable m&egrave;re', // tel_portable_mere
'Professeur instrument'         => 'Professeur'                              , // professeur_cours
'Professeur FM'                 => 'Professeur'                              , // professeur_cours
'Professeur chant'              => 'Professeur'                              , // professeur_vocal
'Atelier Christophe'            => 'Atelier 1'                               , // atelier_1
'Niveau cours danse'            => 'Niveau cours danse 1'                    , // niveau_cours_danse_1
'Jour de cours danse'           => 'Jour 1 de cours'                         , // jour_de_cours_danse_1
'Cr&eacute;neau horaire danse'  => 'Cr&eacute;neau horaire 1'                , // creneau_horaire_danse_1
 
);
 
   return $local_lut_cell[$trim_cell];
}
 
 
// compare title with field in cell
function compare_cell_with_title($cell, $title)
{
// print_r($lut_cell);
 
   $trim_cell = trim($cell);
 
   if ($trim_cell == $title)
      return true;
 
//   if (($trim_cell == 'Nom adh&eacute;rent') && ($title == 'Nom de l&rsquo;adh&eacute;rent'))
//      return true;
 
   if (get_title_cell_change($trim_cell) == $title)
	return true;
 
   return false;
}
 
 
// fill $T
function fill_title_arrays(&$ordered, &$T, &$csv_title, $nb_titles, &$row, $nb_col)
{
 /*
   print_r($ordered);
   echo "\n";
   print_r($T);
   echo "\n";
   print_r($csv_title);
   echo "\n";
   print_r($nb_titles);
   echo "\n";
   print_r($row);
   echo "\n";
   print_r($nb_col);
   echo "\n";
 */
 
   $all_is_ok = 1;
 
   // Pour chaque case de la ligne de titre, ...
   for ($i = 0; $i < $nb_col; $i++)
   {
      // echo "row[" . $i . "] = '" . $row[$i] . "' ! " . "\n";
      if ($row[$i] != "")
      {
         $found = 0;
         // ... on sauve sa signification dans le tableau de titres $T
         for ($c = 1; $c <= $nb_titles; $c++)
         {
            if ( compare_cell_with_title($row[$i], $csv_title[$c]) && ($T[$ordered[$c]] == -1) ) 
            {
               $T[$ordered[$c]] = $i;
               $found = 1;
               // echo "Champ trouvé : " . $i . " : '" . $row[$i] . "' ! " . "\n";
               break; 
            }
         }
         //
         // Si titre (non vide) pas trouvé
         if ( ($found == 0) && (trim($row[$i]) != "") )
         {
            // On est dans un tag <pre> ... </pre>
            echo "Nouveau titre (colonne " . ($i + 1) . ") : '" . $row[$i] . "' ! " . "\n";
            $all_is_ok = 0;
         }
      }
   }
 
   if ($all_is_ok == 0)
   {
      echo '<p>Corriger puis relancer ! </p>' . "\n";
      return -1;
   }
 
   // echo '<p>Champs à remplir : </p>' . "\n";
   //
   for ($c = 1; $c <= $nb_titles; $c++)
   {
      if ($T[$ordered[$c]] == -1)
      {
         echo 'WARNING : Champ non rempli : ' . $ordered[$c]  . " : '" . $csv_title[$c] . "' ! " . "\n";
      }
   }
 
   return 0;
}
 
 
?>

    Driven by DokuWiki Recent changes RSS feed        
   
Nous vous rappelons que vous disposez d'un droit d'accès, de modification, de rectification et de suppression des données qui vous concernent. Pour exercer ce droit, adressez-vous au webmaster .