\n";
switch ($sig_choix) {
case "exacte":
$r=str_replace("!!exacte!!","selected=\"selected\"",$r);
break;
case "entre":
$r=str_replace("!!entre!!","selected=\"selected\"",$r);
break;
case "debut":
$r=str_replace("!!debut!!","selected=\"selected\"",$r);
break;
case "fin":
$r=str_replace("!!fin!!","selected=\"selected\"",$r);
break;
default:
$r=str_replace("!!vide!!","selected=\"selected\"",$r);
break;
}
$r=preg_replace("/!![a-z]*!!/","",$r);
$sig_js="";
return $r.$sig_js;
}
function search_other_function_clause() {
//doit retourner une requete de selection d'identifiants de notices
global $sig_choix,$sig_date_debut,$sig_date_fin;
$r='';
//Récupération de la date
$sig_date_debut_formate=detectFormatDate($sig_date_debut);
$sig_date_fin_formate=detectFormatDate($sig_date_fin);
if($sig_choix == "exacte" && $sig_date_debut ){
$r="SELECT notice_id FROM notices WHERE date_parution='".addslashes($sig_date_debut_formate)."'";
}elseif($sig_date_debut && $sig_date_fin){
$r="SELECT notice_id FROM notices WHERE date_parution >= '".addslashes($sig_date_debut_formate)."' AND date_parution <= '".addslashes($sig_date_fin_formate)."'";
}elseif($sig_date_debut){
$r="SELECT notice_id FROM notices WHERE date_parution >= '".addslashes($sig_date_debut_formate)."'";
}elseif($sig_date_fin){
$r="SELECT notice_id FROM notices WHERE date_parution <= '".addslashes($sig_date_fin_formate)."'";
}
return $r;
}
function search_other_function_has_values() {
global $sig_date_debut,$sig_date_fin;
if ($sig_date_debut || $sig_date_fin) return true;
else return false;
}
function search_other_function_get_values(){
global $sig_choix,$sig_date_debut,$sig_date_fin;
return $sig_choix."---".$sig_date_debut."---".$sig_date_fin;
}
function search_other_function_rec_history($n) {
global $sig_choix,$sig_date_debut,$sig_date_fin;
$_SESSION["sig_choix".$n]=$sig_choix;
$_SESSION["sig_date_debut".$n]=$sig_date_debut;
$_SESSION["sig_date_fin".$n]=$sig_date_fin;
}
function search_other_function_get_history($n) {
global $sig_choix,$sig_date_debut,$sig_date_fin;
$sig_choix=$_SESSION["sig_choix".$n];
$sig_date_debut=$_SESSION["sig_date_debut".$n];
$sig_date_fin=$_SESSION["sig_date_fin".$n];
}
function search_other_function_human_query($n) {
global $sig_choix,$sig_date_debut,$sig_date_fin,$charset,$msg;
$r1="";
$sig_choix=$_SESSION["sig_choix".$n];
$sig_date_debut=$_SESSION["sig_date_debut".$n];
$sig_date_fin=$_SESSION["sig_date_fin".$n];
if($sig_choix == "exacte" && $sig_date_debut ){
$r1=htmlentities($msg["search_date_pub_res_egal"],ENT_QUOTES,$charset)." ".$sig_date_debut;
}elseif($sig_date_debut && $sig_date_fin){
//$r1="Date de publication entre le ".$sig_date_debut." et le ".$sig_date_fin;
$r1=htmlentities(sprintf($msg["search_date_pub_res_entre"],$sig_date_debut,$sig_date_fin),ENT_QUOTES,$charset);
}elseif($sig_date_debut){
$r1=htmlentities($msg["search_date_pub_res_sup"],ENT_QUOTES,$charset)." ".$sig_date_debut;
}elseif($sig_date_fin){
$r1=htmlentities($msg["search_date_pub_res_inf"],ENT_QUOTES,$charset)." ".$sig_date_fin;
}
return $r1;
}
function search_other_function_post_values() {
global $sig_choix,$sig_date_debut,$sig_date_fin, $charset;
return "\n\n\n";
}
?>