2015-12-03 09:02:40 +00:00
|
|
|
<?php session_start();
|
|
|
|
require('autoloader.php');
|
|
|
|
if(!Authentification::checkUser(0)){
|
|
|
|
header("Location: http://".$_SERVER['HTTP_HOST']."/index.php");
|
|
|
|
die();
|
|
|
|
};?>
|
2015-12-03 08:51:40 +00:00
|
|
|
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>Tableau de bord</title>
|
|
|
|
|
|
|
|
<meta charset='utf-8'/>
|
|
|
|
<meta name='description' value='Site de test'/>
|
|
|
|
<meta name='author' value='{xdrm} & SeekDaSky'/>
|
|
|
|
|
2015-12-19 17:15:04 +00:00
|
|
|
<link rel='stylesheet' href='css/font.css'/>
|
2015-12-08 07:15:34 +00:00
|
|
|
<link rel='stylesheet' href='css/animations.css'/>
|
2015-12-03 08:51:40 +00:00
|
|
|
<link rel='stylesheet' href='css/global.css'/>
|
2015-12-09 10:48:42 +00:00
|
|
|
<link rel='stylesheet' href='css/responsive.css'/>
|
2015-12-08 07:15:34 +00:00
|
|
|
|
2015-12-14 07:35:20 +00:00
|
|
|
<script type='text/javascript' src='js/lib/API.js'></script>
|
2015-12-14 10:01:35 +00:00
|
|
|
<script type='text/javascript' src='js/lib/adjust.js'></script>
|
2015-12-03 08:51:40 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
2015-12-13 22:17:56 +00:00
|
|
|
<!-- BARRE DE NOTIFICATIONS -->
|
|
|
|
<div id='NOTIFBAR'>
|
|
|
|
<div></div>
|
|
|
|
<div>
|
|
|
|
<h3>Oups!</h3>
|
|
|
|
<p>Certains champs sont incorrects. Veuillez réessayer.</p>
|
|
|
|
<input type='button' value='Fermer'>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
2015-12-03 08:51:40 +00:00
|
|
|
<!-- WRAPPER DE LA PAGE -->
|
|
|
|
<div id='WRAPPER'>
|
|
|
|
|
|
|
|
<!-- MENU DE LA PAGE -->
|
|
|
|
<nav id='MENU'>
|
2015-12-08 07:15:34 +00:00
|
|
|
<a href='Dashboard.php' id='ICON'></a>
|
2015-12-09 20:43:02 +00:00
|
|
|
<div>
|
|
|
|
<a href='Dashboard.php' id='dashboard' class='active'>Tableau de bord</a>
|
|
|
|
<a href='Consultations.php' id='consultations'>Consultations</a>
|
|
|
|
<a href='Medecins.php' id='medecin'>Gestion des médecins</a>
|
|
|
|
<a href='Patients.php' id='patient'>Gestion des patients</a>
|
|
|
|
</div>
|
2015-12-03 08:51:40 +00:00
|
|
|
</nav>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- CONTAINER DE LA PAGE -->
|
|
|
|
<section id='CONTAINER'>
|
|
|
|
|
|
|
|
<!-- FIL D'ARIANE -->
|
2015-12-08 07:15:34 +00:00
|
|
|
<div id='BREADCRUMB'><a href='Dashboard.php'>Accueil</a></div>
|
2015-12-03 10:49:29 +00:00
|
|
|
|
2016-01-03 16:44:20 +00:00
|
|
|
<article data-title="Statistiques sur l'âge des patients">
|
|
|
|
|
|
|
|
<?php
|
|
|
|
$stats = StatsRepo::getAgePatient();
|
|
|
|
?>
|
|
|
|
<div class="StatContainer">
|
|
|
|
<p class="title">Homme</p>
|
|
|
|
<div class="man bar" style="height: 150px"></div>
|
|
|
|
<?php
|
|
|
|
foreach($stats['H'] as $Homme){
|
|
|
|
echo '<div class="man bar" style="height:'.round($Homme/$stats['NbrH']*150).'px;margin-top:'.round(150-($Homme/$stats['NbrH']*150)).'px"></div>';
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
|
|
|
|
<div class="clear labels">
|
|
|
|
<p class="label">Total</p>
|
|
|
|
<?php
|
|
|
|
foreach (array_keys($stats['H']) as $key){
|
|
|
|
echo '<p class="label">'.$key.'</p>';
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="clear labels">
|
|
|
|
<p class="label value"><?php echo $stats['NbrH']; ?></p>
|
|
|
|
<?php
|
|
|
|
foreach ($stats['H'] as $value){
|
|
|
|
echo '<p class="label value">'.$value.'</p>';
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="StatContainer">
|
|
|
|
<p class="title">Femme</p>
|
|
|
|
<div class="woman bar" style="height: 150px"></div>
|
|
|
|
<?php
|
|
|
|
foreach($stats['H'] as $Femme){
|
|
|
|
echo '<div class="woman bar" style="height:'.round($Femme/$stats['NbrH']*150).'px;margin-top:'.round(150-($Femme/$stats['NbrH']*150)).'px"></div>';
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
|
|
|
|
<div class="clear labels">
|
|
|
|
<p class="label">Total</p>
|
|
|
|
<?php
|
|
|
|
foreach (array_keys($stats['F']) as $key){
|
|
|
|
echo '<p class="label">'.$key.'</p>';
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="clear labels">
|
|
|
|
<p class="label value"><?php echo $stats['NbrF']; ?></p>
|
|
|
|
<?php
|
|
|
|
foreach ($stats['F'] as $value){
|
|
|
|
echo '<p class="label value">'.$value.'</p>';
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="clear"></div>
|
|
|
|
|
|
|
|
</article>
|
|
|
|
|
|
|
|
<article id="search" data-title="Nombre total d'heure de consultation par medecin">
|
|
|
|
<form method="POST" action="Dashboard.php#search">
|
|
|
|
<select id='StatMedecin' name='id_medecin'>
|
|
|
|
<option value='*'>Medecins:</option>
|
|
|
|
<?php
|
|
|
|
foreach(MedecinRepo::getAll() as $MEDECIN)
|
|
|
|
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(isset($_POST['submit'])) {
|
|
|
|
$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><p>'.$medecin['Nom'].' '. $medecin['Prenom'].'</p>
|
|
|
|
<p>Nombre total de consultation: '.$stats['NombreRDV'].'</p>
|
|
|
|
<p>Durée totale des consultations: '.$heures.' Heures et '.$minutes.' Minutes</p></div>';
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</article>
|
|
|
|
|
2015-12-08 08:31:51 +00:00
|
|
|
|
2015-12-03 08:51:40 +00:00
|
|
|
</section>
|
|
|
|
|
|
|
|
</div>
|
2015-12-13 22:17:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
<script type='text/javascript'>
|
|
|
|
var notifBar = document.getElementById('NOTIFBAR');
|
|
|
|
notifBar.children[1].children[2].addEventListener('click', function(e){
|
|
|
|
remClass(notifBar, 'active');
|
|
|
|
}, false);
|
|
|
|
</script>
|
2015-12-03 08:51:40 +00:00
|
|
|
</body>
|
2015-12-03 09:02:40 +00:00
|
|
|
</html>
|