t_fields[$perso_id][TITRE],ENT_QUOTES,$charset)),$sel_header);
// affichage du header
print $sel_header;
print $jscript;
if($recherche){
$f_user_input=rawurldecode($recherche);
}
$sel_search_form=str_replace("!!deb_rech!!",htmlentities(stripslashes($f_user_input),ENT_QUOTES,$charset),$sel_search_form);
print $sel_search_form;
$type=$persos->t_fields[$perso_id][TYPE];
$options=$param=_parser_text_no_function_("\n".$persos->t_fields[$perso_id][OPTIONS], "OPTIONS");
if ($type=="list") {
$requete_count="select count(".$custom_prefixe."_custom_list_value) from ".$custom_prefixe."_custom_lists where ".$custom_prefixe."_custom_champ=".$perso_id;
$requete="select ".$custom_prefixe."_custom_list_value, ".$custom_prefixe."_custom_list_lib from ".$custom_prefixe."_custom_lists where ".$custom_prefixe."_custom_champ=".$perso_id;
if ($f_user_input) {
$recherche=$f_user_input;
$f_user_input=str_replace("*","%",$f_user_input);
$requete.=" and ".$custom_prefixe."_custom_list_lib like '%".$f_user_input."%'";
$requete_count.=" and ".$custom_prefixe."_custom_list_lib like '%".$f_user_input."%'";
}
$requete.=" order by ordre limit ".($page*$nb_per_page).",$nb_per_page";
$resultat_count=mysql_query($requete_count);
} else {
$requete="create temporary table temp_perso_list ENGINE=MyISAM ".$options[QUERY][0][value];
mysql_query($requete);
$resultat=mysql_query("show columns from temp_perso_list");
$id_field=mysql_result($resultat,0,0);
$lib_field=mysql_result($resultat,1,0);
$requete_count="select count($id_field) from temp_perso_list";
$requete="select $id_field, $lib_field from temp_perso_list";
if ($f_user_input) {
$recherche=$f_user_input;
$f_user_input=str_replace("*","%",$f_user_input);
$requete.=" where ".$lib_field." like '%".$f_user_input."%'";
$requete_count.=" where ".$lib_field." like '%".$f_user_input."%'";
}
$requete.=" order by $lib_field limit ".($page*$nb_per_page).",$nb_per_page";
$resultat_count=mysql_query($requete_count);
}
$nbr_lignes=@mysql_result($resultat_count,0,0);
$resultat=mysql_query($requete);
while($r=mysql_fetch_row($resultat)) {
print pmb_bidi("".htmlentities($r[1],ENT_QUOTES,$charset)."
");
}
// constitution des liens
$nbepages = ceil($nbr_lignes/$nb_per_page);
$suivante = $page+1;
$precedente = $page-1;
// affichage du lien précédent si nécéssaire
print '