21if (isModEnabled(
'category') && $user->hasRight(
'categorie',
'lire')) {
22 require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
26 $(document).ready(function() {
29 $(":button[name=addcontact]").click(function() {
30 $(":hidden[name=action]").val("add");
31 $("#find_customer").submit();
34 $(":button[name=loadfilter]").click(function() {
35 $(":hidden[name=action]").val("loadfilter");
36 $("#find_customer").submit();
39 $(":button[name=deletefilter]").click(function() {
40 $(":hidden[name=action]").val("deletefilter");
41 $("#find_customer").submit();
44 $(":button[name=savefilter]").click(function() {
45 $(":hidden[name=action]").val("savefilter");
46 $("#find_customer").submit();
49 $(":button[name=createfilter]").click(function() {
50 $(":hidden[name=action]").val("createfilter");
51 $("#find_customer").submit();
59print
'<div class="tabBar">'.
"\n";
60print
'<form name="find_customer" id="find_customer" action="'.$_SERVER[
'PHP_SELF'].
'?id='.$id.
'" method="POST">'.
"\n";
61print
'<input type="hidden" name="token" value="'.newToken().
'">'.
"\n";
62print
'<input type="hidden" name="action" value="">'.
"\n";
63print
'<table class="border centpercent">'.
"\n";
66print
'<td colspan="3" class="right">'.
"\n";
68print
'<input type="button" name="addcontact" id="addcontact" value="'.$langs->trans(
'AdvTgtAddContact').
'" class="button"/>'.
"\n";
73print
'<tr><td>'.$langs->trans(
'AdvTgtNameTemplate').
'</td><td class="valignmiddle">';
74if (!empty($template_id)) {
75 $default_template = $template_id;
77 $default_template = $advTarget->id;
79print $formadvtargetemaling->selectAdvtargetemailingTemplate(
'template_id', $default_template, 0, $advTarget->type_element,
'valignmiddle');
80print
'<input type="button" name="loadfilter" id="loadfilter" value="'.$langs->trans(
'AdvTgtLoadFilter').
'" class="button"/>';
81print
'<input type="button" name="deletefilter" id="deletefilter" value="'.$langs->trans(
'AdvTgtDeleteFilter').
'" class="button"/>';
82print
'<input type="button" name="savefilter" id="savefilter" value="'.$langs->trans(
'AdvTgtSaveFilter').
'" class="button"/>';
83print
'</td><td>'.
"\n";
84print
'</td></tr>'.
"\n";
86print
'<tr><td>'.$langs->trans(
'AdvTgtOrCreateNewFilter').
'</td><td>';
87print
'<input type="text" name="template_name" id="template_name" value=""/>';
88print
'<input type="button" name="createfilter" id="createfilter" value="'.$langs->trans(
'AdvTgtCreateFilter').
'" class="button"/>';
89print
'</td><td>'.
"\n";
90print
'</td></tr>'.
"\n";
92print
'<tr><td>'.$langs->trans(
'AdvTgtTypeOfIncude').
'</td><td>';
93print $form->selectarray(
'type_of_target', $advTarget->select_target_type, $array_query[
'type_of_target']);
94print
'</td><td>'.
"\n";
95print $form->textwithpicto(
'', $langs->trans(
"AdvTgtTypeOfIncudeHelp"), 1,
'help');
96print
'</td></tr>'.
"\n";
99print
'<tr><td>'.$langs->trans(
'ThirdPartyName');
100if (!empty($array_query[
'cust_name'])) {
101 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
103print
'</td><td><input type="text" name="cust_name" value="'.$array_query[
'cust_name'].
'"/></td><td>'.
"\n";
104print $form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchTextHelp"), 1,
'help');
105print
'</td></tr>'.
"\n";
108print
'<tr><td>'.$langs->trans(
'CustomerCode');
109if (!empty($array_query[
'cust_code'])) {
110 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
111 $cust_code_str = (string) $array_query[
'cust_code'];
113 $cust_code_str =
null;
115print
'</td><td><input type="text" name="cust_code"'.($cust_code_str!=
null?
' value="'.$cust_code_str:
'').
'"/></td><td>'.
"\n";
116print $form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchTextHelp"), 1,
'help');
117print
'</td></tr>'.
"\n";
120print
'<tr><td>'.$langs->trans(
'Address');
121if (!empty($array_query[
'cust_adress'])) {
122 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
124print
'</td><td><input type="text" name="cust_adress" value="'.$array_query[
'cust_adress'].
'"/></td><td>'.
"\n";
125print $form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchTextHelp"), 1,
'help');
126print
'</td></tr>'.
"\n";
129print
'<tr><td>'.$langs->trans(
'Zip');
130if (!empty($array_query[
'cust_zip'])) {
131 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
133print
'</td><td><input type="text" name="cust_zip" value="'.$array_query[
'cust_zip'].
'"/></td><td>'.
"\n";
134print $form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchTextHelp"), 1,
'help');
135print
'</td></tr>'.
"\n";
138print
'<tr><td>'.$langs->trans(
'Town');
139if (!empty($array_query[
'cust_city'])) {
140 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
142print
'</td><td><input type="text" name="cust_city" value="'.$array_query[
'cust_city'].
'"/></td><td>'.
"\n";
143print $form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchTextHelp"), 1,
'help');
144print
'</td></tr>'.
"\n";
147print
'<tr><td>'.$langs->trans(
'State');
148if (!empty($array_query[
'cust_state'])) {
149 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
151print
'</td><td>'.
"\n";
152print $formadvtargetemaling->multiselectState(
'cust_state', $array_query[
'cust_state']);
153print
'</td><td>'.
"\n";
154print
'</td></tr>'.
"\n";
157print
'<tr><td>'.$langs->trans(
"Country");
158if (!empty($array_query[
'cust_country'])) {
159 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
161print
'</td><td>'.
"\n";
162print $formadvtargetemaling->multiselectCountry(
'cust_country', $array_query[
'cust_country']);
163print
'</td><td>'.
"\n";
164print
'</td></tr>'.
"\n";
167print
'<tr><td>'.$langs->trans(
'Status').
' '.$langs->trans(
'ThirdParty');
168if (!empty($array_query[
'cust_status'])) {
169 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
172print $formadvtargetemaling->advMultiselectarray(
175 '0' => $langs->trans(
'ActivityCeased'),
176 '1' => $langs->trans(
'InActivity')
178 $array_query[
'cust_status']
180print
'</td><td>'.
"\n";
181print
'</td></tr>'.
"\n";
184print
'<tr><td>'.$langs->trans(
"ParentCompany");
185if (!empty($array_query[
'cust_mothercompany'])) {
186 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
188print
'</td><td>'.
"\n";
189print
'<input type="text" name="cust_mothercompany" value="'.$array_query[
'cust_mothercompany'].
'"/>';
190print
'</td><td>'.
"\n";
191print $form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchTextHelp"), 1,
'help');
192print
'</td></tr>'.
"\n";
195$selected = $array_query[
'cust_typecust'];
196print
'<tr><td>'.$langs->trans(
'ProspectCustomer').
' '.$langs->trans(
'ThirdParty');
197if (!empty($array_query[
'cust_typecust'])) {
198 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
201$options_array = array(
202 2 => $langs->trans(
'Prospect'),
203 3 => $langs->trans(
'ProspectCustomer'),
204 1 => $langs->trans(
'Customer'),
205 0 => $langs->trans(
'NorProspectNorCustomer')
207print $formadvtargetemaling->advMultiselectarray(
'cust_typecust', $options_array, $array_query[
'cust_typecust']);
208print
'</td><td>'.
"\n";
209print
'</td></tr>'.
"\n";
212print
'<tr><td>'.$langs->trans(
'ProspectLevel');
213if (!empty($array_query[
'cust_prospect_status'])) {
214 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
217print $formadvtargetemaling->multiselectProspectionStatus($array_query[
'cust_prospect_status'],
'cust_prospect_status');
218print
'</td><td>'.
"\n";
219print
'</td></tr>'.
"\n";
222print
'<tr><td>'.$langs->trans(
'StatusProsp');
223if (!empty($array_query[
'cust_comm_status'])) {
224 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
227print $formadvtargetemaling->advMultiselectarray(
'cust_comm_status', $advTarget->type_statuscommprospect, $array_query[
'cust_comm_status']);
228print
'</td><td>'.
"\n";
229print
'</td></tr>'.
"\n";
232print
'<tr><td>'.$langs->trans(
"ThirdPartyType");
233if (!empty($array_query[
'cust_typeent'])) {
234 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
236print
'</td><td>'.
"\n";
237print $formadvtargetemaling->advMultiselectarray(
'cust_typeent', $formcompany->typent_array(0,
" AND id <> 0"), $array_query[
'cust_typeent']);
238print
'</td><td>'.
"\n";
239print
'</td></tr>'.
"\n";
242print
'<td>'.$langs->trans(
"Staff");
243if (!empty($array_query[
'cust_effectif_id'])) {
244 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
247print $formadvtargetemaling->advMultiselectarray(
"cust_effectif_id", $formcompany->effectif_array(0,
" AND id <> 0"), $array_query[
'cust_effectif_id']);
248print
'</td><td>'.
"\n";
249print
'</td></tr>'.
"\n";
252print
'<tr><td>'.$langs->trans(
"SalesRepresentatives");
253if (!empty($array_query[
'cust_saleman'])) {
254 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
256print
'</td><td>'.
"\n";
257print $formadvtargetemaling->multiselectselectSalesRepresentatives(
'cust_saleman', $array_query[
'cust_saleman'], $user);
258print
'</td><td>'.
"\n";
259print
'</td></tr>'.
"\n";
263 print
'<tr><td>'.$langs->trans(
"DefaultLang");
264 if (!empty($array_query[
'cust_language'])) {
265 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
267 print
'</td><td>'.
"\n";
268 print $formadvtargetemaling->multiselectselectLanguage(
'cust_language', $array_query[
'cust_language']);
269 print
'</td><td>'.
"\n";
270 print
'</td></tr>'.
"\n";
273if (isModEnabled(
'category') && $user->hasRight(
'categorie',
'lire')) {
275 print
'<tr><td>'.$langs->trans(
"CustomersCategoryShort");
276 if (!empty($array_query[
'cust_categ'])) {
277 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
279 print
'</td><td>'.
"\n";
280 $cate_arbo = $form->select_all_categories(Categorie::TYPE_CUSTOMER,
null,
'parent',
null,
null, 1);
281 print $form->multiselectarray(
'cust_categ', $cate_arbo,
GETPOST(
'cust_categ',
'array'),
null,
null,
null,
null,
"90%");
282 print
'</td><td>'.
"\n";
283 print
'</td></tr>'.
"\n";
289 $elementtype = $socstatic->table_element;
291 require_once DOL_DOCUMENT_ROOT .
'/core/class/extrafields.class.php';
293 $extrafields->fetch_name_optionals_label($elementtype);
294 foreach ($extrafields->attributes[$elementtype][
'label'] as $key => $val) {
295 if ($key !=
'ts_nameextra' && $key !=
'ts_payeur') {
296 print
'<tr><td>'.$extrafields->attributes[$elementtype][
'label'][$key];
297 if (!empty($array_query[
'options_'.$key]) || (is_array($array_query[
'options_'.$key]) && count($array_query[
'options_'.$key]) > 0)) {
298 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
301 if (($extrafields->attributes[$elementtype][
'type'][$key] ==
'varchar') || ($extrafields->attributes[$elementtype][
'type'][$key] ==
'text')) {
302 print
'<input type="text" name="options_'.$key.
'"/></td><td>'.
"\n";
303 print $form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchTextHelp"), 1,
'help');
304 } elseif (($extrafields->attributes[$elementtype][
'type'][$key] ==
'int') || ($extrafields->attributes[$elementtype][
'type'][$key] ==
'double')) {
305 print $langs->trans(
"AdvTgtMinVal").
'<input type="text" name="options'.$key.
'_min"/>';
306 print $langs->trans(
"AdvTgtMaxVal").
'<input type="text" name="options'.$key.
'_max"/>';
307 print
'</td><td>'.
"\n";
308 print $form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchIntHelp"), 1,
'help');
309 } elseif (($extrafields->attributes[$elementtype][
'type'][$key] ==
'date') || ($extrafields->attributes[$elementtype][
'type'][$key] ==
'datetime')) {
310 print
'<table class="nobordernopadding"><tr>';
311 print
'<td>'.$langs->trans(
"AdvTgtStartDt").
'</td><td>';
312 print $form->selectDate(
'',
'options_'.$key.
'_st_dt');
313 print
'</td><td>'.$langs->trans(
"AdvTgtEndDt").
'</td><td>';
314 print $form->selectDate(
'',
'options_'.$key.
'_end_dt');
315 print
'</td></tr></table>';
317 print
'</td><td>'.
"\n";
318 print $form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchDtHelp"), 1,
'help');
319 } elseif (($extrafields->attributes[$elementtype][
'type'][$key] ==
'boolean')) {
320 print $form->selectarray(
324 '1' => $langs->trans(
'Yes'),
325 '0' => $langs->trans(
'No')
327 $array_query[
'options_'.$key]
329 print
'</td><td>'.
"\n";
330 } elseif (($extrafields->attributes[$elementtype][
'type'][$key] ==
'select')) {
331 print $formadvtargetemaling->advMultiselectarray(
'options_'.$key, $extrafields->attributes[$key][
'param'][
'options'], $array_query[
'options_'.$key]);
332 print
'</td><td>'.
"\n";
333 } elseif (($extrafields->attributes[$elementtype][
'type'][$key] ==
'sellist')) {
334 print $formadvtargetemaling->advMultiselectarraySelllist(
'options_'.$key, $extrafields->attributes[$key][
'param'][
'options'], $array_query[
'options_'.$key]);
335 print
'</td><td>'.
"\n";
337 print
'<table class="nobordernopadding"><tr>';
338 print
'<td></td><td>';
339 if (is_array($array_query[
'options_'.$key])) {
340 print $extrafields->showInputField($key, implode(
',', $array_query[
'options_'.$key]));
342 print $extrafields->showInputField($key, $array_query[
'options_'.$key]);
344 print
'</td></tr></table>';
346 print
'</td><td>'.
"\n";
348 print
'</td></tr>'.
"\n";
353 $action_search =
'query';
355 $parameters = array(
'advtarget' => 1);
356 if (!empty($advTarget->id)) {
357 $parameters = array(
'array_query' => $advTarget->filtervalue);
360 $reshook = $hookmanager->executeHooks(
'formObjectOptions', $parameters, $std_soc, $action_search);
361 print $hookmanager->resPrint;
365print
'<tr><td>'.$langs->trans(
'Status').
' '.$langs->trans(
'Contact');
366if (!empty($array_query[
'contact_status'])) {
367 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
370print $formadvtargetemaling->advMultiselectarray(
373 '0' => $langs->trans(
'ActivityCeased'),
374 '1' => $langs->trans(
'InActivity')
376 $array_query[
'contact_status']
378print
'</td><td>'.
"\n";
379print $form->textwithpicto(
'', $langs->trans(
"AdvTgtContactHelp"), 1,
'help');
380print
'</td></tr>'.
"\n";
383print
'<tr><td width="15%">'.$langs->trans(
"UserTitle");
384if (!empty($array_query[
'contact_civility'])) {
385 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
388print $formadvtargetemaling->multiselectCivility(
'contact_civility', $array_query[
'contact_civility']);
392print
'<tr><td>'.$langs->trans(
'Contact').
' '.$langs->trans(
'Lastname');
393if (!empty($array_query[
'contact_lastname'])) {
394 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
396print
'</td><td><input type="text" name="contact_lastname" value="'.$array_query[
'contact_lastname'].
'"/></td><td>'.
"\n";
397print $form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchTextHelp"), 1,
'help');
398print
'</td></tr>'.
"\n";
399print
'<tr><td>'.$langs->trans(
'Contact').
' '.$langs->trans(
'Firstname');
400if (!empty($array_query[
'contact_firstname'])) {
401 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
403print
'</td><td><input type="text" name="contact_firstname" value="'.$array_query[
'contact_firstname'].
'"/></td><td>'.
"\n";
404print $form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchTextHelp"), 1,
'help');
405print
'</td></tr>'.
"\n";
408print
'<tr><td>'.$langs->trans(
'Contact').
' '.$langs->trans(
"Country");
409if (!empty($array_query[
'contact_country'])) {
410 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
412print
'</td><td>'.
"\n";
413print $formadvtargetemaling->multiselectCountry(
'contact_country', $array_query[
'contact_country']);
414print
'</td><td>'.
"\n";
415print
'</td></tr>'.
"\n";
418print
'<tr><td>'.$langs->trans(
'Contact').
' '.$langs->trans(
"No_Email");
419if (!empty($array_query[
'contact_no_email'])) {
420 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
422print
'</td><td>'.
"\n";
423print $form->selectarray(
427 '1' => $langs->trans(
'Yes'),
428 '0' => $langs->trans(
'No')
430 $array_query[
'contact_no_email']
432print
'</td><td>'.
"\n";
433print
'</td></tr>'.
"\n";
436print
'<tr><td>'.$langs->trans(
'Contact').
' '.$langs->trans(
"DateCreation");
437if (!empty($array_query[
'contact_create_st_dt'])) {
438 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
440print
'</td><td>'.
"\n";
441print
'<table class="nobordernopadding"><tr>';
442print
'<td>'.$langs->trans(
"AdvTgtStartDt").
'</td><td>';
443print $form->selectDate($array_query[
'contact_create_st_dt'],
'contact_create_st_dt', 0, 0, 1,
'find_customer', 1, 1);
444print
'</td><td>'.$langs->trans(
"AdvTgtEndDt").
'</td><td>';
445print $form->selectDate($array_query[
'contact_create_end_dt'],
'contact_create_end_dt', 0, 0, 1,
'find_customer', 1, 1);
446print
'</td></tr></table>';
447print
'</td><td>'.
"\n";
448print
'</td></tr>'.
"\n";
451print
'<tr><td>'.$langs->trans(
'Contact').
' '.$langs->trans(
"DateLastModification");
452if (!empty($array_query[
'contact_update_st_dt'])) {
453 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
455print
'</td><td>'.
"\n";
456print
'<table class="nobordernopadding"><tr>';
457print
'<td>'.$langs->trans(
"AdvTgtStartDt").
'</td><td>';
458print $form->selectDate($array_query[
'contact_update_st_dt'],
'contact_update_st_dt', 0, 0, 1,
'find_customer', 1, 1);
459print
'</td><td>'.$langs->trans(
"AdvTgtEndDt").
'</td><td>';
460print $form->selectDate($array_query[
'contact_update_end_dt'],
'contact_update_end_dt', 0, 0, 1,
'find_customer', 1, 1);
461print
'</td></tr></table>';
462print
'</td><td>'.
"\n";
463print
'</td></tr>'.
"\n";
465if (isModEnabled(
'category') && $user->hasRight(
'categorie',
'lire')) {
467 print
'<tr><td>'.$langs->trans(
"ContactCategoriesShort");
468 if (!empty($array_query[
'contact_categ'])) {
469 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
471 print
'</td><td>'.
"\n";
472 $cate_arbo = $form->select_all_categories(Categorie::TYPE_CONTACT,
null,
'parent',
null,
null, 1);
473 print $form->multiselectarray(
'contact_categ', $cate_arbo,
GETPOST(
'contact_categ',
'array'),
null,
null,
null,
null,
"90%");
474 print
'</td><td>'.
"\n";
475 print
'</td></tr>'.
"\n";
480 $contactstatic =
new Contact($db);
481 $elementype = $contactstatic->table_element;
485 $extrafields->fetch_name_optionals_label($elementype);
486 if (!empty($extrafields->attributes[$elementtype][
'type'])) {
487 foreach ($extrafields->attributes[$elementtype][
'type'] as $key => &$value) {
488 if ($value ==
'radio') {
493 if (!empty($extrafields->attributes[$elementtype][
'label'])) {
494 foreach ($extrafields->attributes[$elementtype][
'label'] as $key => $val) {
495 print
'<tr><td>'.$extrafields->attributes[$elementtype][
'label'][$key];
496 if ($array_query[
'options_'.$key.
'_cnct'] !=
'' || (is_array($array_query[
'options_'.$key.
'_cnct']) && count($array_query[
'options_'.$key.
'_cnct']) > 0)) {
497 print
img_picto($langs->trans(
'AdvTgtUse'),
'ok.png@advtargetemailing');
500 if (($extrafields->attributes[$elementtype][
'type'][$key] ==
'varchar') || ($extrafields->attributes[$elementtype][
'type'][$key] ==
'text')) {
501 print
'<input type="text" name="options_'.$key.
'_cnct"/></td><td>'.
"\n";
502 print $form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchTextHelp"), 1,
'help');
503 } elseif (($extrafields->attributes[$elementtype][
'type'][$key] ==
'int') || ($extrafields->attributes[$elementtype][
'type'][$key] ==
'double')) {
504 print $langs->trans(
"AdvTgtMinVal").
'<input type="text" name="options_'.$key.
'_min_cnct"/>';
505 print $langs->trans(
"AdvTgtMaxVal").
'<input type="text" name="options_'.$key.
'_max_cnct"/>';
506 print
'</td><td>'.
"\n";
507 print $form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchIntHelp"), 1,
'help');
508 } elseif (($extrafields->attributes[$elementtype][
'type'][$key] ==
'date') || ($extrafields->attributes[$elementtype][
'type'][$key] ==
'datetime')) {
509 print
'<table class="nobordernopadding"><tr>';
510 print
'<td>'.$langs->trans(
"AdvTgtStartDt").
'</td><td>';
511 print $form->selectDate(
'',
'options_'.$key.
'_st_dt_cnct');
512 print
'</td><td>'.$langs->trans(
"AdvTgtEndDt").
'</td><td>';
513 print $form->selectDate(
'',
'options_'.$key.
'_end_dt_cnct');
514 print
'</td></tr></table>';
515 print
'</td><td>'.
"\n";
516 print $form->textwithpicto(
'', $langs->trans(
"AdvTgtSearchDtHelp"), 1,
'help');
517 } elseif (($extrafields->attributes[$elementtype][
'type'][$key] ==
'boolean')) {
518 print $form->selectarray(
519 'options_'.$key.
'_cnct',
522 '1' => $langs->trans(
'Yes'),
523 '0' => $langs->trans(
'No')
525 $array_query[
'options_'.$key.
'_cnct']
527 print
'</td><td>'.
"\n";
528 } elseif (($extrafields->attributes[$elementtype][
'type'][$key] ==
'select')) {
529 print $formadvtargetemaling->advMultiselectarray(
'options_'.$key.
'_cnct', $extrafields->attributes[$key][
'param'][
'options'], $array_query[
'options_'.$key.
'_cnct']);
530 print
'</td><td>'.
"\n";
531 } elseif (($extrafields->attributes[$elementtype][
'type'][$key] ==
'sellist')) {
532 print $formadvtargetemaling->advMultiselectarraySelllist(
'options_'.$key.
'_cnct', $extrafields->attributes[$key][
'param'][
'options'], $array_query[
'options_'.$key.
'_cnct']);
533 print
'</td><td>'.
"\n";
535 if (is_array($array_query[
'options_'.$key.
'_cnct'])) {
536 print $extrafields->showInputField($key, implode(
',', $array_query[
'options_'.$key.
'_cnct']),
'',
'_cnct');
538 print $extrafields->showInputField($key, $array_query[
'options_'.$key.
'_cnct'],
'',
'_cnct');
540 print
'</td><td>'.
"\n";
542 print
'</td></tr>'.
"\n";
547print
'<td colspan="3" class="right">'.
"\n";
548print
'<input type="button" name="addcontact" id="addcontact" value="'.$langs->trans(
'AdvTgtAddContact').
'" class="butAction"/>'.
"\n";
551print
'</table>'.
"\n";
554print
'<form action="'.$_SERVER[
'PHP_SELF'].
'?action=clear&id='.
$object->id.
'" method="POST">';
555print
'<input type="hidden" name="token" value="'.newToken().
'">';
557print
'<table class="noborder centpercent">';
558print
'<tr class="liste_titre">';
559print
'<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 dolibarr global constant string value.