[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Epnadmin-fr] CVS: epnadmin constantes.inc.php,1.11,1.12 dateheure.inc.p
From: |
Loïc Dayot |
Subject: |
[Epnadmin-fr] CVS: epnadmin constantes.inc.php,1.11,1.12 dateheure.inc.php,1.4,1.5 stats.php,1.6,1.7 |
Date: |
Wed, 01 Jan 2003 08:23:09 -0500 |
Update of /cvsroot/epnadmin/epnadmin
In directory subversions:/tmp/cvs-serv15080/epnadmin
Modified Files:
constantes.inc.php dateheure.inc.php stats.php
Log Message:
Le dernier tableau statistique annoncé concernant l'affluence des usagers
pendant les plages horaires en accès individuels.
Index: constantes.inc.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/constantes.inc.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** constantes.inc.php 14 Dec 2002 12:11:27 -0000 1.11
--- constantes.inc.php 1 Jan 2003 13:23:07 -0000 1.12
***************
*** 3,7 ****
Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot
! EPNadmin - Version 0.5.4 - 14/12/2002
This program is free software; you can redistribute it and/or modify
--- 3,7 ----
Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot
! EPNadmin - Version 0.6 - 01/01/2003
This program is free software; you can redistribute it and/or modify
***************
*** 49,57 ****
// Tous les tarifs possibles pour les usagers
$tarifs[0]="tarif A"; $tarifcouleur[0][0]=254; $tarifcouleur[0][1]=227;
$tarifcouleur[0][2]=197;
! $tarifs[1]="tarif B"; $tarifcouleur[1][0]=250;
$tarifcouleur[1][1]=169; $tarifcouleur[1][2]=211;
! $tarifs[2]="tarif C"; $tarifcouleur[2][0]=255; $tarifcouleur[2][1]=255;
$tarifcouleur[2][2]=0;
// Paramétrage des réservations des salles et des postes
! $unitehoraire=60; // nombre de minutes qui est l'unité de temps de
réservation des postes individuels
define ("MINHORAIRE", "08:00");
define ("MAXHORAIRE", "22:00");
--- 49,57 ----
// Tous les tarifs possibles pour les usagers
$tarifs[0]="tarif A"; $tarifcouleur[0][0]=254; $tarifcouleur[0][1]=227;
$tarifcouleur[0][2]=197;
! $tarifs[1]="tarif B"; $tarifcouleur[1][0]=250; $tarifcouleur[1][1]=169;
$tarifcouleur[1][2]=211;
! $tarifs[2]="tarif C"; $tarifcouleur[2][0]=255; $tarifcouleur[2][1]=255;
$tarifcouleur[2][2]=0;
// Paramétrage des réservations des salles et des postes
! $unitehoraire=30; // nombre de minutes qui est l'unité de temps de
réservation des postes individuels
define ("MINHORAIRE", "08:00");
define ("MAXHORAIRE", "22:00");
Index: dateheure.inc.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/dateheure.inc.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** dateheure.inc.php 6 Nov 2002 18:25:07 -0000 1.4
--- dateheure.inc.php 1 Jan 2003 13:23:07 -0000 1.5
***************
*** 129,132 ****
--- 129,133 ----
case 5: return "vendredi"; break;
case 6: return "samedi"; break;
+ case 7: return "dimanche"; break;
}
}
Index: stats.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/stats.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** stats.php 8 Nov 2002 18:59:07 -0000 1.6
--- stats.php 1 Jan 2003 13:23:07 -0000 1.7
***************
*** 3,7 ****
Copyright (C) 2002 Loïc Dayot
! EPNadmin - Version 0.5.3
This program is free software; you can redistribute it and/or modify
--- 3,7 ----
Copyright (C) 2002 Loïc Dayot
! EPNadmin - Version 0.6
This program is free software; you can redistribute it and/or modify
***************
*** 38,42 ****
<?
$titr = "Statistiques";
! $datemaj="7 novembre 2002";
// On retire l'affichage du menu et du titre.
--- 38,42 ----
<?
$titr = "Statistiques";
! $datemaj="1er décembre 2003";
// On retire l'affichage du menu et du titre.
***************
*** 70,74 ****
// Date de fin
! if($fday==""||fmonth==""||fyear=="")
$datefin = date("Y-m-d");
else
--- 70,74 ----
// Date de fin
! if($fjour==""||$fmois==""||$fannee=="")
$datefin = date("Y-m-d");
else
***************
*** 702,705 ****
--- 702,797 ----
echo "</table>\n";
+ break;
+
+
//-----------------------------------------------------------------------------------------/
+ // EVOLUTION MENSUELLE
/
+
//-----------------------------------------------------------------------------------------/
+
+ case 'horaires' : // HORAIRES
+
+ // Condition interval de date demandé.
+ $where = "(date>='$datedeb'
+ AND date<='$datefin')";
+
+ // Début du tableau
+ echo "<table border='1' align='center' bgcolor='#CCFFFF'><tr><td></td>";
+ // Ligne d'entête
+ for ($nojour=1; $nojour<=7; $nojour++)
+ echo "<th>".jourSemaine($nojour)."</th>";
+ echo "\n";
+ // Boucle des horaires
+ for ($heure=MINHORAIRE;
+ $heure<MAXHORAIRE;
+ $heure=date("H:i:00", strtotime("+$unitehoraire minutes",
strtotime($heure)))
+ )
+ {
+ // Affichage de l'entête
+ echo "<tr><td>".datetoHeure($heure)."-".
+ datetoHeure(date("H:i:00", strtotime("+$unitehoraire minutes",
+ strtotime($heure))))."</td>\n";
+
+ // Boucle des jours
+ for ($nojour=1; $nojour<=7; $nojour++)
+ {
+ // calcul du nombre d'utilisations réelles pour cette tranche horaire
là.
+ $req1="SELECT COUNT(*) as nb
+ FROM utilisation_postes
+ WHERE (debut<='$heure' AND fin>'$heure')
+ AND WEEKDAY(date)=($nojour-1)
+ AND (etat<>'annulée' AND etat<>'non tenue')
+ AND $where";
+ $res1=executeRequete($req1);
+ if ($utilisation=mysql_fetch_object($res1))
+ $nb1=$utilisation->nb;
+ else
+ $nb1=0;
+
+ // calcul du nombre d'ouvertures pour cette tranche horaire là.
+ $req2="SELECT COUNT(*) as nb
+ FROM calendrier
+ WHERE (debut<='$heure' AND fin>'$heure')
+ AND WEEKDAY(date)=($nojour-1)
+ AND ouverture='accès individuels'
+ AND $where";
+ $res2=executeRequete($req2);
+ if ($calendrier=mysql_fetch_object($res2))
+ $nb2=$calendrier->nb;
+ else
+ $nb2=0;
+
+ // Calcul du rapport d'utilisation
+ $coul=" bgcolor='white'";
+ if ($nb2>0)
+ {
+ $rapport=$nb1/$nb2;
+ if ($rapport<2) // 4 est le nombre de postes réservables divisé
par deux
+ $coul=" bgcolor='red'";
+ if ($rapport>4)
+ $coul=" bgcolor='#90EE90'";
+ }
+ else
+ $rapport="nc";
+
+ // Affichage des résultats
+ if ($nb1==0 && $nb2==0)
+ echo "<td></td>\n";
+ else
+ printf("<td%s>%u/%u= <b>%01.1f</b></td>\n", $coul, $nb1, $nb2,
$rapport);
+ } // for $nojour
+ // Termine la ligne d'horaire
+ echo "</tr>";
+
+ } // for $heure
+
+ echo "</table>\n";
+
+ // Légende
+ echo "<p>Le contenu de chque cellule est constitué ainsi : <br>
+ (1)/(2)=(3)<br>
+ (1) : nombre d'utilisations de postes en accès individuels<br>
+ (2) : nombre de fois que l'accès individuel a été ouvert<br>
+ (3) : résultat du ration de (1) sur (2).
+ Ce résultat devrait être rapproché du nombre
+ de postes accessibles en accès individuels.</p>\n";
break;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Epnadmin-fr] CVS: epnadmin constantes.inc.php,1.11,1.12 dateheure.inc.php,1.4,1.5 stats.php,1.6,1.7,
Loïc Dayot <=
- Next by Date:
[Epnadmin-fr] CVS: epnadmin camembert.inc.php,NONE,1.1 image.inc.php,NONE,1.1 constantes.inc.php,1.12,1.13 dateheure.inc.php,1.5,1.6 entete.inc.php,1.13,1.14 header.inc.php,1.10,1.11 inscription_session.php,1.12,1.13 logiciels.php,1.2,1.3 materiels.php,1.4,1.5 stats.php,1.7,1.8
- Next by thread:
[Epnadmin-fr] CVS: epnadmin camembert.inc.php,NONE,1.1 image.inc.php,NONE,1.1 constantes.inc.php,1.12,1.13 dateheure.inc.php,1.5,1.6 entete.inc.php,1.13,1.14 header.inc.php,1.10,1.11 inscription_session.php,1.12,1.13 logiciels.php,1.2,1.3 materiels.php,1.4,1.5 stats.php,1.7,1.8
- Index(es):