示例#1
0
 $echantillonsMultidataForm = OutilsMultidataForm::init("echantillonsDonnees", 25, OutilsUrl::composer("compte-rendu", "ajax-saisie-echantillons"), array("choixMedicament", "qteOfferte"));
 // Valider
 $valid = array();
 $valid["dateVisite"] = 1;
 $valid["choixPraticien"] = 1;
 $valid["choixMotif"] = 1;
 $valid["motifAutre"] = 1;
 $valid["bilan"] = 1;
 $valid["echantillons"] = 1;
 // Si Formulaire
 if (OutilsForm::existePostEntrees(array("dateVisite", "choixPraticien", "choixMotif", "bilan"))) {
     $dateVisite = $_POST["dateVisite"];
     $valid["dateVisite"] = OutilsForm::valideDate($dateVisite, time()) ? 1 : 0;
     //
     $choixPraticien = $_POST["choixPraticien"];
     $valid["choixPraticien"] = is_array(GsbModele::getLePraticienDetails($choixPraticien));
     //
     $bilan = $_POST["bilan"];
     $valid["bilan"] = OutilsForm::valideMessage($bilan);
     //
     $remplacant = isset($_POST["remplacant"]);
     $documentation = isset($_POST["documentation"]);
     //
     if (isset($_POST["motifAutre"])) {
         $motifAutre = $_POST["motifAutre"];
         $motifAutreActive = true;
         $choixMotif = "autre-saisie";
         $valid["motifAutre"] = OutilsForm::valideMessage($motifAutre, 128);
     } else {
         $choixMotif = $_POST["choixMotif"];
         $valid["choixMotif"] = $choixMotif >= 0 && count($lesMotifs) > $choixMotif ? 1 : 0;
示例#2
0
     Vue::$title = "Consulter les praticiens";
     Vue::configToDataTable("DataTablePraticien");
     $lesPraticiens = GsbModele::getLesPraticiens();
     $lesPraticiens = GsbModele::getLesPraticiens();
     $lesPraticiensSontVide = count($lesPraticiens) == 0;
     Controleur::composeVue("vues/praticien/liste.php");
     break;
 case "details":
     $lesPraticiens = GsbModele::getLesPraticiens();
     $lesPraticiensSontVide = count($lesPraticiens) == 0;
     $lePraticien = null;
     $lePraticienNum = null;
     $lePraticienPrecedant = null;
     $lePraticienSuivant = null;
     if (isset($_GET["num"])) {
         $lePraticien = GsbModele::getLePraticienDetails($_GET["num"]);
         if ($lePraticien && $lesPraticiens) {
             $lePraticienNum = $lePraticien["PRA_NUM"];
             $lesPraticiensTaille = count($lesPraticiens);
             for ($i = 0; $i < $lesPraticiensTaille; $i++) {
                 if ($lePraticien["PRA_NUM"] == $lesPraticiens[$i]["PRA_NUM"]) {
                     if ($i > 0) {
                         $lePraticienPrecedant = $lesPraticiens[$i - 1];
                     }
                     if ($i + 1 < $lesPraticiensTaille) {
                         $lePraticienSuivant = $lesPraticiens[$i + 1];
                     }
                     break;
                     // Arrète le FOR
                 }
             }