Example #1
0
 function save_form()
 {
     global $dbh;
     //max_aut_link
     //f_aut_link_typexxx
     //f_aut_link_tablexxx
     //f_aut_link_idxxx
     global $max_aut_link;
     global $include_path;
     if (!$this->aut_table && !$this->id) {
         return;
     }
     $this->delete_link();
     for ($i = 0; $i < $max_aut_link; $i++) {
         eval("global \$f_aut_link_table" . $i . ";\$f_aut_link_table= \$f_aut_link_table{$i};");
         eval("global \$f_aut_link_id" . $i . ";\$f_aut_link_id= \$f_aut_link_id{$i};");
         eval("global \$f_aut_link_type" . $i . ";\$f_aut_link_type= \$f_aut_link_type{$i};");
         eval("global \$f_aut_link_reciproc" . $i . ";\$f_aut_link_reciproc= \$f_aut_link_reciproc{$i};");
         eval("global \$f_aut_link_comment" . $i . ";\$f_aut_link_comment= \$f_aut_link_comment{$i};");
         // Les selecteurs de concept retourne l'uri et non id
         if ($f_aut_link_table == AUT_TABLE_CONCEPT && !is_numeric($f_aut_link_id)) {
             $f_aut_link_id = onto_common_uri::get_id($f_aut_link_id);
         }
         if ($f_aut_link_reciproc) {
             $f_aut_link_reciproc = 1;
         }
         if ($f_aut_link_id && $f_aut_link_table && $f_aut_link_type && !($this->aut_table == $f_aut_link_table && $this->id == $f_aut_link_id)) {
             $requete = "INSERT INTO aut_link (aut_link_from, aut_link_from_num, aut_link_to,aut_link_to_num , aut_link_type, aut_link_reciproc, aut_link_comment) \n\t \t\t\tVALUES ('" . $this->aut_table . "', '" . $this->id . "','" . $f_aut_link_table . "', '" . $f_aut_link_id . "', '" . $f_aut_link_type . "', '" . $f_aut_link_reciproc . "','" . $f_aut_link_comment . "')";
             pmb_mysql_query($requete);
         }
         if ($f_aut_link_reciproc) {
             $indexation_authority = new indexation_authority($include_path . "/indexation/authorities/titres_uniformes/champs_base.xml", "authorities", AUT_TABLE_TITRES_UNIFORMES);
             $indexation_authority->maj($f_aut_link_id, 'aut_link');
         }
     }
 }
 static function update_index($id)
 {
     global $dbh;
     global $include_path;
     $indexation_authority = new indexation_authority($include_path . "/indexation/authorities/collections/champs_base.xml", "authorities", AUT_TABLE_COLLECTIONS);
     $indexation_authority->maj($id);
     // On cherche tous les n-uplet de la table notice correspondant à cette collection.
     $found = pmb_mysql_query("select distinct notice_id from notices where coll_id='" . $id . "'", $dbh);
     // Pour chaque n-uplet trouvés on met a jour la table notice_global_index avec la collection modifiée :
     while ($mesNotices = pmb_mysql_fetch_object($found)) {
         $notice_id = $mesNotices->notice_id;
         notice::majNoticesGlobalIndex($notice_id);
         notice::majNoticesMotsGlobalIndex($notice_id, 'collection');
     }
 }
Example #3
0
 static function update_index($id)
 {
     global $dbh;
     global $include_path;
     $indexation_authority = new indexation_authority($include_path . "/indexation/authorities/series/champs_base.xml", "authorities", AUT_TABLE_SERIES);
     $indexation_authority->maj($id);
     // On cherche tous les n-uplet de la table notice correspondant à cette série.
     $found = pmb_mysql_query("select distinct(notice_id) from notices where tparent_id='" . $id . "'", $dbh);
     // Pour chaque n-uplet trouvés on met a jour la table notice_global_index avec la série modifiée :
     while ($mesNotices = pmb_mysql_fetch_object($found)) {
         $notice_id = $mesNotices->notice_id;
         notice::majNotices($notice_id);
         //Le titre de série est indexé dans les index de la notice
         notice::majNoticesGlobalIndex($notice_id);
         notice::majNoticesMotsGlobalIndex($notice_id, 'serie');
     }
 }
 static function update_index($id)
 {
     global $dbh;
     global $include_path;
     $indexation_authority = new indexation_authority($include_path . "/indexation/authorities/titres_uniformes/champs_base.xml", "authorities", AUT_TABLE_TITRES_UNIFORMES);
     $indexation_authority->maj($id);
     // On cherche tous les n-uplet de la table notice correspondant à ce titre_uniforme.
     $found = pmb_mysql_query("select ntu_num_notice from notices_titres_uniformes where ntu_num_tu = " . $id, $dbh);
     // Pour chaque n-uplet trouvés on met a jour la table notice_global_index avec l'auteur modifié :
     while ($mesNotices = pmb_mysql_fetch_object($found)) {
         $notice_id = $mesNotices->ntu_num_notice;
         notice::majNoticesGlobalIndex($notice_id);
         notice::majNoticesMotsGlobalIndex($notice_id, 'uniformtitle');
         //TODO preciser le datatype avant d'appeler cette fonction
     }
 }
    }
}
if (!noeuds::isProtected($id)) {
    //Ajout des renvois "voir aussi"
    $requete = "DELETE FROM voir_aussi WHERE num_noeud_orig=" . $id;
    pmb_mysql_query($requete);
    for ($i = 0; $i < $max_categ; $i++) {
        $categ_id = "f_categ_id" . $i;
        $categ_rec = "f_categ_rec" . $i;
        if (${$categ_id} && ${$categ_id} != $id) {
            $requete = "INSERT INTO voir_aussi (num_noeud_orig, num_noeud_dest, langue) VALUES ({$id}," . ${$categ_id} . ",'" . $thes->langue_defaut . "' )";
            @pmb_mysql_query($requete);
            if (${$categ_rec}) {
                $requete = "INSERT INTO voir_aussi (num_noeud_orig, num_noeud_dest, langue) VALUES (" . ${$categ_id} . "," . $id . ",'" . $thes->langue_defaut . "' )";
                $indexation_authority = new indexation_authority($include_path . "/indexation/authorities/categories/champs_base.xml", "authorities", AUT_TABLE_CATEG);
                $indexation_authority->maj(${$categ_id}, 'subject');
            } else {
                $requete = "DELETE from voir_aussi where num_noeud_dest = '" . $id . "' and num_noeud_orig = '" . ${$categ_id} . "'\t";
            }
            @pmb_mysql_query($requete);
        }
    }
}
//synchro_rdf : le noeud a été créé/modifié
if ($pmb_synchro_rdf) {
    //De nouveaux noeuds impactés ?
    if (!count($arrayIdImpactes) || !in_array($id, $arrayIdImpactes)) {
        $arrayIdImpactes[] = $id;
    }
    if ($noeud->num_parent != $thes->num_noeud_racine) {
        if (!count($arrayIdImpactes) || !in_array($noeud->num_parent, $arrayIdImpactes)) {
 static function update_index($id)
 {
     global $dbh;
     global $include_path;
     $indexation_authority = new indexation_authority($include_path . "/indexation/authorities/categories/champs_base.xml", "authorities", AUT_TABLE_CATEG);
     $indexation_authority->maj($id);
     //ajout des mots des termes dans la table words pour l autoindexation
     $q = "select trim(index_categorie) as index_categorie, langue from categories where num_noeud=" . $id;
     $r = pmb_mysql_query($q, $dbh);
     $i = 0;
     $t_words = array();
     if (pmb_mysql_num_rows($r)) {
         while ($row = pmb_mysql_fetch_object($r)) {
             $t_row = explode(' ', $row->index_categorie);
             if (is_array($t_row) && count($t_row)) {
                 $t_row = array_unique($t_row);
                 foreach ($t_row as $w) {
                     if ($w) {
                         $t_words[$i]['word'] = $w;
                         $t_words[$i]['lang'] = $row->langue;
                         $i++;
                     }
                 }
             }
         }
     }
     if (count($t_words)) {
         //calcul de stem et double_metaphone
         foreach ($t_words as $i => $w) {
             $q1 = "select id_word from words where word='" . addslashes($w['word']) . "' and lang='" . addslashes($w['lang']) . "' limit 1";
             $r1 = pmb_mysql_query($q1, $dbh);
             if (pmb_mysql_num_rows($r1)) {
                 //le mot existe
                 $t_words[$i]['allready_exists'] = 1;
             } else {
                 //le mot n'existe pas
                 $dmeta = new DoubleMetaPhone($w['word']);
                 if ($dmeta->primary || $dmeta->secondary) {
                     $t_words[$i]['double_metaphone'] = $dmeta->primary . " " . $dmeta->secondary;
                 }
                 if ($w['lang'] == 'fr_FR') {
                     $stemming = new stemming($w['word']);
                     $t_words[$i]['stem'] = $stemming->stem;
                 } else {
                     $t_words[$i]['stem'] = '';
                 }
             }
         }
         foreach ($t_words as $i => $w) {
             if (!$w['allready_exists']) {
                 $q2 = "insert ignore into words (word, lang, double_metaphone, stem) values ('" . $w['word'] . "', '" . $w['lang'] . "', '" . $w['double_metaphone'] . "', '" . $w['stem'] . "') ";
                 pmb_mysql_query($q2, $dbh);
             }
         }
     }
     // On cherche tous les n-uplet de la table notice correspondant à cette catégorie.
     $found = pmb_mysql_query("select distinct notcateg_notice from notices_categories where num_noeud='" . $id . "' ", $dbh);
     // Pour chaque n-uplet trouvés on met a jour la table notice_global_index avec l'auteur modifié :
     $num = pmb_mysql_num_rows($found);
     for ($j = 0; $j < $num; $j++) {
         $mesNotices = pmb_mysql_fetch_object($found);
         $notice_id = $mesNotices->notcateg_notice;
         notice::majNoticesGlobalIndex($notice_id);
         notice::majNoticesMotsGlobalIndex($notice_id, 'subject');
     }
     //on cherche les questions correspondantes...
     $query = "select num_faq_question from faq_questions_categories where num_categ = " . $id;
     $result = pmb_mysql_query($query);
     if (pmb_mysql_num_rows($result)) {
         $index = new indexation($include_path . "/indexation/faq/question.xml", "faq_questions");
         while ($row = pmb_mysql_fetch_object($result)) {
             $index->maj($row->num_faq_question, "categories");
         }
     }
 }
Example #7
0
 static function update_index($id)
 {
     global $dbh;
     global $include_path;
     $indexation_authority = new indexation_authority($include_path . "/indexation/authorities/publishers/champs_base.xml", "authorities", AUT_TABLE_PUBLISHERS);
     $indexation_authority->maj($id);
     // On cherche tous les n-uplet de la table notice correspondant a cet éditeur.
     $found = pmb_mysql_query("select distinct notice_id from notices where ed1_id='" . $id . "' OR ed2_id='" . $id . "'", $dbh);
     // Pour chaque n-uplet trouves on met a jour la table notice_global_index avec l'éditeur modifié :
     while ($mesNotices = pmb_mysql_fetch_object($found)) {
         $notice_id = $mesNotices->notice_id;
         notice::majNoticesGlobalIndex($notice_id);
         notice::majNoticesMotsGlobalIndex($notice_id, 'publisher');
     }
 }
Example #8
0
 static function update_index($id)
 {
     global $dbh;
     global $include_path;
     $indexation_authority = new indexation_authority($include_path . "/indexation/authorities/authors/champs_base.xml", "authorities", AUT_TABLE_AUTHORS);
     $indexation_authority->maj($id);
     // On cherche tous les n-uplet de la table notice correspondant à cet auteur.
     $found = pmb_mysql_query("select distinct responsability_notice from responsability where responsability_author='" . $id . "'", $dbh);
     // Pour chaque n-uplet trouvés on met a jour la table notice_global_index avec l'auteur modifié :
     while ($mesNotices = pmb_mysql_fetch_object($found)) {
         $notice_id = $mesNotices->responsability_notice;
         notice::majNoticesGlobalIndex($notice_id);
         notice::majNoticesMotsGlobalIndex($notice_id, 'author');
     }
     // On met à jour les titres uniformes correspondant à cet auteur
     $found = pmb_mysql_query("select distinct responsability_tu_num from responsability_tu where responsability_tu_author_num='" . $id . "'", $dbh);
     // Pour chaque n-uplet trouvés on met a jour l'index du titre uniforme avec l'auteur modifié :
     while ($mesTu = pmb_mysql_fetch_object($found)) {
         titre_uniforme::update_index_tu($mesTu->responsability_tu_num);
         titre_uniforme::update_index($mesTu->responsability_tu_num);
     }
 }
function pmb_init_indexation_authorities()
{
    global $dbh, $msg;
    global $include_path;
    // => Authors
    $result = pmb_mysql_query("SELECT author_id as id from authors", $dbh);
    if ($result) {
        $count = pmb_mysql_num_rows($result);
        if ($count) {
            $indexation_authority = new indexation_authority($include_path . "/indexation/authorities/authors/champs_base.xml", "authorities", AUT_TABLE_AUTHORS);
            while ($row = pmb_mysql_fetch_object($result)) {
                $indexation_authority->maj($row->id);
            }
            pmb_indexation_display($msg["nettoyage_reindex_authors"], $count . " " . $msg["nettoyage_res_reindex_authors"]);
        }
    }
    // => Publishers
    $result = pmb_mysql_query("SELECT ed_id as id from publishers", $dbh);
    if ($result) {
        $count = pmb_mysql_num_rows($result);
        if ($count) {
            $indexation_authority = new indexation_authority($include_path . "/indexation/authorities/publishers/champs_base.xml", "authorities", AUT_TABLE_PUBLISHERS);
            while ($row = pmb_mysql_fetch_object($result)) {
                $indexation_authority->maj($row->id);
            }
            pmb_indexation_display($msg["nettoyage_reindex_publishers"], $count . " " . $msg["nettoyage_res_reindex_publishers"]);
        }
    }
    // => Categories
    $result = pmb_mysql_query("select distinct num_noeud as id from categories", $dbh);
    if ($result) {
        $count = pmb_mysql_num_rows($result);
        if ($count) {
            $indexation_authority = new indexation_authority($include_path . "/indexation/authorities/categories/champs_base.xml", "authorities", AUT_TABLE_CATEG);
            while ($row = pmb_mysql_fetch_object($result)) {
                $indexation_authority->maj($row->id);
            }
            pmb_indexation_display($msg["nettoyage_reindex_categories"], $count . " " . $msg["nettoyage_res_reindex_categories"]);
        }
    }
    // => Collections
    $result = pmb_mysql_query("SELECT collection_id as id from collections", $dbh);
    if ($result) {
        $count = pmb_mysql_num_rows($result);
        if ($count) {
            $indexation_authority = new indexation_authority($include_path . "/indexation/authorities/collections/champs_base.xml", "authorities", AUT_TABLE_COLLECTIONS);
            while ($row = pmb_mysql_fetch_object($result)) {
                $indexation_authority->maj($row->id);
            }
            pmb_indexation_display($msg["nettoyage_reindex_collections"], $count . " " . $msg["nettoyage_res_reindex_collections"]);
        }
    }
    // => Sous collections
    $result = pmb_mysql_query("SELECT sub_coll_id as id from sub_collections", $dbh);
    if ($result) {
        $count = pmb_mysql_num_rows($result);
        if ($count) {
            $indexation_authority = new indexation_authority($include_path . "/indexation/authorities/subcollections/champs_base.xml", "authorities", AUT_TABLE_SUB_COLLECTIONS);
            while ($row = pmb_mysql_fetch_object($result)) {
                $indexation_authority->maj($row->id);
            }
            pmb_indexation_display($msg["nettoyage_reindex_sub_collections"], $count . " " . $msg["nettoyage_res_reindex_sub_collections"]);
        }
    }
    // => Séries
    $result = pmb_mysql_query("SELECT serie_id as id from series", $dbh);
    if ($result) {
        $count = pmb_mysql_num_rows($result);
        if ($count) {
            $indexation_authority = new indexation_authority($include_path . "/indexation/authorities/series/champs_base.xml", "authorities", AUT_TABLE_SERIES);
            while ($row = pmb_mysql_fetch_object($result)) {
                $indexation_authority->maj($row->id);
            }
            pmb_indexation_display($msg["nettoyage_reindex_series"], $count . " " . $msg["nettoyage_res_reindex_series"]);
        }
    }
    // => Index. Décimales
    $result = pmb_mysql_query("SELECT indexint_id as id from indexint", $dbh);
    if ($result) {
        $count = pmb_mysql_num_rows($result);
        if ($count) {
            $indexation_authority = new indexation_authority($include_path . "/indexation/authorities/indexint/champs_base.xml", "authorities", AUT_TABLE_INDEXINT);
            while ($row = pmb_mysql_fetch_object($result)) {
                $indexation_authority->maj($row->id);
            }
            pmb_indexation_display($msg["nettoyage_reindex_indexint"], $count . " " . $msg["nettoyage_res_reindex_indexint"]);
        }
    }
    // => Titres uniformes
    $result = pmb_mysql_query("SELECT tu_id as id from titres_uniformes", $dbh);
    if ($result) {
        $count = pmb_mysql_num_rows($result);
        if ($count) {
            $indexation_authority = new indexation_authority($include_path . "/indexation/authorities/titres_uniformes/champs_base.xml", "authorities", AUT_TABLE_TITRES_UNIFORMES);
            while ($row = pmb_mysql_fetch_object($result)) {
                $indexation_authority->maj($row->id);
            }
            pmb_indexation_display($msg["nettoyage_reindex_titres_uniformes"], $count . " " . $msg["nettoyage_res_reindex_titres_uniformes"]);
        }
    }
}
 function indexAuthorities()
 {
     global $msg, $dbh, $charset, $PMBusername;
     global $include_path;
     if (SESSrights & ADMINISTRATION_AUTH) {
         //remise a zero de la table au début
         pmb_mysql_query("truncate authorities_words_global_index", $dbh);
         pmb_mysql_query("truncate authorities_fields_global_index", $dbh);
         //AUTHORS
         $result .= "<h3>" . htmlentities($msg["nettoyage_reindex_authors"], ENT_QUOTES, $charset) . "</h3>";
         $query = pmb_mysql_query("SELECT author_id as id from authors", $dbh);
         if (pmb_mysql_num_rows($query)) {
             $indexation_authority = new indexation_authority($include_path . "/indexation/authorities/authors/champs_base.xml", "authorities", AUT_TABLE_AUTHORS);
             while ($row = pmb_mysql_fetch_object($query)) {
                 $indexation_authority->maj($row->id);
             }
             pmb_mysql_free_result($query);
         }
         $elts = pmb_mysql_query("SELECT count(1) FROM authors", $dbh);
         $count = pmb_mysql_result($elts, 0, 0);
         $result .= "" . htmlentities($msg["nettoyage_reindex_authors"], ENT_QUOTES, $charset) . " {$count} " . htmlentities($msg["nettoyage_res_reindex_authors"], ENT_QUOTES, $charset);
         //PUBLISHERS
         $result .= "<h3>" . htmlentities($msg["nettoyage_reindex_publishers"], ENT_QUOTES, $charset) . "</h3>";
         $query = pmb_mysql_query("SELECT ed_id as id from publishers", $dbh);
         if (pmb_mysql_num_rows($query)) {
             $indexation_authority = new indexation_authority($include_path . "/indexation/authorities/publishers/champs_base.xml", "authorities", AUT_TABLE_PUBLISHERS);
             while ($row = pmb_mysql_fetch_object($query)) {
                 $indexation_authority->maj($row->id);
             }
             pmb_mysql_free_result($query);
         }
         $elts = pmb_mysql_query("SELECT count(1) FROM publishers", $dbh);
         $count = pmb_mysql_result($elts, 0, 0);
         $result .= "" . htmlentities($msg["nettoyage_reindex_publishers"], ENT_QUOTES, $charset) . " {$count} " . htmlentities($msg["nettoyage_res_reindex_publishers"], ENT_QUOTES, $charset);
         //CATEGORIES
         $result .= "<h3>" . htmlentities($msg["nettoyage_reindex_categories"], ENT_QUOTES, $charset) . "</h3>";
         $req = "select distinct num_noeud as id from categories";
         $query = pmb_mysql_query($req, $dbh);
         if (pmb_mysql_num_rows($query)) {
             $indexation_authority = new indexation_authority($include_path . "/indexation/authorities/categories/champs_base.xml", "authorities", AUT_TABLE_CATEG);
             while ($row = pmb_mysql_fetch_object($query)) {
                 $indexation_authority->maj($row->id);
             }
             pmb_mysql_free_result($query);
         }
         $elts = pmb_mysql_query("SELECT count(distinct num_noeud) FROM categories", $dbh);
         $count = pmb_mysql_result($elts, 0, 0);
         $result .= "" . htmlentities($msg["nettoyage_reindex_categories"], ENT_QUOTES, $charset) . " {$count} " . htmlentities($msg["nettoyage_res_reindex_categories"], ENT_QUOTES, $charset);
         //COLLECTIONS
         $result .= "<h3>" . htmlentities($msg["nettoyage_reindex_collections"], ENT_QUOTES, $charset) . "</h3>";
         $query = pmb_mysql_query("SELECT collection_id as id from collections", $dbh);
         if (pmb_mysql_num_rows($query)) {
             $indexation_authority = new indexation_authority($include_path . "/indexation/authorities/collections/champs_base.xml", "authorities", AUT_TABLE_COLLECTIONS);
             while ($row = pmb_mysql_fetch_object($query)) {
                 $indexation_authority->maj($row->id);
             }
             pmb_mysql_free_result($query);
         }
         $elts = pmb_mysql_query("SELECT count(1) FROM collections", $dbh);
         $count = pmb_mysql_result($elts, 0, 0);
         $result .= "" . htmlentities($msg["nettoyage_reindex_collections"], ENT_QUOTES, $charset) . " {$count} " . htmlentities($msg["nettoyage_res_reindex_collections"], ENT_QUOTES, $charset);
         //SUBCOLLECTIONS
         $result .= "<h3>" . htmlentities($msg["nettoyage_reindex_sub_collections"], ENT_QUOTES, $charset) . "</h3>";
         $query = pmb_mysql_query("SELECT sub_coll_id as id from sub_collections", $dbh);
         if (pmb_mysql_num_rows($query)) {
             $indexation_authority = new indexation_authority($include_path . "/indexation/authorities/subcollections/champs_base.xml", "authorities", AUT_TABLE_SUB_COLLECTIONS);
             while ($row = pmb_mysql_fetch_object($query)) {
                 $indexation_authority->maj($row->id);
             }
             pmb_mysql_free_result($query);
         }
         $elts = pmb_mysql_query("SELECT count(1) FROM sub_collections", $dbh);
         $count = pmb_mysql_result($elts, 0, 0);
         $result .= "" . htmlentities($msg["nettoyage_reindex_sub_collections"], ENT_QUOTES, $charset) . " {$count} " . htmlentities($msg["nettoyage_res_reindex_sub_collections"], ENT_QUOTES, $charset);
         //SERIES
         $result .= "<h3>" . htmlentities($msg["nettoyage_reindex_series"], ENT_QUOTES, $charset) . "</h3>";
         $query = pmb_mysql_query("SELECT serie_id as id from series", $dbh);
         if (pmb_mysql_num_rows($query)) {
             $indexation_authority = new indexation_authority($include_path . "/indexation/authorities/series/champs_base.xml", "authorities", AUT_TABLE_SERIES);
             while ($row = pmb_mysql_fetch_object($query)) {
                 $indexation_authority->maj($row->id);
             }
             pmb_mysql_free_result($query);
         }
         $elts = pmb_mysql_query("SELECT count(1) FROM series", $dbh);
         $count = pmb_mysql_result($elts, 0, 0);
         $result .= "" . htmlentities($msg["nettoyage_reindex_series"], ENT_QUOTES, $charset) . " {$count} " . htmlentities($msg["nettoyage_res_reindex_series"], ENT_QUOTES, $charset);
         //DEWEY
         $result .= "<h3>" . htmlentities($msg["nettoyage_reindex_indexint"], ENT_QUOTES, $charset) . "</h3>";
         $query = pmb_mysql_query("SELECT indexint_id as id from indexint", $dbh);
         if (pmb_mysql_num_rows($query)) {
             $indexation_authority = new indexation_authority($include_path . "/indexation/authorities/indexint/champs_base.xml", "authorities", AUT_TABLE_INDEXINT);
             while ($row = pmb_mysql_fetch_object($query)) {
                 $indexation_authority->maj($row->id);
             }
             pmb_mysql_free_result($query);
         }
         $elts = pmb_mysql_query("SELECT count(1) FROM indexint", $dbh);
         $count = pmb_mysql_result($elts, 0, 0);
         $result .= "" . htmlentities($msg["nettoyage_reindex_indexint"], ENT_QUOTES, $charset) . " {$count} " . htmlentities($msg["nettoyage_res_reindex_indexint"], ENT_QUOTES, $charset);
         //TITRES_UNIFORMES
         $result .= "<h3>" . htmlentities($msg["nettoyage_reindex_titres_uniformes"], ENT_QUOTES, $charset) . "</h3>";
         $query = pmb_mysql_query("SELECT tu_id as id from titres_uniformes", $dbh);
         if (pmb_mysql_num_rows($query)) {
             $indexation_authority = new indexation_authority($include_path . "/indexation/authorities/titres_uniformes/champs_base.xml", "authorities", AUT_TABLE_TITRES_UNIFORMES);
             while ($row = pmb_mysql_fetch_object($query)) {
                 $indexation_authority->maj($row->id);
             }
             pmb_mysql_free_result($query);
         }
         $elts = pmb_mysql_query("SELECT count(1) FROM titres_uniformes", $dbh);
         $count = pmb_mysql_result($elts, 0, 0);
         $result .= "" . htmlentities($msg["nettoyage_reindex_titres_uniformes"], ENT_QUOTES, $charset) . " {$count} " . htmlentities($msg["nettoyage_res_reindex_titres_uniformes"], ENT_QUOTES, $charset);
         //AUTORITES PERSO
         $result .= "<h3>" . htmlentities($msg["nettoyage_reindex_authperso"], ENT_QUOTES, $charset) . "</h3>";
         $query = pmb_mysql_query("SELECT id_authperso_authority as id, authperso_authority_authperso_num from authperso_authorities", $dbh);
         if (pmb_mysql_num_rows($query)) {
             $id_authperso = 0;
             while ($row = pmb_mysql_fetch_object($query)) {
                 if (!$id_authperso || $id_authperso != $row->authperso_authority_authperso_num) {
                     $indexation_authperso = new indexation_authperso($include_path . "/indexation/authorities/authperso/champs_base.xml", "authorities", AUT_TABLE_AUTHPERSO, $row->authperso_authority_authperso_num);
                     $id_authperso = $row->authperso_authority_authperso_num;
                 }
                 $indexation_authperso->maj($row->id);
             }
             pmb_mysql_free_result($query);
         }
         $elts = pmb_mysql_query("SELECT count(1) FROM authperso_authorities", $dbh);
         $count = pmb_mysql_result($elts, 0, 0);
         $result .= "" . htmlentities($msg["nettoyage_reindex_authperso"], ENT_QUOTES, $charset) . " {$count} " . htmlentities($msg["nettoyage_res_reindex_authperso"], ENT_QUOTES, $charset);
     } else {
         $result .= sprintf($msg["planificateur_rights_bad_user_rights"], $PMBusername);
     }
     return $result;
 }
     }
     print "<br /><br /><h2 align='center'>" . htmlentities($msg["nettoyage_reindex_titres_uniformes"], ENT_QUOTES, $charset) . "</h2>";
     $query = pmb_mysql_query("SELECT tu_id as id from titres_uniformes LIMIT {$start}, {$lot}");
     if (pmb_mysql_num_rows($query)) {
         // définition de l'état de la jauge
         $state = floor($start / ($count / $jauge_size));
         // mise à jour de l'affichage de la jauge
         print "<table border='0' align='center' width='{$jauge_size}' cellpadding='0'><tr><td class='jauge'>";
         print "<img src='../../images/jauge.png' width='{$state}' height='16'></td></tr></table>";
         // calcul pourcentage avancement
         $percent = floor($start / $count * 100);
         // affichage du % d'avancement et de l'état
         print "<div align='center'>{$percent}%</div>";
         $indexation_authority = new indexation_authority($include_path . "/indexation/authorities/titres_uniformes/champs_base.xml", "authorities", AUT_TABLE_TITRES_UNIFORMES);
         while ($row = pmb_mysql_fetch_object($query)) {
             $indexation_authority->maj($row->id);
         }
         pmb_mysql_free_result($query);
         $next = $start + $lot;
         print "\n\t\t\t<form class='form-{$current_module}' name='current_state' action='./clean.php' method='post'>\n\t\t\t<input type='hidden' name='v_state' value=\"" . urlencode($v_state) . "\">\n\t\t\t<input type='hidden' name='spec' value=\"{$spec}\">\n\t\t\t<input type='hidden' name='start' value=\"{$next}\">\n\t\t\t<input type='hidden' name='count' value=\"{$count}\">\n\t\t\t<input type='hidden' name='index_quoi' value=\"TITRES_UNIFORMES\">\n\t\t\t</form>\n\t\t\t<script type=\"text/javascript\"><!--\n\t\t\tsetTimeout(\"document.forms['current_state'].submit()\",1000);\n\t\t\t-->\n\t\t\t</script>";
     } else {
         // mise à jour de l'affichage de la jauge
         print "<table border='0' align='center' width='{$table_size}' cellpadding='0'><tr><td class='jauge'>";
         print "<img src='../../images/jauge.png' width='{$jauge_size}' height='16'></td></tr></table>";
         print "<div align='center'>100%</div>";
         $v_state .= "<br /><img src=../../images/d.gif hspace=3>" . htmlentities($msg["nettoyage_reindex_titres_uniformes"], ENT_QUOTES, $charset) . " {$count} " . htmlentities($msg["nettoyage_res_reindex_titres_uniformes"], ENT_QUOTES, $charset);
         print "\n\t\t\t<form class='form-{$current_module}' name='current_state' action='./clean.php' method='post'>\n\t\t\t<input type='hidden' name='v_state' value=\"" . urlencode($v_state) . "\">\n\t\t\t<input type='hidden' name='spec' value=\"{$spec}\">\n\t\t\t<input type='hidden' name='start' value='0'>\n\t\t\t<input type='hidden' name='count' value='0'>\n\t\t\t<input type='hidden' name='index_quoi' value=\"AUTHPERSO\">\n\t\t\t</form>\n\t\t\t<script type=\"text/javascript\"><!--\n\t\t\tsetTimeout(\"document.forms['current_state'].submit()\",1000);\n\t\t\t-->\n\t\t\t</script>";
     }
     break;
 case 'AUTHPERSO':
     if (!$count) {