예제 #1
0
 $newForma->datedeb_admin = $textDateDeb;
 $newForma->datefin_admin = $textDateFin;
 $newForma->surMesure = $radioMesure;
 $newForma->enligne = $radioEnligne;
 $newForma->numpara = $numpara;
 if (!$numpara) {
     $numpara = $newForma->creerParagraphe();
     $newForma->creerFormation();
     $cree = 1;
 } else {
     $newForma->modifierParagraphe();
     $newForma->modifierFormation();
 }
 if (is_array($selectCateg)) {
     $newForma->listcateg = $selectCateg;
     $newForma->associerFormaCateg();
 }
 if (is_array($selectSscateg)) {
     $newForma->listsscateg = $selectSscateg;
     $newForma->associerFormaSscateg();
 }
 if ($selectFich || isset($_FILES["fileFiche"]['tmp_name']) && $_FILES["fileFiche"]['tmp_name'] != "") {
     if ($selectFich) {
         // on associe une fiche formation existante
         $newForma->numfichier = $selectFich;
         $newForma->associerFichier();
     } else {
         if (isset($_FILES["fileFiche"]['tmp_name']) && $_FILES["fileFiche"]['tmp_name'] != "") {
             // on crée une formation
             $newFiche = new Fichier();
             $newFiche->nomFichier = normaliza(basename($_FILES["fileFiche"]['name']));