[ Index ] |
|
Code source de SPIP 1.8.3 |
1 <?php 2 3 /***************************************************************************\ 4 * SPIP, Systeme de publication pour l'internet * 5 * * 6 * Copyright (c) 2001-2005 * 7 * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James * 8 * * 9 * Ce programme est un logiciel libre distribue sous licence GNU/GPL. * 10 * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. * 11 \***************************************************************************/ 12 13 14 include ("inc.php3"); 15 16 include_ecrire ("inc_admin.php3"); 17 18 debut_page(_L('Moteur de recherche'), "administration", "cache"); 19 20 21 echo "<br><br><br>"; 22 gros_titre(_L('Moteur de recherche')); 23 24 25 debut_gauche(); 26 27 debut_droite(); 28 29 if ($connect_statut != '0minirezo' OR !$connect_toutes_rubriques) { 30 echo _T('avis_non_acces_page'); 31 fin_page(); 32 exit; 33 } 34 35 include_ecrire ('inc_index.php3'); 36 37 38 if ($forcer_indexation = intval($forcer_indexation)) 39 effectuer_une_indexation ($forcer_indexation); 40 41 if ($forcer_reindexation == 'oui') 42 creer_liste_indexation(); 43 44 if ($purger == 'oui') { 45 purger_index(); 46 creer_liste_indexation(); 47 } 48 49 echo "<a href='admin_index.php3?mise_a_jour=oui'>"._L('Cliquez ici pour mettre à jour les infos d\'indexation du site').'</a><br />'; 50 echo "<a href='admin_index.php3?forcer_indexation=20'>"._L('Cliquez ici pour forcer l\'indexation du site').'</a><br />'; 51 echo "<a href='admin_index.php3?forcer_reindexation=oui'>"._L('Cliquez ici pour relancer l\'indexation du site sans purger les données.').'</a><br />'; 52 echo "<a href='admin_index.php3?purger=oui'>"._L('Cliquez ici pour purger les tables d\'indexation.').'</a><br />'; 53 54 55 56 57 58 // graphe des objets indexes 59 $types = array('article','auteur','breve','mot','rubrique','syndic','forum','signature','document'); 60 while (list(,$type) = each($types)) { 61 $table = 'spip_'.table_objet($type); 62 $table_index = 'spip_index_'.table_objet($type); 63 $critere = critere_indexation($type); 64 65 // mise a jour des idx='' en fonction du contenu de la table d'indexation 66 if ($mise_a_jour) { 67 $vus=''; 68 $s = spip_query("SELECT DISTINCT(id_$type) FROM $table_index"); 69 while ($t = spip_fetch_array($s)) 70 $vus.=','.$t[0]; 71 if ($vus) 72 spip_query("UPDATE $table SET idx='oui' WHERE id_$type IN (0$vus) AND $critere AND idx=''"); 73 } 74 75 // 76 $s = spip_query("SELECT idx,COUNT(*) FROM $table WHERE $critere GROUP BY idx"); 77 while ($t = spip_fetch_array($s)) { 78 $indexes[$type][$t[0]] = $t[1]; 79 $index_total[$type] += $t[1]; 80 } 81 } 82 83 84 debut_cadre_relief(); 85 86 function jauge($couleur,$pixels) { 87 if ($pixels) 88 echo http_img_pack("jauge-$couleur.gif", $couleur, "height='10' width='$pixels'"); 89 } 90 91 echo "<table>"; 92 reset ($types); 93 while (list(,$type) = each($types)) if ($index_total[$type]>0) { 94 if ($ifond==0){ 95 $ifond=1; 96 $couleur="$couleur_claire"; 97 }else{ 98 $ifond=0; 99 $couleur="#FFFFFF"; 100 } 101 echo "<TR BGCOLOR='$couleur' BACKGROUND='" . _DIR_RESTREINT . "rien.gif'><TD WIDTH=\"100\">"; 102 echo "<FONT FACE='arial,helvetica,sans-serif' SIZE=2>"; 103 echo $type; 104 echo "</FONT><TD>"; 105 jauge('rouge', $a = floor(300*$indexes[$type]['non']/$index_total[$type])); 106 jauge('vert', $b = ceil(300*$indexes[$type]['oui']/$index_total[$type])); 107 jauge('fond', 300-$a-$b); 108 echo "</TD></TR>\n"; 109 } 110 echo "</table>"; 111 112 fin_cadre_relief(); 113 114 115 echo "<BR>"; 116 117 fin_page(); 118 119 120 ?> 121
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Thu Feb 22 22:27:47 2007 | par Balluche grâce à PHPXref 0.7 |