18if (isModEnabled(
'categorie') && $user->hasRight(
'categorie',
'lire')) {
19 require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
23 $(document).ready(function() {
26 $(":button[name=addcontact]").click(function() {
27 $(":hidden[name=action]").val("add");
28 $("#find_customer").submit();
31 $(":button[name=loadfilter]").click(function() {
32 $(":hidden[name=action]").val("loadfilter");
33 $("#find_customer").submit();
36 $(":button[name=deletefilter]").click(function() {
37 $(":hidden[name=action]").val("deletefilter");
38 $("#find_customer").submit();
41 $(":button[name=savefilter]").click(function() {
42 $(":hidden[name=action]").val("savefilter");
43 $("#find_customer").submit();
46 $(":button[name=createfilter]").click(function() {
47 $(":hidden[name=action]").val("createfilter");
48 $("#find_customer").submit();
56print
'<div class="tabBar">'.
"\n";
57print
'<form name="find_customer" id="find_customer" action="'.$_SERVER[
'PHP_SELF'].
'?id='.$id.
'" method="POST">'.
"\n";
58print
'<input type="hidden" name="token" value="'.newToken().
'">'.
"\n";
59print
'<input type="hidden" name="action" value="">'.
"\n";
60print
'<table class="border centpercent">'.
"\n";
63print
'<td colspan="3" class="right">'.
"\n";
65print
'<input type="button" name="addcontact" id="addcontact" value="'.$langs->trans(
'AdvTgtAddContact').
'" class="button"/>'.
"\n";
70print
'<tr><td>'.$langs->trans(
'AdvTgtNameTemplate').
'</td><td class="valignmiddle">';
71if (!empty($template_id)) {
72 $default_template = $template_id;
74 $default_template = $advTarget->id;
76print $formadvtargetemaling->selectAdvtargetemailingTemplate(
'template_id', $default_template, 0, $advTarget->type_element,
'valignmiddle');
77print
'<input type="button" name="loadfilter" id="loadfilter" value="'.$langs->trans(
'AdvTgtLoadFilter').
'" class="button"/>';
78print
'<input type="button" name="deletefilter" id="deletefilter" value="'.$langs->trans(
'AdvTgtDeleteFilter').
'" class="button"/>';
79print
'<input type="button" name="savefilter" id="savefilter" value="'.$langs->trans(
'AdvTgtSaveFilter').
'" class="button"/>';
80print
'</td><td>'.
"\n";
81print
'</td></tr>'.
"\n";
83print
'<tr><td>'.$langs->trans(
'AdvTgtOrCreateNewFilter').
'</td><td>';
84print
'<input type="text" name="template_name" id="template_name" value=""/>';
85print
'<input type="button" name="createfilter" id="createfilter" value="'.$langs->trans(
'AdvTgtCreateFilter').
'" class="button"/>';
86print
'</td><td>'.
"\n";
87print
'</td></tr>'.
"\n";
89print
'<tr><td>'.$langs->trans(
'AdvTgtTypeOfIncude').
'</td><td>';
90print $form->selectarray(
'type_of_target', $advTarget->select_target_type, $array_query[
'type_of_target']);
91print
'</td><td>'.
"\n";
92print $form->textwithpicto(
'', $langs->trans(
"AdvTgtTypeOfIncudeHelp"), 1,
'help');
93print
'</td></tr>'.
"\n";
96print
'<tr><td>'.$langs->trans(
'ThirdPartyName');
97if (!empty($array_query[
'cust_name'])) {
98 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
100print
'</td><td><input type="text" name="cust_name" value="'.$array_query[
'cust_name'].
'"/></td><td>'.
"\n";
101print $form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchTextHelp"), 1,
'help');
102print
'</td></tr>'.
"\n";
105print
'<tr><td>'.$langs->trans(
'CustomerCode');
106if (!empty($array_query[
'cust_code'])) {
107 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
109print
'</td><td><input type="text" name="cust_code" value="'.$array_query[
'cust_code'].
'"/></td><td>'.
"\n";
110print $form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchTextHelp"), 1,
'help');
111print
'</td></tr>'.
"\n";
114print
'<tr><td>'.$langs->trans(
'Address');
115if (!empty($array_query[
'cust_adress'])) {
116 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
118print
'</td><td><input type="text" name="cust_adress" value="'.$array_query[
'cust_adress'].
'"/></td><td>'.
"\n";
119print $form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchTextHelp"), 1,
'help');
120print
'</td></tr>'.
"\n";
123print
'<tr><td>'.$langs->trans(
'Zip');
124if (!empty($array_query[
'cust_zip'])) {
125 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
127print
'</td><td><input type="text" name="cust_zip" value="'.$array_query[
'cust_zip'].
'"/></td><td>'.
"\n";
128print $form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchTextHelp"), 1,
'help');
129print
'</td></tr>'.
"\n";
132print
'<tr><td>'.$langs->trans(
'Town');
133if (!empty($array_query[
'cust_city'])) {
134 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
136print
'</td><td><input type="text" name="cust_city" value="'.$array_query[
'cust_city'].
'"/></td><td>'.
"\n";
137print $form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchTextHelp"), 1,
'help');
138print
'</td></tr>'.
"\n";
141print
'<tr><td>'.$langs->trans(
"Country");
142if (!empty($array_query[
'cust_country'])) {
143 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
145print
'</td><td>'.
"\n";
146print $formadvtargetemaling->multiselectCountry(
'cust_country', $array_query[
'cust_country']);
147print
'</td><td>'.
"\n";
148print
'</td></tr>'.
"\n";
151print
'<tr><td>'.$langs->trans(
'Status').
' '.$langs->trans(
'ThirdParty');
152if (!empty($array_query[
'cust_status'])) {
153 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
156print $formadvtargetemaling->advMultiselectarray(
159 '0' => $langs->trans(
'ActivityCeased'),
160 '1' => $langs->trans(
'InActivity')
162 $array_query[
'cust_status']
164print
'</td><td>'.
"\n";
165print
'</td></tr>'.
"\n";
168print
'<tr><td>'.$langs->trans(
"Maison mère");
169if (!empty($array_query[
'cust_mothercompany'])) {
170 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
172print
'</td><td>'.
"\n";
173print
'<input type="text" name="cust_mothercompany" value="'.$array_query[
'cust_mothercompany'].
'"/>';
174print
'</td><td>'.
"\n";
175print $form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchTextHelp"), 1,
'help');
176print
'</td></tr>'.
"\n";
179$selected = $array_query[
'cust_typecust'];
180print
'<tr><td>'.$langs->trans(
'ProspectCustomer').
' '.$langs->trans(
'ThirdParty');
181if (!empty($array_query[
'cust_typecust'])) {
182 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
185$options_array = array(
186 2 => $langs->trans(
'Prospect'),
187 3 => $langs->trans(
'ProspectCustomer'),
188 1 => $langs->trans(
'Customer'),
189 0 => $langs->trans(
'NorProspectNorCustomer')
191print $formadvtargetemaling->advMultiselectarray(
'cust_typecust', $options_array, $array_query[
'cust_typecust']);
192print
'</td><td>'.
"\n";
193print
'</td></tr>'.
"\n";
196print
'<tr><td>'.$langs->trans(
'ProspectLevel');
197if (!empty($array_query[
'cust_prospect_status'])) {
198 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
201print $formadvtargetemaling->multiselectProspectionStatus($array_query[
'cust_prospect_status'],
'cust_prospect_status');
202print
'</td><td>'.
"\n";
203print
'</td></tr>'.
"\n";
206print
'<tr><td>'.$langs->trans(
'StatusProsp');
207if (!empty($array_query[
'cust_comm_status'])) {
208 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
211print $formadvtargetemaling->advMultiselectarray(
'cust_comm_status', $advTarget->type_statuscommprospect, $array_query[
'cust_comm_status']);
212print
'</td><td>'.
"\n";
213print
'</td></tr>'.
"\n";
216print
'<tr><td>'.$langs->trans(
"ThirdPartyType");
217if (!empty($array_query[
'cust_typeent'])) {
218 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
220print
'</td><td>'.
"\n";
221print $formadvtargetemaling->advMultiselectarray(
'cust_typeent', $formcompany->typent_array(0,
" AND id <> 0"), $array_query[
'cust_typeent']);
222print
'</td><td>'.
"\n";
223print
'</td></tr>'.
"\n";
226print
'<td>'.$langs->trans(
"Staff");
227if (!empty($array_query[
'cust_effectif_id'])) {
228 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
231print $formadvtargetemaling->advMultiselectarray(
"cust_effectif_id", $formcompany->effectif_array(0,
" AND id <> 0"), $array_query[
'cust_effectif_id']);
232print
'</td><td>'.
"\n";
233print
'</td></tr>'.
"\n";
236print
'<tr><td>'.$langs->trans(
"SalesRepresentatives");
237if (!empty($array_query[
'cust_saleman'])) {
238 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
240print
'</td><td>'.
"\n";
241print $formadvtargetemaling->multiselectselectSalesRepresentatives(
'cust_saleman', $array_query[
'cust_saleman'], $user);
242print
'</td><td>'.
"\n";
243print
'</td></tr>'.
"\n";
247 print
'<tr><td>'.$langs->trans(
"DefaultLang");
248 if (!empty($array_query[
'cust_language'])) {
249 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
251 print
'</td><td>'.
"\n";
252 print $formadvtargetemaling->multiselectselectLanguage(
'cust_language', $array_query[
'cust_language']);
253 print
'</td><td>'.
"\n";
254 print
'</td></tr>'.
"\n";
257if (isModEnabled(
'categorie') && $user->hasRight(
'categorie',
'lire')) {
259 print
'<tr><td>'.$langs->trans(
"CustomersCategoryShort");
260 if (!empty($array_query[
'cust_categ'])) {
261 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
263 print
'</td><td>'.
"\n";
264 $cate_arbo = $form->select_all_categories(Categorie::TYPE_CUSTOMER,
null,
'parent',
null,
null, 1);
265 print $form->multiselectarray(
'cust_categ', $cate_arbo,
GETPOST(
'cust_categ',
'array'),
null,
null,
null,
null,
"90%");
266 print
'</td><td>'.
"\n";
267 print
'</td></tr>'.
"\n";
273 $elementtype = $socstatic->table_element;
277 $extrafields->fetch_name_optionals_label($elementtype);
278 foreach ($extrafields->attributes[$elementtype][
'label'] as $key => $val) {
279 if ($key !=
'ts_nameextra' && $key !=
'ts_payeur') {
280 print
'<tr><td>'.$extrafields->attributes[$elementtype][
'label'][$key];
281 if (!empty($array_query[
'options_'.$key]) || (is_array($array_query[
'options_'.$key]) && count($array_query[
'options_'.$key]) > 0)) {
282 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
285 if (($extrafields->attributes[$elementtype][
'type'][$key] ==
'varchar') || ($extrafields->attributes[$elementtype][
'type'][$key] ==
'text')) {
286 print
'<input type="text" name="options_'.$key.
'"/></td><td>'.
"\n";
287 print $form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchTextHelp"), 1,
'help');
288 } elseif (($extrafields->attributes[$elementtype][
'type'][$key] ==
'int') || ($extrafields->attributes[$elementtype][
'type'][$key] ==
'double')) {
289 print $langs->trans(
"AdvTgtMinVal").
'<input type="text" name="options'.$key.
'_min"/>';
290 print $langs->trans(
"AdvTgtMaxVal").
'<input type="text" name="options'.$key.
'_max"/>';
291 print
'</td><td>'.
"\n";
292 print $form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchIntHelp"), 1,
'help');
293 } elseif (($extrafields->attributes[$elementtype][
'type'][$key] ==
'date') || ($extrafields->attributes[$elementtype][
'type'][$key] ==
'datetime')) {
294 print
'<table class="nobordernopadding"><tr>';
295 print
'<td>'.$langs->trans(
"AdvTgtStartDt").
'</td><td>';
296 print $form->selectDate(
'',
'options_'.$key.
'_st_dt');
297 print
'</td><td>'.$langs->trans(
"AdvTgtEndDt").
'</td><td>';
298 print $form->selectDate(
'',
'options_'.$key.
'_end_dt');
299 print
'</td></tr></table>';
301 print
'</td><td>'.
"\n";
302 print $form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchDtHelp"), 1,
'help');
303 } elseif (($extrafields->attributes[$elementtype][
'type'][$key] ==
'boolean')) {
304 print $form->selectarray(
308 '1' => $langs->trans(
'Yes'),
309 '0' => $langs->trans(
'No')
311 $array_query[
'options_'.$key]
313 print
'</td><td>'.
"\n";
314 } elseif (($extrafields->attributes[$elementtype][
'type'][$key] ==
'select')) {
315 print $formadvtargetemaling->advMultiselectarray(
'options_'.$key, $extrafields->attributes[$key][
'param'][
'options'], $array_query[
'options_'.$key]);
316 print
'</td><td>'.
"\n";
317 } elseif (($extrafields->attributes[$elementtype][
'type'][$key] ==
'sellist')) {
318 print $formadvtargetemaling->advMultiselectarraySelllist(
'options_'.$key, $extrafields->attributes[$key][
'param'][
'options'], $array_query[
'options_'.$key]);
319 print
'</td><td>'.
"\n";
321 print
'<table class="nobordernopadding"><tr>';
322 print
'<td></td><td>';
323 if (is_array($array_query[
'options_'.$key])) {
324 print $extrafields->showInputField($key, implode(
',', $array_query[
'options_'.$key]));
326 print $extrafields->showInputField($key, $array_query[
'options_'.$key]);
328 print
'</td></tr></table>';
330 print
'</td><td>'.
"\n";
332 print
'</td></tr>'.
"\n";
337 $action_search =
'query';
339 $parameters = array(
'advtarget'=>1);
340 if (!empty($advTarget->id)) {
341 $parameters = array(
'array_query' => $advTarget->filtervalue);
344 $reshook = $hookmanager->executeHooks(
'formObjectOptions', $parameters, $std_soc, $action_search);
345 print $hookmanager->resPrint;
349print
'<tr><td>'.$langs->trans(
'Status').
' '.$langs->trans(
'Contact');
350if (!empty($array_query[
'contact_status'])) {
351 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
354print $formadvtargetemaling->advMultiselectarray(
357 '0' => $langs->trans(
'ActivityCeased'),
358 '1' => $langs->trans(
'InActivity')
360 $array_query[
'contact_status']
362print
'</td><td>'.
"\n";
363print $form->textwithpicto(
'', $langs->trans(
"AdvTgtContactHelp"), 1,
'help');
364print
'</td></tr>'.
"\n";
367print
'<tr><td width="15%">'.$langs->trans(
"UserTitle");
368if (!empty($array_query[
'contact_civility'])) {
369 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
372print $formadvtargetemaling->multiselectCivility(
'contact_civility', $array_query[
'contact_civility']);
376print
'<tr><td>'.$langs->trans(
'Contact').
' '.$langs->trans(
'Lastname');
377if (!empty($array_query[
'contact_lastname'])) {
378 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
380print
'</td><td><input type="text" name="contact_lastname" value="'.$array_query[
'contact_lastname'].
'"/></td><td>'.
"\n";
381print $form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchTextHelp"), 1,
'help');
382print
'</td></tr>'.
"\n";
383print
'<tr><td>'.$langs->trans(
'Contact').
' '.$langs->trans(
'Firstname');
384if (!empty($array_query[
'contact_firstname'])) {
385 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
387print
'</td><td><input type="text" name="contact_firstname" value="'.$array_query[
'contact_firstname'].
'"/></td><td>'.
"\n";
388print $form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchTextHelp"), 1,
'help');
389print
'</td></tr>'.
"\n";
392print
'<tr><td>'.$langs->trans(
'Contact').
' '.$langs->trans(
"Country");
393if (!empty($array_query[
'contact_country'])) {
394 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
396print
'</td><td>'.
"\n";
397print $formadvtargetemaling->multiselectCountry(
'contact_country', $array_query[
'contact_country']);
398print
'</td><td>'.
"\n";
399print
'</td></tr>'.
"\n";
402print
'<tr><td>'.$langs->trans(
'Contact').
' '.$langs->trans(
"No_Email");
403if (!empty($array_query[
'contact_no_email'])) {
404 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
406print
'</td><td>'.
"\n";
407print $form->selectarray(
411 '1' => $langs->trans(
'Yes'),
412 '0' => $langs->trans(
'No')
414 $array_query[
'contact_no_email']
416print
'</td><td>'.
"\n";
417print
'</td></tr>'.
"\n";
420print
'<tr><td>'.$langs->trans(
'Contact').
' '.$langs->trans(
"DateCreation");
421if (!empty($array_query[
'contact_create_st_dt'])) {
422 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
424print
'</td><td>'.
"\n";
425print
'<table class="nobordernopadding"><tr>';
426print
'<td>'.$langs->trans(
"AdvTgtStartDt").
'</td><td>';
427print $form->selectDate($array_query[
'contact_create_st_dt'],
'contact_create_st_dt', 0, 0, 1,
'find_customer', 1, 1);
428print
'</td><td>'.$langs->trans(
"AdvTgtEndDt").
'</td><td>';
429print $form->selectDate($array_query[
'contact_create_end_dt'],
'contact_create_end_dt', 0, 0, 1,
'find_customer', 1, 1);
430print
'</td></tr></table>';
431print
'</td><td>'.
"\n";
432print
'</td></tr>'.
"\n";
435print
'<tr><td>'.$langs->trans(
'Contact').
' '.$langs->trans(
"DateLastModification");
436if (!empty($array_query[
'contact_update_st_dt'])) {
437 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
439print
'</td><td>'.
"\n";
440print
'<table class="nobordernopadding"><tr>';
441print
'<td>'.$langs->trans(
"AdvTgtStartDt").
'</td><td>';
442print $form->selectDate($array_query[
'contact_update_st_dt'],
'contact_update_st_dt', 0, 0, 1,
'find_customer', 1, 1);
443print
'</td><td>'.$langs->trans(
"AdvTgtEndDt").
'</td><td>';
444print $form->selectDate($array_query[
'contact_update_end_dt'],
'contact_update_end_dt', 0, 0, 1,
'find_customer', 1, 1);
445print
'</td></tr></table>';
446print
'</td><td>'.
"\n";
447print
'</td></tr>'.
"\n";
449if (isModEnabled(
'categorie') && $user->hasRight(
'categorie',
'lire')) {
451 print
'<tr><td>'.$langs->trans(
"ContactCategoriesShort");
452 if (!empty($array_query[
'contact_categ'])) {
453 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
455 print
'</td><td>'.
"\n";
456 $cate_arbo = $form->select_all_categories(Categorie::TYPE_CONTACT,
null,
'parent',
null,
null, 1);
457 print $form->multiselectarray(
'contact_categ', $cate_arbo,
GETPOST(
'contact_categ',
'array'),
null,
null,
null,
null,
"90%");
458 print
'</td><td>'.
"\n";
459 print
'</td></tr>'.
"\n";
464 $contactstatic =
new Contact($db);
465 $elementype = $contactstatic->table_element;
469 $extrafields->fetch_name_optionals_label($elementype);
470 if (!empty($extrafields->attributes[$elementtype][
'type'])) {
471 foreach ($extrafields->attributes[$elementtype][
'type'] as $key => &$value) {
472 if ($value ==
'radio') {
477 if (!empty($extrafields->attributes[$elementtype][
'label'])) {
478 foreach ($extrafields->attributes[$elementtype][
'label'] as $key => $val) {
479 print
'<tr><td>'.$extrafields->attributes[$elementtype][
'label'][$key];
480 if ($array_query[
'options_'.$key.
'_cnct'] !=
'' || (is_array($array_query[
'options_'.$key.
'_cnct']) && count($array_query[
'options_'.$key.
'_cnct']) > 0)) {
481 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
484 if (($extrafields->attributes[$elementtype][
'type'][$key] ==
'varchar') || ($extrafields->attributes[$elementtype][
'type'][$key] ==
'text')) {
485 print
'<input type="text" name="options_'.$key.
'_cnct"/></td><td>'.
"\n";
486 print $form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchTextHelp"), 1,
'help');
487 } elseif (($extrafields->attributes[$elementtype][
'type'][$key] ==
'int') || ($extrafields->attributes[$elementtype][
'type'][$key] ==
'double')) {
488 print $langs->trans(
"AdvTgtMinVal").
'<input type="text" name="options_'.$key.
'_min_cnct"/>';
489 print $langs->trans(
"AdvTgtMaxVal").
'<input type="text" name="options_'.$key.
'_max_cnct"/>';
490 print
'</td><td>'.
"\n";
491 print $form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchIntHelp"), 1,
'help');
492 } elseif (($extrafields->attributes[$elementtype][
'type'][$key] ==
'date') || ($extrafields->attributes[$elementtype][
'type'][$key] ==
'datetime')) {
493 print
'<table class="nobordernopadding"><tr>';
494 print
'<td>'.$langs->trans(
"AdvTgtStartDt").
'</td><td>';
495 print $form->selectDate(
'',
'options_'.$key.
'_st_dt_cnct');
496 print
'</td><td>'.$langs->trans(
"AdvTgtEndDt").
'</td><td>';
497 print $form->selectDate(
'',
'options_'.$key.
'_end_dt_cnct');
498 print
'</td></tr></table>';
499 print
'</td><td>'.
"\n";
500 print $form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchDtHelp"), 1,
'help');
501 } elseif (($extrafields->attributes[$elementtype][
'type'][$key] ==
'boolean')) {
502 print $form->selectarray(
503 'options_'.$key.
'_cnct',
506 '1' => $langs->trans(
'Yes'),
507 '0' => $langs->trans(
'No')
509 $array_query[
'options_'.$key.
'_cnct']
511 print
'</td><td>'.
"\n";
512 } elseif (($extrafields->attributes[$elementtype][
'type'][$key] ==
'select')) {
513 print $formadvtargetemaling->advMultiselectarray(
'options_'.$key.
'_cnct', $extrafields->attributes[$key][
'param'][
'options'], $array_query[
'options_'.$key.
'_cnct']);
514 print
'</td><td>'.
"\n";
515 } elseif (($extrafields->attributes[$elementtype][
'type'][$key] ==
'sellist')) {
516 print $formadvtargetemaling->advMultiselectarraySelllist(
'options_'.$key.
'_cnct', $extrafields->attributes[$key][
'param'][
'options'], $array_query[
'options_'.$key.
'_cnct']);
517 print
'</td><td>'.
"\n";
519 if (is_array($array_query[
'options_'.$key.
'_cnct'])) {
520 print $extrafields->showInputField($key, implode(
',', $array_query[
'options_'.$key.
'_cnct']),
'',
'_cnct');
522 print $extrafields->showInputField($key, $array_query[
'options_'.$key.
'_cnct'],
'',
'_cnct');
524 print
'</td><td>'.
"\n";
526 print
'</td></tr>'.
"\n";
531print
'<td colspan="3" class="right">'.
"\n";
532print
'<input type="button" name="addcontact" id="addcontact" value="'.$langs->trans(
'AdvTgtAddContact').
'" class="butAction"/>'.
"\n";
535print
'</table>'.
"\n";
538print
'<form action="'.$_SERVER[
'PHP_SELF'].
'?action=clear&id='.$object->id.
'" method="POST">';
539print
'<input type="hidden" name="token" value="'.newToken().
'">';
541print
'<table class="noborder centpercent">';
542print
'<tr class="liste_titre">';
543print
'<td class="liste_titre right"><input type="submit" class="button" value="'.$langs->trans(
"TargetsReset").
'"></td>';
Class to manage third parties objects (customers, suppliers, prospects...)
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
if(!function_exists( 'dol_getprefix')) dol_include_once($relpath, $classname='')
Make an include_once using default root and alternate root if it fails.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.