[ Index ] |
|
Code source de SPIP Agora 1.4 |
1 <?php 2 /***************************************************** 3 * This file is part of Agora, web based content management system. 4 * 5 * Agora is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; version 2 of the License. 8 * 9 * Agora is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details (file "COPYING"). 13 * 14 * Copyright © Arnaud Martin, Antoine Pitrou et Philippe Rivière. 15 * List of authors detailed in "copyright_fr.html" file. 16 * E-mail : agora@sig.premier-ministre.gouv.fr 17 * Web site : http://www.agora.gouv.fr 18 *****************************************************/ 19 include ("inc.php"); 20 21 debut_page(_T('titre_page_etat_traductions'), "asuivre", "plan-trad"); 22 23 $authorization = &recuperer_instance_authorization('afficherStatistiqueTrad', 24 $GLOBALS['connect_id_auteur'], 25 array('connect_toutes_rubriques' => $connect_toutes_rubriques)); 26 27 if ($authorization->isAuthorizedAction()) { 28 echo "<br>"; 29 barre_onglets("traductions", "bilan"); 30 } 31 32 debut_gauche(); 33 34 debut_droite(); 35 36 $authorization = &recuperer_instance_authorization('afficherStatistiqueTrad', 37 $GLOBALS['connect_id_auteur'], 38 array('connect_toutes_rubriques' => $connect_toutes_rubriques)); 39 40 if (!$authorization->isAuthorizedAction()) { 41 echo _T('avis_non_acces_page'); 42 fin_page(); 43 exit; 44 } 45 46 // 47 // Statistiques des traductions 48 // 49 50 debut_cadre_relief ("langues-24.gif"); 51 52 $langues = explode(',', lire_meta('langues_multilingue')); 53 54 $traduits = array(); 55 $conflits = array(); 56 57 while (list(, $trad_lang) = each($langues)) { 58 $articleMetier = &recuperer_instance_article(); 59 $row = $articleMetier->getTradStatistics($trad_lang); 60 61 if (PEAR::isError($rows)) { 62 die ($rows->getMessage()); 63 } 64 65 if (!$row) 66 continue; 67 68 if (!$row['total']) 69 continue; 70 71 $traduits[$trad_lang] = 1.0 * $row['traduits'] / $row['total']; 72 $conflits[$trad_lang] = 1.0 * $row['conflits'] / $row['total']; 73 } 74 75 echo "<table cellpadding='2' cellspacing='0' border='0' width='100%'>\n"; 76 $ifond = 1; 77 78 arsort($traduits); 79 80 while (list($trad_lang, $coef_traduits) = each($traduits)) { 81 $coef_conflits = $conflits[$trad_lang]; 82 $coef_traduits -= $coef_conflits; 83 84 if ($ifond==0) { 85 $ifond=1; 86 $couleur=""; 87 } 88 else { 89 $ifond=0; 90 $couleur="$couleur_claire"; 91 } 92 93 $largeur = 200; 94 $vert = intval(($largeur - 2) * $coef_traduits); 95 $rouge = intval(($largeur - 2) * $coef_conflits); 96 97 echo "<tr bgcolor='$couleur'>"; 98 $dir = lang_dir($trad_lang, '', ' dir=rtl'); 99 echo "<td width='100%'><font face='Verdana,Arial,Sans,sans-serif' size='2'>"; 100 echo "<a$dir href='plan_trad.php?trad_lang=$trad_lang'>".traduire_nom_langue($trad_lang)."</a>"; 101 echo " : ".intval(($coef_traduits + $coef_conflits) * 100)."%"; 102 echo "</font></td>\n"; 103 echo "<td>"; 104 105 echo "<table cellpadding='0' cellspacing='0' border='0' width='$largeur' height='8'>\n"; 106 echo "<tr>\n<td align='left'>"; 107 echo "<img src='img_pack/jauge-fond.gif' height='8' width='$largeur' style='position: relative;'>"; 108 if ($vert) echo "<img src='img_pack/jauge-vert.gif' width='$vert' height='8' style='position: relative; top: -8px; left: 1px;'>"; 109 if ($rouge) echo "<img src='img_pack/jauge-rouge.gif' width='$rouge' height='8' style='position: relative; top: -8px; left: 1px;'>"; 110 echo "<img src='img_pack/rien.gif' height='8' width='1' border='0'>"; 111 echo "</td>\n</tr>\n</table>\n"; 112 echo "</td>\n"; 113 echo "</tr>\n"; 114 } 115 echo "</table>\n"; 116 117 echo "<p><font face='Verdana,Arial,Sans,sans-serif' size='2'>"._T('texte_bilan_traductions')."</font>"; 118 119 fin_cadre_relief(); 120 121 fin_page(); 122 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sat Feb 24 14:40:03 2007 | par Balluche grâce à PHPXref 0.7 |