dolibarr 25.0.0-alpha
view.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2020-2022 Laurent Destailleur <eldy@users.sourceforge.net>
3 * Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <https://www.gnu.org/licenses/>.
17 */
18
25if (!defined('NOLOGIN')) {
26 define("NOLOGIN", 1); // This means this output page does not require to be logged.
27}
28if (!defined('NOCSRFCHECK')) {
29 define("NOCSRFCHECK", 1); // We accept to go on this page from external web site.
30}
31if (!defined('NOIPCHECK')) {
32 define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip
33}
34if (!defined('NOBROWSERNOTIF')) {
35 define('NOBROWSERNOTIF', '1');
36}
37
38// Load Dolibarr environment
39require '../../main.inc.php';
48require_once DOL_DOCUMENT_ROOT.'/core/lib/security.lib.php';
49require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
50require_once DOL_DOCUMENT_ROOT.'/core/class/vcard.class.php';
51
52// Load translation files required by the page
53$langs->loadLangs(array("companies", "other", "recruitment"));
54
55// Get parameters
56$action = GETPOST('action', 'aZ09');
57$mode = GETPOST('mode', 'aZ09');
58$cancel = GETPOST('cancel', 'alpha');
59$backtopage = '';
60
61$id = GETPOSTINT('id');
62$securekey = GETPOST('securekey', 'alpha');
63$suffix = GETPOST('suffix');
64
65$object = new User($db);
66$object->fetch($id, '', '', 1);
67
68// Define $urlwithroot
69//$urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($dolibarr_main_url_root));
70//$urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
71$urlwithroot = DOL_MAIN_URL_ROOT; // This is to use same domain name than current. For Paypal payment, we can use internal URL like localhost.
72
73// Security check
74global $conf;
75$encodedsecurekey = dol_hash($conf->file->instance_unique_id.'uservirtualcard'.$object->id.'-'.$object->login, 'md5');
76if (!hash_equals($encodedsecurekey, (string) $securekey)) {
77 httponly_accessforbidden('Bad value for securitykey or public profile not enabled');
78}
79
80if (!getDolUserInt('USER_ENABLE_PUBLIC', 0, $object)) {
81 httponly_accessforbidden('Bad value for securitykey or public profile not enabled');
82}
83
84
85/*
86 * Actions
87 */
88
89if ($cancel) {
90 if (!empty($backtopage)) {
91 header("Location: ".$backtopage);
92 exit;
93 }
94 $action = 'view';
95}
96
97
98/*
99 * View
100 */
101
102$v = new vCard();
103
104$company = $mysoc;
105
106$modulepart = 'userphotopublic';
107$dir = $conf->user->dir_output;
108
109// Show logo (search order: logo defined by ONLINE_SIGN_LOGO_suffix, then ONLINE_SIGN_LOGO_, then small company logo, large company logo, theme logo, common logo)
110// Define logo and logosmall
111$logo = '';
112$logosmall = '';
113if (!empty($object->photo)) {
114 if (dolIsAllowedForPreview($object->photo)) {
115 $logosmall = get_exdir(0, 0, 0, 0, $object, 'user').'photos/'.getImageFileNameForSize($object->photo, '_small');
116 $logo = get_exdir(0, 0, 0, 0, $object, 'user').'photos/'.$object->photo;
117 //$originalfile = get_exdir(0, 0, 0, 0, $object, 'user').'photos/'.$object->photo;
118 }
119}
120//print '<!-- Show logo (logosmall='.$logosmall.' logo='.$logo.') -->'."\n";
121// Define urllogo
122$urllogo = '';
123$urllogofull = '';
124if (!empty($logosmall) && is_readable($dir.'/'.$logosmall)) {
125 $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart='.urlencode($modulepart).($conf->entity > 1 ? '&amp;entity='.$conf->entity : '').'&amp;securekey='.urlencode($securekey).'&amp;file='.urlencode($logosmall);
126 $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart='.$modulepart.($conf->entity > 1 ? '&entity='.$conf->entity : '').'&securekey='.urlencode($securekey).'&file='.urlencode($logosmall);
127} elseif (!empty($logo) && is_readable($dir.'/'.$logo)) {
128 $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart='.urlencode($modulepart).($conf->entity > 1 ? '&amp;entity='.$conf->entity : '').'&amp;securekey='.urlencode($securekey).'&amp;file='.urlencode($logo);
129 $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart='.$modulepart.($conf->entity > 1 ? '&entity='.$conf->entity : '').'&securekey='.urlencode($securekey).'&file='.urlencode($logo);
130}
131
132// Clean data we don't want on public page
133if (getDolUserInt('USER_PUBLIC_HIDE_PHOTO', 0, $object)) {
134 $logo = '';
135 $logosmall = '';
136 $urllogo = '';
137 $urllogofull = '';
138}
139if (getDolUserInt('USER_PUBLIC_HIDE_JOBPOSITION', 0, $object)) {
140 $object->job = '';
141}
142if (getDolUserInt('USER_PUBLIC_HIDE_EMAIL', 0, $object)) {
143 $object->email = '';
144}
145if (getDolUserInt('USER_PUBLIC_HIDE_OFFICE_PHONE', 0, $object)) {
146 $object->office_phone = '';
147}
148if (getDolUserInt('USER_PUBLIC_HIDE_OFFICE_FAX', 0, $object)) {
149 $object->office_fax = '';
150}
151if (getDolUserInt('USER_PUBLIC_HIDE_USER_MOBILE', 0, $object)) {
152 $object->user_mobile = '';
153}
154if (getDolUserInt('USER_PUBLIC_HIDE_SOCIALNETWORKS', 0, $object)) {
155 $object->socialnetworks = [];
156} else {
157 // Show list of social networks for company
158 $listofnetworks = $object->socialnetworks;
159
160 if (!empty($listofnetworks)) {
161 foreach ($listofnetworks as $key => $networkVal) {
162 if (getDolUserInt('USER_PUBLIC_HIDE_SOCIALNETWORKS_'.strtoupper($key), 0, $object)) {
163 unset($object->socialnetworks[$key]);
164 }
165 }
166 }
167}
168
169// By default, personal birthdate and address is not visible
170if (!getDolUserInt('USER_PUBLIC_SHOW_BIRTH', 0, $object)) {
171 $object->birth = null;
172}
173if (!getDolUserInt('USER_PUBLIC_SHOW_ADDRESS', 0, $object)) {
174 $object->address = '';
175 $object->town = '';
176 $object->zip = '';
177 $object->state = '';
178 $object->country = '';
179}
180
181if (getDolUserInt('USER_PUBLIC_HIDE_COMPANY', 0, $object)) {
182 $company = null;
183}
184if (getDolUserInt('SOCIETE_PUBLIC_HIDE_EMAIL', 0, $object)) {
185 $mysoc->email = '';
186}
187if (getDolUserInt('SOCIETE_PUBLIC_HIDE_OFFICE_PHONE', 0, $object)) {
188 $mysoc->phone = '';
189}
190if (getDolUserInt('SOCIETE_PUBLIC_HIDE_OFFICE_FAX', 0, $object)) {
191 $mysoc->fax = '';
192}
193if (getDolUserInt('SOCIETE_PUBLIC_HIDE_URL', 0, $object)) {
194 $mysoc->url = '';
195}
196if (getDolUserInt('USER_PUBLIC_HIDE_SOCIALNETWORKS_BUSINESS', 0, $object) && is_object($company)) {
197 $company->socialnetworks = [];
198} else {
199 // Show list of social networks for company
200 $listofnetworks = $mysoc->socialnetworks;
201
202 if (!empty($listofnetworks)) {
203 foreach ($listofnetworks as $key => $networkVal) {
204 if (getDolUserInt('SOCIETE_PUBLIC_HIDE_SOCIALNETWORKS_'.strtoupper($key), 0, $object)) {
205 unset($mysoc->socialnetworks[$key]);
206 }
207 }
208 }
209}
210
211// Output vcard
212if ($mode == 'vcard') {
213 // We create VCard
214 $output = $v->buildVCardString($object, $company, $langs, $urllogofull);
215
216 $filename = $v->getFileName(); // "Nom prenom.vcf", already sanitized
217
218 top_httphead('text/vcard; name="'.$filename.'"');
219
220 header("Content-Disposition: attachment; filename=\"".$filename."\"");
221 header("Content-Length: ".dol_strlen($output));
222 header("Connection: close");
223
224 print $output;
225
226 $db->close();
227
228 exit;
229}
230
231$head = '';
232if (getDolGlobalString('MAIN_USER_PROFILE_CSS_URL')) {
233 $head = '<link rel="stylesheet" type="text/css" href="' . getDolGlobalString('MAIN_USER_PROFILE_CSS_URL').'?lang='.$langs->defaultlang.'">'."\n";
234}
235
236$conf->dol_hide_topmenu = 1;
237$conf->dol_hide_leftmenu = 1;
238
239if (!getDolUserInt('USER_ENABLE_PUBLIC', 0, $object)) {
240 $langs->load("errors");
241 print '<div class="error">'.$langs->trans('ErrorPublicInterfaceNotEnabled').'</div>';
242 $db->close();
243 exit();
244}
245
246$arrayofjs = array();
247$arrayofcss = array();
248
249$replacemainarea = (empty($conf->dol_hide_leftmenu) ? '<div>' : '').'<div>';
250llxHeader($head, $object->getFullName($langs).' - '.$langs->trans("PublicVirtualCard"), '', '', 0, 0, $arrayofjs, $arrayofcss, '', 'onlinepaymentbody'.(GETPOST('mode') == 'preview' ? ' scalepreview cursorpointer virtualcardpreview' : ''), $replacemainarea, 1, 1);
251
252print '
253<style>
254@media (prefers-color-scheme: dark) {
255 form {
256 background-color: #CCC !important;
257 }
258}
259</style>
260';
261
262print '<span id="dolpaymentspan"></span>'."\n";
263print '<div class="center">'."\n";
264
265print '<form id="dolpaymentform" class="center" name="paymentform" action="'.$_SERVER["PHP_SELF"].'" method="POST">'."\n";
266print '<input type="hidden" name="token" value="'.newToken().'">'."\n";
267print '<input type="hidden" name="action" value="dosubmit">'."\n";
268print '<input type="hidden" name="securekey" value="'.$securekey.'">'."\n";
269print '<input type="hidden" name="entity" value="'.$conf->entity.'" />';
270print "\n";
271
272
273// Output html code for logo
274print '<div class="backgreypublicpayment">';
275print '<div class="logopublicpayment">';
276
277// Name
278print '<div class="double colortext">'.$object->getFullName($langs).'</div>';
279// User position
280if ($object->job && !getDolUserInt('USER_PUBLIC_HIDE_JOBPOSITION', 0, $object)) {
281 print '<div class="">';
282 print dol_escape_htmltag($object->job);
283 print '</div>';
284}
285if (!getDolUserInt('USER_PUBLIC_HIDE_COMPANY', 0, $object)) {
286 print '<div class="bold">';
287 print dol_escape_htmltag($mysoc->name);
288 print '</div>';
289}
290
291print '</div>';
292print '</div>';
293
294if (getDolGlobalString('USER_IMAGE_PUBLIC_INTERFACE')) {
295 print '<div class="backimagepublicrecruitment">';
296 print '<img id="idUSER_IMAGE_PUBLIC_INTERFACE" src="' . getDolGlobalString('USER_IMAGE_PUBLIC_INTERFACE').'">';
297 print '</div>';
298}
299
300// url for the download .vcf file link
301$urlforqrcode = $object->getOnlineVirtualCardUrl('vcard');
302
303$socialnetworksdict = getArrayOfSocialNetworks();
304
305
306// Show barcode
307$showbarcode = GETPOST('nobarcode') ? 0 : 1;
308if ($showbarcode) {
309 $outdir = $conf->user->dir_temp;
310
311 $filename = $v->buildVCardString($object, $company, $langs, '', $outdir);
312
313 $encodedsecurekey = dol_hash($conf->file->instance_unique_id.'uservirtualcard'.$object->id.'-'.$object->login, 'md5');
314 if (isModEnabled('multicompany')) {
315 $entity_qr = '&entity='.((int) $conf->entity);
316 } else {
317 $entity_qr = '';
318 }
319
320 print '<br>';
321 print '<div class="floatleft inline-block valignmiddle paddingleft paddingright">';
322 //print '<!-- filename = '.dol_escape_htmltag($filename).' -->';
323 print '<img style="max-width: 100%" src="'.$dolibarr_main_url_root.'/viewimage.php?modulepart=barcode'.$entity_qr.'&generator=tcpdfbarcode&encoding=QRCODE&code='.urlencode(basename($filename)).'&securekey='.$encodedsecurekey.'">';
324 print '</div>';
325 print '<br>';
326}
327
328
329// Me section
330
331$usersection = '';
332
333// User email
334if ($object->email && !getDolUserInt('USER_PUBLIC_HIDE_EMAIL', 0, $object)) {
335 $usersection .= '<div class="flexitemsmall">';
336 $usersection .= dol_print_email($object->email, 0, 0, 1, 0, 1, 1);
337 $usersection .= '</div>';
338}
339
340// User url
341if ($object->url && !getDolUserInt('USER_PUBLIC_HIDE_URL', 0, $object)) {
342 $usersection .= '<div class="flexitemsmall">';
343 $usersection .= img_picto('', 'globe', 'class="pictofixedwidth"');
344 $usersection .= dol_print_url($object->url ?? '', '_blank', 0, 0, '');
345 $usersection .= '</div>';
346}
347
348// Office phone
349if ($object->office_phone && !getDolUserInt('USER_PUBLIC_HIDE_OFFICE_PHONE', 0, $object)) {
350 $usersection .= '<div class="flexitemsmall">';
351 $usersection .= img_picto('', 'phone', 'class="pictofixedwidth"');
352 $usersection .= dol_print_phone($object->office_phone, $object->country_code, 0, $mysoc->id, 'tel', ' ', '', '');
353 $usersection .= '</div>';
354}
355// Office fax
356if ($object->office_fax && !getDolUserInt('USER_PUBLIC_HIDE_OFFICE_FAX', 0, $object)) {
357 $usersection .= '<div class="flexitemsmall">';
358 $usersection .= img_picto('', 'phoning_fax', 'class="pictofixedwidth"');
359 $usersection .= dol_print_phone($object->office_fax, $object->country_code, 0, $mysoc->id, 'fax', ' ', '', '');
360 $usersection .= '</div>';
361}
362// Mobile
363if ($object->user_mobile && !getDolUserInt('USER_PUBLIC_HIDE_USER_MOBILE', 0, $object)) {
364 $usersection .= '<div class="flexitemsmall">';
365 $usersection .= img_picto('', 'phoning_mobile', 'class="pictofixedwidth"');
366 $usersection .= dol_print_phone($object->user_mobile, $object->country_code, 0, $mysoc->id, 'tel', ' ', '', '');
367 $usersection .= '</div>';
368}
369if (getDolUserInt('USER_PUBLIC_SHOW_BIRTH', 0, $object) && !is_null($object->birth)) {
370 $usersection .= '<div class="flexitemsmall">';
371 $usersection .= img_picto('', 'calendar', 'class="pictofixedwidth"');
372 $usersection .= dol_print_date($object->birth);
373 $usersection .= '</div>';
374}
375if (getDolUserInt('USER_PUBLIC_SHOW_ADDRESS', 0, $object) && $object->address) {
376 $usersection .= '<div class="flexitemsmall">';
377 $usersection .= img_picto('', 'state', 'class="pictofixedwidth"');
378 $usersection .= dol_print_address(dol_format_address($object, 0, "\n", $langs), 'map', 'user', $object->id, 1);
379 $usersection .= '</div>';
380}
381
382// Social networks
383if (!empty($object->socialnetworks) && is_array($object->socialnetworks)) {
384 if (!getDolUserString('USER_PUBLIC_HIDE_SOCIALNETWORKS', 0, $object)) {
385 $listOfSocialNetworks = $object->socialnetworks;
386 foreach ($listOfSocialNetworks as $key => $value) {
387 if (!getDolUserString('USER_HIDE_SOCIALNETWORK_'.strtoupper($key), 0, $object)) {
388 $usersection .= '<div class="flexitemsmall">'.dol_print_socialnetworks($value, 0, $object->id, strtolower($key), $socialnetworksdict).'</div>';
389 }
390 }
391 }
392}
393
394if ($usersection) {
395 // Show photo
396 if ($urllogo) {
397 print '<img class="userphotopublicvcard" id="dolpaymentlogo" src="'.$urllogofull.'">';
398 } else {
399 print '<br>';
400 }
401
402 print '<table id="dolpaymenttable" summary="Job position offer" class="center">'."\n";
403
404 // Output payment summary form
405 print '<tr><td class="left">';
406
407 print '<div class="nowidthimp" id="tablepublicpayment">';
408
409 print $usersection;
410
411 print '</div>'."\n";
412 print "\n";
413
414 print '</td></tr>'."\n";
415
416 print '</table>'."\n";
417} else {
418 // Show photo
419 if ($urllogo) {
420 print '<br><center><img class="userphotopublicvcard" style="position: unset !important;" id="dolpaymentlogo" src="'.$urllogofull.'"></center>';
421 }
422}
423
424
425if (!getDolUserInt('USER_PUBLIC_HIDE_COMPANY', 0, $object)) {
426 $companysection = '';
427
428 if ($mysoc->email) {
429 $companysection .= '<div class="flexitemsmall">';
430 $companysection .= img_picto('', 'email', 'class="pictofixedwidth"');
431 $companysection .= dol_print_email($mysoc->email, 0, 0, 1);
432 $companysection .= '</div>';
433 }
434
435 if ($mysoc->url) {
436 $companysection .= '<div class="flexitemsmall">';
437 $companysection .= img_picto('', 'globe', 'class="pictofixedwidth"');
438 $companysection .= dol_print_url($mysoc->url, '_blank', 0, 0, '');
439 $companysection .= '</div>';
440 }
441
442 if ($mysoc->phone) {
443 $companysection .= '<div class="flexitemsmall">';
444 $companysection .= img_picto('', 'phone', 'class="pictofixedwidth"');
445 $companysection .= dol_print_phone($mysoc->phone, $mysoc->country_code, 0, $mysoc->id, 'tel', ' ', '', '');
446 $companysection .= '</div>';
447 }
448 if ($mysoc->fax) {
449 $companysection .= '<div class="flexitemsmall">';
450 $companysection .= img_picto('', 'phoning_fax', 'class="pictofixedwidth"');
451 $companysection .= dol_print_phone($mysoc->fax, $mysoc->country_code, 0, $mysoc->id, 'fax', ' ', '', '');
452 $companysection .= '</div>';
453 }
454
455 // Social networks
456 if (!empty($mysoc->socialnetworks) && is_array($mysoc->socialnetworks) && count($mysoc->socialnetworks) > 0) {
457 if (!getDolUserInt('USER_PUBLIC_HIDE_SOCIALNETWORKS_BUSINESS', 0, $object)) {
458 foreach ($mysoc->socialnetworks as $key => $value) {
459 if (!getDolUserInt('SOCIETE_PUBLIC_HIDE_SOCIALNETWORKS_'.strtoupper($key), 0, $object)) {
460 $companysection .= '<div class="flexitemsmall wordbreak">'.dol_print_socialnetworks($value, 0, $mysoc->id, $key, $socialnetworksdict).'</div>';
461 }
462 }
463 }
464 }
465
466 // Show logo (search order: logo defined by ONLINE_SIGN_LOGO_suffix, then ONLINE_SIGN_LOGO_, then small company logo, large company logo, theme logo, common logo)
467 // Define logo and logosmall
468 $logosmall = $mysoc->logo_squarred_small ? $mysoc->logo_squarred_small : $mysoc->logo_small;
469 $logo = $mysoc->logo_squarred ? $mysoc->logo_squarred : $mysoc->logo;
470 $paramlogo = 'ONLINE_USER_LOGO_'.$suffix;
471 if (getDolGlobalString($paramlogo)) {
472 $logosmall = getDolGlobalString($paramlogo);
473 } elseif (getDolGlobalString('ONLINE_USER_LOGO')) {
474 $logosmall = getDolGlobalString('ONLINE_USER_LOGO');
475 }
476 //print '<!-- Show logo (logosmall='.$logosmall.' logo='.$logo.') -->'."\n";
477 // Define urllogo
478 $urllogo = '';
479 $urllogofull = '';
480 if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$logosmall)) {
481 $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany'.($conf->entity > 1 ? '&amp;entity='.$conf->entity : '').'&amp;file='.urlencode('logos/thumbs/'.$logosmall);
482 $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany'.($conf->entity > 1 ? '&entity='.$conf->entity : '').'&file='.urlencode('logos/thumbs/'.$logosmall);
483 } elseif (!empty($logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$logo)) {
484 $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany'.($conf->entity > 1 ? '&amp;entity='.$conf->entity : '').'&amp;file='.urlencode('logos/'.$logo);
485 $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany'.($conf->entity > 1 ? '&entity='.$conf->entity : '').'&file='.urlencode('logos/'.$logo);
486 }
487 // Output html code for logo
488 if ($urllogo) {
489 print '<div class="logopublicpayment center">';
490 if (!empty($mysoc->url)) {
491 print '<a href="'.$mysoc->url.'" target="_blank" rel="noopener">';
492 }
493 print '<img class="userphotopublicvcard" id="dolpaymentlogo" src="'.$urllogofull.'">';
494 if (!empty($mysoc->url)) {
495 print '</a>';
496 }
497 print '</div>';
498 }
499 print '<table id="dolpaymenttable" summary="Job position offer" class="center">'."\n";
500
501 // Output payment summary form
502 print '<tr><td class="left">';
503
504 if ($companysection || $mysoc->name) {
505 print '<div class="nowidthimp" id="tablepublicpayment">';
506
507 // Add company info
508 if ($mysoc->name) {
509 print '<div class="center bold">';
510 print dol_escape_htmltag($mysoc->name);
511 print '</div>';
512 print '<br>';
513 }
514
515 print $companysection;
516
517 print '</div>'."\n";
518 print "\n";
519 }
520
521 print '</td></tr>'."\n";
522
523 print '</table>'."\n";
524}
525
526
527// Description
528$text = getDolUserString('USER_PUBLIC_MORE', '', $object);
529print $text;
530
531
532print '</form>'."\n";
533print '</div>'."\n";
534print '<br>';
535
536
537print '<div class="backgreypublicpayment">';
538print '<div class="center">';
539print '<a href="'.$urlforqrcode.'">';
540// Download / AddToContacts
541print img_picto($langs->trans("Download").' VCF', 'add').' ';
542print $langs->trans("Download").' VCF';
543print '</a>';
544print '</div>';
545//print '<div>';
546//print '</div>';
547print '</div>';
548
549$fullexternaleurltovirtualcard = $object->getOnlineVirtualCardUrl('', 'external');
550$fullinternalurltovirtualcard = $object->getOnlineVirtualCardUrl('', 'internal');
551
552print '<script>';
553print 'jQuery(document).ready(function() {
554 jQuery(".virtualcardpreview").click(function(event) {
555 event.preventDefault();
556 console.log("We click on the card");
557 window.open("'.$fullexternaleurltovirtualcard.'");
558 });
559});';
560print '</script>';
561
562llxFooter('', 'public');
563
564$db->close();
$id
Support class for third parties, contacts, members, users or resources.
Definition account.php:47
if(! $sortfield) if(! $sortorder) $object
Definition account.php:100
global $dolibarr_main_url_root
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
Definition wrapper.php:91
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Definition wrapper.php:73
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $conf
The main.inc.php has been included so the following variable are now defined:
Class to manage Dolibarr users.
Class to build vCard files.
global $mysoc
dol_print_email($email, $contactid=0, $socid=0, $addlink=0, $max=0, $showinvalid=2, $withpicto=0, $morecss='paddingrightonly')
Show EMail link formatted for HTML output.
dol_print_phone($phone, $countrycode='', $contactid=0, $socid=0, $addlink='', $separ="&nbsp;", $withpicto='', $titlealt='', $adddivfloat=0, $morecss='paddingright')
Format phone numbers according to country.
dol_format_address($object, $withcountry=0, $sep="\n", $outputlangs=null, $mode=0, $extralangcode='')
Return a formatted address (part address/zip/town/state) according to country rules.
dol_strlen($string, $stringencoding='UTF-8', $binarycount=0)
Make a strlen call.
getDolUserInt($key, $default=0, $tmpuser=null)
Return Dolibarr user constant int value.
dol_print_url($url, $target='_blank', $max=32, $withpicto=0, $morecss='')
Show Url link.
getDolUserString($key, $default='', $tmpuser=null)
Return Dolibarr user constant string value.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0, $nodefault=0)
Return value of a param into GET or POST supervariable.
getImageFileNameForSize($file, $extName, $extImgTarget='')
Return the filename of file to get the thumbs.
getArrayOfSocialNetworks()
Get array of social network dictionary.
GETPOSTINT($paramname, $method=0, $nodefault=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dolIsAllowedForPreview($file)
Return if a file is qualified for preview.
dol_print_address($address, $htmlid, $element, $id, $noprint=0, $charfornl='')
Format address string.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false, $decorate=0)
Output date in a string format according to outputlangs (or langs if not defined).
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
get_exdir($num, $level, $alpha, $withoutslash, $object, $modulepart='')
Return a path to have a the directory according to object where files are stored.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Definition html.lib.php:183
if(!defined( 'NOREQUIREMENU')) if(!empty(GETPOST('seteventmessages', 'alpha'))) if(!function_exists("llxHeader")) top_httphead($contenttype='text/html', $forcenocache=0)
Show HTTP header.
httponly_accessforbidden($message='1', $http_response_code=403, $stringalreadysanitized=0)
Show a message to say access is forbidden and stop program.
dol_hash($chain, $type='0', $nosalt=0, $mode=0)
Returns a hash (non reversible encryption) of a string.