From 27af39f5d455420e33d86c06c826f26f598b8f33 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 19 Aug 2005 16:19:40 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20Probl=E8me=20sur=20lien=20suivant-pr=E9c?= =?UTF-8?q?=E9dent=20effa=E7ant=20selection=20filtre.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/contrat/services.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/htdocs/contrat/services.php b/htdocs/contrat/services.php index 6534fa02794..6b15cc95321 100644 --- a/htdocs/contrat/services.php +++ b/htdocs/contrat/services.php @@ -18,7 +18,6 @@ * * $Id$ * $Source$ - * */ /** @@ -47,6 +46,7 @@ if (! $sortorder) $sortorder="ASC"; $search_nom=isset($_GET["search_nom"])?$_GET["search_nom"]:$_POST["search_nom"]; $search_contract=isset($_GET["search_contract"])?$_GET["search_contract"]:$_POST["search_contract"]; +$search_service=isset($_GET["search_service"])?$_GET["search_service"]:$_POST["search_service"]; $statut=isset($_GET["statut"])?$_GET["statut"]:1; $socid=$_GET["socid"]; @@ -79,6 +79,7 @@ if ($mode == "5") $sql.= " AND cd.statut = 5"; //if ($mode == "expired") $sql.= " AND cd.statut = 1"; if ($search_nom) $sql.= " AND s.nom like '%".$search_nom."%'"; if ($search_contract) $sql.= " AND c.rowid = '".$search_contract."'"; +if ($search_service) $sql.= " AND (p.ref like '%".$search_service."%' OR p.label like '%".$search_service."%')"; if ($socid > 0) $sql.= " AND s.idp = $socid"; $sql .= " ORDER BY $sortfield $sortorder"; $sql .= $db->plimit($limit + 1 ,$offset); @@ -89,14 +90,17 @@ if ($resql) $num = $db->num_rows($resql); $i = 0; - print_barre_liste($langs->trans("ListOfServices"), $page, "services.php", "&sref=$sref&snom=$snom&mode=$mode", $sortfield, $sortorder,'',$num); + $param=''; + if ($search_contract) $param.='&search_contract='.urlencode($search_contract); + if ($search_nom) $param.='&search_nom='.urlencode($search_nom); + if ($search_service) $param.='&search_service='.urlencode($search_service); + if ($mode) $param.='&mode='.$mode; + + print_barre_liste($langs->trans("ListOfServices"), $page, "services.php", $param, $sortfield, $sortorder,'',$num); print ''; print ''; - $param='&search_contract='.$search_contract; - $param.='&search_nom='.$search_nom; - $param.='&mode='.$mode; print_liste_field_titre($langs->trans("Contract"),"services.php", "c.rowid","$param","","",$sortfield); print_liste_field_titre($langs->trans("Service"),"services.php", "p.label","$param","","",$sortfield); print_liste_field_titre($langs->trans("Company"),"services.php", "s.nom","$param","","",$sortfield); @@ -114,7 +118,9 @@ if ($resql) print ''; - print ''; + print ''; print '';
'; print ''; print ' '; + print ''; + print ''; print ''; print '