18 if (
isModEnabled(
'categorie') && $user->rights->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();
56 print
'<div class="tabBar">'.
"\n";
57 print
'<form name="find_customer" id="find_customer" action="'.$_SERVER[
'PHP_SELF'].
'?id='.$id.
'" method="POST">'.
"\n";
58 print
'<input type="hidden" name="token" value="'.newToken().
'">'.
"\n";
59 print
'<input type="hidden" name="action" value="">'.
"\n";
60 print
'<table class="border centpercent">'.
"\n";
63 print
'<td colspan="3" class="right">'.
"\n";
65 print
'<input type="button" name="addcontact" id="addcontact" value="'.$langs->trans(
'AdvTgtAddContact').
'" class="button"/>'.
"\n";
70 print
'<tr><td>'.$langs->trans(
'AdvTgtNameTemplate').
'</td><td class="valignmiddle">';
71 if (!empty($template_id)) {
72 $default_template = $template_id;
74 $default_template = $advTarget->id;
76 print $formadvtargetemaling->selectAdvtargetemailingTemplate(
'template_id', $default_template, 0, $advTarget->type_element,
'valignmiddle');
77 print
'<input type="button" name="loadfilter" id="loadfilter" value="'.$langs->trans(
'AdvTgtLoadFilter').
'" class="button"/>';
78 print
'<input type="button" name="deletefilter" id="deletefilter" value="'.$langs->trans(
'AdvTgtDeleteFilter').
'" class="button"/>';
79 print
'<input type="button" name="savefilter" id="savefilter" value="'.$langs->trans(
'AdvTgtSaveFilter').
'" class="button"/>';
80 print
'</td><td>'.
"\n";
81 print
'</td></tr>'.
"\n";
83 print
'<tr><td>'.$langs->trans(
'AdvTgtOrCreateNewFilter').
'</td><td>';
84 print
'<input type="text" name="template_name" id="template_name" value=""/>';
85 print
'<input type="button" name="createfilter" id="createfilter" value="'.$langs->trans(
'AdvTgtCreateFilter').
'" class="button"/>';
86 print
'</td><td>'.
"\n";
87 print
'</td></tr>'.
"\n";
89 print
'<tr><td>'.$langs->trans(
'AdvTgtTypeOfIncude').
'</td><td>';
90 print
$form->selectarray(
'type_of_target', $advTarget->select_target_type, $array_query[
'type_of_target']);
91 print
'</td><td>'.
"\n";
92 print
$form->textwithpicto(
'', $langs->trans(
"AdvTgtTypeOfIncudeHelp"), 1,
'help');
93 print
'</td></tr>'.
"\n";
96 print
'<tr><td>'.$langs->trans(
'ThirdPartyName');
97 if (!empty($array_query[
'cust_name'])) {
98 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
100 print
'</td><td><input type="text" name="cust_name" value="'.$array_query[
'cust_name'].
'"/></td><td>'.
"\n";
101 print
$form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchTextHelp"), 1,
'help');
102 print
'</td></tr>'.
"\n";
105 print
'<tr><td>'.$langs->trans(
'CustomerCode');
106 if (!empty($array_query[
'cust_code'])) {
107 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
109 print
'</td><td><input type="text" name="cust_code" value="'.$array_query[
'cust_code'].
'"/></td><td>'.
"\n";
110 print
$form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchTextHelp"), 1,
'help');
111 print
'</td></tr>'.
"\n";
114 print
'<tr><td>'.$langs->trans(
'Address');
115 if (!empty($array_query[
'cust_adress'])) {
116 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
118 print
'</td><td><input type="text" name="cust_adress" value="'.$array_query[
'cust_adress'].
'"/></td><td>'.
"\n";
119 print
$form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchTextHelp"), 1,
'help');
120 print
'</td></tr>'.
"\n";
123 print
'<tr><td>'.$langs->trans(
'Zip');
124 if (!empty($array_query[
'cust_zip'])) {
125 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
127 print
'</td><td><input type="text" name="cust_zip" value="'.$array_query[
'cust_zip'].
'"/></td><td>'.
"\n";
128 print
$form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchTextHelp"), 1,
'help');
129 print
'</td></tr>'.
"\n";
132 print
'<tr><td>'.$langs->trans(
'Town');
133 if (!empty($array_query[
'cust_city'])) {
134 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
136 print
'</td><td><input type="text" name="cust_city" value="'.$array_query[
'cust_city'].
'"/></td><td>'.
"\n";
137 print
$form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchTextHelp"), 1,
'help');
138 print
'</td></tr>'.
"\n";
141 print
'<tr><td>'.$langs->trans(
"Country");
142 if (!empty($array_query[
'cust_country'])) {
143 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
145 print
'</td><td>'.
"\n";
146 print $formadvtargetemaling->multiselectCountry(
'cust_country', $array_query[
'cust_country']);
147 print
'</td><td>'.
"\n";
148 print
'</td></tr>'.
"\n";
151 print
'<tr><td>'.$langs->trans(
'Status').
' '.$langs->trans(
'ThirdParty');
152 if (!empty($array_query[
'cust_status'])) {
153 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
156 print $formadvtargetemaling->advMultiselectarray(
159 '0' => $langs->trans(
'ActivityCeased'),
160 '1' => $langs->trans(
'InActivity')
162 $array_query[
'cust_status']
164 print
'</td><td>'.
"\n";
165 print
'</td></tr>'.
"\n";
168 print
'<tr><td>'.$langs->trans(
"Maison mère");
169 if (!empty($array_query[
'cust_mothercompany'])) {
170 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
172 print
'</td><td>'.
"\n";
173 print
'<input type="text" name="cust_mothercompany" value="'.$array_query[
'cust_mothercompany'].
'"/>';
174 print
'</td><td>'.
"\n";
175 print
$form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchTextHelp"), 1,
'help');
176 print
'</td></tr>'.
"\n";
179 $selected = $array_query[
'cust_typecust'];
180 print
'<tr><td>'.$langs->trans(
'ProspectCustomer').
' '.$langs->trans(
'ThirdParty');
181 if (!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')
191 print $formadvtargetemaling->advMultiselectarray(
'cust_typecust', $options_array, $array_query[
'cust_typecust']);
192 print
'</td><td>'.
"\n";
193 print
'</td></tr>'.
"\n";
196 print
'<tr><td>'.$langs->trans(
'ProspectLevel');
197 if (!empty($array_query[
'cust_prospect_status'])) {
198 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
201 print $formadvtargetemaling->multiselectProspectionStatus($array_query[
'cust_prospect_status'],
'cust_prospect_status');
202 print
'</td><td>'.
"\n";
203 print
'</td></tr>'.
"\n";
206 print
'<tr><td>'.$langs->trans(
'StatusProsp');
207 if (!empty($array_query[
'cust_comm_status'])) {
208 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
211 print $formadvtargetemaling->advMultiselectarray(
'cust_comm_status', $advTarget->type_statuscommprospect, $array_query[
'cust_comm_status']);
212 print
'</td><td>'.
"\n";
213 print
'</td></tr>'.
"\n";
216 print
'<tr><td>'.$langs->trans(
"ThirdPartyType");
217 if (!empty($array_query[
'cust_typeent'])) {
218 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
220 print
'</td><td>'.
"\n";
221 print $formadvtargetemaling->advMultiselectarray(
'cust_typeent', $formcompany->typent_array(0,
" AND id <> 0"), $array_query[
'cust_typeent']);
222 print
'</td><td>'.
"\n";
223 print
'</td></tr>'.
"\n";
226 print
'<td>'.$langs->trans(
"Staff");
227 if (!empty($array_query[
'cust_effectif_id'])) {
228 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
231 print $formadvtargetemaling->advMultiselectarray(
"cust_effectif_id", $formcompany->effectif_array(0,
" AND id <> 0"), $array_query[
'cust_effectif_id']);
232 print
'</td><td>'.
"\n";
233 print
'</td></tr>'.
"\n";
236 print
'<tr><td>'.$langs->trans(
"SalesRepresentatives");
237 if (!empty($array_query[
'cust_saleman'])) {
238 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
240 print
'</td><td>'.
"\n";
241 print $formadvtargetemaling->multiselectselectSalesRepresentatives(
'cust_saleman', $array_query[
'cust_saleman'], $user);
242 print
'</td><td>'.
"\n";
243 print
'</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";
257 if (
isModEnabled(
'categorie') && $user->rights->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";
271 if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) {
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';
340 include_once DOL_DOCUMENT_ROOT.
'/core/class/hookmanager.class.php';
342 $hookmanager->initHooks(array(
'thirdpartycard'));
344 $parameters = array();
345 if (!empty($advTarget->id)) {
346 $parameters = array(
'array_query' => $advTarget->filtervalue);
349 $reshook = $hookmanager->executeHooks(
'formObjectOptions', $parameters, $std_soc, $action_search);
350 print $hookmanager->resPrint;
354 print
'<tr><td>'.$langs->trans(
'Status').
' '.$langs->trans(
'Contact');
355 if (!empty($array_query[
'contact_status'])) {
356 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
359 print $formadvtargetemaling->advMultiselectarray(
362 '0' => $langs->trans(
'ActivityCeased'),
363 '1' => $langs->trans(
'InActivity')
365 $array_query[
'contact_status']
367 print
'</td><td>'.
"\n";
368 print
$form->textwithpicto(
'', $langs->trans(
"AdvTgtContactHelp"), 1,
'help');
369 print
'</td></tr>'.
"\n";
372 print
'<tr><td width="15%">'.$langs->trans(
"UserTitle");
373 if (!empty($array_query[
'contact_civility'])) {
374 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
377 print $formadvtargetemaling->multiselectCivility(
'contact_civility', $array_query[
'contact_civility']);
381 print
'<tr><td>'.$langs->trans(
'Contact').
' '.$langs->trans(
'Lastname');
382 if (!empty($array_query[
'contact_lastname'])) {
383 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
385 print
'</td><td><input type="text" name="contact_lastname" value="'.$array_query[
'contact_lastname'].
'"/></td><td>'.
"\n";
386 print
$form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchTextHelp"), 1,
'help');
387 print
'</td></tr>'.
"\n";
388 print
'<tr><td>'.$langs->trans(
'Contact').
' '.$langs->trans(
'Firstname');
389 if (!empty($array_query[
'contact_firstname'])) {
390 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
392 print
'</td><td><input type="text" name="contact_firstname" value="'.$array_query[
'contact_firstname'].
'"/></td><td>'.
"\n";
393 print
$form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchTextHelp"), 1,
'help');
394 print
'</td></tr>'.
"\n";
397 print
'<tr><td>'.$langs->trans(
'Contact').
' '.$langs->trans(
"Country");
398 if (!empty($array_query[
'contact_country'])) {
399 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
401 print
'</td><td>'.
"\n";
402 print $formadvtargetemaling->multiselectCountry(
'contact_country', $array_query[
'contact_country']);
403 print
'</td><td>'.
"\n";
404 print
'</td></tr>'.
"\n";
407 print
'<tr><td>'.$langs->trans(
'Contact').
' '.$langs->trans(
"No_Email");
408 if (!empty($array_query[
'contact_no_email'])) {
409 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
411 print
'</td><td>'.
"\n";
412 print
$form->selectarray(
416 '1' => $langs->trans(
'Yes'),
417 '0' => $langs->trans(
'No')
419 $array_query[
'contact_no_email']
421 print
'</td><td>'.
"\n";
422 print
'</td></tr>'.
"\n";
425 print
'<tr><td>'.$langs->trans(
'Contact').
' '.$langs->trans(
"DateCreation");
426 if (!empty($array_query[
'contact_create_st_dt'])) {
427 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
429 print
'</td><td>'.
"\n";
430 print
'<table class="nobordernopadding"><tr>';
431 print
'<td>'.$langs->trans(
"AdvTgtStartDt").
'</td><td>';
432 print
$form->selectDate($array_query[
'contact_create_st_dt'],
'contact_create_st_dt', 0, 0, 1,
'find_customer', 1, 1);
433 print
'</td><td>'.$langs->trans(
"AdvTgtEndDt").
'</td><td>';
434 print
$form->selectDate($array_query[
'contact_create_end_dt'],
'contact_create_end_dt', 0, 0, 1,
'find_customer', 1, 1);
435 print
'</td></tr></table>';
436 print
'</td><td>'.
"\n";
437 print
'</td></tr>'.
"\n";
440 print
'<tr><td>'.$langs->trans(
'Contact').
' '.$langs->trans(
"DateLastModification");
441 if (!empty($array_query[
'contact_update_st_dt'])) {
442 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
444 print
'</td><td>'.
"\n";
445 print
'<table class="nobordernopadding"><tr>';
446 print
'<td>'.$langs->trans(
"AdvTgtStartDt").
'</td><td>';
447 print
$form->selectDate($array_query[
'contact_update_st_dt'],
'contact_update_st_dt', 0, 0, 1,
'find_customer', 1, 1);
448 print
'</td><td>'.$langs->trans(
"AdvTgtEndDt").
'</td><td>';
449 print
$form->selectDate($array_query[
'contact_update_end_dt'],
'contact_update_end_dt', 0, 0, 1,
'find_customer', 1, 1);
450 print
'</td></tr></table>';
451 print
'</td><td>'.
"\n";
452 print
'</td></tr>'.
"\n";
454 if (
isModEnabled(
'categorie') && $user->rights->categorie->lire) {
456 print
'<tr><td>'.$langs->trans(
"ContactCategoriesShort");
457 if (!empty($array_query[
'contact_categ'])) {
458 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
460 print
'</td><td>'.
"\n";
461 $cate_arbo =
$form->select_all_categories(Categorie::TYPE_CONTACT,
null,
'parent',
null,
null, 1);
462 print
$form->multiselectarray(
'contact_categ', $cate_arbo,
GETPOST(
'contact_categ',
'array'),
null,
null,
null,
null,
"90%");
463 print
'</td><td>'.
"\n";
464 print
'</td></tr>'.
"\n";
468 if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) {
469 $contactstatic =
new Contact($db);
470 $elementype = $contactstatic->table_element;
474 $extrafields->fetch_name_optionals_label($elementype);
475 if (!empty($extrafields->attributes[$elementtype][
'type'])) {
476 foreach ($extrafields->attributes[$elementtype][
'type'] as $key => &$value) {
477 if ($value ==
'radio') {
482 if (!empty($extrafields->attributes[$elementtype][
'label'])) {
483 foreach ($extrafields->attributes[$elementtype][
'label'] as $key => $val) {
484 print
'<tr><td>'.$extrafields->attributes[$elementtype][
'label'][$key];
485 if ($array_query[
'options_'.$key.
'_cnct'] !=
'' || (is_array($array_query[
'options_'.$key.
'_cnct']) && count($array_query[
'options_'.$key.
'_cnct']) > 0)) {
486 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
489 if (($extrafields->attributes[$elementtype][
'type'][$key] ==
'varchar') || ($extrafields->attributes[$elementtype][
'type'][$key] ==
'text')) {
490 print
'<input type="text" name="options_'.$key.
'_cnct"/></td><td>'.
"\n";
491 print
$form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchTextHelp"), 1,
'help');
492 } elseif (($extrafields->attributes[$elementtype][
'type'][$key] ==
'int') || ($extrafields->attributes[$elementtype][
'type'][$key] ==
'double')) {
493 print $langs->trans(
"AdvTgtMinVal").
'<input type="text" name="options_'.$key.
'_min_cnct"/>';
494 print $langs->trans(
"AdvTgtMaxVal").
'<input type="text" name="options_'.$key.
'_max_cnct"/>';
495 print
'</td><td>'.
"\n";
496 print
$form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchIntHelp"), 1,
'help');
497 } elseif (($extrafields->attributes[$elementtype][
'type'][$key] ==
'date') || ($extrafields->attributes[$elementtype][
'type'][$key] ==
'datetime')) {
498 print
'<table class="nobordernopadding"><tr>';
499 print
'<td>'.$langs->trans(
"AdvTgtStartDt").
'</td><td>';
500 print
$form->selectDate(
'',
'options_'.$key.
'_st_dt_cnct');
501 print
'</td><td>'.$langs->trans(
"AdvTgtEndDt").
'</td><td>';
502 print
$form->selectDate(
'',
'options_'.$key.
'_end_dt_cnct');
503 print
'</td></tr></table>';
504 print
'</td><td>'.
"\n";
505 print
$form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchDtHelp"), 1,
'help');
506 } elseif (($extrafields->attributes[$elementtype][
'type'][$key] ==
'boolean')) {
507 print
$form->selectarray(
508 'options_'.$key.
'_cnct',
511 '1' => $langs->trans(
'Yes'),
512 '0' => $langs->trans(
'No')
514 $array_query[
'options_'.$key.
'_cnct']
516 print
'</td><td>'.
"\n";
517 } elseif (($extrafields->attributes[$elementtype][
'type'][$key] ==
'select')) {
518 print $formadvtargetemaling->advMultiselectarray(
'options_'.$key.
'_cnct', $extrafields->attributes[$key][
'param'][
'options'], $array_query[
'options_'.$key.
'_cnct']);
519 print
'</td><td>'.
"\n";
520 } elseif (($extrafields->attributes[$elementtype][
'type'][$key] ==
'sellist')) {
521 print $formadvtargetemaling->advMultiselectarraySelllist(
'options_'.$key.
'_cnct', $extrafields->attributes[$key][
'param'][
'options'], $array_query[
'options_'.$key.
'_cnct']);
522 print
'</td><td>'.
"\n";
524 if (is_array($array_query[
'options_'.$key.
'_cnct'])) {
525 print $extrafields->showInputField($key, implode(
',', $array_query[
'options_'.$key.
'_cnct']),
'',
'_cnct');
527 print $extrafields->showInputField($key, $array_query[
'options_'.$key.
'_cnct'],
'',
'_cnct');
529 print
'</td><td>'.
"\n";
531 print
'</td></tr>'.
"\n";
536 print
'<td colspan="3" class="right">'.
"\n";
537 print
'<input type="button" name="addcontact" id="addcontact" value="'.$langs->trans(
'AdvTgtAddContact').
'" class="butAction"/>'.
"\n";
540 print
'</table>'.
"\n";
541 print
'</form>'.
"\n";
543 print
'<form action="'.$_SERVER[
'PHP_SELF'].
'?action=clear&id='.$object->id.
'" method="POST">';
544 print
'<input type="hidden" name="token" value="'.newToken().
'">';
546 print
'<table class="noborder centpercent">';
547 print
'<tr class="liste_titre">';
548 print
'<td class="liste_titre right"><input type="submit" class="button" value="'.$langs->trans(
"TargetsReset").
'"></td>';
Class to manage third parties objects (customers, suppliers, prospects...)
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
if(!function_exists('dol_getprefix')) dol_include_once($relpath, $classname='')
Make an include_once using default root and alternate root if it fails.
getDolGlobalInt($key, $default=0)
Return 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)
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
isModEnabled($module)
Is Dolibarr module enabled.