$value) { if ($key!=$value) { $_SESSION["session_history"][$value]=$_SESSION["session_history"][$key]; if ($_SESSION["session_history"][$value]["NOTI"]["SEARCH_TYPE"]=="extended") { for ($j=0;$j<=count($_SESSION["session_history"][$value]["NOTI"]["POST"]["search"])-1;$j++) { if ($_SESSION["session_history"][$value]["NOTI"]["POST"]["search"][$j]=="s_1") { $t2=array(); $t2[0]=$t1[$_SESSION["session_history"][$key]["NOTI"]["POST"]["field_".$j."_".$_SESSION["session_history"][$key]["NOTI"]["POST"]["search"][$j]][0]]; $_SESSION["session_history"][$value]["NOTI"]["POST"]["field_".$j."_".$_SESSION["session_history"][$value]["NOTI"]["POST"]["search"][$j]][0]=$t2[0]; $_SESSION["session_history"][$value]["QUERY"]["POST"]["field_".$j."_".$_SESSION["session_history"][$value]["QUERY"]["POST"]["search"][$j]][0]=$t2[0]; } } } $_SESSION["session_history"][$key]=array(); unset($_SESSION["session_history"][$key]); } } } $_SESSION["CURRENT"]=$_SESSION["session_history"][count($_SESSION["session_history"])]; break; case 'delall': $_SESSION["session_history"]=array(); $_SESSION["CURRENT"]=false; //vide également l'historique stocké en base $requete="delete from admin_session where userid=".SESSuserid; $r=mysql_query($requete); break; case 'export': if ($sel) { header("Content-Type: text/txt"); header('Content-Disposition: attachment; filename="search.rsh"'); $export=array(); $f=0; for ($i=0; $i

".$msg["histo_import_title"]."

"; print "
"; print "
"; print $msg["histo_select_file"]."
"; print "

"; print "
"; print "
 
"; print "
"; print "
"; print ""; exit(); break; case 'import2': $error=false; if ($_FILES['search_file']['tmp_name']) { $fp=@fopen($_FILES['search_file']['tmp_name'],'r'); if ($fp) { $searches=fread($fp,filesize($_FILES['search_file']['tmp_name'])); $import=unserialize($searches); if ($import) { for ($i=0; $i

".$msg["histo_title"]."

"; print "
"; if ($alert) { print ""; } print ""; if (count($_SESSION["session_history"])) { print $begin_result_liste." "; print "\"".$msg["histo_del_selected"]."\" "; print "\"".$msg["histo_del_histo"]."\" "; print " \"".$msg["histo_save_histo"]."\" "; print " \"".$msg["histo_export_selected"]."\" "; print " \"".$msg["histo_import_searches"]."\"
"; for ($i=count($_SESSION["session_history"])-1; $i>=0; $i--) { $javascript_template ="
!!query!!
"; $query_prep=($i+1).")"; if (!$_SESSION["session_history"][$i]["QUERY"]["NOLINK"]) $query_prep.=" "; $query_prep.=$_SESSION["session_history"][$i]["QUERY"]["HUMAN_TITLE"]." : ".$_SESSION["session_history"][$i]["QUERY"]["HUMAN_QUERY"]; if (!$_SESSION["session_history"][$i]["QUERY"]["NOLINK"]) $query_prep.=""; $to_print=str_replace("!!query!!",$query_prep,$javascript_template); $subqueries=""; if (($_SESSION["session_history"][$i]["AUT"])||($_SESSION["session_history"][$i]["NOTI"])||($_SESSION["session_history"][$i]["EXPL"])||($_SESSION["session_history"][$i]["EMPR"])) { $subqueries.=""; if (($_SESSION["session_history"][$i]["AUT"])&&($_SESSION["session_history"][$i]["NOTI"])) { $image="./images/branch.png"; $background="./images/branch_background.png"; } else { $image="./images/branch_final.png"; $background=""; } if ($_SESSION["session_history"][$i]["AUT"]) $subqueries.="\n"; if ($_SESSION["session_history"][$i]["NOTI"]) { $subqueries.="\n"; } if ($_SESSION["session_history"][$i]["EXPL"]) { $subqueries.="\n"; } if ($_SESSION["session_history"][$i]["EMPR"]) { $subqueries.="\n"; } $subqueries.="
A ".$_SESSION["session_history"][$i]["AUT"]["HUMAN_QUERY"].", page ".$_SESSION["session_history"][$i]["AUT"]["PAGE"]."
N ".$_SESSION["session_history"][$i]["NOTI"]["HUMAN_QUERY"].", page ".$_SESSION["session_history"][$i]["NOTI"]["PAGE"].""; if (!$_SESSION["session_history"][$i]["NOTI"]["NOPRINT"]) $subqueries.=" \"".$msg["histo_add_to_cart"]."\" \"".$msg["histo_print"]."\""; if ($pmb_allow_external_search) $subqueries.=" \"".$msg["connecteurs_external_search_sources"]."\""; $subqueries.="
N ".$_SESSION["session_history"][$i]["EXPL"]["HUMAN_QUERY"].", page ".$_SESSION["session_history"][$i]["EXPL"]["PAGE"].""; $subqueries.="
N ".$_SESSION["session_history"][$i]["EMPR"]["HUMAN_QUERY"].", page ".$_SESSION["session_history"][$i]["EMPR"]["PAGE"].""; $subqueries.="
"; } $to_print=str_replace("!!subqueries!!",$subqueries,$to_print); $to_print=str_replace("!!id!!",$i+1,$to_print); if (($_SESSION["CURRENT"]!==false)&&($_SESSION["CURRENT"]==$i)) $to_print=str_replace("!!sO!!","startOpen=\"Yes\"",$to_print); else $to_print=str_replace("!!sO!!","",$to_print); print pmb_bidi($to_print); } } else { print "".$msg["histo_empty"]."
"; print "\"".$msg["histo_import_searches"]."\"
"; } print "
"; print "
"; ?>