From d5a18ab584645aecc638fe2489a70d1bb32e0883 Mon Sep 17 00:00:00 2001 From: philippe grand Date: Fri, 6 May 2016 17:07:14 +0200 Subject: [PATCH 01/10] add column numbering name and fix a lot of issues within members list --- htdocs/adherents/list.php | 180 ++++++++++++++++++++++++++-------- htdocs/langs/en_US/other.lang | 1 + 2 files changed, 139 insertions(+), 42 deletions(-) diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index 1cc09394023..43aeee8ebdf 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -3,6 +3,7 @@ * Copyright (C) 2002-2003 Jean-Louis Bergamo * Copyright (C) 2004-2014 Laurent Destailleur * Copyright (C) 2013-2015 Raphaël Doursenaud + * Copyright (C) 2016 Philippe Grand * * 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 @@ -320,10 +321,10 @@ if ($resql) print ''; if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { - print ' '; + print ''.$langs->trans("NumberingShort").''; } if (! empty($arrayfields['d.ref']['checked'])) print_liste_field_titre($arrayfields['d.ref']['label'],$_SERVER["PHP_SELF"],'d.rowid','',$param,'',$sortfield,$sortorder); - if (! empty($arrayfields['d.firstname']['checked'])) print_liste_field_titre($arrayfields['d.firstname']['label'],$_SERVER["PHP_SELF"],'d.firstname','',$param,'',$sortfield,$sortorder); + if (! empty($arrayfields['d.firstname']['checked']) && empty($arrayfields['d.lastname']['checked'])) print_liste_field_titre($arrayfields['d.firstname']['label'],$_SERVER["PHP_SELF"],'d.firstname','',$param,'',$sortfield,$sortorder); if (! empty($arrayfields['d.lastname']['checked'])) print_liste_field_titre($arrayfields['d.lastname']['label'],$_SERVER["PHP_SELF"],'d.lastname','',$param,'',$sortfield,$sortorder); if (! empty($arrayfields['d.company']['checked'])) print_liste_field_titre($arrayfields['d.company']['label'],$_SERVER["PHP_SELF"],'d.company','',$param,'',$sortfield,$sortorder); if (! empty($arrayfields['d.login']['checked'])) print_liste_field_titre($arrayfields['d.login']['label'],$_SERVER["PHP_SELF"],'d.login','',$param,'',$sortfield,$sortorder); @@ -359,39 +360,89 @@ if ($resql) // Line for filters fields print ''; + if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) + { + print ' '; + } + // Ref - if (! empty($arrayfields['c.ref']['checked'])) + if (! empty($arrayfields['d.ref']['checked'])) { print ''; print ''; print ''; } + + if (! empty($arrayfields['d.firstname']['checked']) || ! empty($arrayfields['d.lastname']['checked']) || ! empty($arrayfields['d.company']['checked'])) + { + print ''; + print ''; + } - print ''; - print ''; + if (! empty($arrayfields['d.login']['checked'])) + { + print ''; + print ''; + } + + if (! empty($arrayfields['d.morphy']['checked'])) + { + print ' '; + } - print ''; - print ''; + if (! empty($arrayfields['t.libelle']['checked'])) + { + print ''; + $listetype=$membertypestatic->liste_array(); + print $form->selectarray("type", $listetype, $type, 1, 0, 0, '', 0, 32); + print ''; + } - print ''; - print ''; + if (! empty($arrayfields['d.address']['checked'])) + { + print ' '; + } + + if (! empty($arrayfields['d.zip']['checked'])) + { + print ' '; + } + + if (! empty($arrayfields['d.town']['checked'])) + { + print ' '; + } - print ''; - $listetype=$membertypestatic->liste_array(); - print $form->selectarray("type", $listetype, $type, 1, 0, 0, '', 0, 32); - print ''; - - print ' '; - - print ''; - print ''; + if (! empty($arrayfields['d.email']['checked'])) + { + print ''; + print ''; + } + + if (! empty($arrayfields['d.datefin']['checked'])) + { + print ' '; + } + + if (! empty($arrayfields['d.datec']['checked'])) + { + print ' '; + } + + if (! empty($arrayfields['d.tms']['checked'])) + { + print ' '; + } $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListOption',$parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Status - print ' '; + if (! empty($arrayfields['d.statut']['checked'])) + { + print ' '; + } // Action column print ''; @@ -431,29 +482,62 @@ if ($resql) } // Ref - print ""; - print $memberstatic->getNomUrl(1); - print "\n"; + if (! empty($arrayfields['d.ref']['checked'])) + { + print ""; + print $memberstatic->getNomUrl(1); + print "\n"; + } // Lastname - print "rowid\">"; - print ((! empty($objp->lastname) || ! empty($objp->firstname)) ? dol_trunc($memberstatic->getFullName($langs)) : ''); - print (((! empty($objp->lastname) || ! empty($objp->firstname)) && ! empty($companyname)) ? ' / ' : ''); - print (! empty($companyname) ? dol_trunc($companyname, 32) : ''); - print "\n"; + if (! empty($arrayfields['d.firstname']['checked']) || ! empty($arrayfields['d.lastname']['checked']) || ! empty($arrayfields['d.company']['checked'])) + { + print "rowid\">"; + print ((! empty($objp->lastname) || ! empty($objp->firstname)) ? dol_trunc($memberstatic->getFullName($langs)) : ''); + print (((! empty($objp->lastname) || ! empty($objp->firstname)) && ! empty($companyname)) ? ' / ' : ''); + print (! empty($companyname) ? dol_trunc($companyname, 32) : ''); + print "\n"; + } // Login - print "".$objp->login."\n"; + if (! empty($arrayfields['d.login']['checked'])) + { + print "".$objp->login."\n"; + } + + // Moral/Physique + if (! empty($arrayfields['d.morphy']['checked'])) + { + print "".$memberstatic->getmorphylib($objp->morphy)."\n"; + } // Type - $membertypestatic->id=$objp->type_id; - $membertypestatic->libelle=$objp->type; - print ''; - print $membertypestatic->getNomUrl(1,32); - print ''; - - // Moral/Physique - print "".$memberstatic->getmorphylib($objp->morphy)."\n"; + if (! empty($arrayfields['t.libelle']['checked'])) + { + $membertypestatic->id=$objp->type_id; + $membertypestatic->libelle=$objp->type; + print ''; + print $membertypestatic->getNomUrl(1,32); + print ''; + } + + // Address + if (! empty($arrayfields['d.address']['checked'])) + { + print "".$memberstatic->address."\n"; + } + + // Zip + if (! empty($arrayfields['d.zip']['checked'])) + { + print "".$memberstatic->zip."\n"; + } + + // Town + if (! empty($arrayfields['d.town']['checked'])) + { + print "".$memberstatic->town."\n"; + } // EMail print "".dol_print_email($objp->email,0,0,1)."\n"; @@ -462,15 +546,10 @@ if ($resql) $reshook=$hookmanager->executeHooks('printFieldListValue',$parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - // Statut - print ''; - print $memberstatic->LibStatut($objp->statut,$objp->cotisation,$datefin,2); - print ""; - // End of subscription date if ($datefin) { - print ''; + print ''; print dol_print_date($datefin,'day'); if ($memberstatic->hasDelay()) { print " ".img_warning($langs->trans("SubscriptionLate")); @@ -491,6 +570,23 @@ if ($resql) } print ''; } + + // Date create + if (! empty($arrayfields['d.datec']['checked'])) + { + print "".$memberstatic->datec."\n"; + } + + // Date modif + if (! empty($arrayfields['d.tms']['checked'])) + { + print "".$memberstatic->datem."\n"; + } + + // Statut + print ''; + print $memberstatic->LibStatut($objp->statut,$objp->cotisation,$datefin,2); + print ""; // Actions print ''; diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index 3000eecf33b..6187293aefd 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - other SecurityCode=Security code Calendar=Calendar +NumberingShort=N° Tools=Tools ToolsDesc=This area is dedicated to group miscellaneous tools not available into other menu entries.

Those tools can be reached from menu on the side. Birthday=Birthday From a7d13a81f092a1b19a66e1b9263c3bb77c470912 Mon Sep 17 00:00:00 2001 From: philippe grand Date: Sun, 8 May 2016 15:43:36 +0200 Subject: [PATCH 02/10] Revert "add column numbering name and fix a lot of issues within members list" changes on the same file by eldy This reverts commit d5a18ab584645aecc638fe2489a70d1bb32e0883. --- htdocs/adherents/list.php | 180 ++++++++-------------------------- htdocs/langs/en_US/other.lang | 1 - 2 files changed, 42 insertions(+), 139 deletions(-) diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index 43aeee8ebdf..1cc09394023 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -3,7 +3,6 @@ * Copyright (C) 2002-2003 Jean-Louis Bergamo * Copyright (C) 2004-2014 Laurent Destailleur * Copyright (C) 2013-2015 Raphaël Doursenaud - * Copyright (C) 2016 Philippe Grand * * 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 @@ -321,10 +320,10 @@ if ($resql) print ''; if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { - print ''.$langs->trans("NumberingShort").''; + print ' '; } if (! empty($arrayfields['d.ref']['checked'])) print_liste_field_titre($arrayfields['d.ref']['label'],$_SERVER["PHP_SELF"],'d.rowid','',$param,'',$sortfield,$sortorder); - if (! empty($arrayfields['d.firstname']['checked']) && empty($arrayfields['d.lastname']['checked'])) print_liste_field_titre($arrayfields['d.firstname']['label'],$_SERVER["PHP_SELF"],'d.firstname','',$param,'',$sortfield,$sortorder); + if (! empty($arrayfields['d.firstname']['checked'])) print_liste_field_titre($arrayfields['d.firstname']['label'],$_SERVER["PHP_SELF"],'d.firstname','',$param,'',$sortfield,$sortorder); if (! empty($arrayfields['d.lastname']['checked'])) print_liste_field_titre($arrayfields['d.lastname']['label'],$_SERVER["PHP_SELF"],'d.lastname','',$param,'',$sortfield,$sortorder); if (! empty($arrayfields['d.company']['checked'])) print_liste_field_titre($arrayfields['d.company']['label'],$_SERVER["PHP_SELF"],'d.company','',$param,'',$sortfield,$sortorder); if (! empty($arrayfields['d.login']['checked'])) print_liste_field_titre($arrayfields['d.login']['label'],$_SERVER["PHP_SELF"],'d.login','',$param,'',$sortfield,$sortorder); @@ -360,89 +359,39 @@ if ($resql) // Line for filters fields print ''; - if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) - { - print ' '; - } - // Ref - if (! empty($arrayfields['d.ref']['checked'])) + if (! empty($arrayfields['c.ref']['checked'])) { print ''; print ''; print ''; } - - if (! empty($arrayfields['d.firstname']['checked']) || ! empty($arrayfields['d.lastname']['checked']) || ! empty($arrayfields['d.company']['checked'])) - { - print ''; - print ''; - } - if (! empty($arrayfields['d.login']['checked'])) - { - print ''; - print ''; - } - - if (! empty($arrayfields['d.morphy']['checked'])) - { - print ' '; - } + print ''; + print ''; - if (! empty($arrayfields['t.libelle']['checked'])) - { - print ''; - $listetype=$membertypestatic->liste_array(); - print $form->selectarray("type", $listetype, $type, 1, 0, 0, '', 0, 32); - print ''; - } + print ''; + print ''; - if (! empty($arrayfields['d.address']['checked'])) - { - print ' '; - } - - if (! empty($arrayfields['d.zip']['checked'])) - { - print ' '; - } - - if (! empty($arrayfields['d.town']['checked'])) - { - print ' '; - } + print ''; + print ''; - if (! empty($arrayfields['d.email']['checked'])) - { - print ''; - print ''; - } - - if (! empty($arrayfields['d.datefin']['checked'])) - { - print ' '; - } - - if (! empty($arrayfields['d.datec']['checked'])) - { - print ' '; - } - - if (! empty($arrayfields['d.tms']['checked'])) - { - print ' '; - } + print ''; + $listetype=$membertypestatic->liste_array(); + print $form->selectarray("type", $listetype, $type, 1, 0, 0, '', 0, 32); + print ''; + + print ' '; + + print ''; + print ''; $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListOption',$parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Status - if (! empty($arrayfields['d.statut']['checked'])) - { - print ' '; - } + print ' '; // Action column print ''; @@ -482,62 +431,29 @@ if ($resql) } // Ref - if (! empty($arrayfields['d.ref']['checked'])) - { - print ""; - print $memberstatic->getNomUrl(1); - print "\n"; - } + print ""; + print $memberstatic->getNomUrl(1); + print "\n"; // Lastname - if (! empty($arrayfields['d.firstname']['checked']) || ! empty($arrayfields['d.lastname']['checked']) || ! empty($arrayfields['d.company']['checked'])) - { - print "rowid\">"; - print ((! empty($objp->lastname) || ! empty($objp->firstname)) ? dol_trunc($memberstatic->getFullName($langs)) : ''); - print (((! empty($objp->lastname) || ! empty($objp->firstname)) && ! empty($companyname)) ? ' / ' : ''); - print (! empty($companyname) ? dol_trunc($companyname, 32) : ''); - print "\n"; - } + print "rowid\">"; + print ((! empty($objp->lastname) || ! empty($objp->firstname)) ? dol_trunc($memberstatic->getFullName($langs)) : ''); + print (((! empty($objp->lastname) || ! empty($objp->firstname)) && ! empty($companyname)) ? ' / ' : ''); + print (! empty($companyname) ? dol_trunc($companyname, 32) : ''); + print "\n"; // Login - if (! empty($arrayfields['d.login']['checked'])) - { - print "".$objp->login."\n"; - } - - // Moral/Physique - if (! empty($arrayfields['d.morphy']['checked'])) - { - print "".$memberstatic->getmorphylib($objp->morphy)."\n"; - } + print "".$objp->login."\n"; // Type - if (! empty($arrayfields['t.libelle']['checked'])) - { - $membertypestatic->id=$objp->type_id; - $membertypestatic->libelle=$objp->type; - print ''; - print $membertypestatic->getNomUrl(1,32); - print ''; - } - - // Address - if (! empty($arrayfields['d.address']['checked'])) - { - print "".$memberstatic->address."\n"; - } - - // Zip - if (! empty($arrayfields['d.zip']['checked'])) - { - print "".$memberstatic->zip."\n"; - } - - // Town - if (! empty($arrayfields['d.town']['checked'])) - { - print "".$memberstatic->town."\n"; - } + $membertypestatic->id=$objp->type_id; + $membertypestatic->libelle=$objp->type; + print ''; + print $membertypestatic->getNomUrl(1,32); + print ''; + + // Moral/Physique + print "".$memberstatic->getmorphylib($objp->morphy)."\n"; // EMail print "".dol_print_email($objp->email,0,0,1)."\n"; @@ -546,10 +462,15 @@ if ($resql) $reshook=$hookmanager->executeHooks('printFieldListValue',$parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; + // Statut + print ''; + print $memberstatic->LibStatut($objp->statut,$objp->cotisation,$datefin,2); + print ""; + // End of subscription date if ($datefin) { - print ''; + print ''; print dol_print_date($datefin,'day'); if ($memberstatic->hasDelay()) { print " ".img_warning($langs->trans("SubscriptionLate")); @@ -570,23 +491,6 @@ if ($resql) } print ''; } - - // Date create - if (! empty($arrayfields['d.datec']['checked'])) - { - print "".$memberstatic->datec."\n"; - } - - // Date modif - if (! empty($arrayfields['d.tms']['checked'])) - { - print "".$memberstatic->datem."\n"; - } - - // Statut - print ''; - print $memberstatic->LibStatut($objp->statut,$objp->cotisation,$datefin,2); - print ""; // Actions print ''; diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index 6187293aefd..3000eecf33b 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -1,7 +1,6 @@ # Dolibarr language file - Source file is en_US - other SecurityCode=Security code Calendar=Calendar -NumberingShort=N° Tools=Tools ToolsDesc=This area is dedicated to group miscellaneous tools not available into other menu entries.

Those tools can be reached from menu on the side. Birthday=Birthday From e8bd56a0d7e47779f2baea18b1db0f11e08442b7 Mon Sep 17 00:00:00 2001 From: philippe grand Date: Sun, 8 May 2016 15:53:01 +0200 Subject: [PATCH 03/10] add new translation --- htdocs/langs/en_US/other.lang | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index 3000eecf33b..6187293aefd 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - other SecurityCode=Security code Calendar=Calendar +NumberingShort=N° Tools=Tools ToolsDesc=This area is dedicated to group miscellaneous tools not available into other menu entries.

Those tools can be reached from menu on the side. Birthday=Birthday From f4a533bafa2685c2853cc7411b8adb819f27ab5e Mon Sep 17 00:00:00 2001 From: philippe grand Date: Sun, 8 May 2016 16:09:00 +0200 Subject: [PATCH 04/10] Fix : when MAIN_VIEW_LINE_NUMBER is on --- htdocs/adherents/list.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index 01ce37ee3a8..4689b147cab 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -347,7 +347,7 @@ if ($resql) print ''; if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { - print ' '; + print ''.$langs->trans("NumberingShort").''; } if (! empty($arrayfields['d.ref']['checked'])) print_liste_field_titre($arrayfields['d.ref']['label'],$_SERVER["PHP_SELF"],'d.rowid','',$param,'',$sortfield,$sortorder); if (! empty($arrayfields['d.firstname']['checked'])) print_liste_field_titre($arrayfields['d.firstname']['label'],$_SERVER["PHP_SELF"],'d.firstname','',$param,'',$sortfield,$sortorder); @@ -388,6 +388,12 @@ if ($resql) // Line for filters fields print ''; + // Line numbering + if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) + { + print ' '; + } + // Ref if (! empty($arrayfields['d.ref']['checked'])) { From 07a10743f8a068b2d8b4fc91d0244b99e1b0225c Mon Sep 17 00:00:00 2001 From: philippe grand Date: Sun, 8 May 2016 16:20:32 +0200 Subject: [PATCH 05/10] Fix : inverted columns --- htdocs/adherents/list.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index 4689b147cab..f9e25dd5bc0 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -625,14 +625,6 @@ if ($resql) print $obj->address; print ''; } - // Town - if (! empty($arrayfields['d.town']['checked'])) - { - print ''; - print $obj->town; - print ''; - if (! $i) $totalarray['nbfield']++; - } // Zip if (! empty($arrayfields['d.zip']['checked'])) { @@ -641,6 +633,14 @@ if ($resql) print ''; if (! $i) $totalarray['nbfield']++; } + // Town + if (! empty($arrayfields['d.town']['checked'])) + { + print ''; + print $obj->town; + print ''; + if (! $i) $totalarray['nbfield']++; + } // State if (! empty($arrayfields['state.nom']['checked'])) { From 788d499bf614cb92401c605d86d353943c2ff0c3 Mon Sep 17 00:00:00 2001 From: Ion Agorria Date: Wed, 11 May 2016 18:50:02 +0200 Subject: [PATCH 06/10] Change resource type to dolresource in class --- htdocs/resource/class/dolresource.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/resource/class/dolresource.class.php b/htdocs/resource/class/dolresource.class.php index b6b4eec8be2..f7adb19112e 100644 --- a/htdocs/resource/class/dolresource.class.php +++ b/htdocs/resource/class/dolresource.class.php @@ -30,7 +30,7 @@ require_once DOL_DOCUMENT_ROOT."/core/lib/functions2.lib.php"; */ class Dolresource extends CommonObject { - var $element='resource'; //!< Id that identify managed objects + var $element='dolresource'; //!< Id that identify managed objects var $table_element='resource'; //!< Name of table without prefix where object is stored var $resource_id; From 9b11907c70f3df91895b5a156fb47bcd98f4ec90 Mon Sep 17 00:00:00 2001 From: Ion Agorria Date: Wed, 11 May 2016 18:50:25 +0200 Subject: [PATCH 07/10] Update existing linked elements to new type --- htdocs/install/mysql/migration/3.9.0-4.0.0.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/install/mysql/migration/3.9.0-4.0.0.sql b/htdocs/install/mysql/migration/3.9.0-4.0.0.sql index 20c1c1d0de3..14849e6fa9c 100644 --- a/htdocs/install/mysql/migration/3.9.0-4.0.0.sql +++ b/htdocs/install/mysql/migration/3.9.0-4.0.0.sql @@ -438,6 +438,7 @@ ALTER TABLE llx_resource ADD COLUMN extraparams varchar(255); ALTER TABLE llx_element_resources ADD COLUMN duree real; -- total duration of using ressource +UPDATE llx_element_resources SET resource_type = 'dolresource' WHERE resource_type = 'resource'; CREATE TABLE llx_advtargetemailing ( From 740b6819c73adc4c0373ff6e5b2ba425eb49a2e1 Mon Sep 17 00:00:00 2001 From: philippe grand Date: Fri, 13 May 2016 17:49:16 +0200 Subject: [PATCH 08/10] add phone pro search within member list --- htdocs/adherents/list.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index f9e25dd5bc0..ab9ac5aca1b 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -49,6 +49,7 @@ $search_zip=GETPOST("search_zip"); $search_town=GETPOST("search_town"); $search_state=GETPOST("search_state"); $search_country=GETPOST("search_country"); +$search_phone=GETPOST("search_phone"); $type=GETPOST("type"); $search_email=GETPOST("search_email"); $search_categ = GETPOST("search_categ",'int'); @@ -104,6 +105,7 @@ $arrayfields=array( 'd.address'=>array('label'=>$langs->trans("Address"), 'checked'=>0), 'd.zip'=>array('label'=>$langs->trans("Zip"), 'checked'=>0), 'd.town'=>array('label'=>$langs->trans("Town"), 'checked'=>0), + 'd.phone'=>array('label'=>$langs->trans("Phone"), 'checked'=>0), 'state.nom'=>array('label'=>$langs->trans("State"), 'checked'=>0), 'country.code_iso'=>array('label'=>$langs->trans("Country"), 'checked'=>0), /*'d.note_public'=>array('label'=>$langs->trans("NotePublic"), 'checked'=>0), @@ -151,6 +153,7 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETP $search_town=""; $search_state=""; $search_country=''; + $search_phone=''; $search_morphy=""; $search_categ=""; $catid=""; @@ -290,6 +293,7 @@ if ($resql) if ($search_zip != '') $param.= "&search_zip=".urlencode($search_zip); if ($search_state != '') $param.= "&search_state=".urlencode($search_state); if ($search_country != '') $param.= "&search_country=".urlencode($search_country); + if ($search_phone != '') $param.= "&search_phone=".urlencode($search_phone); if ($filter) $param.="&filter=".urlencode($filter); if ($type > 0) $param.="&type=".urlencode($type); if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss); @@ -361,6 +365,7 @@ if ($resql) if (! empty($arrayfields['d.town']['checked'])) print_liste_field_titre($arrayfields['d.town']['label'],$_SERVER["PHP_SELF"],'d.town','',$param,'',$sortfield,$sortorder); if (! empty($arrayfields['state.nom']['checked'])) print_liste_field_titre($langs->trans("StateShort"),$_SERVER["PHP_SELF"],"state.nom","",$param,'',$sortfield,$sortorder); if (! empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($langs->trans("Country"),$_SERVER["PHP_SELF"],"country.code_iso","",$param,'align="center"',$sortfield,$sortorder); + if (! empty($arrayfields['d.phone']['checked'])) print_liste_field_titre($arrayfields['d.phone']['label'],$_SERVER["PHP_SELF"],'d.phone','',$param,'',$sortfield,$sortorder); if (! empty($arrayfields['d.email']['checked'])) print_liste_field_titre($arrayfields['d.email']['label'],$_SERVER["PHP_SELF"],'d.email','',$param,'',$sortfield,$sortorder); if (! empty($arrayfields['d.datefin']['checked'])) print_liste_field_titre($arrayfields['d.datefin']['label'],$_SERVER["PHP_SELF"],'d.datefin','',$param,'align="center"',$sortfield,$sortorder); // Extra fields @@ -470,6 +475,12 @@ if ($resql) print $form->select_country($search_country,'search_country','',0,'maxwidth100'); print ''; } + // Phone pro + if (! empty($arrayfields['d.phone']['checked'])) + { + print ''; + print ''; + } // Email if (! empty($arrayfields['d.email']['checked'])) { @@ -656,6 +667,14 @@ if ($resql) print ''; if (! $i) $totalarray['nbfield']++; } + // Phone pro + if (! empty($arrayfields['d.phone']['checked'])) + { + print ''; + print $obj->phone; + print ''; + if (! $i) $totalarray['nbfield']++; + } // EMail if (! empty($arrayfields['d.email']['checked'])) { From 23cae18765249ab531c1ae512dba9e32ef89b7a9 Mon Sep 17 00:00:00 2001 From: philippe grand Date: Fri, 13 May 2016 19:06:28 +0200 Subject: [PATCH 09/10] add phone perso search within member list --- htdocs/adherents/list.php | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index ab9ac5aca1b..a50b3bd4a14 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -50,6 +50,7 @@ $search_town=GETPOST("search_town"); $search_state=GETPOST("search_state"); $search_country=GETPOST("search_country"); $search_phone=GETPOST("search_phone"); +$search_phone_perso=GETPOST("search_phone_perso"); $type=GETPOST("type"); $search_email=GETPOST("search_email"); $search_categ = GETPOST("search_categ",'int'); @@ -106,6 +107,7 @@ $arrayfields=array( 'd.zip'=>array('label'=>$langs->trans("Zip"), 'checked'=>0), 'd.town'=>array('label'=>$langs->trans("Town"), 'checked'=>0), 'd.phone'=>array('label'=>$langs->trans("Phone"), 'checked'=>0), + 'd.phone_perso'=>array('label'=>$langs->trans("PhonePerso"), 'checked'=>0), 'state.nom'=>array('label'=>$langs->trans("State"), 'checked'=>0), 'country.code_iso'=>array('label'=>$langs->trans("Country"), 'checked'=>0), /*'d.note_public'=>array('label'=>$langs->trans("NotePublic"), 'checked'=>0), @@ -154,6 +156,7 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETP $search_state=""; $search_country=''; $search_phone=''; + $search_phone_perso=''; $search_morphy=""; $search_categ=""; $catid=""; @@ -294,6 +297,7 @@ if ($resql) if ($search_state != '') $param.= "&search_state=".urlencode($search_state); if ($search_country != '') $param.= "&search_country=".urlencode($search_country); if ($search_phone != '') $param.= "&search_phone=".urlencode($search_phone); + if ($search_phone_perso != '') $param.= "&search_phone_perso=".urlencode($search_phone_perso); if ($filter) $param.="&filter=".urlencode($filter); if ($type > 0) $param.="&type=".urlencode($type); if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss); @@ -366,6 +370,7 @@ if ($resql) if (! empty($arrayfields['state.nom']['checked'])) print_liste_field_titre($langs->trans("StateShort"),$_SERVER["PHP_SELF"],"state.nom","",$param,'',$sortfield,$sortorder); if (! empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($langs->trans("Country"),$_SERVER["PHP_SELF"],"country.code_iso","",$param,'align="center"',$sortfield,$sortorder); if (! empty($arrayfields['d.phone']['checked'])) print_liste_field_titre($arrayfields['d.phone']['label'],$_SERVER["PHP_SELF"],'d.phone','',$param,'',$sortfield,$sortorder); + if (! empty($arrayfields['d.phone_perso']['checked'])) print_liste_field_titre($arrayfields['d.phone_perso']['label'],$_SERVER["PHP_SELF"],'d.phone_perso','',$param,'',$sortfield,$sortorder); if (! empty($arrayfields['d.email']['checked'])) print_liste_field_titre($arrayfields['d.email']['label'],$_SERVER["PHP_SELF"],'d.email','',$param,'',$sortfield,$sortorder); if (! empty($arrayfields['d.datefin']['checked'])) print_liste_field_titre($arrayfields['d.datefin']['label'],$_SERVER["PHP_SELF"],'d.datefin','',$param,'align="center"',$sortfield,$sortorder); // Extra fields @@ -481,6 +486,12 @@ if ($resql) print ''; print ''; } + // Phone perso + if (! empty($arrayfields['d.phone_perso']['checked'])) + { + print ''; + print ''; + } // Email if (! empty($arrayfields['d.email']['checked'])) { @@ -573,7 +584,7 @@ if ($resql) } else { $companyname=$obj->company; } - +var_dump($obj);exit; $var=!$var; print ""; @@ -675,6 +686,14 @@ if ($resql) print ''; if (! $i) $totalarray['nbfield']++; } + // Phone perso + if (! empty($arrayfields['d.phone_perso']['checked'])) + { + print ''; + print $obj->phone_perso; + print ''; + if (! $i) $totalarray['nbfield']++; + } // EMail if (! empty($arrayfields['d.email']['checked'])) { From 45bdcd282a2f86af5622e9ac3f63b3355bd6b00e Mon Sep 17 00:00:00 2001 From: philippe grand Date: Fri, 13 May 2016 19:24:55 +0200 Subject: [PATCH 10/10] add mobile search within member list --- htdocs/adherents/list.php | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index a50b3bd4a14..5878aac2755 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -51,6 +51,7 @@ $search_state=GETPOST("search_state"); $search_country=GETPOST("search_country"); $search_phone=GETPOST("search_phone"); $search_phone_perso=GETPOST("search_phone_perso"); +$search_phone_mobile=GETPOST("search_phone_mobile"); $type=GETPOST("type"); $search_email=GETPOST("search_email"); $search_categ = GETPOST("search_categ",'int'); @@ -108,6 +109,7 @@ $arrayfields=array( 'd.town'=>array('label'=>$langs->trans("Town"), 'checked'=>0), 'd.phone'=>array('label'=>$langs->trans("Phone"), 'checked'=>0), 'd.phone_perso'=>array('label'=>$langs->trans("PhonePerso"), 'checked'=>0), + 'd.phone_mobile'=>array('label'=>$langs->trans("PhoneMobile"), 'checked'=>0), 'state.nom'=>array('label'=>$langs->trans("State"), 'checked'=>0), 'country.code_iso'=>array('label'=>$langs->trans("Country"), 'checked'=>0), /*'d.note_public'=>array('label'=>$langs->trans("NotePublic"), 'checked'=>0), @@ -157,6 +159,7 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETP $search_country=''; $search_phone=''; $search_phone_perso=''; + $search_phone_mobile=''; $search_morphy=""; $search_categ=""; $catid=""; @@ -298,6 +301,7 @@ if ($resql) if ($search_country != '') $param.= "&search_country=".urlencode($search_country); if ($search_phone != '') $param.= "&search_phone=".urlencode($search_phone); if ($search_phone_perso != '') $param.= "&search_phone_perso=".urlencode($search_phone_perso); + if ($search_phone_mobile != '') $param.= "&search_phone_mobile=".urlencode($search_phone_mobile); if ($filter) $param.="&filter=".urlencode($filter); if ($type > 0) $param.="&type=".urlencode($type); if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss); @@ -371,6 +375,7 @@ if ($resql) if (! empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($langs->trans("Country"),$_SERVER["PHP_SELF"],"country.code_iso","",$param,'align="center"',$sortfield,$sortorder); if (! empty($arrayfields['d.phone']['checked'])) print_liste_field_titre($arrayfields['d.phone']['label'],$_SERVER["PHP_SELF"],'d.phone','',$param,'',$sortfield,$sortorder); if (! empty($arrayfields['d.phone_perso']['checked'])) print_liste_field_titre($arrayfields['d.phone_perso']['label'],$_SERVER["PHP_SELF"],'d.phone_perso','',$param,'',$sortfield,$sortorder); + if (! empty($arrayfields['d.phone_mobile']['checked'])) print_liste_field_titre($arrayfields['d.phone_mobile']['label'],$_SERVER["PHP_SELF"],'d.phone_mobile','',$param,'',$sortfield,$sortorder); if (! empty($arrayfields['d.email']['checked'])) print_liste_field_titre($arrayfields['d.email']['label'],$_SERVER["PHP_SELF"],'d.email','',$param,'',$sortfield,$sortorder); if (! empty($arrayfields['d.datefin']['checked'])) print_liste_field_titre($arrayfields['d.datefin']['label'],$_SERVER["PHP_SELF"],'d.datefin','',$param,'align="center"',$sortfield,$sortorder); // Extra fields @@ -492,6 +497,12 @@ if ($resql) print ''; print ''; } + // Phone mobile + if (! empty($arrayfields['d.phone_mobile']['checked'])) + { + print ''; + print ''; + } // Email if (! empty($arrayfields['d.email']['checked'])) { @@ -584,7 +595,7 @@ if ($resql) } else { $companyname=$obj->company; } -var_dump($obj);exit; + $var=!$var; print ""; @@ -694,6 +705,14 @@ var_dump($obj);exit; print ''; if (! $i) $totalarray['nbfield']++; } + // Phone mobile + if (! empty($arrayfields['d.phone_mobile']['checked'])) + { + print ''; + print $obj->phone_mobile; + print ''; + if (! $i) $totalarray['nbfield']++; + } // EMail if (! empty($arrayfields['d.email']['checked'])) {