예제 #1
0
 public function testRDVStat()
 {
     $this->assertEquals(StatsRepo::getRDVStat(2)['NombreRDV'], 2);
     $this->assertEquals(StatsRepo::getRDVStat(2)['DureeTotale'], 120);
 }
예제 #2
0
    if ($medecinOpt == $MEDECIN['Id']) {
        echo "<option value='" . $MEDECIN['Id'] . "' selected>" . $MEDECIN['Nom'] . " " . $MEDECIN['Prenom'] . "</option>";
    } else {
        echo "<option value='" . $MEDECIN['Id'] . "'>" . $MEDECIN['Nom'] . " " . $MEDECIN['Prenom'] . "</option>";
    }
}
?>
						</select>

						<input id="sbCherche" name="submit" type="submit" value="Lancer la recherche" />
					</form>

					<?php 
if ($medecinOpt != null) {
    $medecin = MedecinRepo::getById($_POST['id_medecin']);
    $stats = StatsRepo::getRDVStat($_POST['id_medecin']);
    $heures = ($stats['DureeTotale'] - $stats['DureeTotale'] % 60) / 60;
    $minutes = $stats['DureeTotale'] % 60;
    echo '<div><strong>' . $medecin['Nom'] . ' ' . $medecin['Prenom'] . '</strong>
								<p>Nombre total de consultations: ' . $stats['NombreRDV'] . '</p>
								<p>Durée totale des consultations: ' . $heures . ' Heures et ' . $minutes . ' Minutes</p></div>';
}
?>
				</article>


			</section>

		</div>