menuvue = new Menuvueutilisateur(); $this->menuvue->getMenuVue('Creerclient'); $this->client = new Client(); $this->sexe = (new Sexe())->getListe(); $this->typeclient = (new Typeclient())->getListe(); $this->pays = (new Pays())->getListe($_SESSION['codePaysSociete']); $this->ville = (new Ville())->getListe($_SESSION['codePaysSociete']); $this->titre = array(); $this->secteuractivite = (new Secteuractivite())->getListe(); $this->localite = new Localite(); $this->langue = new Langue(); $_SESSION['modeDevis'] = "0"; } public function index() { $langue = $this->langue->getListe(); $this->genererVue(array('pays' => $this->pays, 'ville' => $this->ville, 'titre' => $this->titre, 'secteuractivite' => $this->secteuractivite, 'sexe' => $this->sexe, 'typeclient' => $this->typeclient, 'listelocalite' => $this->localite, 'langue' => $langue)); } public function ajouter($prenoms=null) { $codeSociete = $this->requete->getSession()->getAttribut('codeSociete'); $user = $this->requete->getSession()->getAttribut('login'); $dateCre = date("Y-m-d"); $typeClient = $this->requete->getParametre("typeClient"); $codeTitre = $this->requete->getParametre("codeTitre"); $nom = $this->requete->getParametre("nom"); $nom = strtoupper($nom); $prenoms = $this->requete->getParametreFormulaire("prenoms"); $prenoms = strtoupper($prenoms); $adresseGeo = $this->requete->getParametreFormulaire("adresseGeo"); $boitepostale = $this->requete->getParametreFormulaire("boitepostale"); $codeVille = $this->requete->getParametreFormulaire("codeVille"); $codeLocalite = $this->requete->getParametreFormulaire("codeLocalite"); $codePays = $this->requete->getParametreFormulaire("codePays"); $telephoneBureau = $this->requete->getParametreFormulaire("telephoneBureau"); $telephonedomicile = $this->requete->getParametreFormulaire("telephonedomicile"); $telephonePortable = $this->requete->getParametreFormulaire("telephonePortable"); $fax = $this->requete->getParametreFormulaire("fax"); $email = $this->requete->getParametreFormulaire("email"); $sexe = $this->requete->getParametreFormulaire("sexe"); $dateNaissance = $this->requete->getParametreDate("dateNaissance"); $codeSecteur = $this->requete->getParametreFormulaire("codeSecteur"); $codeGestionnaire =""; $nomMandataire = $this->requete->getParametreFormulaire("nomMandataire"); $telephoneFixemandataire = $this->requete->getParametreFormulaire("telephoneFixemandataire"); $telephonePortablemandataire = $this->requete->getParametreFormulaire("telephonePortablemandataire"); $emailMandataire = $this->requete->getParametreFormulaire("emailMandataire"); $registreCommerce = $this->requete->getParametreFormulaire("registreCommerce"); $codeLangueClient = $this->requete->getParametreFormulaire("codeLangueUser"); $dernierNumeroClient = $this->client->getDenierNumeroClient(); $dernierNumeroClient=$dernierNumeroClient+1; if ($this->client->existeligne($dernierNumeroClient)) { $dernierNumeroClient=$dernierNumeroClient+1; } $numeroClient = $dernierNumeroClient; $id = $this->client->ajouter($codeSociete, $numeroClient, $typeClient, $codeTitre, $nom, $prenoms, $adresseGeo, $boitepostale, $codeVille, $codePays, $telephoneBureau, $telephonedomicile, $telephonePortable, $fax, $email, $sexe, $dateNaissance, $codeSecteur, $codeGestionnaire, $nomMandataire, $telephoneFixemandataire, $telephonePortablemandataire, $emailMandataire, $dateCre, $user, $codeLocalite, $registreCommerce, $codeLangueClient); $this->client->setDenierNumeroClient($numeroClient); $_SESSION['idClientAjax'] = $id; // $this->rediriger("Ficheclient/".$id); $this->rediriger("Ficheclient"); } }