id_mot."',0,3)"; @mysql_query($rqt_ins); semantique::gen_table_empty_word(); } } else { print ""; } } $baseurl="&text_empty_word=".rawurlencode($text_empty_word); break; case 'search': if ($search_empty_word) { $search_empty_word=str_replace("*","%",$search_empty_word); $clause=" and mot like '".$search_empty_word."%'"; } if ($type_mot_vide) { $types_mots_vides=$type_mot_vide; $autorites_list_empty_word=str_replace("!!checked".$type_mot_vide."!!","checked",$autorites_list_empty_word); } else $autorites_list_empty_word=str_replace("!!checked0!!","checked",$autorites_list_empty_word); $baseurl.="&search_empty_word=".rawurlencode($search_empty_word)."&type_mot_vide=".$type_mot_vide; break; case 'last_words': if (!$nb_per_page) $nb_per_page=$nb_per_page_search; $tri=" id_mot desc"; break; case 'calculate': if ($nb_noti) { $rqt="select count(notice_id) from notices"; $execute_query=mysql_query($rqt); $r=mysql_fetch_array($execute_query); $pmb_nb_noti_calc_empty_words=$nb_noti; @mysql_query("update parametres set valeur_param='".$nb_noti."' where type_param='pmb' and sstype_param='nb_noti_calc_empty_words'"); $nb_noti=floor(($r[0]*$nb_noti)/100); semantique::calculate_empty_words($nb_noti); semantique::gen_table_empty_word(); } break; case 'del': if ($id_mot&&$type_lien) { @mysql_query("delete from linked_mots where num_mot=".$id_mot." and num_linked_mot=0 and type_lien=".$type_lien); $rqt="select num_mot from linked_mots where num_mot=".$id_mot." or num_linked_mot=".$id_mot; $query_exist=mysql_query($rqt); if ($query_exist&&!mysql_num_rows($query_exist)) @mysql_query("delete from mots where id_mot=".$id_mot); semantique::gen_table_empty_word(); } break; default: break; } if ($action!='add') { //nombre de notices pour le calcul if (!$pmb_nb_noti_calc_empty_words) $pmb_nb_noti_calc_empty_words="50"; $autorites_list_empty_word=str_replace("!!nb_noti!!",$pmb_nb_noti_calc_empty_words,$autorites_list_empty_word); //pagination if (!$page) $page=1; if (!$nb_per_page) $nb_per_page=$nb_per_page_gestion; $limit="limit ".(($page-1)*$nb_per_page).",".$nb_per_page; //tous les mots vides if (!$type_mot_vide) $types_mots_vides="2,3,4"; //trier par mot ou derniers ajoutés if (!$tri) $tri=" mot"; $autorites_list_empty_word=str_replace("!!checked0!!","checked",$autorites_list_empty_word); $autorites_list_empty_word=str_replace("!!checked2!!","",$autorites_list_empty_word); $autorites_list_empty_word=str_replace("!!checked3!!","",$autorites_list_empty_word); $autorites_list_empty_word=str_replace("!!checked4!!","",$autorites_list_empty_word); //calcul du nombre de mots $rqt1="select id_mot from mots,linked_mots where (linked_mots.type_lien in ($types_mots_vides))$clause and linked_mots.num_mot=mots.id_mot"; $execute_query1=mysql_query($rqt1); $compt=mysql_num_rows($execute_query1); //recherche des mots vides calculés et saisis $rqt="select id_mot,mot,type_lien from mots,linked_mots where (linked_mots.type_lien in ($types_mots_vides))$clause and linked_mots.num_mot=mots.id_mot order by $tri $limit"; $execute_query=mysql_query($rqt); $liste_mots="