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); } } $pb->progress(); } }elseif($myCart->type=='EXPL'){ while(list($cle, $object) = each($liste)) { $requete="SELECT expl_notice, expl_bulletin FROM exemplaires WHERE expl_id='".$object."' "; $res=mysql_query($requete); if(mysql_num_rows($res)){ $row=mysql_fetch_object($res); if($row->expl_notice){ notice::majNoticesTotal($row->expl_notice); }else{ $requete="SELECT bulletin_titre, num_notice FROM bulletins WHERE bulletin_id='".$row->expl_bulletin."'"; $res2=mysql_query($requete); if(mysql_num_rows($res2)){ $element=mysql_fetch_object($res2); if(trim($element->bulletin_titre)){ $requete="UPDATE bulletins SET index_titre=' ".addslashes(strip_empty_words($element->bulletin_titre))." ' WHERE bulletin_id='".$row->expl_bulletin."'"; mysql_query($requete); } if($element->num_notice){ notice::majNoticesTotal($element->num_notice); } } } } $pb->progress(); } } $pb->hide(); } print "

$msg[caddie_situation_reindex]

"; print sprintf($msg["caddie_action_flag_processed"],$nb_elements_flag)."
"; print sprintf($msg["caddie_action_no_flag_processed"],$nb_elements_no_flag)."
"; print "".sprintf($msg["caddie_action_total_processed"],$nb_elements_total)."

"; print aff_cart_nb_items ($myCart) ; default: break; } } else aff_paniers($idcaddie, "NOTI", "./catalog.php?categ=caddie&sub=action&quelle=reindex", "choix_quoi", $msg["caddie_action_reindex"], "", 0, 0, 0);