Exemplo n.º 1
0
 //Création du compte
 $oCompte = new Compte();
 $oCompte->cpt_id = $cptId;
 $oCompte->cpt_nom = $_REQUEST['cptNom'];
 $oCompte->cpt_com = $_REQUEST['cptCom'];
 $oCompte->cpt_code = $_REQUEST['cptCode'];
 //Modification du compte
 $updCpt = CompteManager::updCompte($oCompte);
 //echo "Mise à jour du bon check : $updCpt ";
 $oPersonne = new Personne();
 $oPersonne->civ_id = $_REQUEST['civilite'];
 $oPersonne->cpt_id = $cptId;
 $oPersonne->prs_dtn = $_REQUEST['prsDtn'];
 $oPersonne->prs_prenom1 = $_REQUEST['prsPrenom1'];
 $oPersonne->prs_prenom2 = $_REQUEST['prsPrenom2'];
 $updPrs = PersonneManager::updPersonne($oPersonne);
 //-----------------Gestion des lignes du formulaire-------------------------
 //Création des tableaux contenant toutes les informations
 //Un tableau par type de champs
 $resLigMail = ['mail_id' => $_REQUEST['mailId'], 'mail_lbl' => $_REQUEST['mailLbl'], 'mail_adr' => $_REQUEST['mailAdr']];
 $resLigTel = ['tel_id' => $_REQUEST['telId'], 'tel_lbl' => $_REQUEST['telLbl'], 'tel_ind' => $_REQUEST['telInd'], 'tel_num' => $_REQUEST['telNum']];
 $resLigAdr = ['adr_id' => $_REQUEST['adrId'], 'adr_lbl' => $_REQUEST['adrLbl'], 'adr_num' => $_REQUEST['adrNum'], 'adr_voie' => $_REQUEST['adrVoie'], 'adr_rue1' => $_REQUEST['adrRue1'], 'adr_rue2' => $_REQUEST['adrRue2'], 'adr_rue3' => $_REQUEST['adrRue3'], 'adr_cp' => $_REQUEST['adrCp'], 'adr_ville' => $_REQUEST['adrVille'], 'adr_etat' => $_REQUEST['adrEtat'], 'pays_id' => $_REQUEST['paysId']];
 //Tableau pour la suppression de ligne
 //Ce tableau est un tableau à deux dimensions
 //la premiere est une clé associative contenant 'adr', 'tel', ou 'mail', le second
 //contient l'id de l'élément à supprimer
 if (isset($_REQUEST['ligSupp'])) {
     $tLigSupp = $_REQUEST['ligSupp'];
 }
 //On traite les lignes de mails
 //On prend mail_id comme témoin