'frs_4', 'frs_4' => 'frs_4', 'frs_3' => 'frs_3', 'frwikisource' => 'frs_4', ); $wikiname = array( 'frs_4' => 'Wikisource (q4)', 'frs_3' => 'Wikisource (q3)', ); if ($wiki and $okwiki[$wiki]) { $wiki = $okwiki[$wiki]; } else { $wiki = 'frs_4'; } $wikisite = 'fr.wiktionary'; if (!$start || $start <= 0) { $start = 0; } if (!$number || $number <= 0 || $number > 500) { $number = 120; } # Condition $where = ''; $conditions = ''; $fin = str_replace('%', '\%', mysql_real_escape_string($_GET['fin'])); $debut = str_replace('%', '\%', mysql_real_escape_string($_GET['debut'])); $contient = str_replace('%', '\%', mysql_real_escape_string($_GET['contient'])); $inverse = str_replace('%', '\%', mysql_real_escape_string($_GET['inverse'])); if ($fin) { $conditions .= "mot LIKE '%$fin'"; } if ($debut) { if ($conditions) { $conditions .= " AND "; } $conditions .= "mot LIKE '$debut%'"; } if ($contient) { if ($conditions) { $conditions .= " AND "; } if ($inverse) { $conditions .= 'NOT ';} $conditions .= "mot LIKE '%$contient%'"; } if ($afrom) { if ($conditions) { $conditions .= " AND "; } $conditions .= "afrom >= $afrom"; } if ($ato) { if ($conditions) { $conditions .= " AND "; } $conditions .= "afrom <= $ato"; } if ($conditions) { $where = "WHERE $conditions"; } ?>

Occurrence de mots inconnus

\n"; $prem_lettre = ''; while ($ligne = mysql_fetch_array($resultat)) { $article = $ligne['mot']; $nombre = $ligne['count']; $nlivres = $ligne['count_livres']; $annee_from = $ligne['afrom']; $annee_to = $ligne['ato']; $titre = $article; if (strlen($titre) > 40) { $titre = substr($titre, 0, 40) . '[...]'; } print "
  • $titre"; if ($nombre) { if ($nlivres) { print " (" . $nlivres . " livres, " . $nombre . " fois)"; } else { print " (".$nombre." fois)"; } } if ($annee_to && $annee_from) { if ($annee_to == $annee_from) { print " ($annee_from)"; } else { print " ($annee_from-$annee_to)"; } } print "
  • \n"; } print "\n"; } if ($number) { $table = 'compte_'.$wiki; $requete = "SELECT * FROM $table $where LIMIT $start, $number"; print "\n"; $resultat = mysql_query($requete) or print("La requète a échoué (il s'agit d'un bug ou bien le serveur a un problème).\n"); if ($resultat) { log_action('index_liste', $wiki, $requete); $before = $start - $number; $end = $start + $number; $navigation = ''; # Retour début if ($start==1) { $navigation .= "<< "; } else { $navigation .= "<< "; } # Recule if ($before > 0) { $navigation .= "< "; } else { $navigation .= "< "; } # Intervalle $navigation .= " $start-$end "; # Avance $newstart = $start + $number; $navigation .= ">"; print "
    "; print $navigation; print "
    \n"; affiche_wiki($resultat, $wiki, $wikisite); print "
    "; print $navigation; print "
    \n"; } else { print "Pas de résultat, désolé.\n"; } } else { print "Erreur (désolé).\n"; } ?>
    Filtre
    \n"; echo "\n"; echo ''; ?> Fin : '; echo ''; echo ' '; ?>
    Liens