"; } switch($action){ case 'add': print $titre_uniforme_form; break; case 'update': $value['name'] = $name; require_once("$class_path/titre_uniforme.class.php"); $titre_uniforme = new titre_uniforme(); $titre_uniforme->update($value); $sel_search_form = str_replace("!!bouton_ajouter!!", $bouton_ajouter, $sel_search_form); $sel_search_form = str_replace("!!deb_rech!!", htmlentities(stripslashes($f_user_input),ENT_QUOTES,$charset), $sel_search_form); print $sel_search_form; print $jscript; show_results($dbh, $name, 0, 0,$titre_uniforme->id); break; default: $sel_search_form = str_replace("!!bouton_ajouter!!", $bouton_ajouter, $sel_search_form); $sel_search_form = str_replace("!!deb_rech!!", htmlentities(stripslashes($f_user_input),ENT_QUOTES,$charset), $sel_search_form); print $sel_search_form; print $jscript; show_results($dbh, $user_input, $nbr_lignes, $page, 0); break; } print $sel_footer; // function d'affichage function show_results($dbh, $user_input, $nbr_lignes=0, $page=0, $id = 0) { global $nb_per_page; global $base_url; global $caller; global $class_path; global $no_display; global $charset; global $msg ; global $callback; if (!$id) { // on récupére le nombre de lignes if($user_input=="") { $requete = "SELECT COUNT(1) FROM titres_uniformes where tu_id!='$no_display' "; } else { $aq=new analyse_query(stripslashes($user_input)); if ($aq->error) { error_message($msg["searcher_syntax_error"],sprintf($msg["searcher_syntax_error_desc"],$aq->current_car,$aq->input_html,$aq->error_message)); exit; } $requete=$aq->get_query_count("titres_uniformes","tu_name,","index_tu","tu_id","tu_id!='$no_display'"); } $res = mysql_query($requete, $dbh); $nbr_lignes = @mysql_result($res, 0, 0); } else { $nbr_lignes=1; } if(!$page) $page=1; $debut =($page-1)*$nb_per_page; if($nbr_lignes) { // on lance la vraie requête if (!$id) { if($user_input=="") { $requete = "SELECT * FROM titres_uniformes where tu_id!='$no_display' ORDER BY tu_name LIMIT $debut,$nb_per_page "; } else { $members=$aq->get_query_members("titres_uniformes","tu_name","index_tu","tu_id"); $requete="select *,".$members["select"]." as pert from titres_uniformes where ".$members["where"]." and tu_id!='$no_display' group by tu_id order by pert desc,index_tu limit $debut,$nb_per_page"; } } else { $requete="select * from titres_uniformes where tu_id='".$id."'"; } $res = @mysql_query($requete, $dbh); while(($titre_uniforme=mysql_fetch_object($res))) { $name = $titre_uniforme->tu_name; print "