".htmlentities($msg["nettoyage_reindex_notices"], ENT_QUOTES, $charset)."
";
$query = mysql_query("SELECT notice_id FROM notices LIMIT $start, $lot");
if(mysql_num_rows($query)) {
// définition de l'état de la jauge
$state = floor($start / ($count / $jauge_size));
$state .= "px";
// mise à jour de l'affichage de la jauge
print "";
print " |
";
// calcul pourcentage avancement
$percent = floor(($start/$count)*100);
// affichage du % d'avancement et de l'état
print "$percent%
";
while(($row = mysql_fetch_object($query))) {
// constitution des pseudo-indexes
notice::majNotices($row->notice_id);
}
mysql_free_result($query);
$next = $start + $lot;
print "
";
} else {
// mise à jour de l'affichage de la jauge
print "";
print " |
";
print "100%
";
$v_state .= "
".htmlentities($msg["nettoyage_reindex_notices"], ENT_QUOTES, $charset)." $count ".htmlentities($msg["nettoyage_res_reindex_notices"], ENT_QUOTES, $charset);
print "
";
}
break ;
case 'AUTEURS':
if (!$count) {
$elts = mysql_query("SELECT count(1) FROM authors", $dbh);
$count = mysql_result($elts, 0, 0);
}
print "
".htmlentities($msg["nettoyage_reindex_authors"], ENT_QUOTES, $charset)."
";
$query = mysql_query("SELECT author_id as id,concat(author_name,' ',author_rejete,' ', author_lieu, ' ',author_ville,' ',author_pays,' ',author_numero,' ',author_subdivision) as auteur from authors LIMIT $start, $lot", $dbh);
if (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 "";
print " |
";
// calcul pourcentage avancement
$percent = floor(($start/$count)*100);
// affichage du % d'avancement et de l'état
print "$percent%
";
while(($row = mysql_fetch_object($query))) {
// constitution des pseudo-indexes
$ind_elt = strip_empty_chars($row->auteur);
$req_update = "UPDATE authors ";
$req_update .= " SET index_author=' ${ind_elt} '";
$req_update .= " WHERE author_id=$row->id ";
$update = mysql_query($req_update, $dbh);
}
mysql_free_result($query);
$next = $start + $lot;
print "
";
} else {
// mise à jour de l'affichage de la jauge
print "";
print " |
";
print "100%
";
$v_state .= "
".htmlentities($msg["nettoyage_reindex_authors"], ENT_QUOTES, $charset)." $count ".htmlentities($msg["nettoyage_res_reindex_authors"], ENT_QUOTES, $charset);
print "
";
}
break ;
case 'EDITEURS':
if (!$count) {
$elts = mysql_query("SELECT count(1) FROM publishers", $dbh);
$count = mysql_result($elts, 0, 0);
}
print "
".htmlentities($msg["nettoyage_reindex_publishers"], ENT_QUOTES, $charset)."
";
$query = mysql_query("SELECT ed_id as id, ed_name as publisher, ed_ville, ed_pays from publishers LIMIT $start, $lot");
if (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 "";
print " |
";
// calcul pourcentage avancement
$percent = floor(($start/$count)*100);
// affichage du % d'avancement et de l'état
print "$percent%
";
while(($row = mysql_fetch_object($query))) {
// constitution des pseudo-indexes
$ind_elt = strip_empty_chars($row->publisher." ".$row->ed_ville." ".$row->ed_pays);
$req_update = "UPDATE publishers ";
$req_update .= " SET index_publisher=' ${ind_elt} '";
$req_update .= " WHERE ed_id=$row->id ";
$update = mysql_query($req_update);
}
mysql_free_result($query);
$next = $start + $lot;
print "
";
} else {
// mise à jour de l'affichage de la jauge
print "";
print " |
";
print "100%
";
$v_state .= "
".htmlentities($msg["nettoyage_reindex_publishers"], ENT_QUOTES, $charset)." $count ".htmlentities($msg["nettoyage_res_reindex_publishers"], ENT_QUOTES, $charset);
print "
";
}
break ;
case 'CATEGORIES':
if (!$count) {
$elts = mysql_query("SELECT count(1) FROM categories", $dbh);
$count = mysql_result($elts, 0, 0);
}
print "
".htmlentities($msg["nettoyage_reindex_categories"], ENT_QUOTES, $charset)."
";
$req = "select num_noeud, langue, libelle_categorie from categories limit $start, $lot ";
$query = mysql_query($req, $dbh);
if (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 "";
print " |
";
// calcul pourcentage avancement
$percent = floor(($start/$count)*100);
// affichage du % d'avancement et de l'état
print "$percent%
";
while($row = mysql_fetch_object($query)) {
// constitution des pseudo-indexes
$ind_elt = strip_empty_words($row->libelle_categorie, $row->langue);
$req_update = "UPDATE categories ";
$req_update.= "SET index_categorie=' ${ind_elt} '";
$req_update.= "WHERE num_noeud='".$row->num_noeud."' and langue='".$row->langue."' ";
$update = mysql_query($req_update);
}
mysql_free_result($query);
$next = $start + $lot;
print "
";
} else {
// mise à jour de l'affichage de la jauge
print "";
print " |
";
print "100%
";
$v_state .= "
".htmlentities($msg["nettoyage_reindex_categories"], ENT_QUOTES, $charset)." $count ".htmlentities($msg["nettoyage_res_reindex_categories"], ENT_QUOTES, $charset);
print "
";
}
break ;
case 'COLLECTIONS':
if (!$count) {
$elts = mysql_query("SELECT count(1) FROM collections", $dbh);
$count = mysql_result($elts, 0, 0);
}
print "
".htmlentities($msg["nettoyage_reindex_collections"], ENT_QUOTES, $charset)."
";
$query = mysql_query("SELECT collection_id as id, collection_name as collection from collections LIMIT $start, $lot");
if (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 "";
print " |
";
// calcul pourcentage avancement
$percent = floor(($start/$count)*100);
// affichage du % d'avancement et de l'état
print "$percent%
";
while(($row = mysql_fetch_object($query))) {
// constitution des pseudo-indexes
$ind_elt = strip_empty_words($row->collection);
$req_update = "UPDATE collections ";
$req_update .= " SET index_coll=' ${ind_elt} '";
$req_update .= " WHERE collection_id=$row->id ";
$update = mysql_query($req_update);
}
mysql_free_result($query);
$next = $start + $lot;
print "
";
} else {
// mise à jour de l'affichage de la jauge
print "";
print " |
";
print "100%
";
$v_state .= "
".htmlentities($msg["nettoyage_reindex_collections"], ENT_QUOTES, $charset)." $count ".htmlentities($msg["nettoyage_res_reindex_collections"], ENT_QUOTES, $charset);
print "
";
}
break ;
case 'SOUSCOLLECTIONS':
if (!$count) {
$elts = mysql_query("SELECT count(1) FROM sub_collections", $dbh);
$count = mysql_result($elts, 0, 0);
}
print "
".htmlentities($msg["nettoyage_reindex_sub_collections"], ENT_QUOTES, $charset)."
";
$query = mysql_query("SELECT sub_coll_id as id, sub_coll_name as sub_collection from sub_collections LIMIT $start, $lot");
if (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 "";
print " |
";
// calcul pourcentage avancement
$percent = floor(($start/$count)*100);
// affichage du % d'avancement et de l'état
print "$percent%
";
while(($row = mysql_fetch_object($query))) {
// constitution des pseudo-indexes
$ind_elt = strip_empty_words($row->sub_collection);
$req_update = "UPDATE sub_collections ";
$req_update .= " SET index_sub_coll=' ${ind_elt} '";
$req_update .= " WHERE sub_coll_id=$row->id ";
$update = mysql_query($req_update);
}
mysql_free_result($query);
$next = $start + $lot;
print "
";
} else {
// mise à jour de l'affichage de la jauge
print "";
print " |
";
print "100%
";
$v_state .= "
".htmlentities($msg["nettoyage_reindex_sub_collections"], ENT_QUOTES, $charset)." $count ".htmlentities($msg["nettoyage_res_reindex_sub_collections"], ENT_QUOTES, $charset);
print "
";
}
break ;
case 'SERIES':
if (!$count) {
$elts = mysql_query("SELECT count(1) FROM series", $dbh);
$count = mysql_result($elts, 0, 0);
}
print "
".htmlentities($msg["nettoyage_reindex_series"], ENT_QUOTES, $charset)."
";
$query = mysql_query("SELECT serie_id as id, serie_name from series LIMIT $start, $lot");
if (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 "";
print " |
";
// calcul pourcentage avancement
$percent = floor(($start/$count)*100);
// affichage du % d'avancement et de l'état
print "$percent%
";
while(($row = mysql_fetch_object($query))) {
// constitution des pseudo-indexes
$ind_elt = strip_empty_words($row->serie_name);
$req_update = "UPDATE series ";
$req_update .= " SET serie_index=' ${ind_elt} '";
$req_update .= " WHERE serie_id=$row->id ";
$update = mysql_query($req_update);
}
mysql_free_result($query);
$next = $start + $lot;
print "
";
} else {
// mise à jour de l'affichage de la jauge
print "";
print " |
";
print "100%
";
$v_state .= "
".htmlentities($msg["nettoyage_reindex_series"], ENT_QUOTES, $charset)." $count ".htmlentities($msg["nettoyage_res_reindex_series"], ENT_QUOTES, $charset);
print "
";
}
break ;
case 'DEWEY':
if (!$count) {
$elts = mysql_query("SELECT count(1) FROM indexint", $dbh);
$count = mysql_result($elts, 0, 0);
}
print "
".htmlentities($msg["nettoyage_reindex_indexint"], ENT_QUOTES, $charset)."
";
$query = mysql_query("SELECT indexint_id as id, concat(indexint_name,' ',indexint_comment) as index_indexint from indexint LIMIT $start, $lot");
if (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 "";
print " |
";
// calcul pourcentage avancement
$percent = floor(($start/$count)*100);
// affichage du % d'avancement et de l'état
print "$percent%
";
while(($row = mysql_fetch_object($query))) {
// constitution des pseudo-indexes
$ind_elt = strip_empty_words($row->index_indexint);
$req_update = "UPDATE indexint ";
$req_update .= " SET index_indexint=' ${ind_elt} '";
$req_update .= " WHERE indexint_id=$row->id ";
$update = mysql_query($req_update);
}
mysql_free_result($query);
$next = $start + $lot;
print "
";
} else {
// mise à jour de l'affichage de la jauge
print "";
print " |
";
print "100%
";
$v_state .= "
".htmlentities($msg["nettoyage_reindex_indexint"], ENT_QUOTES, $charset)." $count ".htmlentities($msg["nettoyage_res_reindex_indexint"], ENT_QUOTES, $charset);
print "
";
}
break ;
case 'FRAIS_ANNEXES':
if (!$count) {
$elts = mysql_query("SELECT count(1) FROM frais", $dbh);
$count = mysql_result($elts, 0, 0);
}
print "
".htmlentities($msg["nettoyage_reindex_frais_annexes"], ENT_QUOTES, $charset)."
";
$query = mysql_query("SELECT id_frais as id, libelle from frais LIMIT $start, $lot");
if (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 "";
print " |
";
// calcul pourcentage avancement
$percent = floor(($start/$count)*100);
// affichage du % d'avancement et de l'état
print "$percent%
";
while(($row = mysql_fetch_object($query))) {
// constitution des pseudo-indexes
$ind_elt = strip_empty_words($row->libelle);
$req_update = "UPDATE frais ";
$req_update .= " SET index_libelle=' ${ind_elt} '";
$req_update .= " WHERE id_frais=$row->id ";
$update = mysql_query($req_update);
}
mysql_free_result($query);
$next = $start + $lot;
print "
";
} else {
// mise à jour de l'affichage de la jauge
print "";
print " |
";
print "100%
";
$v_state .= "
".htmlentities($msg["nettoyage_reindex_frais_annexes"], ENT_QUOTES, $charset)." $count ".htmlentities($msg["nettoyage_res_frais_annexes"], ENT_QUOTES, $charset);
print "
";
}
break ;
case 'FINI':
$spec = $spec - INDEX_NOTICES;
$v_state .= "
".htmlentities($msg["nettoyage_reindex_fini"], ENT_QUOTES, $charset);
print "
";
break ;
}