Exemplo n.º 1
0
 public function validerEntreprise($id)
 {
     $this->connexion();
     $statement = $this->connexion->prepare('INSERT INTO entreprise(nomEnt,mdpEnt,typeCreneau,formationsRecherchees,nbRecruteurs,nbPlaces,nbStands,nbRepas,
     mailEnt,nomContact,prenomContact,numTelEnt,codePostal,villeEnt,adresseEnt) SELECT nomEnt,mdpEnt,typeCreneau,formationsRecherchees,nbRecruteurs,nbPlaces,nbStands,nbRepas,
     mailEnt,nomContact,prenomContact,numTelEnt,codePostal,villeEnt,adresseEnt FROM temp_entreprise WHERE IDEnt = ' . $id . ';');
     $statement->execute();
     $statement = $this->connexion->prepare('DELETE FROM temp_entreprise WHERE IDEnt = ' . $id . ';');
     $statement->execute();
     $statement = $this->connexion->prepare('SELECT * FROM entreprise ORDER BY IDEnt DESC LIMIT 1;');
     $statement->execute();
     $ent = $statement->fetch();
     $this->deconnexion();
     $tabConfig = $this->getConfiguration();
     $idEnt = $ent['IDEnt'];
     $formationsRecherchees = $ent['formationsRecherchees'];
     $nbStands = $ent['nbStands'];
     $disponibilite = $ent['typeCreneau'];
     $creationFormation = new Formation($idEnt, $formationsRecherchees, $nbStands, $disponibilite, $tabConfig['nbCreneauxMatin'], $tabConfig['nbCreneauxAprem']);
     $creationFormation->createForm();
     return;
 }