Rev 331 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<?php
function mb_ucfirst($str) {
$fc = mb_strtoupper(mb_substr($str, 0, 1));
return $fc.mb_substr($str, 1);
}
$config = parse_ini_file('config.ini');
$url_jrest = $config['url_jrest'];
$url_infos_especes = $url_jrest.'OdsEspece/ToutesEspeces';
$especes = json_decode(file_get_contents($url_infos_especes), true);
$url_infos_stades = $url_jrest.'OdsEvenement/TousEvenements';
$stades = json_decode(file_get_contents($url_infos_stades), true);
$url_annee_min_obs = $url_jrest.'OdsObservation/AnneeMinimumObservation';
$annee_min_obs = json_decode(file_get_contents($url_annee_min_obs), true);
$annees_observations = range($annee_min_obs, date('Y'));
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-style-type" content="text/css" />
<meta http-equiv="Content-script-type" content="text/javascript" />
<meta http-equiv="Content-language" content="fr" />
<base href="<?= dirname($_SERVER['PHP_SELF'])."/"; ?>" />
<title>Graphiques</title>
<meta name="revisit-after" content="15 days" />
<meta name="robots" content="index,follow" />
<meta name="author" content="Tela Botanica" />
<script type="text/javascript" src="<?= dirname($_SERVER['PHP_SELF'])."/"; ?>js/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="<?= dirname($_SERVER['PHP_SELF'])."/"; ?>js/plotly.min.js"></script>
<script type="text/javascript" src="<?= dirname($_SERVER['PHP_SELF'])."/"; ?>js/config.js"></script>
<script type="text/javascript" src="<?= dirname($_SERVER['PHP_SELF'])."/"; ?>js/calendrier-evenements.js"></script>
<link media="screen" href="<?= dirname($_SERVER['PHP_SELF'])."/"; ?>css/graphiques.css" type="text/css" rel="stylesheet" />
<script type="text/javascript">
var url_jrest = <?= json_encode($url_jrest, true) ?>;
var global_evenements = <?= json_encode($stades, true) ?>;
var annees_observations = <?= json_encode($annees_observations, true) ?>;
</script>
</head>
<body>
<div class="conteneur">
<div class="conteneur-criteres">
<div class="conteneur_selecteur_especes">
<select id="selecteur_liste_especes">
<option value="0" class="espece_type_0" selected="selected"> Choisissez une espèce </option>
<?php foreach($especes as $id_espece => $infos_espece) : ?>
<option value="<?= $id_espece; ?>"><?= mb_ucfirst($infos_espece['nom_vernaculaire']); ?></option>
<?php endforeach; ?>
</select>
</div>
<div class="conteneur_selecteur_annees">
<select id="selecteur_annees">
<option data-evenements="[]" value="0" class="stade" selected="selected"> Choisissez une année </option>
<?php foreach($annees_observations as $annee_obs) : ?>
<option value="<?= $annee_obs; ?>"><?= $annee_obs; ?></option>
<?php endforeach; ?>
</select>
</div>
</div>
<div id="conteneur-graphique" class="conteneur-graphique calendrier-evenements"></div>
</div>
</body>
</html>