From b5db70342bfd94a27c904f355d73b6e251e1b6a6 Mon Sep 17 00:00:00 2001 From: Ferran Marcet Date: Fri, 9 Sep 2016 13:58:41 +0200 Subject: [PATCH 1/2] Fix: Search all is lost on lists when pagination or when the columns are sorted --- htdocs/comm/propal/list.php | 2 ++ htdocs/commande/list.php | 1 + htdocs/compta/facture.php | 1 - htdocs/compta/facture/list.php | 1 + htdocs/contact/list.php | 1 + htdocs/contrat/list.php | 2 ++ htdocs/expedition/list.php | 2 ++ htdocs/expensereport/list.php | 1 + htdocs/fichinter/list.php | 1 + htdocs/fourn/commande/list.php | 2 ++ htdocs/product/reassort.php | 25 ++++++++++++++--------- htdocs/product/reassortlot.php | 34 ++++++++++++++++++++----------- htdocs/product/stock/list.php | 30 +++++++++++++++++++-------- htdocs/societe/list.php | 3 ++- htdocs/supplier_proposal/list.php | 4 +++- 15 files changed, 76 insertions(+), 34 deletions(-) diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 55d8b49fa46..688cc73f84e 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -10,6 +10,7 @@ * Copyright (C) 2012 Christophe Battarel * Copyright (C) 2013 Cédric Salvador * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2016 Ferran Marcet * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -255,6 +256,7 @@ if ($result) } $param='&socid='.$socid.'&viewstatut='.$viewstatut; + if ($sall) $param.='&sall='.$sall; if ($month) $param.='&month='.$month; if ($year) $param.='&year='.$year; if ($search_ref) $param.='&search_ref=' .$search_ref; diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 401be745957..f9653c06732 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -259,6 +259,7 @@ if ($resql) $title.=' - '.$langs->trans('StatusOrderValidated').', '.(empty($conf->expedition->enabled)?'':$langs->trans("StatusOrderSent").', ').$langs->trans('StatusOrderToBill'); $param=''; + if ($sall) $param.='&sall='.$sall; if ($socid > 0) $param.='&socid='.$socid; if ($viewstatut != '') $param.='&viewstatut='.$viewstatut; if ($orderday) $param.='&orderday='.$orderday; diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 659bcaae7c4..34ed1383e14 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -66,7 +66,6 @@ if (!empty($conf->incoterm->enabled)) $langs->load('incoterm'); if (! empty($conf->margin->enabled)) $langs->load('margins'); -$sall = trim(GETPOST('sall')); $projectid = (GETPOST('projectid') ? GETPOST('projectid', 'int') : 0); $id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index fd0a61b638f..205f84c416f 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -568,6 +568,7 @@ if ($resql) } $param='&socid='.$socid; + if ($sall) $param.='&sall='.$sall; if ($day) $param.='&day='.$day; if ($month) $param.='&month='.$month; if ($year) $param.='&year=' .$year; diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index d9fa371e443..8d9c3f0ae64 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -364,6 +364,7 @@ if ($result) $param ='&begin='.urlencode($begin).'&view='.urlencode($view).'&userid='.urlencode($userid).'&contactname='.urlencode($sall); $param.='&type='.urlencode($type).'&view='.urlencode($view).'&search_lastname='.urlencode($search_lastname).'&search_firstname='.urlencode($search_firstname).'&search_societe='.urlencode($search_societe).'&search_email='.urlencode($search_email); if (!empty($search_categ)) $param.='&search_categ='.urlencode($search_categ); + if ($sall != '') $param.='&sall='.urlencode($sall); if ($search_lastname != '') $param.='&search_lastname='.urlencode($search_lastname); if ($search_firstname != '') $param.='&search_firstname='.urlencode($search_firstname); if ($search_zip != '') $param.='&search_zip='.urlencode($search_zip); diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index 23df8a06593..4f808e73be3 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -6,6 +6,7 @@ * Copyright (C) 2014 Juanjo Menent * Copyright (C) 2015 Claudio Aschieri * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2016 Ferran Marcet * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -222,6 +223,7 @@ if ($resql) $param.='&search_name='.$search_name; $param.='&search_ref_supplier='.$search_ref_supplier; $param.='&search_sale=' .$search_sale; + if ($sall != '') $param.='&sall='.$sall; if ($optioncss != '') $param.='&optioncss='.$optioncss; print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "c.rowid","","$param",'',$sortfield,$sortorder); diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index 36dfb1db55e..34b452985d5 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -2,6 +2,7 @@ /* Copyright (C) 2001-2005 Rodolphe Quiedeville * Copyright (C) 2004-2015 Laurent Destailleur * Copyright (C) 2005-2010 Regis Houssin + * Copyright (C) 2016 Ferran Marcet * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -124,6 +125,7 @@ if ($resql) $expedition = new Expedition($db); $param=""; + if ($sall) $param.= "&sall=".$sall; if ($search_ref_exp) $param.= "&search_ref_exp=".$search_ref_exp; if ($search_ref_liv) $param.= "&search_ref_liv=".$search_ref_liv; if ($search_company) $param.= "&search_company=".$search_company; diff --git a/htdocs/expensereport/list.php b/htdocs/expensereport/list.php index efa6572dd10..b24f5fcfe01 100644 --- a/htdocs/expensereport/list.php +++ b/htdocs/expensereport/list.php @@ -193,6 +193,7 @@ if ($resql) $i = 0; $param=""; + if ($sall) $param.="&sall=".$sall; if ($search_ref) $param.="&search_ref=".$search_ref; if ($search_user) $param.="&search_user=".$search_user; if ($search_amount_ht) $param.="&search_amount_ht=".$search_amount_ht; diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php index 74edaf72099..d01911df6ff 100644 --- a/htdocs/fichinter/list.php +++ b/htdocs/fichinter/list.php @@ -139,6 +139,7 @@ if ($result) $num = $db->num_rows($result); $urlparam=''; + if ($sall) $urlparam.="&sall=".$sall; if ($socid) $urlparam.="&socid=".$socid; if ($search_ref) $urlparam.="&search_ref=".urlencode($search_ref); if ($search_company) $urlparam.="&search_company=".urlencode($search_company); diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index 89060d9f913..1449bd3671b 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -5,6 +5,7 @@ * Copyright (C) 2013 Cédric Salvador * Copyright (C) 2014 Marcos García * Copyright (C) 2014 Juanjo Menent + * Copyright (C) 2016 Ferran Marcet * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -208,6 +209,7 @@ if ($resql) $i = 0; $param=""; + if ($sall) $param.="&search_all=".$sall; if ($search_ref) $param.="&search_ref=".$search_ref; if ($search_company) $param.="&search_company=".$search_company; if ($search_user) $param.="&search_user=".$search_user; diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php index b8a52024dfc..436d2c024fa 100644 --- a/htdocs/product/reassort.php +++ b/htdocs/product/reassort.php @@ -239,24 +239,29 @@ if ($resql) print ''; } - - $param="&tosell=$tosell&tobuy=$tobuy".(isset($type)?"&type=$type":"")."&fourn_id=$fourn_id&snom=$snom&sref=$sref"; + $param=''; + if ($tosell) $param.="&tosell=".$tosell; + if ($tobuy) $param.="&tobuy=".$tobuy; + if ($type) $param.="&type=".$type; + if ($fourn_id) $param.="&fourn_id=".$fourn_id; + if ($snom) $param.="&snom=".$snom; + if ($sref) $param.="&sref=".$sref; print ''; // Lignes des titres print ""; - print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.ref",$param,"","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Label"), $_SERVER["PHP_SELF"], "p.label",$param,"","",$sortfield,$sortorder); - if (! empty($conf->service->enabled) && $type == 1) print_liste_field_titre($langs->trans("Duration"), $_SERVER["PHP_SELF"], "p.duration",$param,"",'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("StockLimit"), $_SERVER["PHP_SELF"], "p.seuil_stock_alerte",$param,"",'align="right"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("DesiredStock"), $_SERVER["PHP_SELF"], "p.desiredstock",$param,"",'align="right"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("PhysicalStock"), $_SERVER["PHP_SELF"], "stock_physique",$param,"",'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.ref","",$param,"",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Label"), $_SERVER["PHP_SELF"], "p.label","",$param,"",$sortfield,$sortorder); + if (! empty($conf->service->enabled) && $type == 1) print_liste_field_titre($langs->trans("Duration"), $_SERVER["PHP_SELF"], "p.duration","",$param,'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("StockLimit"), $_SERVER["PHP_SELF"], "p.seuil_stock_alerte","",$param,'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("DesiredStock"), $_SERVER["PHP_SELF"], "p.desiredstock","",$param,'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("PhysicalStock"), $_SERVER["PHP_SELF"], "stock_physique","",$param,'align="right"',$sortfield,$sortorder); // TODO Add info of running suppliers/customers orders //print_liste_field_titre($langs->trans("TheoreticalStock"),$_SERVER["PHP_SELF"], "stock_theorique",$param,"",'align="right"',$sortfield,$sortorder); print_liste_field_titre(''); - print_liste_field_titre($langs->trans("Status").' ('.$langs->trans("Sell").')',$_SERVER["PHP_SELF"], "p.tosell",$param,"",'align="right"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Status").' ('.$langs->trans("Buy").')',$_SERVER["PHP_SELF"], "p.tobuy",$param,"",'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Status").' ('.$langs->trans("Sell").')',$_SERVER["PHP_SELF"], "p.tosell","",$param,'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Status").' ('.$langs->trans("Buy").')',$_SERVER["PHP_SELF"], "p.tobuy","",$param,'align="right"',$sortfield,$sortorder); print "\n"; // Lignes des champs de filtre diff --git a/htdocs/product/reassortlot.php b/htdocs/product/reassortlot.php index 87d6d4e46eb..17c0d5a0cfa 100644 --- a/htdocs/product/reassortlot.php +++ b/htdocs/product/reassortlot.php @@ -4,6 +4,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2013 Cédric Salvador * Copyright (C) 2015 Raphaël Doursenaud + * Copyright (C) 2016 Ferran Marcet * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -247,28 +248,37 @@ if ($resql) print $hookmanager->resPrint; print ''; } - - $param="&tosell=$tosell&tobuy=$tobuy".(isset($type)?"&type=$type":"")."&fourn_id=$fourn_id&snom=$snom&sref=$sref&batch=$batch&eatby=$eatby&sellby=$sellby"; + + $param=''; + if ($tosell) $param.="&tosell=".$tosell; + if ($tobuy) $param.="&tobuy=".$tobuy; + if ($type) $param.="&type=".$type; + if ($fourn_id) $param.="&fourn_id=".$fourn_id; + if ($snom) $param.="&snom=".$snom; + if ($sref) $param.="&sref=".$sref; + if ($search_batch) $param.="&search_batch=".$search_batch; + /*if ($eatby) $param.="&eatby=".$eatby; + if ($sellby) $param.="&sellby=".$sellby;*/ print '
'; // Lignes des titres print ""; - print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.ref",$param,"","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Label"), $_SERVER["PHP_SELF"], "p.label",$param,"","",$sortfield,$sortorder); - if (! empty($conf->service->enabled) && $type == 1) print_liste_field_titre($langs->trans("Duration"), $_SERVER["PHP_SELF"], "p.duration",$param,"",'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Warehouse"), $_SERVER["PHP_SELF"], "",$param,"",'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.ref","",$param,"",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Label"), $_SERVER["PHP_SELF"], "p.label","",$param,"",$sortfield,$sortorder); + if (! empty($conf->service->enabled) && $type == 1) print_liste_field_titre($langs->trans("Duration"), $_SERVER["PHP_SELF"], "p.duration","",$param,'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Warehouse"), $_SERVER["PHP_SELF"], "","",$param,'',$sortfield,$sortorder); //print_liste_field_titre($langs->trans("DesiredStock"), $_SERVER["PHP_SELF"], "p.desiredstock",$param,"",'align="right"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Batch"), $_SERVER["PHP_SELF"], "pb.batch",$param,"",'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("l_eatby"), $_SERVER["PHP_SELF"], "pb.eatby",$param,"",'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("l_sellby"), $_SERVER["PHP_SELF"], "pb.sellby",$param,"",'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("PhysicalStock"), $_SERVER["PHP_SELF"], "stock_physique",$param,"",'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Batch"), $_SERVER["PHP_SELF"], "pb.batch","",$param,'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("l_eatby"), $_SERVER["PHP_SELF"], "pb.eatby","",$param,'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("l_sellby"), $_SERVER["PHP_SELF"], "pb.sellby","",$param,'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("PhysicalStock"), $_SERVER["PHP_SELF"], "stock_physique","",$param,'align="right"',$sortfield,$sortorder); // TODO Add info of running suppliers/customers orders //print_liste_field_titre($langs->trans("TheoreticalStock"),$_SERVER["PHP_SELF"], "stock_theorique",$param,"",'align="right"',$sortfield,$sortorder); print_liste_field_titre(''); - print_liste_field_titre($langs->trans("Status").' ('.$langs->trans("Sell").')',$_SERVER["PHP_SELF"], "p.tosell",$param,"",'align="right"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Status").' ('.$langs->trans("Buy").')',$_SERVER["PHP_SELF"], "p.tobuy",$param,"",'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Status").' ('.$langs->trans("Sell").')',$_SERVER["PHP_SELF"], "p.tosell","",$param,'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Status").' ('.$langs->trans("Buy").')',$_SERVER["PHP_SELF"], "p.tobuy","",$param,'align="right"',$sortfield,$sortorder); print "\n"; // Lignes des champs de filtre diff --git a/htdocs/product/stock/list.php b/htdocs/product/stock/list.php index 6d487de21e3..edbc30a5e97 100644 --- a/htdocs/product/stock/list.php +++ b/htdocs/product/stock/list.php @@ -107,7 +107,13 @@ if ($result) $help_url='EN:Module_Stocks_En|FR:Module_Stock|ES:Módulo_Stocks'; llxHeader("",$langs->trans("ListOfWarehouses"),$help_url); - print_barre_liste($langs->trans("ListOfWarehouses"), $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, '', $num, $totalnboflines); + $param = ''; + if ($search_ref) $param.="&search_ref=".$search_ref; + if ($search_label) $param.="&search_label=".$search_label; + if ($search_status) $param.="&search_status=".$search_status; + if ($sall) $param.="&sall=".$sall; + + print_barre_liste($langs->trans("ListOfWarehouses"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines); print ''; print ''; @@ -122,17 +128,23 @@ if ($result) } $moreforfilter=''; - + + + if ($search_ref) $sql.= natural_search("e.label", $search_ref); // ref + if ($search_label) $sql.= natural_search("e.lieu", $search_label); // label + if ($search_status != '' && $search_status >= 0) $sql.= " AND e.statut = ".$search_status; + if ($sall) $sql .= natural_search(array_keys($fieldstosearchall), $sall); + print '
'; print ""; - print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"], "e.label","","","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("LocationSummary"),$_SERVER["PHP_SELF"], "e.lieu","","","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("PhysicalStock"), $_SERVER["PHP_SELF"], "stockqty",'','','align="right"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("EstimatedStockValue"), $_SERVER["PHP_SELF"], "e.valo_pmp",'','','align="right"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("EstimatedStockValueSell"), $_SERVER["PHP_SELF"], "",'','','align="right"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"], "e.statut",'','','align="right"',$sortfield,$sortorder); - print_liste_field_titre('',$_SERVER["PHP_SELF"],"",'','','',$sortfield,$sortorder,'maxwidthsearch '); + print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"], "e.label","",$param,"",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("LocationSummary"),$_SERVER["PHP_SELF"], "e.lieu","",$param,"",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("PhysicalStock"), $_SERVER["PHP_SELF"], "stockqty",'',$param,'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("EstimatedStockValue"), $_SERVER["PHP_SELF"], "e.valo_pmp",'',$param,'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("EstimatedStockValueSell"), $_SERVER["PHP_SELF"], "",'',$param,'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"], "e.statut",'',$param,'align="right"',$sortfield,$sortorder); + print_liste_field_titre('',$_SERVER["PHP_SELF"],"",'',$param,'',$sortfield,$sortorder,'maxwidthsearch '); print "\n"; // Lignes des champs de filtre diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index e9b98ad7164..93e757278c6 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -5,6 +5,7 @@ * Copyright (C) 2012 Marcos García * Copyright (C) 2013-2015 Raphaël Doursenaud * Copyright (C) 2015 Florian Henry + * Copyright (C) 2016 Ferran Marcet * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -429,7 +430,7 @@ if ($resql) $num = $db->num_rows($resql); $i = 0; - if ($sall != '') $param = "&sall=".urlencode($sall); + if ($search_all != '') $param = "&sall=".urlencode($search_all); if ($search_categ != '') $param.='&search_categ='.urlencode($search_categ); if ($search_sale > 0) $param.='&search_sale='.urlencode($search_sale); if ($search_nom != '') $param.= "&search_nom=".urlencode($search_nom); diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php index 31589bad334..663b1bb512f 100644 --- a/htdocs/supplier_proposal/list.php +++ b/htdocs/supplier_proposal/list.php @@ -9,7 +9,8 @@ * Copyright (C) 2010-2011 Philippe Grand * Copyright (C) 2012 Christophe Battarel * Copyright (C) 2013 Cédric Salvador -* + * Copyright (C) 2016 Ferran Marcet + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or @@ -238,6 +239,7 @@ if ($result) } $param='&socid='.$socid.'&viewstatut='.$viewstatut; + if ($sall) $param.='&sall='.$sall; if ($month) $param.='&month='.$month; if ($year) $param.='&year='.$year; if ($search_ref) $param.='&search_ref=' .$search_ref; From 4777faf49bdd70df9f99a3ffd0ce33825b0a420f Mon Sep 17 00:00:00 2001 From: Ferran Marcet Date: Fri, 9 Sep 2016 14:02:27 +0200 Subject: [PATCH 2/2] Fix: Search all is lost on lists when pagination or when the columns are sorted --- htdocs/product/stock/list.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/htdocs/product/stock/list.php b/htdocs/product/stock/list.php index edbc30a5e97..e46ef0026d6 100644 --- a/htdocs/product/stock/list.php +++ b/htdocs/product/stock/list.php @@ -129,12 +129,6 @@ if ($result) $moreforfilter=''; - - if ($search_ref) $sql.= natural_search("e.label", $search_ref); // ref - if ($search_label) $sql.= natural_search("e.lieu", $search_label); // label - if ($search_status != '' && $search_status >= 0) $sql.= " AND e.statut = ".$search_status; - if ($sall) $sql .= natural_search(array_keys($fieldstosearchall), $sall); - print '
'; print "";