"; gros_titre(_L('Moteur de recherche')); debut_gauche(); debut_droite(); if ($connect_statut != '0minirezo' OR !$connect_toutes_rubriques) { echo _T('avis_non_acces_page'); fin_page(); exit; } include_ecrire('inc_index.php3'); if ($forcer_indexation = intval($forcer_indexation)) effectuer_une_indexation ($forcer_indexation); if ($forcer_reindexation == 'oui') creer_liste_indexation(); if ($purger == 'oui') { purger_index(); creer_liste_indexation(); } echo ""._L('Cliquez ici pour mettre à jour les infos d\'indexation du site').'
'; echo ""._L('Cliquez ici pour forcer l\'indexation du site').'
'; echo ""._L('Cliquez ici pour relancer l\'indexation du site sans purger les données.').'
'; echo ""._L('Cliquez ici pour purger les tables d\'indexation.').'
'; // graphe des objets indexes $types = array('article','auteur','breve','mot','rubrique','syndic','forum','signature','document'); while (list(,$type) = each($types)) { $table = 'spip_'.table_objet($type); $table_index = 'spip_index_'.table_objet($type); $critere = critere_indexation($type); // mise a jour des idx='' en fonction du contenu de la table d'indexation if ($mise_a_jour) { $vus=''; $s = spip_query("SELECT DISTINCT(id_$type) FROM $table_index"); while ($t = spip_fetch_array($s)) $vus.=','.$t[0]; if ($vus) spip_query("UPDATE $table SET idx='oui' WHERE id_$type IN (0$vus) AND $critere AND idx=''"); } // $s = spip_query("SELECT idx,COUNT(*) FROM $table WHERE $critere GROUP BY idx"); while ($t = spip_fetch_array($s)) { $indexes[$type][$t[0]] = $t[1]; $index_total[$type] += $t[1]; } } debut_cadre_relief(); function jauge($couleur,$pixels) { if ($pixels) echo http_img_pack("jauge-$couleur.gif", $couleur, "height='10' width='$pixels'"); } echo ""; reset ($types); while (list(,$type) = each($types)) if ($index_total[$type]>0) { if ($ifond==0){ $ifond=1; $couleur="$couleur_claire"; }else{ $ifond=0; $couleur="#FFFFFF"; } echo "\n"; } echo "
"; echo ""; echo $type; echo ""; jauge('rouge', $a = floor(300*$indexes[$type]['non']/$index_total[$type])); jauge('vert', $b = ceil(300*$indexes[$type]['oui']/$index_total[$type])); jauge('fond', 300-$a-$b); echo "
"; fin_cadre_relief(); echo "
"; fin_page(); ?>