get('motdepasse'); } if(isset($_POST['valider'])){ if($contrat == "ok") $contrat = true; else $contrat = false; $condition = $contrat; $condition &= $new_artiste->set("nom",$_POST['nom'],"string","Nom"); $condition &= $new_artiste->set("prenom",$_POST['prenom'],"string","Prénom"); $condition &= $new_artiste->set("datedenaissance",$_POST['datedenaissance'],"date"); $condition &= $new_artiste->set("lieudenaissance",$_POST['lieudenaissance'],"string","Lieu de naissance"); $condition &= $new_artiste->set("adresse",$_POST['adresse'],"string","Adresse"); $condition &= $new_artiste->set("codepostal",$_POST['codepostal'],"postalcode"); $condition &= $new_artiste->set("ville",$_POST['ville'],"string","Ville"); $condition &= $new_artiste->set("pays",$_POST['pays'],"string","Pays"); $condition &= $new_artiste->set("telephone",$_POST['telephone'],"phone","Téléphone *",true); $condition &= $new_artiste->set("portable",$_POST['portable'],"phone","Portable *",true); $condition &= $new_artiste->set("fax",$_POST['fax'],"phone","Fax *",true); $condition &= $new_artiste->set("codebanque",$_POST['codebanque'],"string","Code banque",true); $condition &= $new_artiste->set("codeguichet",$_POST['codeguichet'],"string","Code guichet",true); $condition &= $new_artiste->set("numerocompte",$_POST['numerocompte'],"string","Numero compte",true); $condition &= $new_artiste->set("clerib",$_POST['clerib'],"string","Clé rib",true); $condition &= $new_artiste->set("domiciliation",$_POST['domiciliation'],"string","Domiciliation",true); $condition &= $new_artiste->set("iban",$_POST['iban'],"string","Iban",true); $condition &= $new_artiste->set("bic",$_POST['bic'],"string","Bic",true); $condition &= $new_artiste->set("email",$_POST['email'],"email"); $condition &= $new_artiste->set("motdepasse",$_POST['motdepasse'],"string","Mot de passe"); $condition &= $_POST['confirmation_motdepasse']==$_POST['motdepasse']; if( $condition ) { if(Table_Artiste::Email($_POST['email'],$numero_artiste)){ if( $numero_artiste == 0 || $numero_artiste == "" ){ $resultat = "inscription_ok"; Table_Artiste::ajouter($new_artiste); } else{ $resultat = "modification_ok"; Table_Artiste::modifier($new_artiste); } //if( !$session->ajouterArtiste2($_POST['email'],$_POST['motdepasse']) ) //echo "< ! > : Problème dans l'enregistrement de l'artiste dans la session courante"; }else{ $resultat = "email_existe_deja"; } }else{ $resultat = "erreur_de_saisie"; } } if( $numero_artiste==0 || $numero_artiste=="" ) $mode = "inscription"; else $mode = "modification"; /** ************************************************************************** */ /** ************************* Smarty ***************************************** */ $smarty = new Smarty_HomePage; $smarty->assign("foot1", $foot1); $smarty->assign("foot2", $foot2); $smarty->assign("foot3", $foot3); $smarty->assign("foot4", marqueur_xiti2($nom_page)); $smarty->assign("artiste", $new_artiste); $smarty->assign("mode", $mode); $smarty->assign("confirmation_motdepasse", $confirmation_motdepasse); $smarty->assign("resultat", $resultat); $smarty->assign("contrat", $contrat); $smarty->display("InscriptionArtiste.tpl"); DestroyObject ("session"); DestroyObject ("new_artiste"); DestroyObject ("smarty"); /** ************************************************************************** */ ?>