[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Epnadmin-fr] CVS: epnadmin config.php,1.5,1.6 configuration.php,1.8,1.9
From: |
Loïc Dayot |
Subject: |
[Epnadmin-fr] CVS: epnadmin config.php,1.5,1.6 configuration.php,1.8,1.9 dateheure.inc.php,1.11,1.12 entete.inc.php,1.23,1.24 fr.lang.inc.php,1.9,1.10 parcours.php,1.8,1.9 print.php,1.7,1.8 session.php,1.12,1.13 stats.php,1.13,1.14 table_horaire.php,1.14,1.15 table_horaire_session.php,1.18,1.19 usagers.inc.php,1.9,1.10 |
Date: |
Tue, 18 Feb 2003 17:21:39 -0500 |
Update of /cvsroot/epnadmin/epnadmin
In directory subversions:/tmp/cvs-serv30151/epnadmin
Modified Files:
config.php configuration.php dateheure.inc.php entete.inc.php
fr.lang.inc.php parcours.php print.php session.php stats.php
table_horaire.php table_horaire_session.php usagers.inc.php
Log Message:
Quelques ajustements. On s'approche peut-être d'une version 0.6.
Correction dans les tableaux statistiques pour prendre en compte autant de
tarifs différetns que possible.
Affichage des dépendances dans la configuration des fonctionnalités.
Une variable de plus à paramétrer dans le script de config.
Suppression des flottans dans l'affichage des heures.
Correction d'une faute de frappe dans table_horaire_session.
Index: config.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/config.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** config.php 17 Feb 2003 22:45:35 -0000 1.5
--- config.php 18 Feb 2003 22:21:36 -0000 1.6
***************
*** 1219,1223 ****
$reussi&=enregistreconfig("ip_serveur", $ip_serveur);
! $reussi&=enregistreconfig("EXECUTION_COMMANDES_BASH",
$EXECUTION_COMMANDES_BASH);
$reussi&=enregistreconfig("logo", $logo);
--- 1219,1225 ----
$reussi&=enregistreconfig("ip_serveur", $ip_serveur);
! $reussi&=enregistreconfig("unitehoraire",
$unitehoraire);
!
! $reussi&=enregistreconfig("EXECUTION_COMMANDES_BASH",
$EXECUTION_COMMANDES_BASH);
$reussi&=enregistreconfig("logo", $logo);
***************
*** 1256,1259 ****
--- 1258,1264 ----
<tr><td> </td></tr>
+
<tr><td>$sunitehoraire<br><input type=\"text\" name=\"unitehoraire\"
value=\"$unitehoraire\" size=\"40\"></td></tr>
+ <tr><td> </td></tr>
+
<tr><td>$sEXECUTION_COMMANDES_BASH<br>
<input type=\"radio\"";
***************
*** 1266,1270 ****
<tr><td> </td></tr>
! <tr><td>$slogo<br><input
type=\"text\" name=\"logo\" value=\"$logo\" size=\"40\"></td></tr>
<tr><td> </td></tr>
--- 1271,1275 ----
<tr><td> </td></tr>
! <tr><td>$slogo<br><input type=\"text\" name=\"logo\"
value=\"$logo\" size=\"40\"></td></tr>
<tr><td> </td></tr>
Index: configuration.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/configuration.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** configuration.php 17 Feb 2003 22:45:35 -0000 1.8
--- configuration.php 18 Feb 2003 22:21:36 -0000 1.9
***************
*** 87,91 ****
else
echo "<td>Actif ?</td>";
! echo "<td>Commentaire</td></tr>\n";
$req1="SELECT * FROM fonctions ORDER BY ordre";
--- 87,94 ----
else
echo "<td>Actif ?</td>";
! echo "<td>Commentaire</td>";
! if ($id==0)
! echo "<td>Dépend de</td>";
! echo "</tr>\n";
$req1="SELECT * FROM fonctions ORDER BY ordre";
***************
*** 155,158 ****
--- 158,172 ----
}
echo "</td><td>".nl2br($fonction->commentaire)."</td>";
+
+ if ($id==0 && $fonction->depend>"")
+ { // On configure les fonctionnalités, on affiche alors les dépendances.
+ echo "<td>";
+ $reqd="SELECT * FROM fonctions WHERE id IN ($fonction->depend) ORDER
BY ordre";
+ $resd=executeRequete($reqd);
+ while ($fctd=mysql_fetch_object($resd))
+ echo $fctd->fonction."<br>";
+ echo "</td>";
+ }
+
echo "</tr>\n";
}
***************
*** 192,197 ****
else
echo "<td>Actif ?</td>";
! echo "<td>Commentaire</td></tr>\n";
!
$req1="SELECT * FROM fonctions ORDER BY ordre";
--- 206,213 ----
else
echo "<td>Actif ?</td>";
! echo "<td>Commentaire</td>";
! if ($id==0)
! echo "<td>Dépend de</td>";
! echo "</tr>\n";
$req1="SELECT * FROM fonctions ORDER BY ordre";
***************
*** 264,267 ****
--- 280,294 ----
echo "<td>".nl2br($fonction->commentaire)."</td>";
+
+ if ($id==0 && $fonction->depend>"")
+ { // On configure les fonctionnalités, on affiche alors les dépendances.
+ echo "<td>";
+ $reqd="SELECT * FROM fonctions WHERE id IN ($fonction->depend) ORDER BY
ordre";
+ $resd=executeRequete($reqd);
+ while ($fctd=mysql_fetch_object($resd))
+ echo $fctd->fonction."<br>";
+ echo "</td>";
+ }
+
echo "</tr>\n";
}
***************
*** 325,329 ****
// Retrouver la fonctionnalité rendue active
$req4="SELECT * FROM fonctions WHERE id='$suivante'";
! debug($req4);
$res4=executeRequete($req4);
$fctajoutee=mysql_fetch_object($res4);
--- 352,356 ----
// Retrouver la fonctionnalité rendue active
$req4="SELECT * FROM fonctions WHERE id='$suivante'";
! //debug($req4);
$res4=executeRequete($req4);
$fctajoutee=mysql_fetch_object($res4);
Index: dateheure.inc.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/dateheure.inc.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** dateheure.inc.php 16 Feb 2003 21:49:55 -0000 1.11
--- dateheure.inc.php 18 Feb 2003 22:21:36 -0000 1.12
***************
*** 59,63 ****
$heure=substr($heure,1);
$m="";
! while (substr($heure,0,1)!=":" && strlen($heure)>0)
{
$m.=substr($heure,0,1);
--- 59,63 ----
$heure=substr($heure,1);
$m="";
! while (substr($heure,0,1)!=":" && strlen($heure)>0 && strlen($m)<2)
{
$m.=substr($heure,0,1);
Index: entete.inc.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/entete.inc.php,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -r1.23 -r1.24
*** entete.inc.php 17 Feb 2003 22:45:35 -0000 1.23
--- entete.inc.php 18 Feb 2003 22:21:36 -0000 1.24
***************
*** 167,178 ****
if (UTILISATIONS>="~")
! echo "<a href=\"table_horaire.php\">$sresaposte</a><br>\n";
if (USAGERS_AUTRES>="w")
! echo "<a href=\"usagers.php?operation=3\">$snouvel</a> - ";
if (USAGERS_AUTRES>="r")
! echo "<a href=\"usagers.php?operation=5\">$susagers</a><br>\n";
if (USAGERS_AUTRES>="w")
! echo "<a href=\"print.php\">$scartes</a>\n";
if (USAGERS_AUTRES>="w" && TARIFS_AUTRES>="w")
echo " - ";
--- 167,178 ----
if (UTILISATIONS>="~")
! echo "<a href=\"table_horaire.php\">$sresaposte</a>\n";
if (USAGERS_AUTRES>="w")
! echo "<br><a href=\"usagers.php?operation=3\">$snouvel</a> - ";
if (USAGERS_AUTRES>="r")
! echo "<a href=\"usagers.php?operation=5\">$susagers</a>\n";
if (USAGERS_AUTRES>="w")
! echo "<br><a href=\"print.php\">$scartes</a>\n";
if (USAGERS_AUTRES>="w" && TARIFS_AUTRES>="w")
echo " - ";
***************
*** 182,191 ****
echo " - ";
if (USAGES>="~")
! echo "<a href=\"usages.php\">$susages</a><br>\n";
if (HORAIRES>="~")
! echo "<a href=\"horaires.php\">$shoraires</a><br>\n";
if ($is_ident=="usager")
! echo "<a
href=\"reservations.php?operation=4\">$sutilisationspassees</a><br>\n";
echo "</td>
--- 182,191 ----
echo " - ";
if (USAGES>="~")
! echo "<a href=\"usages.php\">$susages</a>\n";
if (HORAIRES>="~")
! echo "<br><a href=\"horaires.php\">$shoraires</a>\n";
if ($is_ident=="usager")
! echo "<br><a
href=\"reservations.php?operation=4\">$sutilisationspassees</a>\n";
echo "</td>
Index: fr.lang.inc.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/fr.lang.inc.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** fr.lang.inc.php 17 Feb 2003 22:45:35 -0000 1.9
--- fr.lang.inc.php 18 Feb 2003 22:21:36 -0000 1.10
***************
*** 142,145 ****
--- 142,147 ----
$sversconfiguration="<p>Pour aller vers la configuration des fonctionnalités
et des droits, cliquer sur le lien suivant <a
href=\"configuration.php\">configuration.php</a>.<br>
Pour revenir à ce script (notamment pour le
verrouiller), un lien se trouvera depuis le script de [fonctionnalités et
droits] du menu [administration].</p>";
+ $sunitehoraire="Unité horaire des réservations des postes en accès
individuel.<br>
+ L'unité est la minute. Pour que les créneaux soient d'une heure pleine
et indivisible, saisir [60]. Pour fonctionner par demie-heure, saisir [30].";
// configuration.php
Index: parcours.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/parcours.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** parcours.php 17 Feb 2003 22:45:35 -0000 1.8
--- parcours.php 18 Feb 2003 22:21:36 -0000 1.9
***************
*** 132,138 ****
$res4 = executeRequete($req4);
$nb=0;
! echo "<table align=center border=1>";
echo "<tr><th colspan=9>Liste des usagers qui peuvent s'inscrire à une
initiation<br>";
! echo "<table>".afficheInitiation($id_initiation, FALSE)."</table>\n";
echo "</th></tr>\n";
while ($usager = mysql_fetch_object($res4))
--- 132,138 ----
$res4 = executeRequete($req4);
$nb=0;
! echo "<table align=center border=1 bgcolor=\"".COULEUR_PARCOURS."\">";
echo "<tr><th colspan=9>Liste des usagers qui peuvent s'inscrire à une
initiation<br>";
! echo "<table
bgcolor=\"".COULEUR_PEDAGOGIE."\">".afficheInitiation($id_initiation,
FALSE)."</table>\n";
echo "</th></tr>\n";
while ($usager = mysql_fetch_object($res4))
***************
*** 166,172 ****
$res3 = executeRequete($req3);
$nb=0;
! echo "<table align=center border=1>";
echo "<tr><th colspan=10>Liste des usagers qui ont suivi une
initiation<br>";
! echo "<table>".afficheInitiation($id_initiation, FALSE)."</table>\n";
echo "</th></tr>\n";
while ($usager = mysql_fetch_object($res3))
--- 166,172 ----
$res3 = executeRequete($req3);
$nb=0;
! echo "<table align=center border=1 bgcolor=\"".COULEUR_PARCOURS."\">";
echo "<tr><th colspan=10>Liste des usagers qui ont suivi une
initiation<br>";
! echo "<table
bgcolor=\"".COULEUR_PEDAGOGIE."\">".afficheInitiation($id_initiation,
FALSE)."</table>\n";
echo "</th></tr>\n";
while ($usager = mysql_fetch_object($res3))
Index: print.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/print.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** print.php 17 Feb 2003 22:45:35 -0000 1.7
--- print.php 18 Feb 2003 22:21:36 -0000 1.8
***************
*** 83,89 ****
if (defined("FCT_TARIFS"))
{
! $r=hexdec(substr($couleurtarif[$tarif],1,2));
! $b=hexdec(substr($couleurtarif[$tarif],3,2));
! $v=hexdec(substr($couleurtarif[$tarif],5,2));
$tarifpierre = ImageColorAllocate ($im, $r, $b, $v);
imagefilledrectangle($im,0,80,480,130,$tarifpierre);
--- 83,89 ----
if (defined("FCT_TARIFS"))
{
! $r=hexdec(substr($couleurtarif[$tarif],0,2));
! $b=hexdec(substr($couleurtarif[$tarif],2,2));
! $v=hexdec(substr($couleurtarif[$tarif],4,2));
$tarifpierre = ImageColorAllocate ($im, $r, $b, $v);
imagefilledrectangle($im,0,80,480,130,$tarifpierre);
Index: session.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/session.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** session.php 17 Feb 2003 22:45:35 -0000 1.12
--- session.php 18 Feb 2003 22:21:36 -0000 1.13
***************
*** 48,52 ****
<?
$titr = "Gestion des sessions";
! $datemaj="16 février 2003";
require("entete.inc.php");
--- 48,52 ----
<?
$titr = "Gestion des sessions";
! $datemaj="18 février 2003";
require("entete.inc.php");
***************
*** 88,92 ****
$localisation=mysql_fetch_object($res2);
! if (LOCALISATIONS_AUTRES<"r")
$enable="disabled";
choixSalle($id_localisation, $enable);
--- 88,92 ----
$localisation=mysql_fetch_object($res2);
! if (SESSIONS_AUTRES<"r")
$enable="disabled";
choixSalle($id_localisation, $enable);
***************
*** 118,125 ****
echo " </select></td></tr>";
}
!
echo "<tr><td>Inscriptions ouvertes aux usagers ?</td>
! <td><input type=\"radio\" checked name=\"inscriptionauto\"
value=\"oui\">oui
! <input type=\"radio\" name=\"inscriptionauto\"
value=\"non\">non</td></tr>\n";
echo "<tr><td>Nombre de participants prévu :</td>
<td><input type=\"text\" name=\"nbparticipants\"
value=\"$session->nbparticipants\" size=5></td></tr>
--- 118,133 ----
echo " </select></td></tr>";
}
! if (defined("FCT_USAGERS"))
! {
echo "<tr><td>Inscriptions ouvertes aux usagers ?</td>
! <td><input type=\"radio\" ";
! if (!$initiation->inscription ||
$initiation->inscriptionauto=="oui")
! echo "checked ";
! echo "name=\"inscriptionauto\" value=\"oui\">oui
! <input type=\"radio\" ";
! if ($initiation->inscriptionauto=="non")
! echo "checked ";
! echo "name=\"inscriptionauto\" value=\"non\">non</td></tr>\n";
! }
echo "<tr><td>Nombre de participants prévu :</td>
<td><input type=\"text\" name=\"nbparticipants\"
value=\"$session->nbparticipants\" size=5></td></tr>
Index: stats.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/stats.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** stats.php 17 Feb 2003 22:45:35 -0000 1.13
--- stats.php 18 Feb 2003 22:21:36 -0000 1.14
***************
*** 49,53 ****
<?
$titr = "Statistiques";
! $datemaj="21 janvier 2003";
require("entete.inc.php");
--- 49,53 ----
<?
$titr = "Statistiques";
! $datemaj="18 février 2003";
require("entete.inc.php");
***************
*** 163,167 ****
case 'usages' :
- echo "<p>Tableau des usages en nombre d'heures</p>\n";
$req = "SELECT SEC_TO_TIME(SUM(TIME_TO_SEC(fin)-TIME_TO_SEC(debut))) AS
nbheure
FROM utilisation_postes
--- 163,166 ----
***************
*** 172,180 ****
$stat = mysql_fetch_object($res);
$nbtotal = $stat->nbheure;
$req = "SELECT usages.nom AS usag,
SEC_TO_TIME(SUM(TIME_TO_SEC(fin)-TIME_TO_SEC(debut))) AS
nbheure,
! tarif,
! INTERVAL(YEAR(CURDATE())-YEAR(naissance), 20, 60) as age "
. "FROM usages "
. "LEFT JOIN utilisation_postes ON
usages.id=utilisation_postes.id_usage "
--- 171,185 ----
$stat = mysql_fetch_object($res);
$nbtotal = $stat->nbheure;
+ if ($nbtotal==0)
+ {
+ echo "<p>Désolé, mais il ne semble pas qu'il y ait eu aucune
utilisation répondant aux critères sélectionnés.</p>\n";
+ break;
+ }
+ echo "<p>Tableau des usages en nombre d'heures</p>\n";
$req = "SELECT usages.nom AS usag,
SEC_TO_TIME(SUM(TIME_TO_SEC(fin)-TIME_TO_SEC(debut))) AS
nbheure,
! id_tarif,
! INTERVAL(YEAR(CURDATE())-YEAR(naissance), 20, 40, 60) as
age "
. "FROM usages "
. "LEFT JOIN utilisation_postes ON
usages.id=utilisation_postes.id_usage "
***************
*** 184,188 ****
. "AND DATE_ADD(utilisation_postes.date, INTERVAL 0 DAY)>=\"$datedeb\"
AND DATE_ADD(utilisation_postes.date, INTERVAL 0 DAY)<=\"$datefin\" "
! . "GROUP BY usag, tarif, age ORDER BY usages.nom, tarif";
$res = executeRequete($req);
//debug($req);
--- 189,193 ----
. "AND DATE_ADD(utilisation_postes.date, INTERVAL 0 DAY)>=\"$datedeb\"
AND DATE_ADD(utilisation_postes.date, INTERVAL 0 DAY)<=\"$datefin\" "
! . "GROUP BY usag, id_tarif, age ORDER BY usages.nom, id_tarif";
$res = executeRequete($req);
//debug($req);
***************
*** 193,207 ****
{
echo "<th bgcolor=\"".$couleurtarif[$i]."\">$tarifs[$i]</th>";
$i++;
}
! echo "\n<th>- de 20 ans</th><th>20 à 60 ans</th><th>+ de 60
ans</th><th>âge<br>inconnu</th>\n
<th>Totaux</th><th>%</th></tr>\n";
$stat=mysql_fetch_object($res);
$tuptr=0; // total usagers pierrefittois tarif réduit
$tuptn=0; // total usagers pierrefittois tarif normal
$tunp=0; // total usagers non pierrefittois
$tut=0; // total usagers
$tupinconnu=0; // total usagers âge inconnu
$tup60ans=0; // total usagers + de 60 ans
$tup20ans=0; // total usagers entre 20 et 60 ans
$tupjeune=0; // total usagers - de 20 ans
--- 198,218 ----
{
echo "<th bgcolor=\"".$couleurtarif[$i]."\">$tarifs[$i]</th>";
+ $tuptarif[$i]=0;
$i++;
}
! $nbtarif=$i-1;
! echo "\n<th>- de 20 ans</th><th>20 à 40 ans</th><th>40 à 60 ans</th><th>+
de 60 ans</th><th>âge<br>inconnu</th>\n
<th>Totaux</th><th>%</th></tr>\n";
$stat=mysql_fetch_object($res);
+
+ /*
$tuptr=0; // total usagers pierrefittois tarif réduit
$tuptn=0; // total usagers pierrefittois tarif normal
$tunp=0; // total usagers non pierrefittois
+ */
$tut=0; // total usagers
$tupinconnu=0; // total usagers âge inconnu
$tup60ans=0; // total usagers + de 60 ans
+ $tup40ans=0; // total usagers + de 60 ans
$tup20ans=0; // total usagers entre 20 et 60 ans
$tupjeune=0; // total usagers - de 20 ans
***************
*** 209,231 ****
{
$us=$stat->usag;
! $uptr=0;
$uptn=0;
! $unp=0;
$ut=0;
$upinconnu=0;
$up60ans=0;
$up20ans=0;
$upjeune=0;
while ($stat->usag==$us)
{
! switch ($stat->id_tarif)
{
case '0' : $unp+=$stat->nbheure; break;
case '1' : $uptn+=$stat->nbheure; break;
case '2' : $uptr+=$stat->nbheure; break;
! }
switch ($stat->age)
{
! case 2 : $up60ans+=$stat->nbheure; break;
case 1 : $up20ans+=$stat->nbheure; break;
case 0 : $upjeune+=$stat->nbheure; break;
--- 220,246 ----
{
$us=$stat->usag;
! /*$uptr=0;
$uptn=0;
! $unp=0;*/
! for ($i=0; $i<=$nbtarif; $i++) $uptarif[$i]=0;
$ut=0;
$upinconnu=0;
$up60ans=0;
+ $up40ans=0;
$up20ans=0;
$upjeune=0;
while ($stat->usag==$us)
{
! $uptarif[$stat->id_tarif]+=$stat->nbheure;
! /*switch ($stat->id_tarif)
{
case '0' : $unp+=$stat->nbheure; break;
case '1' : $uptn+=$stat->nbheure; break;
case '2' : $uptr+=$stat->nbheure; break;
! }*/
switch ($stat->age)
{
! case 3 : $up60ans+=$stat->nbheure; break;
! case 2 : $up40ans+=$stat->nbheure; break;
case 1 : $up20ans+=$stat->nbheure; break;
case 0 : $upjeune+=$stat->nbheure; break;
***************
*** 239,248 ****
--- 254,267 ----
echo "<td>$us</td>\n";
// par tarif
+ /*
echo "<td>$unp</td>\n";
echo "<td>$uptn</td>\n";
echo "<td>$uptr</td>\n";
+ */
+ for ($i=0; $i<=$nbtarif; $i++) echo
"<td>".$uptarif[$i]."</td>";
// par age
echo "<td>$upjeune</td>\n";
echo "<td>$up20ans</td>\n";
+ echo "<td>$up40ans</td>\n";
echo "<td>$up60ans</td>\n";
echo "<td>$upinconnu</td>\n";
***************
*** 250,262 ****
echo "<th>$ut</th>\n";
$utp = round($ut / $nbtotal * 100,1);
! if ($utp>1) $stats1[$us]=$utp;
! echo "<td>$utp%".traitp($utp)."</td>\n";
echo "</tr>\n";
$tuptr+=$uptr;
$tuptn+=$uptn;
! $tunp+=$unp;
$tut+=$ut;
$tupinconnu+=$upinconnu;
$tup60ans+=$up60ans;
$tup20ans+=$up20ans;
$tupjeune+=$upjeune;
--- 269,284 ----
echo "<th>$ut</th>\n";
$utp = round($ut / $nbtotal * 100,1);
! if ($utp>0) $stats1[$us]=$utp;
! echo "<td>$utp%"."</td>\n"; //traitp($utp).
echo "</tr>\n";
+ /*
$tuptr+=$uptr;
$tuptn+=$uptn;
! $tunp+=$unp; */
! for ($i=0; $i<=$nbtarif; $i++)
$tuptarif[$i]+=$uptarif[$i];
$tut+=$ut;
$tupinconnu+=$upinconnu;
$tup60ans+=$up60ans;
+ $tup40ans+=$up40ans;
$tup20ans+=$up20ans;
$tupjeune+=$upjeune;
***************
*** 264,272 ****
--- 286,298 ----
echo "<tr bgcolor=\"#2B95FF\">";
echo "<th>Totaux</th>\n";
+ for ($i=0; $i<=$nbtarif; $i++) echo
"<th>".$tuptarif[$i]."</th>";
+ /*
echo "<th>$tunp</th>\n";
echo "<th>$tuptn</th>\n";
echo "<th>$tuptr</th>\n";
+ */
echo "<th>$tupjeune</th>\n";
echo "<th>$tup20ans</th>\n";
+ echo "<th>$tup40ans</th>\n";
echo "<th>$tup60ans</th>\n";
echo "<th>$tupinconnu</th>\n";
***************
*** 278,281 ****
--- 304,316 ----
echo "<tr>";
echo "<td>%</td>\n";
+
+ for ($i=0; $i<=$nbtarif; $i++)
+ {
+ $temp=round($tuptarif[$i] / $nbtotal * 100,1);
+ if ($temp>0) $stats3[$tarifs[$i]]=$temp;
+ echo "<td>$temp% "."</td>\n"; //traitp($temp).
+
+ }
+ /*
$tunp = round($tun / $nbtotal * 100,1);
$stats3[$tarifs[0]]=$tunp;
***************
*** 287,303 ****
$stats3[$tarifs[2]]=$tuptrp;
echo "<td>$tuptrp% ".traitp($tuptrp)."</td>\n";
!
$tupjeune = round($tupjeune / $nbtotal * 100,1);
! $stats2["- de 20 ans"]=$tupjeune;
! echo "<td>$tupjeune% ".traitp($tupjeune)."</td>\n";
$tup20ans = round($tup20ans / $nbtotal * 100,1);
! $stats2["20 à 60 ans"]=$tup20ans;
! echo "<td>$tup20ans% ".traitp($tup20ans)."</td>\n";
$tup60ans = round($tup60ans / $nbtotal * 100,1);
! $stats2["+ de 60 ans"]=$tup60ans;
! echo "<td>$tup60ans% ".traitp($tup60ans)."</td>\n";
$tupinconnu = round($tupinconnu / $nbtotal * 100,1);
! $stats2["âge inconnu"]=$tupinconnu;
! echo "<td>$tupinconnu% ".traitp($tupinconnu)."</td>\n";
$tutp = round($tut / $nbtotal * 100,1);
--- 322,341 ----
$stats3[$tarifs[2]]=$tuptrp;
echo "<td>$tuptrp% ".traitp($tuptrp)."</td>\n";
! */
$tupjeune = round($tupjeune / $nbtotal * 100,1);
! if ($tupjeune>0) $stats2["- de 20 ans"]=$tupjeune;
! echo "<td>$tupjeune% "."</td>\n"; //.traitp($tupjeune)
$tup20ans = round($tup20ans / $nbtotal * 100,1);
! if ($tup20ans>0) $stats2["20 a 40 ans"]=$tup20ans;
! echo "<td>$tup20ans% </td>\n"; //".traitp($tup20ans)."
! $tup40ans = round($tup40ans / $nbtotal * 100,1);
! if ($tup40ans>0) $stats2["40 a 60 ans"]=$tup40ans;
! echo "<td>$tup40ans%</td>\n"; //".traitp($tup40ans)."
$tup60ans = round($tup60ans / $nbtotal * 100,1);
! if ($tup60ans>0) $stats2["+ de 60 ans"]=$tup60ans;
! echo "<td>$tup60ans%</td>\n"; // ".traitp($tup60ans)."
$tupinconnu = round($tupinconnu / $nbtotal * 100,1);
! if ($tupinconnu>0) $stats2["age inconnu"]=$tupinconnu;
! echo "<td>$tupinconnu%</td>\n"; // ".traitp($tupinconnu)."
$tutp = round($tut / $nbtotal * 100,1);
***************
*** 511,515 ****
echo "<th bgcolor=\"".$couleurtarif[$i]."\">$tarifs[$i]</th>";
$i++;
! }
echo "<th>âge<br>inconnu</th><th>- de 20 ans</th><th>20 à 40
ans</th><th>40 à 60 ans</th><th>+ de 60 ans</th><th bgcolor=\"#FFFF80\">Totaux
ou<br>moyennes</th></tr>\n";
--- 549,554 ----
echo "<th bgcolor=\"".$couleurtarif[$i]."\">$tarifs[$i]</th>";
$i++;
! }
! $nbtarifs=$i-1;
echo "<th>âge<br>inconnu</th><th>- de 20 ans</th><th>20 à 40
ans</th><th>40 à 60 ans</th><th>+ de 60 ans</th><th bgcolor=\"#FFFF80\">Totaux
ou<br>moyennes</th></tr>\n";
***************
*** 518,525 ****
$where = "WHERE DATE_ADD(usagers.date, INTERVAL 0 DAY)<=\"$datefin\"";
! $req = "SELECT COUNT(*) AS nb, tarif
FROM usagers
LEFT JOIN credits ON credits.id_usager=usagers.id
! $where GROUP BY tarif ORDER BY tarif";
$res = executeRequete($req);
$i=0;
--- 557,564 ----
$where = "WHERE DATE_ADD(usagers.date, INTERVAL 0 DAY)<=\"$datefin\"";
! $req = "SELECT COUNT(*) AS nb, id_tarif
FROM usagers
LEFT JOIN credits ON credits.id_usager=usagers.id
! $where GROUP BY id_tarif ORDER BY id_tarif";
$res = executeRequete($req);
$i=0;
***************
*** 535,538 ****
--- 574,579 ----
$i++;
}
+ for ($j=$i; $j<$nbtarifs; $j++) echo "<td></td>";
+
$req = "SELECT COUNT(*) AS nb,
INTERVAL(YEAR(CURDATE())-YEAR(naissance), 20, 40, 60) as
age
***************
*** 553,556 ****
--- 594,599 ----
$i++;
}
+ for ($j=$i; $j<4; $j++) echo "<td></td>";
+
$req = "SELECT COUNT(*) AS nb
FROM usagers
***************
*** 567,575 ****
. " AND (DATE_ADD(sessions.date, INTERVAL 0
DAY)>=\"$datedeb\"
AND DATE_ADD(sessions.date, INTERVAL 0
DAY)<=\"$datefin\") ";
! $req = "SELECT
SUM(TIME_TO_SEC(sessions.fin)-TIME_TO_SEC(sessions.debut))/60 AS nb, tarif
FROM usagers
LEFT JOIN credits ON credits.id_usager=usagers.id
$where
! GROUP BY tarif ORDER BY tarif";
$res = executeRequete($req);
$i=0;
--- 610,618 ----
. " AND (DATE_ADD(sessions.date, INTERVAL 0
DAY)>=\"$datedeb\"
AND DATE_ADD(sessions.date, INTERVAL 0
DAY)<=\"$datefin\") ";
! $req = "SELECT
SUM(TIME_TO_SEC(sessions.fin)-TIME_TO_SEC(sessions.debut))/60 AS nb, id_tarif
FROM usagers
LEFT JOIN credits ON credits.id_usager=usagers.id
$where
! GROUP BY id_tarif ORDER BY id_tarif";
$res = executeRequete($req);
$i=0;
***************
*** 585,588 ****
--- 628,632 ----
$i++;
}
+ for ($j=$i; $j<$nbtarifs; $j++) echo "<td></td>";
$req = "SELECT SUM(TIME_TO_SEC(fin)-TIME_TO_SEC(debut))/60 AS nb,
***************
*** 606,609 ****
--- 650,654 ----
$i++;
}
+ for ($j=$i; $j<4; $j++) echo "<td></td>";
$req = "SELECT SUM(TIME_TO_SEC(fin)-TIME_TO_SEC(debut))/60 AS nb FROM
usagers $where";
***************
*** 620,627 ****
AND DATE_ADD(utilisation_postes.date, INTERVAL 0
DAY)<=\"$datefin\") ";
! $req = "SELECT SUM(TIME_TO_SEC(fin)-TIME_TO_SEC(debut))/60 AS nb, tarif
FROM usagers
LEFT JOIN credits ON credits.id_usager=usagers.id
! $where GROUP BY tarif ORDER BY tarif";
$res = executeRequete($req);
$i=0;
--- 665,672 ----
AND DATE_ADD(utilisation_postes.date, INTERVAL 0
DAY)<=\"$datefin\") ";
! $req = "SELECT SUM(TIME_TO_SEC(fin)-TIME_TO_SEC(debut))/60 AS nb, id_tarif
FROM usagers
LEFT JOIN credits ON credits.id_usager=usagers.id
! $where GROUP BY id_tarif ORDER BY id_tarif";
$res = executeRequete($req);
$i=0;
***************
*** 637,640 ****
--- 682,687 ----
$i++;
}
+ for ($j=$i; $j<$nbtarifs; $j++) echo "<td></td>";
+
$req = "SELECT SUM(TIME_TO_SEC(fin)-TIME_TO_SEC(debut))/60 AS nb,
INTERVAL(YEAR(CURDATE())-YEAR(naissance), 20, 40, 60) as
age
***************
*** 653,656 ****
--- 700,704 ----
$i++;
}
+ for ($j=$i; $j<4; $j++) echo "<td></td>";
$req = "SELECT COUNT(*) AS nb FROM usagers $where";
***************
*** 882,886 ****
case 'usagers' : // USAGERS
!
// Calcul du nombre maxi d'usagers
$req2="SELECT id FROM usagers";
--- 930,934 ----
case 'usagers' : // USAGERS
!
// Calcul du nombre maxi d'usagers
$req2="SELECT id FROM usagers";
***************
*** 908,912 ****
$decile=0;
$ndecile=1;
! $ntotdeciles=12;
// Nombre d'usagers n'ayant jamais utilisé les postes individuels
--- 956,960 ----
$decile=0;
$ndecile=1;
! $ntotdeciles=9;
// Nombre d'usagers n'ayant jamais utilisé les postes individuels
***************
*** 938,942 ****
$tableau[$i][$j]["contenu"]="<b>Nombre<br>d'usagers<br>concernés</b>";
$j=0; $i++;
!
echo "<table align='center' border='1'>\n";
while ($stat3=mysql_fetch_object($res3))
--- 986,990 ----
$tableau[$i][$j]["contenu"]="<b>Nombre<br>d'usagers<br>concernés</b>";
$j=0; $i++;
! $n=0;
echo "<table align='center' border='1'>\n";
while ($stat3=mysql_fetch_object($res3))
***************
*** 946,950 ****
{ // On passe au décile suivant
//$tableau[$i][$j]["param"]= "";
!
$tableau[$i][$j]["contenu"]=traitu(1+round($valeurs/$nbmaxusagers*50*$ntotdeciles));
$tableau[$i][$j]["param"]=" align='center' valign='bottom'";
$j++;
--- 994,998 ----
{ // On passe au décile suivant
//$tableau[$i][$j]["param"]= "";
!
$tableau[$i][$j]["contenu"]=traitu(1+round($valeurs/$nbmaxusagers*40*$ntotdeciles));
$tableau[$i][$j]["param"]=" align='center' valign='bottom'";
$j++;
***************
*** 961,967 ****
}
$valeurs++;
! }
$n++;
!
$tableau[$i][$j]["contenu"]=traitu(round($valeurs/$nbmaxusagers*50*$ntotdeciles));
$tableau[$i][$j]["param"]=" align='center' valign='bottom'";
$j++;
--- 1009,1015 ----
}
$valeurs++;
! }
$n++;
!
$tableau[$i][$j]["contenu"]=traitu(round($valeurs/$nbmaxusagers*40*$ntotdeciles));
$tableau[$i][$j]["param"]=" align='center' valign='bottom'";
$j++;
***************
*** 984,994 ****
unset($tableau);
echo "</table>\n";
!
// Même chose avec les activités collectives
// Condition interval de date demandé.
! $where = "(sessions.date>='$datedeb'
! AND sessions.date<='$datefin')
AND (sessions.etat<>'annulée')";
$where2=" (parcours.etat<>'absent' AND parcours.etat<>'indispensable' AND
parcours.etat<>'conseillé')";
--- 1032,1041 ----
unset($tableau);
echo "</table>\n";
!
// Même chose avec les activités collectives
// Condition interval de date demandé.
! $where = "(sessions.date>='$datedeb' AND sessions.date<='$datefin')
AND (sessions.etat<>'annulée')";
$where2=" (parcours.etat<>'absent' AND parcours.etat<>'indispensable' AND
parcours.etat<>'conseillé')";
***************
*** 1016,1020 ****
$decile=0;
$ndecile=1;
! $ntotdeciles=12;
// Nombre d'usagers n'ayant jamais été en activités collectives
--- 1063,1067 ----
$decile=0;
$ndecile=1;
! $ntotdeciles=9;
// Nombre d'usagers n'ayant jamais été en activités collectives
***************
*** 1052,1059 ****
{
$nbminute=heure2minute($stat3->nbmaxheure);
while ($nbminute>$decile)
{ // On passe au décile suivant
//$tableau[$i][$j]["param"]= "";
!
$tableau[$i][$j]["contenu"]=traitu(1+round($valeurs/$nbmaxusagers*50*$ntotdeciles));
$tableau[$i][$j]["param"]=" align='center' valign='bottom'";
$j++;
--- 1099,1107 ----
{
$nbminute=heure2minute($stat3->nbmaxheure);
+ $valeurs++; //$n++;
while ($nbminute>$decile)
{ // On passe au décile suivant
//$tableau[$i][$j]["param"]= "";
!
$tableau[$i][$j]["contenu"]=traitu(1+round($valeurs/$nbmaxusagers*40*$ntotdeciles));
$tableau[$i][$j]["param"]=" align='center' valign='bottom'";
$j++;
***************
*** 1069,1076 ****
$decile+=$nbmaxheure/$ntotdeciles;
}
! $valeurs++;
! }
$n++;
!
$tableau[$i][$j]["contenu"]=traitu(round($valeurs/$nbmaxusagers*50*$ntotdeciles));
$tableau[$i][$j]["param"]=" align='center' valign='bottom'";
$j++;
--- 1117,1123 ----
$decile+=$nbmaxheure/$ntotdeciles;
}
! }
$n++;
!
$tableau[$i][$j]["contenu"]=traitu(round($valeurs/$nbmaxusagers*40*$ntotdeciles));
$tableau[$i][$j]["param"]=" align='center' valign='bottom'";
$j++;
Index: table_horaire.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/table_horaire.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** table_horaire.php 17 Feb 2003 22:45:35 -0000 1.14
--- table_horaire.php 18 Feb 2003 22:21:36 -0000 1.15
***************
*** 183,187 ****
{ // pas de réservation
// On regarde s'il est encore temps
! if (strtotime($datev." ".$heure) >= strtotime("+ 1 hour") ||
($id_ident=="structure" && UTILISATIONS>"~"))
{
if (UTILISATIONS_AUTRES>="w" || UTILISATIONS_MOI>="w")
--- 183,187 ----
{ // pas de réservation
// On regarde s'il est encore temps
! if (strtotime($datev." ".$heure) >= strtotime("+ 1 hour") ||
($is_ident=="structure" && UTILISATIONS>"~"))
{
if (UTILISATIONS_AUTRES>="w" || UTILISATIONS_MOI>="w")
Index: table_horaire_session.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/table_horaire_session.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -r1.18 -r1.19
*** table_horaire_session.php 16 Feb 2003 21:49:56 -0000 1.18
--- table_horaire_session.php 18 Feb 2003 22:21:36 -0000 1.19
***************
*** 22,27 ****
*/
! require_once("header.inc.php");
! if (!defined("FCT_UTILISATIONS"))
{
echo $fctnonactive;
--- 22,27 ----
*/
! require_once("header.inc.php");
! if (!defined("FCT_SESSIONS"))
{
echo $fctnonactive;
Index: usagers.inc.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/usagers.inc.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** usagers.inc.php 17 Feb 2003 22:45:35 -0000 1.9
--- usagers.inc.php 18 Feb 2003 22:21:36 -0000 1.10
***************
*** 203,207 ****
{
echo "<td><font size=\"-1\">";
! if (!$usager->naissance)
echo "<font color=\"#FF0000\"><b>Date naissance inconnue
!</b></font>";
if ($usager->commentaires || $usager->commentaire)
--- 203,207 ----
{
echo "<td><font size=\"-1\">";
! if (!$usager->naissance || $usager->naissance<="0000-00-00")
echo "<font color=\"#FF0000\"><b>Date naissance inconnue
!</b></font>";
if ($usager->commentaires || $usager->commentaire)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Epnadmin-fr] CVS: epnadmin config.php,1.5,1.6 configuration.php,1.8,1.9 dateheure.inc.php,1.11,1.12 entete.inc.php,1.23,1.24 fr.lang.inc.php,1.9,1.10 parcours.php,1.8,1.9 print.php,1.7,1.8 session.php,1.12,1.13 stats.php,1.13,1.14 table_horaire.php,1.14,1.15 table_horaire_session.php,1.18,1.19 usagers.inc.php,1.9,1.10,
Loïc Dayot <=
- Prev by Date:
[Epnadmin-fr] CVS: epnadmin tarifs.php,NONE,1.1 config.php,1.4,1.5 configuration.php,1.7,1.8 constantes.inc.php,1.24,1.25 courriel.php,1.9,1.10 entete.inc.php,1.22,1.23 fr.lang.inc.php,1.8,1.9 initiations.inc.php,1.6,1.7 inscription_session.php,1.17,1.18 logiciels.php,1.6,1.7 materiels.php,1.8,1.9 parcours.php,1.7,1.8 print.php,1.6,1.7 reservations.php,1.11,1.12 session.php,1.11,1.12 sessions.inc.php,1.6,1.7 siteweb.inc.php,1.9,1.10 siteweb.php,1.18,1.19 stats.php,1.12,1.13 structures.php,1.9,1.10 table_horaire.php,1.13,1.14 usagers.inc.php,1.8,1.9usagers.php,1.19,1.20
- Next by Date:
[Epnadmin-fr] Re: juste qlq questions rapides sans pour autant s'inscrire sur lamailling liste :
- Previous by thread:
[Epnadmin-fr] CVS: epnadmin tarifs.php,NONE,1.1 config.php,1.4,1.5 configuration.php,1.7,1.8 constantes.inc.php,1.24,1.25 courriel.php,1.9,1.10 entete.inc.php,1.22,1.23 fr.lang.inc.php,1.8,1.9 initiations.inc.php,1.6,1.7 inscription_session.php,1.17,1.18 logiciels.php,1.6,1.7 materiels.php,1.8,1.9 parcours.php,1.7,1.8 print.php,1.6,1.7 reservations.php,1.11,1.12 session.php,1.11,1.12 sessions.inc.php,1.6,1.7 siteweb.inc.php,1.9,1.10 siteweb.php,1.18,1.19 stats.php,1.12,1.13 structures.php,1.9,1.10 table_horaire.php,1.13,1.14 usagers.inc.php,1.8,1.9usagers.php,1.19,1.20
- Next by thread:
[Epnadmin-fr] Re: juste qlq questions rapides sans pour autant s'inscrire sur lamailling liste :
- Index(es):