diff --git a/htdocs/comm/contact.php b/htdocs/comm/contact.php index 098067793cd5d..b50770dc5feae 100644 --- a/htdocs/comm/contact.php +++ b/htdocs/comm/contact.php @@ -1,7 +1,8 @@ - * Copyright (C) 2003 Eric Seigne - * Copyright (C) 2004-2009 Laurent Destailleur +/* Copyright (C) 2001-2005 Rodolphe Quiedeville + * Copyright (C) 2003 Eric Seigne + * Copyright (C) 2004-2009 Laurent Destailleur + * Copyright (C) 2005-2011 Regis Houssin * * 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 @@ -112,7 +113,7 @@ if ($_GET["contactname"]) // acces a partir du module de recherche { - $sql.= " AND ( p.name like '%".strtolower($_GET[contactname])."%' OR lower(p.firstname) like '%".strtolower($_GET[contactname])."%') "; + $sql.= " AND ( p.name like '%".strtolower($_GET["contactname"])."%' OR lower(p.firstname) like '%".strtolower($_GET["contactname"])."%') "; $sortfield = "p.name"; $sortorder = "ASC"; } diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index 4c0049d8cb0ef..67396ee432e2f 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -53,6 +53,9 @@ if ($user->societe_id > 0) $socid=$user->societe_id; $result = restrictedArea($user,'societe',$socid,''); +$mode=GETPOST("mode"); +$modesearch=GETPOST("mode_search"); + $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); $page = GETPOST("page",'int'); @@ -138,7 +141,7 @@ if ($mode == 'search') { - if ($mode-search == 'soc') + if ($modesearch == 'soc') { $sql = "SELECT s.rowid"; if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user "; diff --git a/htdocs/compta/clients.php b/htdocs/compta/clients.php index da534537bedce..dcb76232589a5 100644 --- a/htdocs/compta/clients.php +++ b/htdocs/compta/clients.php @@ -42,6 +42,9 @@ $langs->load("companies"); +$mode=GETPOST("mode"); +$modesearch=GETPOST("mode_search"); + $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); $page = GETPOST("page",'int'); @@ -75,7 +78,7 @@ } if ($mode == 'search') { - if ($mode-search == 'soc') { + if ($modesearch == 'soc') { $sql = "SELECT s.rowid FROM ".MAIN_DB_PREFIX."societe as s "; $sql.= " WHERE lower(s.nom) like '%".$db->escape(strtolower($socname))."%'"; $sql.= " AND s.entity = ".$conf->entity; diff --git a/htdocs/fourn/facture/index.php b/htdocs/fourn/facture/index.php index 73b7bbb0b4115..74403679d83fb 100644 --- a/htdocs/fourn/facture/index.php +++ b/htdocs/fourn/facture/index.php @@ -44,6 +44,9 @@ $socid = $user->societe_id; } +$mode=GETPOST("mode"); +$modesearch=GETPOST("mode_search"); + $page=$_GET["page"]; $sortorder = $_GET["sortorder"]; $sortfield = $_GET["sortfield"]; @@ -64,9 +67,9 @@ * Actions */ -if ($_POST["mode"] == 'search') +if ($mode == 'search') { - if ($_POST["mode-search"] == 'soc') + if ($modesearch == 'soc') { $sql = "SELECT s.rowid FROM ".MAIN_DB_PREFIX."societe as s "; $sql.= " WHERE s.nom like '%".$db->escape(strtolower($socname))."%'"; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index a8fb10c3f5b9a..1d9c15f5e172e 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1587,7 +1587,7 @@ function printSearchForm($urlaction,$urlobject,$title,$htmlmodesearch='search',$ $ret.='
'; $ret.=''; $ret.=''; - $ret.=''; + $ret.=''; $ret.='global->MAIN_HTML5_PLACEHOLDER)) $ret.=' placeholder="'.$langs->trans("SearchOf").''.strip_tags($title).'"'; else $ret.=' title="'.$langs->trans("SearchOf").''.strip_tags($title).'"'; diff --git a/htdocs/societe/societe.php b/htdocs/societe/societe.php index 17cb1021f7cf4..589e26003fe84 100644 --- a/htdocs/societe/societe.php +++ b/htdocs/societe/societe.php @@ -48,7 +48,7 @@ $search_sale=trim(GETPOST("search_sale")); $search_categ=trim(GETPOST("search_categ")); $mode=GETPOST("mode"); -$modesearch=GETPOST("mode-search"); +$modesearch=GETPOST("mode_search"); $sortfield=GETPOST("sortfield"); $sortorder=GETPOST("sortorder");