[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Epnadmin-fr] CVS: epnadmin epnadminv.css, NONE, 1.1 fr.lang.inc.php, 1
From: |
Loïc Dayot |
Subject: |
[Epnadmin-fr] CVS: epnadmin epnadminv.css, NONE, 1.1 fr.lang.inc.php, 1.31, 1.32 localisations.php, 1.9, 1.10 stats.php, 1.21, 1.22 |
Date: |
Sun, 24 Aug 2003 16:21:18 -0400 |
Update of /cvsroot/epnadmin/epnadmin
In directory subversions:/tmp/cvs-serv31321/epnadmin
Modified Files:
fr.lang.inc.php localisations.php stats.php
Added Files:
epnadminv.css
Log Message:
Modifications dans les statistiques : corrections de bugs et nouvelle entrée
pour des renseignements sur les usagers. Pas terminé.
--- NEW FILE ---
body, #copy {
background-color:#9C9;
}
body {
color:#333;
margin:0;
padding:0;
}
* {
font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;
}
hr {
display:none;
}
.menu, .ssmenu {
/* font-size: 14px;*/
font-size: 0.8em;
}
.menu {
font-weight: bold;
color: #000;
border: 1px #333 solid;
background-color: #6F6;
}
.ssmenu {
background-color:#9F9;
color:#333;
border:0.1em solid #333;
margin:1em;
}
.menu span, .ssmenu span {
display:none;
}
.menu a, .ssmenu a {
text-decoration:none;
color:#333;
}
.menu a:hover {
color: #000
}
.menu {
padding:0 1em;
}
.ssmenu {
padding:0;
}
.ssmenu li {
list-style-type:disc;
list-style-position:inside;
padding-left:0.2em;
color:#FFF;
}
.ssmenu li:hover, .ssmenu a:hover, .ssmenu a:focus {
background-color:#0A0;
color:#FFF;
}
.ssmenu li:hover {
list-style-type:circle;
}
#access a {
color:#6F3;
}
#texte a {
color:#5A2;
}
#access a:hover, #texte a:hover {
text-decoration:none;
}
#access a:focus, #texte a:focus {
text-decoration:none;
background-color:#6F3;
color:#FFF;
}
#access {
margin:1em;
padding:0;
}
#texte {
text-align:justify;
margin:1em;
padding:0;
color: #000;
background-color:#FFF;
}
#texte p {
text-indent:1em;
}
#copy {
padding:1em;
margin:0;
text-align:center;
background-color:#FFF;
}
h1 {
font-size: 20px;
font-weight: bold;
color: #666666;
background-color:#9F6;
/*margin-left: 24px;
margin-top: 12px;
margin-right: 0px;
margin-bottom: 12px; */
border: 1px #333333 solid;
text-align:center;
}
h2 {
font-size: 16px;
color: #668800;
font-weight: bold;
/*letter-spacing: 4px*/
}
h3 {
font-size: 15px;
color: #668800;
font-weight: bold;
/*letter-spacing: 4px*/
}
#tableau {
background-color:#9F6;
}
/* Ajout */
input, textarea {
border: 1px solid black;
}
table {
font-size: 0.8em;
}
Index: fr.lang.inc.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/fr.lang.inc.php,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -r1.31 -r1.32
*** fr.lang.inc.php 27 Jul 2003 19:57:16 -0000 1.31
--- fr.lang.inc.php 24 Aug 2003 20:21:16 -0000 1.32
***************
*** 1045,1048 ****
--- 1045,1056 ----
$ssitegerepar="géré par";
}
+
+ // stats.php
+ {
+ $snbusagers="Nb usagers";
+ $sages="Âges";
+ $sintervalesages=Array("- de 20 ans","20 à 40 ans","40 à 60 ans","+ de 60
ans", "inconnu");
+ }
+
// structures.php
{
Index: localisations.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/localisations.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** localisations.php 17 Jul 2003 20:45:48 -0000 1.9
--- localisations.php 24 Aug 2003 20:21:16 -0000 1.10
***************
*** 163,167 ****
}
$result = recherche("localisations", "id", $id_localisation);
! if (! $u=mysql_fetch_array($result))
{
echo "<p>$localisationintrouvable</p>\n";
--- 163,167 ----
}
$result = recherche("localisations", "id", $id_localisation);
! if (! $u=fetch_array($result))
{
echo "<p>$localisationintrouvable</p>\n";
Index: stats.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/stats.php,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -r1.21 -r1.22
*** stats.php 23 Jul 2003 20:09:27 -0000 1.21
--- stats.php 24 Aug 2003 20:21:16 -0000 1.22
***************
*** 22,28 ****
*/
- // Les deux lignes suivantes suffisent s'il n'y a pas besoin
d'authentification
- // pour consulter les statistiques.
require_once("header.inc.php");
if (!defined("FCT_STATISTIQUES"))
{
--- 22,27 ----
*/
require_once("header.inc.php");
+ require_once("constantes.inc.php"); // définition des constantes
if (!defined("FCT_STATISTIQUES"))
{
***************
*** 33,37 ****
exit;
}
- require_once("constantes.inc.php"); // définition des constantes
//require_once("fonctions.inc.php"); // concernant des fonctions
transversales inclassables
require_once("mysql.inc.php"); // concernant mysql
--- 32,35 ----
***************
*** 42,46 ****
//require_once("siteweb.inc.php"); // concernant les pages perso
des usagers et les sites web des structures
require_once("dateheure.inc.php"); // concernant la manipulation
des heures et des dates, formulaire, conversion...
! //require_once("structures.inc.php"); // concernant les structures
//require_once("initiations.inc.php"); // concernant les initiations
et les thèmes
require_once("parcours.inc.php"); // concernant les parcours des
usagers et leur positionnement
--- 40,44 ----
//require_once("siteweb.inc.php"); // concernant les pages perso
des usagers et les sites web des structures
require_once("dateheure.inc.php"); // concernant la manipulation
des heures et des dates, formulaire, conversion...
! require_once("structures.inc.php"); // concernant les structures
//require_once("initiations.inc.php"); // concernant les initiations
et les thèmes
require_once("parcours.inc.php"); // concernant les parcours des
usagers et leur positionnement
***************
*** 92,96 ****
echo "<form method=\"post\" action=\"$PHP_SELF\">";
echo "
! <table border=\"0\" align=\"center\">
<tr>
<td><h3 align=\"center\">Période</h3></td>
--- 90,94 ----
echo "<form method=\"post\" action=\"$PHP_SELF\">";
echo "
! <table border=\"1\" align=\"center\">
<tr>
<td><h3 align=\"center\">Période</h3></td>
***************
*** 140,144 ****
echo "
<tr>
! <td align=\"center\">
<input type=\"submit\" name=\"Submit\" value=\"Envoyer\">
</td>
--- 138,142 ----
echo "
<tr>
! <td align=\"center\" colspan=\"2\">
<input type=\"submit\" name=\"Submit\" value=\"Envoyer\">
</td>
***************
*** 173,176 ****
--- 171,181 ----
case 1 :
+ // Vérification de l'intérêt de la sélection
+ if (! defined("USAGES"))
+ {
+ echo "La fonctionnalité usages n'est pas activée";
+ break;
+ }
+
$req = "SELECT SEC_TO_TIME(SUM(TIME_TO_SEC(fin)-TIME_TO_SEC(debut))) AS
nbheure
FROM utilisation_postes
***************
*** 353,357 ****
echo "</table>\n";
-
// Essai d'affichage d'un camembert pour ces données
//print_r($stats1);
--- 358,361 ----
***************
*** 364,398 ****
$margin=8;
$filename=$dir_tmp_images.'camembert1.png';
! arsort($stats1);
! if (draw_camembert($stats1, $x, $y, $margin, $filename))
{
! //debug("ok");
! echo "<h3 align=center>Part de chacun des usages<br>
! <img src='image.inc.php?filename=$filename' alt='Camembert'
border='0'></h3>\n";
}
- else
- debug("Graphique pas ok !");
$filename=$dir_tmp_images.'camembert3.png';
! arsort($stats3);
! if (draw_camembert($stats3, $x, $y, $margin, $filename))
{
! //debug("ok");
! echo "<h3 align=center>Utilisation des postes par tarifs<br>
! <img src='image.inc.php?filename=$filename' alt='Camembert'
border='0'></h3>\n";
}
- else
- debug("Graphique pas ok !");
$filename=$dir_tmp_images.'camembert2.png';
! arsort($stats2);
! if (draw_camembert($stats2, $x, $y, $margin, $filename))
{
! //debug("ok");
! echo "<h3 align=center>Utilisation des postes par âges<br>
! <img src='image.inc.php?filename=$filename' alt='Camembert'
border='0'></h3>\n";
}
- else
- debug("Graphique pas ok !");
break;
--- 368,411 ----
$margin=8;
$filename=$dir_tmp_images.'camembert1.png';
! if (is_array($stats2))
{
! arsort($stats1);
! if (draw_camembert($stats1, $x, $y, $margin, $filename))
! {
! //debug("ok");
! echo "<h3 align=center>Part de chacun des usages<br>
! <img src='image.inc.php?filename=$filename' alt='Camembert'
border='0'></h3>\n";
! }
! else
! debug("Graphique pas ok !");
}
$filename=$dir_tmp_images.'camembert3.png';
! if (is_array($stats3))
{
! arsort($stats3);
! if (draw_camembert($stats3, $x, $y, $margin, $filename))
! {
! //debug("ok");
! echo "<h3 align=center>Utilisation des postes par tarifs<br>
! <img src='image.inc.php?filename=$filename' alt='Camembert'
border='0'></h3>\n";
! }
! else
! debug("Graphique pas ok !");
}
$filename=$dir_tmp_images.'camembert2.png';
! if (is_array($stats2))
{
! arsort($stats2);
! if (draw_camembert($stats2, $x, $y, $margin, $filename))
! {
! //debug("ok");
! echo "<h3 align=center>Utilisation des postes par âges<br>
! <img src='image.inc.php?filename=$filename' alt='Camembert'
border='0'></h3>\n";
! }
! else
! debug("Graphique pas ok !");
}
break;
***************
*** 578,582 ****
}
for ($j=$i; $j<1000; $j++)
! if ($tarifs[$i]>0)
echo "<td></td>";
--- 591,595 ----
}
for ($j=$i; $j<1000; $j++)
! if ($tarifs[$j]>0)
echo "<td></td>";
***************
*** 608,611 ****
--- 621,625 ----
echo "<td>$stat->nb</td>";
+
// Ligne nombre d'h sessions
echo "</tr>\n<tr><td>Nb d'heures d'initiation</td>";
***************
*** 624,639 ****
while ($stat = fetch_object($res))
{
! while ($i<$stat->id_tarif)
! {
! if ($tarifs[$i])
echo "<td></td>";
! $i++;
! }
! echo "<td>".datetoheure(minute2heure($stat->nb))."</td>";
! $i++;
}
for ($j=$i; $j<1000; $j++)
! if ($tarifs[$i]>0)
! echo "<td></td>";
$req = "SELECT SUM(TIME_TO_SEC(fin)-TIME_TO_SEC(debut))/60 AS nb,
--- 638,653 ----
while ($stat = fetch_object($res))
{
! while ($i < $stat->id_tarif)
! {
! if ($tarifs[$i])
echo "<td></td>";
! $i++;
! }
! echo "<td>".datetoheure(minute2heure($stat->nb))."</td>";
! $i++;
}
for ($j=$i; $j<1000; $j++)
! if ($tarifs[$j] > " ")
! echo "<td></td>";
$req = "SELECT SUM(TIME_TO_SEC(fin)-TIME_TO_SEC(debut))/60 AS nb,
***************
*** 690,694 ****
}
for ($j=$i; $j<1000; $j++)
! if ($tarifs[$i]>0)
echo "<td></td>";
--- 704,708 ----
}
for ($j=$i; $j<1000; $j++)
! if ($tarifs[$j] > " ")
echo "<td></td>";
***************
*** 939,943 ****
GROUP BY id_localisation";
$res = executeRequete($req);
! $i="";
$nbt=0;
if ($stat = fetch_object($res))
--- 953,957 ----
GROUP BY id_localisation";
$res = executeRequete($req);
! $i="";
$nbt=0;
if ($stat = fetch_object($res))
***************
*** 1049,1052 ****
--- 1063,1073 ----
case 7 : // USAGERS
+ {
+ // Est-ce pretinent ?
+ if (! defined("UTILISATIONS") || ! defined("USAGERS"))
+ {
+ echo $fctnonactive;
+ break;
+ }
// Calcul du nombre maxi d'usagers
***************
*** 1058,1062 ****
$where = "(utilisation_postes.date>='$datedeb'
AND utilisation_postes.date<='$datefin')";
! $where.=" AND etat<>'annulée'";
// Calcul de l'usager le plus grand utilisateur de l'accès individuel
$req1="SELECT SEC_TO_TIME(SUM(TIME_TO_SEC(fin)-TIME_TO_SEC(debut))) AS
nbmaxheure
--- 1079,1083 ----
$where = "(utilisation_postes.date>='$datedeb'
AND utilisation_postes.date<='$datefin')";
! $where.=" AND etat<>'annulée' AND id_usager>0";
// Calcul de l'usager le plus grand utilisateur de l'accès individuel
$req1="SELECT SEC_TO_TIME(SUM(TIME_TO_SEC(fin)-TIME_TO_SEC(debut))) AS
nbmaxheure
***************
*** 1155,1162 ****
// 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é')";
! $where.=" AND".$where2;
/*
--- 1176,1182 ----
// Condition interval de date demandé.
! $where = "(sessions.date>='$datedeb' AND sessions.date<='$datefin') AND
(sessions.etat<>'annulée')";
! $where.= " AND ";
! $where.= "(parcours.etat<>'absent' AND parcours.etat<>'indispensable' AND
parcours.etat<>'conseillé')";
/*
***************
*** 1164,1168 ****
*/
! // Calcul de l'usager le plus grand utilisateur de l'accès individuel
$req1="SELECT SEC_TO_TIME(SUM(TIME_TO_SEC(fin)-TIME_TO_SEC(debut))) AS
nbmaxheure, id_usager
FROM sessions
--- 1184,1188 ----
*/
! // Calcul de l'usager le plus grand utilisateur des activités collectives
$req1="SELECT SEC_TO_TIME(SUM(TIME_TO_SEC(fin)-TIME_TO_SEC(debut))) AS
nbmaxheure, id_usager
FROM sessions
***************
*** 1182,1198 ****
$ndecile=1;
$ntotdeciles=6;
// Nombre d'usagers n'ayant jamais été en activités collectives pendant
la période...
! // TODO : réparer parce que ça ne marche pas...
! $req2="SELECT usagers.id
! FROM usagers
! LEFT JOIN parcours ON parcours.id_usager=usagers.id
! LEFT JOIN sessions ON sessions.id=parcours.id_session
! WHERE (parcours.id_usager IS NULL)";
! // AND $where";
$res2=executeRequete($req2);
! //debug($req2);
! $stat2=num_rows($res2);
! $valeurs=$nbmaxusagers-$stat2; $n=0;
// Les utilisateurs
--- 1202,1214 ----
$ndecile=1;
$ntotdeciles=6;
+ // Nombre d'usagers ayant suivi des activités collectives
+ $nbusagersactcoll=num_rows($res1);
// Nombre d'usagers n'ayant jamais été en activités collectives pendant
la période...
! // Nombre d'usagers
! $req2="SELECT COUNT(id) AS nb_usagers FROM usagers";
$res2=executeRequete($req2);
! $stat2=fetch_object($res2);
! $valeurs=$stat2->nb_usagers-$nbusagersactcoll; $n=0;
// Les utilisateurs
***************
*** 1211,1215 ****
$tableau[$i][$j]["contenu"]="<b>Graphe</b>";
$j++;
!
$tableau[$i][$j]["contenu"]="<b>Bénéficiaire<br>d'acitivités<br>collectives</b>";
$j++;
$tableau[$i][$j]["contenu"]="<b>Nombre<br>d'usagers<br>concernés</b>";
--- 1227,1231 ----
$tableau[$i][$j]["contenu"]="<b>Graphe</b>";
$j++;
!
$tableau[$i][$j]["contenu"]="<b>Bénéficiaire<br>d'acitivités<br>collectives
jusqu'à</b>";
$j++;
$tableau[$i][$j]["contenu"]="<b>Nombre<br>d'usagers<br>concernés</b>";
***************
*** 1263,1267 ****
break;
! }
echo cadre_fin();
--- 1279,1390 ----
break;
! }
!
!
//-----------------------------------------------------------------------------------------/
! // INFORMATIONS SUR LES USAGERS ENREGISTRES
!
//-----------------------------------------------------------------------------------------/
!
! case 8 : // USAGERS ENREGISTRES
! {
! // Est-ce pretinent ?
! if (! defined("USAGERS"))
! {
! echo $fctnonactive;
! break;
! }
!
! echo "<p>La sélection des dates n'a pas d'effet sur les statistiques
suivantes.</p>\n";
!
! echo "<p>Les usagers inscrits dans ";
! switch ($lieuv[0])
! {
! case "V" :
! $where="AND CONCAT(\"V\",structures.ville)=\"$lieuv\"";
! echo "la ville de ".substr($lieuv,1);
! break;
! case "S" :
! $where="AND CONCAT(\"S\",structures.id)=\"$lieuv\"";
! echo "la structure ".structure(substr($lieuv,1));
! break;
! default :
! $where="";
! echo "n'importe quelle structure";
! break;
! }
! echo "</p>\n";
!
! // Tarifs
! if (defined("CREDITS") && defined("TARIFS"))
! {
! echo "<table border='1' align='center' bgcolor='#CCFFFF'>\n
! <tr><th>$starifs</th><th>$snbusagers</th>";
!
! $req="SELECT id_tarif, COUNT(id_usager) AS nb
! FROM credits
! LEFT JOIN usagers ON usagers.id=credits.id_usager
! LEFT JOIN structures ON
structures.id=usagers.id_structure_provenance
! WHERE (0=0) $where
! GROUP BY id_tarif ORDER BY id_tarif";
! $res=executeRequete($req); $itotal=0;
! while ($nbu=fetch_object($res))
! {
! echo "<tr></tr><th
bgcolor=\"{$couleurtarif[$nbu->id_tarif]}\">{$tarifs[$nbu->id_tarif]}</th>";
! echo "<td align=\"right\">$nbu->nb</td></tr>\n";
! $itotal+=$nbu->nb;
! }
! echo "<tr><th>$snbtotal</th><td align=\"right\">$itotal</td></tr>\n";
! echo "</table>\n<br />";
! }
!
! // Ages
! echo "<table border='1' align='center' bgcolor='#CCFFFF'>
!
<tr><th>$sages</th><th>$smasculin</th><th>$sfeminin</th><th>inconnu</th><th>$snbusagers</th>\n";
!
! $req="SELECT COUNT(usagers.id) AS nb,
! IF (YEAR(naissance)=0, 4,
INTERVAL(YEAR(CURDATE())-YEAR(naissance), 20, 40, 60)) as age,
! IFNULL(sexe, \"x\") AS sexe
! FROM usagers
! LEFT JOIN structures ON
structures.id=usagers.id_structure_provenance
! WHERE (0=0) $where
! GROUP BY age, sexe ORDER BY age, sexe DESC";
! $res=executeRequete($req); $itotal=0;
! debug($req);
! $suivant=TRUE;
! $asexe=array ("m", "f", "");
! for ($iage=0; $iage<=4; $iage++)
! {
! echo "<tr></tr><th>{$sintervalesages[$iage]}</th>";
! $itotala=0;
! foreach ($asexe as $ssexe)
! {
! if ($suivant) $nbu=fetch_object($res);
! if ($suivant=(($nbu->sexe==$ssexe) && ($nbu->age==$iage)))
! {
! echo "<td align=\"right\">{$nbu->nb}</td>\n";
! $itotala+=$nbu->nb;
! $itotals[$ssexe]+=$nbu->nb;
! }
! else
! echo "<td></td>\n";
! } // for $sexe
! echo "<td align=\"right\">$itotala</td>\n";
! $itotal+=$itotala;
! echo "</tr>\n";
! } // for $age
! echo "<tr><th>$snbtotal</th>";
! foreach ($asexe as $ssexe)
! echo "<td align=\"right\">{$itotals[$ssexe]}</td>\n";
! echo "<td align=\"right\">$itotal</td></tr>\n";
! echo "</table>\n<br />";
!
! break;
!
!
!
! } // case 8
!
! } // switch
!
!
echo cadre_fin();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Epnadmin-fr] CVS: epnadmin epnadminv.css, NONE, 1.1 fr.lang.inc.php, 1.31, 1.32 localisations.php, 1.9, 1.10 stats.php, 1.21, 1.22,
Loïc Dayot <=