330 |
aurelien |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
function mb_ucfirst($str) {
|
|
|
4 |
$fc = mb_strtoupper(mb_substr($str, 0, 1));
|
|
|
5 |
return $fc.mb_substr($str, 1);
|
|
|
6 |
}
|
|
|
7 |
|
|
|
8 |
$config = parse_ini_file('config.ini');
|
|
|
9 |
$url_jrest = $config['url_jrest'];
|
|
|
10 |
|
|
|
11 |
$url_infos_especes = $url_jrest.'OdsEspece/ToutesEspeces';
|
|
|
12 |
$especes = json_decode(file_get_contents($url_infos_especes), true);
|
|
|
13 |
|
|
|
14 |
$url_infos_stades = $url_jrest.'OdsEvenement/TousEvenements';
|
|
|
15 |
$stades = json_decode(file_get_contents($url_infos_stades), true);
|
|
|
16 |
|
|
|
17 |
$url_annee_min_obs = $url_jrest.'OdsObservation/AnneeMinimumObservation';
|
|
|
18 |
$annee_min_obs = json_decode(file_get_contents($url_annee_min_obs), true);
|
|
|
19 |
|
|
|
20 |
$annees_observations = range($annee_min_obs, date('Y'));
|
|
|
21 |
?>
|
|
|
22 |
|
|
|
23 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
|
24 |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
|
25 |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
|
|
|
26 |
<head>
|
|
|
27 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
|
28 |
<meta http-equiv="Content-style-type" content="text/css" />
|
|
|
29 |
<meta http-equiv="Content-script-type" content="text/javascript" />
|
|
|
30 |
<meta http-equiv="Content-language" content="fr" />
|
|
|
31 |
|
|
|
32 |
<base href="<?= dirname($_SERVER['PHP_SELF'])."/"; ?>" />
|
|
|
33 |
|
|
|
34 |
<title>Graphiques</title>
|
|
|
35 |
|
|
|
36 |
<meta name="revisit-after" content="15 days" />
|
|
|
37 |
<meta name="robots" content="index,follow" />
|
|
|
38 |
<meta name="author" content="Tela Botanica" />
|
|
|
39 |
|
|
|
40 |
<script type="text/javascript" src="<?= dirname($_SERVER['PHP_SELF'])."/"; ?>js/jquery-3.2.1.min.js"></script>
|
|
|
41 |
<script type="text/javascript" src="<?= dirname($_SERVER['PHP_SELF'])."/"; ?>js/plotly.min.js"></script>
|
|
|
42 |
<script type="text/javascript" src="<?= dirname($_SERVER['PHP_SELF'])."/"; ?>js/calendrier-evenements.js"></script>
|
|
|
43 |
<link media="screen" href="<?= dirname($_SERVER['PHP_SELF'])."/"; ?>css/graphiques.css" type="text/css" rel="stylesheet" />
|
|
|
44 |
|
|
|
45 |
<script type="text/javascript">
|
|
|
46 |
var url_jrest = <?= json_encode($url_jrest, true) ?>;
|
|
|
47 |
var global_evenements = <?= json_encode($stades, true) ?>;
|
|
|
48 |
var annees_observations = <?= json_encode($annees_observations, true) ?>;
|
|
|
49 |
</script>
|
|
|
50 |
</head>
|
|
|
51 |
<body>
|
|
|
52 |
<div class="conteneur">
|
|
|
53 |
<div class="conteneur-criteres">
|
|
|
54 |
|
|
|
55 |
<div class="conteneur_selecteur_especes">
|
|
|
56 |
<select id="selecteur_liste_especes">
|
|
|
57 |
<option value="0" class="espece_type_0" selected="selected"> Choisissez une espèce </option>
|
|
|
58 |
<?php foreach($especes as $id_espece => $infos_espece) : ?>
|
|
|
59 |
<option value="<?= $id_espece; ?>"><?= mb_ucfirst($infos_espece['nom_vernaculaire']); ?></option>
|
|
|
60 |
<?php endforeach; ?>
|
|
|
61 |
</select>
|
|
|
62 |
</div>
|
|
|
63 |
|
|
|
64 |
<div class="conteneur_selecteur_annees">
|
|
|
65 |
<select id="selecteur_annees">
|
331 |
aurelien |
66 |
<option data-evenements="[]" value="0" class="stade" selected="selected"> Toutes les années </option>
|
330 |
aurelien |
67 |
<?php foreach($annees_observations as $annee_obs) : ?>
|
|
|
68 |
<option value="<?= $annee_obs; ?>"><?= $annee_obs; ?></option>
|
|
|
69 |
<?php endforeach; ?>
|
|
|
70 |
</select>
|
|
|
71 |
</div>
|
|
|
72 |
|
|
|
73 |
|
|
|
74 |
</div>
|
|
|
75 |
<div id="conteneur-graphique" class="conteneur-graphique calendrier-evenements"></div>
|
|
|
76 |
</div>
|
|
|
77 |
</body>
|
|
|
78 |
</html>
|