35if (isModEnabled(
'category') && $user->hasRight(
'categorie',
'lire')) {
36 require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
41@phan-var-force FormAdvTargetEmailing $formadvtargetemaling
42@phan-var-force AdvanceTargetingMailing $advTarget
43@phan-var-force array<string,string|int|string[]> $array_query
47 $(document).ready(function() {
50 $(":button[name=addcontact]").click(function() {
51 $(":hidden[name=action]").val("add");
52 $("#find_customer").submit();
55 $(":button[name=loadfilter]").click(function() {
56 $(":hidden[name=action]").val("loadfilter");
57 $("#find_customer").submit();
60 $(":button[name=deletefilter]").click(function() {
61 $(":hidden[name=action]").val("deletefilter");
62 $("#find_customer").submit();
65 $(":button[name=savefilter]").click(function() {
66 $(":hidden[name=action]").val("savefilter");
67 $("#find_customer").submit();
70 $(":button[name=createfilter]").click(function() {
71 $(":hidden[name=action]").val("createfilter");
72 $("#find_customer").submit();
80print
'<div class="tabBar">'.
"\n";
81print
'<form name="find_customer" id="find_customer" action="'.$_SERVER[
'PHP_SELF'].
'?id='.
$id.
'" method="POST">'.
"\n";
82print
'<input type="hidden" name="token" value="'.newToken().
'">'.
"\n";
83print
'<input type="hidden" name="action" value="">'.
"\n";
84print
'<table class="border centpercent">'.
"\n";
87print
'<td colspan="3" class="right">'.
"\n";
89print
'<input type="button" name="addcontact" id="addcontact" value="'.$langs->trans(
'AdvTgtAddContact').
'" class="button"/>'.
"\n";
94print
'<tr><td>'.$langs->trans(
'AdvTgtNameTemplate').
'</td><td class="valignmiddle">';
95if (!empty($template_id)) {
96 $default_template = $template_id;
98 $default_template = $advTarget->id;
100print $formadvtargetemaling->selectAdvtargetemailingTemplate(
'template_id', $default_template, 0, $advTarget->type_element,
'valignmiddle');
101print
'<input type="button" name="loadfilter" id="loadfilter" value="'.$langs->trans(
'AdvTgtLoadFilter').
'" class="button"/>';
102print
'<input type="button" name="deletefilter" id="deletefilter" value="'.$langs->trans(
'AdvTgtDeleteFilter').
'" class="button"/>';
103print
'<input type="button" name="savefilter" id="savefilter" value="'.$langs->trans(
'AdvTgtSaveFilter').
'" class="button"/>';
104print
'</td><td>'.
"\n";
105print
'</td></tr>'.
"\n";
107print
'<tr><td>'.$langs->trans(
'AdvTgtOrCreateNewFilter').
'</td><td>';
108print
'<input type="text" name="template_name" id="template_name" value=""/>';
109print
'<input type="button" name="createfilter" id="createfilter" value="'.$langs->trans(
'AdvTgtCreateFilter').
'" class="button"/>';
110print
'</td><td>'.
"\n";
111print
'</td></tr>'.
"\n";
113print
'<tr><td>'.$langs->trans(
'AdvTgtTypeOfIncude').
'</td><td>';
114print $form->selectarray(
'type_of_target', $advTarget->select_target_type, $array_query[
'type_of_target']);
115print
'</td><td>'.
"\n";
116print $form->textwithpicto(
'', $langs->trans(
"AdvTgtTypeOfIncudeHelp"), 1,
'help');
117print
'</td></tr>'.
"\n";
120print
'<tr><td>'.$langs->trans(
'ThirdPartyName');
121if (!empty($array_query[
'cust_name'])) {
122 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
124print
'</td><td><input type="text" name="cust_name" value="'.$array_query[
'cust_name'].
'"/></td><td>'.
"\n";
125print $form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchTextHelp"), 1,
'help');
126print
'</td></tr>'.
"\n";
129print
'<tr><td>'.$langs->trans(
'CustomerCode');
130if (!empty($array_query[
'cust_code'])) {
131 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
132 $cust_code_str = (string) $array_query[
'cust_code'];
134 $cust_code_str =
null;
136print
'</td><td><input type="text" name="cust_code"'.($cust_code_str !=
null ?
' value="'.$cust_code_str :
'').
'"/></td><td>'.
"\n";
137print $form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchTextHelp"), 1,
'help');
138print
'</td></tr>'.
"\n";
141print
'<tr><td>'.$langs->trans(
'Address');
142if (!empty($array_query[
'cust_adress'])) {
143 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
145print
'</td><td><input type="text" name="cust_adress" value="'.$array_query[
'cust_adress'].
'"/></td><td>'.
"\n";
146print $form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchTextHelp"), 1,
'help');
147print
'</td></tr>'.
"\n";
150print
'<tr><td>'.$langs->trans(
'Zip');
151if (!empty($array_query[
'cust_zip'])) {
152 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
154print
'</td><td><input type="text" name="cust_zip" value="'.$array_query[
'cust_zip'].
'"/></td><td>'.
"\n";
155print $form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchTextHelp"), 1,
'help');
156print
'</td></tr>'.
"\n";
159print
'<tr><td>'.$langs->trans(
'Town');
160if (!empty($array_query[
'cust_city'])) {
161 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
163print
'</td><td><input type="text" name="cust_city" value="'.$array_query[
'cust_city'].
'"/></td><td>'.
"\n";
164print $form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchTextHelp"), 1,
'help');
165print
'</td></tr>'.
"\n";
168print
'<tr><td>'.$langs->trans(
'State');
169if (!empty($array_query[
'cust_state'])) {
170 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
172print
'</td><td>'.
"\n";
173print $formadvtargetemaling->multiselectState(
'cust_state', $array_query[
'cust_state']);
174print
'</td><td>'.
"\n";
175print
'</td></tr>'.
"\n";
178print
'<tr><td>'.$langs->trans(
"Country");
179if (!empty($array_query[
'cust_country'])) {
180 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
182print
'</td><td>'.
"\n";
183print $formadvtargetemaling->multiselectCountry(
'cust_country', $array_query[
'cust_country']);
184print
'</td><td>'.
"\n";
185print
'</td></tr>'.
"\n";
188print
'<tr><td>'.$langs->trans(
'Status').
' '.$langs->trans(
'ThirdParty');
189if (!empty($array_query[
'cust_status'])) {
190 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
193print $formadvtargetemaling->advMultiselectarray(
196 '0' => $langs->trans(
'ActivityCeased'),
197 '1' => $langs->trans(
'InActivity')
199 $array_query[
'cust_status']
201print
'</td><td>'.
"\n";
202print
'</td></tr>'.
"\n";
205print
'<tr><td>'.$langs->trans(
"ParentCompany");
206if (!empty($array_query[
'cust_mothercompany'])) {
207 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
209print
'</td><td>'.
"\n";
210print
'<input type="text" name="cust_mothercompany" value="'.$array_query[
'cust_mothercompany'].
'"/>';
211print
'</td><td>'.
"\n";
212print $form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchTextHelp"), 1,
'help');
213print
'</td></tr>'.
"\n";
216$selected = $array_query[
'cust_typecust'];
217print
'<tr><td>'.$langs->trans(
'ProspectCustomer').
' '.$langs->trans(
'ThirdParty');
218if (!empty($array_query[
'cust_typecust'])) {
219 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
222$options_array = array(
223 2 => $langs->trans(
'Prospect'),
224 3 => $langs->trans(
'ProspectCustomer'),
225 1 => $langs->trans(
'Customer'),
226 0 => $langs->trans(
'NorProspectNorCustomer')
228print $formadvtargetemaling->advMultiselectarray(
'cust_typecust', $options_array, $array_query[
'cust_typecust']);
229print
'</td><td>'.
"\n";
230print
'</td></tr>'.
"\n";
233print
'<tr><td>'.$langs->trans(
'ProspectLevel');
234if (!empty($array_query[
'cust_prospect_status'])) {
235 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
238print $formadvtargetemaling->multiselectProspectionStatus($array_query[
'cust_prospect_status'],
'cust_prospect_status');
239print
'</td><td>'.
"\n";
240print
'</td></tr>'.
"\n";
243print
'<tr><td>'.$langs->trans(
'StatusProsp');
244if (!empty($array_query[
'cust_comm_status'])) {
245 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
248print $formadvtargetemaling->advMultiselectarray(
'cust_comm_status', $advTarget->type_statuscommprospect, $array_query[
'cust_comm_status']);
249print
'</td><td>'.
"\n";
250print
'</td></tr>'.
"\n";
253print
'<tr><td>'.$langs->trans(
"ThirdPartyType");
254if (!empty($array_query[
'cust_typeent'])) {
255 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
257print
'</td><td>'.
"\n";
258print $formadvtargetemaling->advMultiselectarray(
'cust_typeent', $formcompany->typent_array(0,
" AND id <> 0"), $array_query[
'cust_typeent']);
259print
'</td><td>'.
"\n";
260print
'</td></tr>'.
"\n";
263print
'<td>'.$langs->trans(
"Staff");
264if (!empty($array_query[
'cust_effectif_id'])) {
265 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
268print $formadvtargetemaling->advMultiselectarray(
"cust_effectif_id", $formcompany->effectif_array(0,
" AND id <> 0"), $array_query[
'cust_effectif_id']);
269print
'</td><td>'.
"\n";
270print
'</td></tr>'.
"\n";
273print
'<tr><td>'.$langs->trans(
"SalesRepresentatives");
274if (!empty($array_query[
'cust_saleman'])) {
275 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
277print
'</td><td>'.
"\n";
278print $formadvtargetemaling->multiselectselectSalesRepresentatives(
'cust_saleman', $array_query[
'cust_saleman'], $user);
279print
'</td><td>'.
"\n";
280print
'</td></tr>'.
"\n";
284 print
'<tr><td>'.$langs->trans(
"DefaultLang");
285 if (!empty($array_query[
'cust_language'])) {
286 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
288 print
'</td><td>'.
"\n";
289 print $formadvtargetemaling->multiselectselectLanguage(
'cust_language', $array_query[
'cust_language']);
290 print
'</td><td>'.
"\n";
291 print
'</td></tr>'.
"\n";
294if (isModEnabled(
'category') && $user->hasRight(
'categorie',
'lire')) {
296 print
'<tr><td>'.$langs->trans(
"CustomersCategoryShort");
297 if (!empty($array_query[
'cust_categ'])) {
298 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
300 print
'</td><td>'.
"\n";
301 $cate_arbo = $form->select_all_categories(Categorie::TYPE_CUSTOMER,
'',
'parent', 0, 0, 1);
302 print $form->multiselectarray(
'cust_categ', $cate_arbo,
GETPOST(
'cust_categ',
'array'), 0, 0,
'', 0,
"90%");
303 print
'</td><td>'.
"\n";
304 print
'</td></tr>'.
"\n";
310 $elementtype = $socstatic->table_element;
312 require_once DOL_DOCUMENT_ROOT .
'/core/class/extrafields.class.php';
314 $extrafields->fetch_name_optionals_label($elementtype);
315 foreach ($extrafields->attributes[$elementtype][
'label'] as $key => $val) {
316 if ($key !=
'ts_nameextra' && $key !=
'ts_payeur') {
317 if (isset($extrafields->attributes[$elementtype][
'langfile'][$key])) {
318 $langs->load($extrafields->attributes[$elementtype][
'langfile'][$key]);
320 print
'<tr><td>'.$langs->trans($extrafields->attributes[$elementtype][
'label'][$key]);
321 if (!empty($array_query[
'options_'.$key]) || (is_array($array_query[
'options_'.$key]) && count($array_query[
'options_'.$key]) > 0)) {
322 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
325 if (($extrafields->attributes[$elementtype][
'type'][$key] ==
'varchar') || ($extrafields->attributes[$elementtype][
'type'][$key] ==
'text')) {
326 print
'<input type="text" name="options_'.$key.
'"/></td><td>'.
"\n";
327 print $form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchTextHelp"), 1,
'help');
328 } elseif (($extrafields->attributes[$elementtype][
'type'][$key] ==
'int') || ($extrafields->attributes[$elementtype][
'type'][$key] ==
'double')) {
329 print $langs->trans(
"AdvTgtMinVal").
'<input type="text" name="options'.$key.
'_min"/>';
330 print $langs->trans(
"AdvTgtMaxVal").
'<input type="text" name="options'.$key.
'_max"/>';
331 print
'</td><td>'.
"\n";
332 print $form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchIntHelp"), 1,
'help');
333 } elseif (($extrafields->attributes[$elementtype][
'type'][$key] ==
'date') || ($extrafields->attributes[$elementtype][
'type'][$key] ==
'datetime')) {
334 print
'<table class="nobordernopadding"><tr>';
335 print
'<td>'.$langs->trans(
"AdvTgtStartDt").
'</td><td>';
336 print $form->selectDate(
'',
'options_'.$key.
'_st_dt', 0, 0, 1);
337 print
'</td><td>'.$langs->trans(
"AdvTgtEndDt").
'</td><td>';
338 print $form->selectDate(
'',
'options_'.$key.
'_end_dt', 0, 0, 1);
339 print
'</td></tr></table>';
341 print
'</td><td>'.
"\n";
342 print $form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchDtHelp"), 1,
'help');
343 } elseif (($extrafields->attributes[$elementtype][
'type'][$key] ==
'boolean')) {
344 print $form->selectarray(
348 '1' => $langs->trans(
'Yes'),
349 '0' => $langs->trans(
'No')
351 $array_query[
'options_'.$key]
353 print
'</td><td>'.
"\n";
354 } elseif ($extrafields->attributes[$elementtype][
'type'][$key] ==
'select') {
355 print $formadvtargetemaling->advMultiselectarray(
'options_'.$key, $extrafields->attributes[$elementtype][
'param'][$key][
'options'], $array_query[
'options_'.$key]);
356 print
'</td><td>'.
"\n";
357 } elseif ($extrafields->attributes[$elementtype][
'type'][$key] ==
'sellist') {
358 print $formadvtargetemaling->advMultiselectarraySelllist(
'options_'.$key, $extrafields->attributes[$elementtype][
'param'][$key][
'options'], $array_query[
'options_'.$key]);
359 print
'</td><td>'.
"\n";
361 print
'<table class="nobordernopadding"><tr>';
362 print
'<td></td><td>';
363 if (is_array($array_query[
'options_'.$key])) {
364 print $extrafields->showInputField($key, implode(
',', $array_query[
'options_'.$key]),
'',
'',
'',
'', 0,
'societe', 1);
366 print $extrafields->showInputField($key, $array_query[
'options_'.$key],
'',
'',
'',
'', 0,
'societe', 1);
368 print
'</td></tr></table>';
370 print
'</td><td>'.
"\n";
372 print
'</td></tr>'.
"\n";
377 $action_search =
'query';
379 $parameters = array(
'advtarget' => 1);
380 if (!empty($advTarget->id)) {
381 $parameters = array(
'array_query' => $advTarget->filtervalue);
384 $reshook = $hookmanager->executeHooks(
'formObjectOptions', $parameters, $std_soc, $action_search);
385 print $hookmanager->resPrint;
389print
'<tr><td>'.$langs->trans(
'Status').
' '.$langs->trans(
'Contact');
390if (!empty($array_query[
'contact_status'])) {
391 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
394print $formadvtargetemaling->advMultiselectarray(
397 '0' => $langs->trans(
'ActivityCeased'),
398 '1' => $langs->trans(
'InActivity')
400 $array_query[
'contact_status']
402print
'</td><td>'.
"\n";
403print $form->textwithpicto(
'', $langs->trans(
"AdvTgtContactHelp"), 1,
'help');
404print
'</td></tr>'.
"\n";
407print
'<tr><td width="15%">'.$langs->trans(
"UserTitle");
408if (!empty($array_query[
'contact_civility'])) {
409 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
412print $formadvtargetemaling->multiselectCivility(
'contact_civility', $array_query[
'contact_civility']);
416print
'<tr><td>'.$langs->trans(
'Contact').
' '.$langs->trans(
'Lastname');
417if (!empty($array_query[
'contact_lastname'])) {
418 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
420print
'</td><td><input type="text" name="contact_lastname" value="'.$array_query[
'contact_lastname'].
'"/></td><td>'.
"\n";
421print $form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchTextHelp"), 1,
'help');
422print
'</td></tr>'.
"\n";
423print
'<tr><td>'.$langs->trans(
'Contact').
' '.$langs->trans(
'Firstname');
424if (!empty($array_query[
'contact_firstname'])) {
425 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
427print
'</td><td><input type="text" name="contact_firstname" value="'.$array_query[
'contact_firstname'].
'"/></td><td>'.
"\n";
428print $form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchTextHelp"), 1,
'help');
429print
'</td></tr>'.
"\n";
432print
'<tr><td>'.$langs->trans(
'Contact').
' '.$langs->trans(
"Country");
433if (!empty($array_query[
'contact_country'])) {
434 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
436print
'</td><td>'.
"\n";
437print $formadvtargetemaling->multiselectCountry(
'contact_country', $array_query[
'contact_country']);
438print
'</td><td>'.
"\n";
439print
'</td></tr>'.
"\n";
442print
'<tr><td>'.$langs->trans(
'Contact').
' '.$langs->trans(
"No_Email");
443if (!empty($array_query[
'contact_no_email'])) {
444 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
446print
'</td><td>'.
"\n";
447print $form->selectarray(
451 '1' => $langs->trans(
'Yes'),
452 '0' => $langs->trans(
'No')
454 $array_query[
'contact_no_email']
456print
'</td><td>'.
"\n";
457print
'</td></tr>'.
"\n";
460print
'<tr><td>'.$langs->trans(
'Contact').
' '.$langs->trans(
"DateCreation");
461if (!empty($array_query[
'contact_create_st_dt'])) {
462 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
464print
'</td><td>'.
"\n";
465print
'<table class="nobordernopadding"><tr>';
466print
'<td>'.$langs->trans(
"AdvTgtStartDt").
'</td><td>';
467print $form->selectDate($array_query[
'contact_create_st_dt'],
'contact_create_st_dt', 0, 0, 1,
'find_customer', 1, 1);
468print
'</td><td>'.$langs->trans(
"AdvTgtEndDt").
'</td><td>';
469print $form->selectDate($array_query[
'contact_create_end_dt'],
'contact_create_end_dt', 0, 0, 1,
'find_customer', 1, 1);
470print
'</td></tr></table>';
471print
'</td><td>'.
"\n";
472print
'</td></tr>'.
"\n";
475print
'<tr><td>'.$langs->trans(
'Contact').
' '.$langs->trans(
"DateLastModification");
476if (!empty($array_query[
'contact_update_st_dt'])) {
477 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
479print
'</td><td>'.
"\n";
480print
'<table class="nobordernopadding"><tr>';
481print
'<td>'.$langs->trans(
"AdvTgtStartDt").
'</td><td>';
482print $form->selectDate($array_query[
'contact_update_st_dt'],
'contact_update_st_dt', 0, 0, 1,
'find_customer', 1, 1);
483print
'</td><td>'.$langs->trans(
"AdvTgtEndDt").
'</td><td>';
484print $form->selectDate($array_query[
'contact_update_end_dt'],
'contact_update_end_dt', 0, 0, 1,
'find_customer', 1, 1);
485print
'</td></tr></table>';
486print
'</td><td>'.
"\n";
487print
'</td></tr>'.
"\n";
489if (isModEnabled(
'category') && $user->hasRight(
'categorie',
'lire')) {
491 print
'<tr><td>'.$langs->trans(
"ContactCategoriesShort");
492 if (!empty($array_query[
'contact_categ'])) {
493 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
495 print
'</td><td>'.
"\n";
496 $cate_arbo = $form->select_all_categories(Categorie::TYPE_CONTACT,
'',
'parent', 0, 0, 1);
497 print $form->multiselectarray(
'contact_categ', $cate_arbo,
GETPOST(
'contact_categ',
'array'), 0, 0,
'', 0,
"90%");
498 print
'</td><td>'.
"\n";
499 print
'</td></tr>'.
"\n";
504 $contactstatic =
new Contact($db);
505 $elementype = $contactstatic->table_element;
509 $extrafields->fetch_name_optionals_label($elementype);
510 if (!empty($extrafields->attributes[$elementtype][
'type'])) {
511 foreach ($extrafields->attributes[$elementtype][
'type'] as $key => &$value) {
512 if ($value ==
'radio') {
517 if (!empty($extrafields->attributes[$elementtype][
'label'])) {
518 foreach ($extrafields->attributes[$elementtype][
'label'] as $key => $val) {
519 print
'<tr><td>'.$extrafields->attributes[$elementtype][
'label'][$key];
520 if ($array_query[
'options_'.$key.
'_cnct'] !=
'' || (is_array($array_query[
'options_'.$key.
'_cnct']) && count($array_query[
'options_'.$key.
'_cnct']) > 0)) {
521 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
524 if (($extrafields->attributes[$elementtype][
'type'][$key] ==
'varchar') || ($extrafields->attributes[$elementtype][
'type'][$key] ==
'text')) {
525 print
'<input type="text" name="options_'.$key.
'_cnct"/></td><td>'.
"\n";
526 print $form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchTextHelp"), 1,
'help');
527 } elseif (($extrafields->attributes[$elementtype][
'type'][$key] ==
'int') || ($extrafields->attributes[$elementtype][
'type'][$key] ==
'double')) {
528 print $langs->trans(
"AdvTgtMinVal").
'<input type="text" name="options_'.$key.
'_min_cnct"/>';
529 print $langs->trans(
"AdvTgtMaxVal").
'<input type="text" name="options_'.$key.
'_max_cnct"/>';
530 print
'</td><td>'.
"\n";
531 print $form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchIntHelp"), 1,
'help');
532 } elseif (($extrafields->attributes[$elementtype][
'type'][$key] ==
'date') || ($extrafields->attributes[$elementtype][
'type'][$key] ==
'datetime')) {
533 print
'<table class="nobordernopadding"><tr>';
534 print
'<td>'.$langs->trans(
"AdvTgtStartDt").
'</td><td>';
535 print $form->selectDate(
'',
'options_'.$key.
'_st_dt_cnct', 0, 0, 1);
536 print
'</td><td>'.$langs->trans(
"AdvTgtEndDt").
'</td><td>';
537 print $form->selectDate(
'',
'options_'.$key.
'_end_dt_cnct', 0, 0, 1);
538 print
'</td></tr></table>';
539 print
'</td><td>'.
"\n";
540 print $form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchDtHelp"), 1,
'help');
541 } elseif (($extrafields->attributes[$elementtype][
'type'][$key] ==
'boolean')) {
542 print $form->selectarray(
543 'options_'.$key.
'_cnct',
546 '1' => $langs->trans(
'Yes'),
547 '0' => $langs->trans(
'No')
549 $array_query[
'options_'.$key.
'_cnct']
551 print
'</td><td>'.
"\n";
552 } elseif ($extrafields->attributes[$elementtype][
'type'][$key] ==
'select') {
553 print $formadvtargetemaling->advMultiselectarray(
'options_'.$key.
'_cnct', $extrafields->attributes[$elementtype][
'param'][$key][
'options'], $array_query[
'options_'.$key.
'_cnct']);
554 print
'</td><td>'.
"\n";
555 } elseif ($extrafields->attributes[$elementtype][
'type'][$key] ==
'sellist') {
556 print $formadvtargetemaling->advMultiselectarraySelllist(
'options_'.$key.
'_cnct', $extrafields->attributes[$elementtype][
'param'][$key][
'options'], $array_query[
'options_'.$key.
'_cnct']);
557 print
'</td><td>'.
"\n";
559 if (is_array($array_query[
'options_'.$key.
'_cnct'])) {
560 print $extrafields->showInputField($key, implode(
',', $array_query[
'options_'.$key.
'_cnct']),
'',
'_cnct',
'',
'', 0,
'socpeople', 1);
562 print $extrafields->showInputField($key, $array_query[
'options_'.$key.
'_cnct'],
'',
'_cnct',
'',
'', 0,
'socpeople', 1);
564 print
'</td><td>'.
"\n";
566 print
'</td></tr>'.
"\n";
571print
'<td colspan="3" class="right">'.
"\n";
572print
'<input type="button" name="addcontact" id="addcontact" value="'.$langs->trans(
'AdvTgtAddContact').
'" class="butAction"/>'.
"\n";
575print
'</table>'.
"\n";
578print
'<form action="'.$_SERVER[
'PHP_SELF'].
'?action=clear&id='.
$object->id.
'" method="POST">';
579print
'<input type="hidden" name="token" value="'.newToken().
'">';
581print
'<table class="noborder centpercent">';
582print
'<tr class="liste_titre">';
583print
'<td class="liste_titre right"><input type="submit" class="button" value="'.$langs->trans(
"TargetsReset").
'"></td>';
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Class to manage third parties objects (customers, suppliers, prospects...)
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
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 a Dolibarr global constant string value.