Example #1
0
     $liste_0 = $myCart->get_cart("FLAG", $elt_flag_inconnu);
     $nb_elements_flag = count($liste_0);
 }
 if ($elt_no_flag) {
     $liste_1 = $myCart->get_cart("NOFLAG", $elt_no_flag_inconnu);
     $nb_elements_no_flag = count($liste_1);
 }
 $liste = array_merge($liste_0, $liste_1);
 $nb_elements_total = count($liste);
 if ($nb_elements_total) {
     $pb = new progress_bar($msg[caddie_situation_reindex_encours], $nb_elements_total, 5);
     if ($myCart->type == 'NOTI') {
         while (list($cle, $object) = each($liste)) {
             // Mise à jour de tous les index de la notice
             notice::majNoticesTotal($object);
             $pb->progress();
         }
     } elseif ($myCart->type == 'BULL') {
         while (list($cle, $object) = each($liste)) {
             $requete = "SELECT bulletin_titre, num_notice FROM bulletins WHERE bulletin_id='" . $object . "'";
             $res = mysql_query($requete);
             if (mysql_num_rows($res)) {
                 $element = mysql_fetch_object($res);
                 if (trim($element->bulletin_titre)) {
                     $requete = "UPDATE bulletins SET index_titre=' " . addslashes(strip_empty_words($element->bulletin_titre)) . " ' WHERE bulletin_id='" . $object . "'";
                     mysql_query($requete);
                 }
                 if ($element->num_notice) {
                     notice::majNoticesTotal($element->num_notice);
                 }
             }