$recherche_aff)));
if (strlen($recherche)) {
include_spip('inc/rechercher');
include_spip('base/abstract_sql');
$tables = liste_des_champs();
//unset($tables['document']);
unset($tables['forum']);
unset($tables['syndic_article']);
$results = recherche_en_base($recherche, $tables, array('jointures' => true, 'score' => false)); // true => a gerer dans l'affichage, autant faire un squelette
/* $modifier = false;
foreach ($results as $table => $r) {
foreach ($r as $id => $x) {
$modifier |= autoriser('modifier', $table, $id);
}
}
*/
// Ajouter la recherche par identifiant
if (preg_match(',^[0-9]+$,', $recherche)
AND $id = intval($recherche))
foreach ($tables as $table => $x) {
$t = sql_countsel(table_objet_sql($table), id_table_objet($table)."=".sql_quote($id));
if ($t
AND autoriser('voir', $table, $id)
AND !isset($results[$table][$id]))
$results[$table][$id] = array();
}
}
echo debut_grand_cadre(true);
echo formulaire_recherche("recherche");
/*
// Si on est autorise a modifier, proposer le choix de REMPLACER
// Il faudra aussi pouvoir indiquer sur quels elements on veut effectuer le remplacement...
if ($modifier) {
echo '
';
}
*/
if ($results) {
echo ""._T('info_resultat_recherche')."
";
echo "
"._T('avis_aucun_resultat')."
"; echo fin_grand_cadre(true), fin_page(); } ?>