diff --git a/ecrire/statistiques.php3 b/ecrire/statistiques.php3 index 111fc9f0f5bb2a915aaaec2d59e8f19961e8e79c..62017cfd4a6add5c41bdf088bb322cfc27ba2a65 100644 --- a/ecrire/statistiques.php3 +++ b/ecrire/statistiques.php3 @@ -103,17 +103,19 @@ function enfants_aff($id_parent,$decalage, $gauche=0) { } echo "<TABLE CELLPADDING=2 CELLSPACING=0 BORDER=0 width='100%'>"; echo "<TR BGCOLOR='$couleur' BACKGROUND='img_pack/rien.gif' width='100%'><TD style='border-bottom: 1px solid #cccccc;'>"; + if ($niveau==0){ + $pourcent = round($nombre_vis[$id_rubrique]/$abs_total*100); + echo "<div style='float: $spip_lang_right;'>$pourcent%</div>"; + } + echo "<IMG SRC='img_pack/rien.gif' WIDTH='".($niveau*20+1)."' HEIGHT=8 BORDER=0>"; + if ( $largeur_rouge > 2) echo bouton_block_invisible("stats$id_rubrique"); echo "<span class='verdana1'>"; echo "<A HREF='naviguer.php3?coll=$id_rubrique' style='color: black;'>$titre</A>"; - if ($niveau==0){ - $pourcent = round($nombre_vis[$id_rubrique]/$abs_total*100); - echo "<div style='float: $spip_lang_right;'>$pourcent %</div>"; - } echo "</span>"; echo "</TD><TD ALIGN='right' width='105' style='border-bottom: 1px solid #cccccc;'>"; @@ -180,7 +182,9 @@ if ($total_vis<1) $total_vis=1; debut_cadre_relief("statistiques-24.gif"); //echo "<TABLE CELLPADDING=2 CELLSPACING=0 BORDER=0 style='border: 1px solid #aaaaaa;'>"; +echo "<div style='border: 1px solid #aaaaaa;'>"; enfants_aff(0,100); +echo "</div>"; //echo "<TR><TD></TD><TD><IMG SRC='img_pack/rien.gif' WIDTH=100 HEIGHT=1 BORDER=0></TD>"; diff --git a/ecrire/statistiques_lang.php3 b/ecrire/statistiques_lang.php3 index 93469dd910078973711088f2c96fd01592565606..7e316ef5bc3b295c62abebdec3d20a592075ff6e 100644 --- a/ecrire/statistiques_lang.php3 +++ b/ecrire/statistiques_lang.php3 @@ -69,71 +69,6 @@ function enfants($id_parent){ } -function enfants_aff($id_parent,$decalage) { - global $total_vis; - global $ifond; - global $niveau; - global $nombre_vis; - global $nombre_abs; - global $couleur_claire, $spip_lang_right; - global $abs_total; - $query="SELECT id_rubrique, titre FROM spip_rubriques WHERE id_parent=\"$id_parent\" ORDER BY titre"; - $result=spip_query($query); - - - while($row = spip_fetch_array($result)){ - $id_rubrique = $row['id_rubrique']; - $titre = typo($row['titre']); - - if ($nombre_vis[$id_rubrique]>0 OR $nombre_abs[$id_rubrique]>0){ - $largeur_rouge = floor(($nombre_vis[$id_rubrique] - $nombre_abs[$id_rubrique]) * 100 / $total_vis); - $largeur_vert = floor($nombre_abs[$id_rubrique] * 100 / $total_vis); - - if ($largeur_rouge+$largeur_vert>0){ - if ($ifond==0){ - $ifond=1; - $couleur="#FFFFFF"; - }else{ - $ifond=0; - $couleur="$couleur_claire"; - } - if ($niveau==0) { - $couleur='#DDDDCC'; - $titre = majuscules($titre); - } - - echo "<TR BGCOLOR='$couleur' BACKGROUND='img_pack/rien.gif'><TD WIDTH=\"100%\">"; - echo "<IMG SRC='img_pack/rien.gif' WIDTH='".($niveau*20+1)."' HEIGHT=8 BORDER=0>"; - echo "<FONT FACE='arial,helvetica,sans-serif' SIZE=2>"; - echo "<A HREF='naviguer.php3?coll=$id_rubrique'>$titre</A>"; - - if ($niveau==0){ - $pourcent=round($nombre_vis[$id_rubrique]/$abs_total*100); - echo " $pourcent %"; - } - - echo "</FONT>"; - echo "</TD><TD ALIGN='right'>"; - - - echo "<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 WIDTH=".($decalage+1)." HEIGHT=8>"; - echo "<TR><TD BACKGROUND='img_pack/jauge-fond.gif' ALIGN='right'>"; - if ($largeur_vert>0) echo "<IMG SRC='img_pack/jauge-vert.gif' WIDTH=$largeur_vert HEIGHT=8 BORDER=0>"; - if ($largeur_rouge>0) echo "<IMG SRC='img_pack/jauge-rouge.gif' WIDTH=$largeur_rouge HEIGHT=8 BORDER=0>"; - echo "<IMG SRC='img_pack/rien.gif' HEIGHT=8 WIDTH=1 BORDER=0>"; - - echo "</TD></TR></TABLE>\n"; - echo "</TD></TR>"; - } - } - $niveau++; - enfants_aff($id_rubrique,$largeur_rouge); - $niveau--; - } - -} - - @@ -175,7 +110,7 @@ debut_cadre_enfonce("langues-24.gif"); echo "<tr bgcolor='$couleur'>"; $dir=lang_dir($lang,'',' dir=rtl'); - echo "<td width='100%' style='border-bottom: 1px solid #cccccc;'><span class='verdana2'$dir>".traduire_nom_langue($lang)."<div style='float: $spip_lang_right;'>$visites%</div></span></td>"; + echo "<td width='100%' style='border-bottom: 1px solid #cccccc;'><span class='verdana2'$dir><div style='float: $spip_lang_right;'>$visites%</div>".traduire_nom_langue($lang)."</span></td>"; echo "<td style='border-bottom: 1px solid #cccccc;'>"; echo "<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 WIDTH='100' HEIGHT=8>";