dolibarr 21.0.0-alpha
webportalmember.class.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2023-2024 Laurent Destailleur <eldy@users.sourceforge.net>
3 * Copyright (C) 2023-2024 Lionel Vessiller <lvessiller@easya.solutions>
4 * Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
5 * Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 */
20
27// Put here all includes required by your class file
28require_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent.class.php';
29
34{
38 public $module = 'webportal';
39
43 const ARRAY_STATUS_LABEL = array(
44 Adherent::STATUS_DRAFT => 'Draft',
45 Adherent::STATUS_VALIDATED => 'Validated',
46 Adherent::STATUS_RESILIATED => 'MemberStatusResiliatedShort',
47 Adherent::STATUS_EXCLUDED => 'MemberStatusExcludedShort',
48 );
49
53 const MORPHY_LIST = array(
54 'phy' => 'Physical',
55 'mor' => 'Moral',
56 );
57
61 const GENDER_LIST = array(
62 'man' => 'Genderman',
63 'woman' => 'Genderwoman',
64 'other' => 'Genderother',
65 );
66
70 protected $member_static = null;
71
110 // BEGIN MODULEBUILDER PROPERTIES
114 public $fields = array(
115 'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'visible' => 0, 'notnull' => 1, 'position' => 10,),
116 'ref' => array('type' => 'varchar(30)', 'label' => 'Ref', 'default' => '1', 'enabled' => 1, 'visible' => 5, 'notnull' => 1, 'position' => 12, 'index' => 1, 'showonheader' => 1,),
117 'entity' => array('type' => 'integer', 'label' => 'Entity', 'default' => '1', 'enabled' => 1, 'visible' => -2, 'notnull' => 1, 'position' => 15, 'index' => 1,),
118
119 'lastname' => array('type' => 'varchar(50)', 'label' => 'Lastname', 'enabled' => 1, 'visible' => 4, 'position' => 30, 'showonheader' => 1,),
120 'firstname' => array('type' => 'varchar(50)', 'label' => 'Firstname', 'enabled' => 1, 'visible' => 4, 'position' => 35, 'showonheader' => 1,),
121 'gender' => array('type' => 'varchar(10)', 'label' => 'Gender', 'enabled' => 1, 'visible' => 4, 'position' => 50, 'arrayofkeyval' => self::GENDER_LIST, 'showonheader' => 1,),
122 'company' => array('type' => 'varchar(128)', 'label' => 'Societe', 'enabled' => 1, 'visible' => 4, 'position' => 65, 'showonheader' => 1,),
123 'address' => array('type' => 'text', 'label' => 'Address', 'enabled' => 1, 'visible' => 4, 'position' => 75, 'showonheader' => 1,),
124 'zip' => array('type' => 'varchar(10)', 'label' => 'Zip', 'enabled' => 1, 'visible' => 4, 'position' => 80, 'showonheader' => 1,),
125 'town' => array('type' => 'varchar(50)', 'label' => 'Town', 'enabled' => 1, 'visible' => 4, 'position' => 85, 'showonheader' => 1,),
126 'state_id' => array('type' => 'integer', 'label' => 'State id', 'enabled' => '!getDolGlobalString("MEMBER_DISABLE_STATE")', 'visible' => -5, 'position' => 90, 'showonheader' => 1,),
127 'country_id' => array('type' => 'integer:Ccountry:core/class/ccountry.class.php', 'label' => 'Country', 'enabled' => 1, 'visible' => 4, 'position' => 95, 'showonheader' => 1,),
128 'phone' => array('type' => 'varchar(30)', 'label' => 'Phone', 'enabled' => 1, 'visible' => 4, 'position' => 115, 'showonheader' => 1,),
129 'phone_perso' => array('type' => 'varchar(30)', 'label' => 'Phone perso', 'enabled' => 1, 'visible' => 4, 'position' => 120, 'showonheader' => 1,),
130 'phone_mobile' => array('type' => 'varchar(30)', 'label' => 'Phone mobile', 'enabled' => 1, 'visible' => 4, 'position' => 125, 'showonheader' => 1,),
131 'email' => array('type' => 'varchar(255)', 'label' => 'Email', 'enabled' => 1, 'visible' => 4, 'position' => 200, 'showonheader' => 1, 'picto' => 'email'),
132 'url' => array('type' => 'varchar(255)', 'label' => 'Url', 'enabled' => 1, 'visible' => 4, 'position' => 210, 'showonheader' => 1,),
133
134 'login' => array('type' => 'varchar(50)', 'label' => 'Login', 'enabled' => 1, 'visible' => 4, 'position' => 240,),
135 'typeid' => array('type' => 'integer:AdherentType:adherents/class/adherent_type.class.php', 'label' => 'MemberType', 'enabled' => 1, 'visible' => 4, 'notnull' => 1, 'position' => 255),
136 'morphy' => array('type' => 'varchar(3)', 'label' => 'MemberNature', 'enabled' => 1, 'visible' => 4, 'notnull' => 1, 'position' => 260, 'arrayofkeyval' => self::MORPHY_LIST,),
137 'civility_id' => array('type' => 'sellist:c_civility:label:rowid::active=1', 'label' => 'Civility', 'enabled' => 1, 'visible' => 4, 'position' => 270,),
138 'birth' => array('type' => 'date', 'label' => 'DateOfBirth', 'enabled' => 1, 'visible' => 4, 'position' => 290,),
139 'fk_soc' => array('type' => 'integer:Societe:societe/class/societe.class.php', 'label' => 'ThirdParty', 'enabled' => 1, 'visible' => 5, 'position' => 300,),
140
141 'datefin' => array('type' => 'date', 'label' => 'SubscriptionEndDate', 'enabled' => 1, 'visible' => 5, 'position' => 400,),
142
143 'status' => array('type' => 'smallint(6)', 'label' => 'Status', 'enabled' => 1, 'visible' => 5, 'notnull' => 1, 'position' => 500, 'arrayofkeyval' => self::ARRAY_STATUS_LABEL, 'showonheader' => 1,),
144 );
148 public $rowid;
149 //public $ref;
150 //public $lastname;
151 //public $firstname;
152 //public $gender;
153 //public $address;
154 //public $zip;
155 //public $town;
156 //public $state_id;
157 //public $country;
158 //public $phone;
159 //public $phone_perso;
160 //public $phone_mobile;
161 //public $email;
162 //public $url;
163 //public $socialnetworks;
164 //public $login;
168 public $fk_adherent_type;
169 //public $morphy;
170 //public $societe;
171 //public $civility_id;
172 //public $datefin;
173 //public $birth;
174 //public $fk_soc;
175 //public $status;
176 // END MODULEBUILDER PROPERTIES
177
183 protected function getMemberStatic()
184 {
185 if (!$this->member_static) {
186 $this->member_static = new Adherent($this->db);
187 }
188
189 return $this->member_static;
190 }
191
197 public function __construct(DoliDB $db)
198 {
199 global $langs;
200
201 $this->db = $db;
202
203 $this->isextrafieldmanaged = 0;
204
205 $this->getMemberStatic();
206
207 // Translate some data of arrayofkeyval
208 if (is_object($langs)) {
209 foreach ($this->fields as $key => $val) {
210 if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) {
211 foreach ($val['arrayofkeyval'] as $key2 => $val2) {
212 $this->fields[$key]['arrayofkeyval'][$key2] = $langs->trans($val2);
213 }
214 }
215 }
216 }
217 }
218
225 public function getTooltipContentArray($params)
226 {
227 global $langs;
228
229 $datas = [];
230
231 if (getDolGlobalInt('MAIN_OPTIMIZEFORTEXTBROWSER')) {
232 return ['optimize' => $langs->trans("WebPortalMember")];
233 }
234 $datas['picto'] = img_picto('', $this->picto) . ' <u>' . $langs->trans("WebPortalMember") . '</u>';
235 if (isset($this->status)) {
236 $datas['picto'] .= ' ' . $this->getLibStatut(5);
237 }
238 $datas['ref'] .= '<br><b>' . $langs->trans('Ref') . ':</b> ' . $this->ref;
239
240 return $datas;
241 }
242
256 public function getNomUrl($withpictoimg = 0, $maxlen = 0, $option = 'card', $mode = '', $morecss = '', $save_lastsearch_value = -1, $notooltip = 0, $addlinktonotes = 0)
257 {
258 global $langs, $hookmanager;
259
260 if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER') && $withpictoimg) {
261 $withpictoimg = 0;
262 }
263
264 $option = 'nolink';
265
266 $result = '';
267 $linkstart = '';
268 $linkend = '';
269 $classfortooltip = 'classfortooltip';
270 $dataparams = '';
271 $params = [
272 'id' => $this->id,
273 'objecttype' => $this->element,
274 'option' => $option,
275 'nofetch' => 1,
276 ];
277 if (getDolGlobalInt('MAIN_ENABLE_AJAX_TOOLTIP')) {
278 $classfortooltip = 'classforajaxtooltip';
279 $dataparams = ' data-params="' . dol_escape_htmltag(json_encode($params)) . '"';
280 $label = '';
281 } else {
282 $label = implode($this->getTooltipContentArray($params));
283 }
284
285 $url = '';
286 //$url = DOL_URL_ROOT.'/adherents/card.php?rowid='.((int) $this->id);
287 //if ($option == 'subscription') {
288 // $url = DOL_URL_ROOT.'/adherents/subscription.php?rowid='.((int) $this->id);
289 //}
290
291 //if ($option != 'nolink') {
292 // // Add param to save lastsearch_values or not
293 // $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0);
294 // if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) {
295 // $add_save_lastsearch_values = 1;
296 // }
297 // if ($add_save_lastsearch_values) {
298 // $url .= '&save_lastsearch_values=1';
299 // }
300 //}
301
302 $linkstart .= '<a href="' . $url . '"';
303 $linkclose = "";
304 if (empty($notooltip)) {
305 if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) {
306 $langs->load("users");
307 $label = $langs->trans("ShowUser");
308 $linkclose .= ' alt="' . dol_escape_htmltag($label, 1) . '"';
309 }
310 $linkclose .= ($label ? ' title="' . dol_escape_htmltag($label, 1) . '"' : ' title="tocomplete"');
311 $linkclose .= $dataparams . ' class="' . $classfortooltip . ($morecss ? ' ' . $morecss : '') . '"';
312 }
313
314 $linkstart .= $linkclose . '>';
315 $linkend = '</a>';
316
317 if ($option === 'nolink') {
318 $linkstart = '';
319 $linkend = '';
320 }
321
322 $result .= $linkstart;
323 if ($withpictoimg) {
324 $result .= '<div class="inline-block nopadding valignmiddle">';
325 }
326 if ($withpictoimg) {
327 $paddafterimage = '';
328 if (abs($withpictoimg) == 1 || abs($withpictoimg) == 4) {
329 $morecss .= ' paddingrightonly';
330 }
331 // Only picto
332 if ($withpictoimg > 0) {
333 $picto = '<span class="nopadding' . ($morecss ? ' userimg' . $morecss : '') . '">' . img_object('', 'user', $paddafterimage . ' ' . ($notooltip ? '' : $dataparams), 0, 0, $notooltip ? 0 : 1) . '</span>';
334 } else {
335 // Picto must be a photo
336 $picto = '<span class="nopadding' . ($morecss ? ' userimg' . $morecss : '') . '"' . ($paddafterimage ? ' ' . $paddafterimage : '') . '>';
337 $picto .= Form::showphoto('memberphoto', $this, 0, 0, 0, 'userphoto' . (($withpictoimg == -3 || $withpictoimg == -4) ? 'small' : ''), 'mini', 0, 1);
338 $picto .= '</span>';
339 }
340 $result .= $picto;
341 }
342 if (($withpictoimg > -2 && $withpictoimg != 2) || $withpictoimg == -4) {
343 if (!getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) {
344 $result .= '<span class="nopadding valignmiddle' . ((!isset($this->statut) || $this->statut) ? '' : ' strikefordisabled') .
345 ($morecss ? ' usertext' . $morecss : '') . '">';
346 }
347 if ($mode == 'login') {
348 $result .= dol_trunc($this->login, $maxlen);
349 } elseif ($mode == 'ref') {
350 $result .= $this->ref;
351 } else {
352 $result .= $this->getFullName($langs, 0, ($mode == 'firstname' ? 2 : ($mode == 'lastname' ? 4 : -1)), $maxlen);
353 }
354 if (!getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) {
355 $result .= '</span>';
356 }
357 }
358 if ($withpictoimg) {
359 $result .= '</div>';
360 }
361 $result .= $linkend;
362
363 //if ($addlinktonotes) {
364 // if ($this->note_private) {
365 // $notetoshow = $langs->trans("ViewPrivateNote").':<br>'.dol_string_nohtmltag($this->note_private, 1);
366 // $result .= ' <span class="note inline-block">';
367 // $result .= '<a href="'.DOL_URL_ROOT.'/adherents/note.php?id='.$this->id.'" class="classfortooltip" title="'.dol_escape_htmltag($notetoshow).'">';
368 // $result .= img_picto('', 'note');
369 // $result .= '</a>';
370 // $result .= '</span>';
371 // }
372 //}
373 global $action;
374 $hookmanager->initHooks(array($this->element . 'dao'));
375 $parameters = array('id' => $this->id, 'getnomurl' => &$result);
376 $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
377 if ($reshook > 0) {
378 $result = $hookmanager->resPrint;
379 } else {
380 $result .= $hookmanager->resPrint;
381 }
382 return $result;
383 }
384
391 public function getLibStatut($mode = 0)
392 {
393 return $this->LibStatut($this->status, $this->need_subscription, $this->datefin, $mode);
394 }
395
396 // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
397
407 public function LibStatut($status, $need_subscription, $date_end_subscription, $mode = 0)
408 {
409 // phpcs:enable
410 return $this->getMemberStatic()->LibStatut($status, $need_subscription, $date_end_subscription, $mode);
411 }
412
419 public function getBannerAddressForWebPortal($htmlkey)
420 {
421 global $conf, $langs, $form, $extralanguages;
422
423 $countriesusingstate = array('AU', 'US', 'IN', 'GB', 'ES', 'UK', 'TR'); // See also option MAIN_FORCE_STATE_INTO_ADDRESS
424
425 $contactid = 0;
426 $thirdpartyid = 0;
427 $elementforaltlanguage = $this->element;
428
429 $out = '';
430
431 $outdone = 0;
432 $coords = $this->getFullAddress(1, ', ', getDolGlobalInt('MAIN_SHOW_REGION_IN_STATE_SELECT'));
433 if ($coords) {
434 $address = dol_print_address($coords, 'address_' . $htmlkey . '_' . $this->id, $this->element, $this->id, 1, ', ');
435 if ($address) {
436 $out .= $address;
437 $outdone++;
438 }
439 $outdone++;
440
441 // List of extra languages
442 $arrayoflangcode = array();
443 if (getDolGlobalString('PDF_USE_ALSO_LANGUAGE_CODE')) {
444 $arrayoflangcode[] = getDolGlobalString('PDF_USE_ALSO_LANGUAGE_CODE');
445 }
446
447 if (is_array($arrayoflangcode) && count($arrayoflangcode)) {
448 if (!is_object($extralanguages)) {
449 include_once DOL_DOCUMENT_ROOT . '/core/class/extralanguages.class.php';
450 $extralanguages = new ExtraLanguages($this->db);
451 }
452 $extralanguages->fetch_name_extralanguages($elementforaltlanguage);
453
454 if (!empty($extralanguages->attributes[$elementforaltlanguage]['address']) || !empty($extralanguages->attributes[$elementforaltlanguage]['town'])) {
455 $out .= "<!-- alternatelanguage for '" . $elementforaltlanguage . "' set to fields '" . implode(',', $extralanguages->attributes[$elementforaltlanguage]) . "' -->\n";
457 if (!is_object($form)) {
458 $form = new Form($this->db);
459 }
460 $htmltext = '';
461 // If there is extra languages
462 foreach ($arrayoflangcode as $extralangcode) {
463 $s = picto_from_langcode($extralangcode, 'class="pictoforlang paddingright"');
464 // This also call dol_format_address()
465 $coords = $this->getFullAddress(1, ', ', $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT, $extralangcode);
466 $htmltext .= $s . dol_print_address($coords, 'address_' . $htmlkey . '_' . $this->id, $this->element, $this->id, 1, ', ');
467 }
468 $out .= $form->textwithpicto('', $htmltext, -1, 'language', 'opacitymedium paddingleft');
469 }
470 }
471 }
472
473 // If MAIN_FORCE_STATE_INTO_ADDRESS is on, state is already returned previously with getFullAddress
474 if (!in_array($this->country_code, $countriesusingstate) && !getDolGlobalString('MAIN_FORCE_STATE_INTO_ADDRESS')
475 && !getDolGlobalString('SOCIETE_DISABLE_STATE') && $this->state) {
476 if (getDolGlobalInt('MAIN_SHOW_REGION_IN_STATE_SELECT') == 1 && $this->region) {
477 $out .= ($outdone ? ' - ' : '') . $this->region . ' - ' . $this->state;
478 } else {
479 $out .= ($outdone ? ' - ' : '') . $this->state;
480 }
481 $outdone++;
482 }
483
484 if ($outdone) {
485 $out = '<div class="address inline-block">' . $out . '</div>';
486 }
487
488 if (!empty($this->phone) || !empty($this->phone_pro) || !empty($this->phone_mobile) || !empty($this->phone_perso) || !empty($this->fax) || !empty($this->office_phone) || !empty($this->user_mobile) || !empty($this->office_fax)) {
489 $out .= ($outdone ? '<br>' : '');
490 }
491 if (!empty($this->phone) && empty($this->phone_pro)) { // For objects that store pro phone into ->phone
492 $out .= dol_print_phone($this->phone, $this->country_code, $contactid, $thirdpartyid, '', '&nbsp;', 'phone', $langs->trans("PhonePro"));
493 $outdone++;
494 }
495 if (!empty($this->phone_pro)) {
496 $out .= dol_print_phone($this->phone_pro, $this->country_code, $contactid, $thirdpartyid, '', '&nbsp;', 'phone', $langs->trans("PhonePro"));
497 $outdone++;
498 }
499 if (!empty($this->phone_mobile)) {
500 $out .= dol_print_phone($this->phone_mobile, $this->country_code, $contactid, $thirdpartyid, '', '&nbsp;', 'mobile', $langs->trans("PhoneMobile"));
501 $outdone++;
502 }
503 if (!empty($this->phone_perso)) {
504 $out .= dol_print_phone($this->phone_perso, $this->country_code, $contactid, $thirdpartyid, '', '&nbsp;', 'phone', $langs->trans("PhonePerso"));
505 $outdone++;
506 }
507 if (!empty($this->office_phone)) {
508 $out .= dol_print_phone($this->office_phone, $this->country_code, $contactid, $thirdpartyid, '', '&nbsp;', 'phone', $langs->trans("PhonePro"));
509 $outdone++;
510 }
511 if (!empty($this->user_mobile)) {
512 $out .= dol_print_phone($this->user_mobile, $this->country_code, $contactid, $thirdpartyid, '', '&nbsp;', 'mobile', $langs->trans("PhoneMobile"));
513 $outdone++;
514 }
515 if (!empty($this->fax)) {
516 $out .= dol_print_phone($this->fax, $this->country_code, $contactid, $thirdpartyid, '', '&nbsp;', 'fax', $langs->trans("Fax"));
517 $outdone++;
518 }
519 if (!empty($this->office_fax)) {
520 $out .= dol_print_phone($this->office_fax, $this->country_code, $contactid, $thirdpartyid, '', '&nbsp;', 'fax', $langs->trans("Fax"));
521 $outdone++;
522 }
523
524 if ($out) {
525 $out .= '<div style="clear: both;"></div>';
526 }
527 $outdone = 0;
528 if (!empty($this->email)) {
529 $out .= dol_print_email($this->email, $this->id, $this->id, '', 0, 0, 1);
530 $outdone++;
531 }
532 if (!empty($this->url)) {
533 $out .= dol_print_url($this->url, '_blank', 0, 1);
534 $outdone++;
535 }
536
537 return $out;
538 }
539}
Class to manage members of a foundation.
const STATUS_EXCLUDED
Excluded.
const STATUS_DRAFT
Draft status.
const STATUS_RESILIATED
Resiliated.
const STATUS_VALIDATED
Validated status.
getFullAddress($withcountry=0, $sep="\n", $withregion=0, $extralangcode='')
Return full address of contact.
fetchValuesForExtraLanguages()
Function to get alternative languages of a data into $this->array_languages This method is NOT called...
Class to manage Dolibarr database access.
Class to manage standard extra languages.
Class to manage generation of HTML components Only common components must be here.
static showphoto($modulepart, $object, $width=100, $height=0, $caneditfield=0, $cssclass='photowithmargin', $imagesize='', $addlinktofullsize=1, $cache=0, $forcecapture='', $noexternsourceoverwrite=0)
Return HTML code to output a photo.
Class for WebPortalMember.
const ARRAY_STATUS_LABEL
Status list (short label)
__construct(DoliDB $db)
Constructor.
getLibStatut($mode=0)
Retourne le libelle du statut d'un adherent (brouillon, valide, resilie, exclu)
getTooltipContentArray($params)
getTooltipContentArray
getNomUrl($withpictoimg=0, $maxlen=0, $option='card', $mode='', $morecss='', $save_lastsearch_value=-1, $notooltip=0, $addlinktonotes=0)
Return clickable name (with picto eventually)
LibStatut($status, $need_subscription, $date_end_subscription, $mode=0)
Renvoi le libelle d'un statut donne.
const MORPHY_LIST
MorPhy list : Moral or Physical.
const GENDER_LIST
Gender list.
getBannerAddressForWebPortal($htmlkey)
Return full address for banner.
getMemberStatic()
Get member for static method.
print $langs trans("Ref").' m titre as m m statut as status
Or an array listing all the potential status of the object: array: int of the status => translated la...
Definition index.php:162
getFullName($langs, $option=0, $nameorder=-1, $maxlen=0)
Return full name (civility+' '+name+' '+lastname)
print $script_file $mode $langs defaultlang(is_numeric($duration_value) ? " delay=". $duration_value :"").(is_numeric($duration_value2) ? " after cd cd cd description as p label as s rowid as s nom as s email
Sender: Who sends the email ("Sender" has sent emails on behalf of "From").
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
picto_from_langcode($codelang, $moreatt='', $notitlealt=0)
Return img flag of country for a language code or country code.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
dol_print_phone($phone, $countrycode='', $cid=0, $socid=0, $addlink='', $separ="&nbsp;", $withpicto='', $titlealt='', $adddivfloat=0, $morecss='paddingright')
Format phone numbers according to country.
dol_print_url($url, $target='_blank', $max=32, $withpicto=0, $morecss='')
Show Url link.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dol_print_email($email, $cid=0, $socid=0, $addlink=0, $max=64, $showinvalid=1, $withpicto=0, $morecss='paddingrightonly')
Show EMail link formatted for HTML output.
dol_print_address($address, $htmlid, $element, $id, $noprint=0, $charfornl='')
Format address string.
dol_trunc($string, $size=40, $trunc='right', $stringencoding='UTF-8', $nodot=0, $display=0)
Truncate a string to a particular length adding '…' if string larger than length.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...