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 );
145 public $rowid;
146 //public $ref;
147 //public $lastname;
148 //public $firstname;
149 //public $gender;
150 //public $address;
151 //public $zip;
152 //public $town;
153 //public $state_id;
154 //public $country;
155 //public $phone;
156 //public $phone_perso;
157 //public $phone_mobile;
158 //public $email;
159 //public $url;
160 //public $socialnetworks;
161 //public $login;
162 public $fk_adherent_type;
163 //public $morphy;
164 //public $societe;
165 //public $civility_id;
166 //public $datefin;
167 //public $birth;
168 //public $fk_soc;
169 //public $status;
170 // END MODULEBUILDER PROPERTIES
171
177 protected function getMemberStatic()
178 {
179 if (!$this->member_static) {
180 $this->member_static = new Adherent($this->db);
181 }
182
183 return $this->member_static;
184 }
185
191 public function __construct(DoliDB $db)
192 {
193 global $langs;
194
195 $this->db = $db;
196
197 $this->isextrafieldmanaged = 0;
198
199 $this->getMemberStatic();
200
201 // Translate some data of arrayofkeyval
202 if (is_object($langs)) {
203 foreach ($this->fields as $key => $val) {
204 if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) {
205 foreach ($val['arrayofkeyval'] as $key2 => $val2) {
206 $this->fields[$key]['arrayofkeyval'][$key2] = $langs->trans($val2);
207 }
208 }
209 }
210 }
211 }
212
220 public function getTooltipContentArray($params)
221 {
222 global $langs;
223
224 $datas = [];
225
226 if (getDolGlobalInt('MAIN_OPTIMIZEFORTEXTBROWSER')) {
227 return ['optimize' => $langs->trans("WebPortalMember")];
228 }
229 $datas['picto'] = img_picto('', $this->picto) . ' <u>' . $langs->trans("WebPortalMember") . '</u>';
230 if (isset($this->status)) {
231 $datas['picto'] .= ' ' . $this->getLibStatut(5);
232 }
233 $datas['ref'] .= '<br><b>' . $langs->trans('Ref') . ':</b> ' . $this->ref;
234
235 return $datas;
236 }
237
251 public function getNomUrl($withpictoimg = 0, $maxlen = 0, $option = 'card', $mode = '', $morecss = '', $save_lastsearch_value = -1, $notooltip = 0, $addlinktonotes = 0)
252 {
253 global $langs, $hookmanager;
254
255 if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER') && $withpictoimg) {
256 $withpictoimg = 0;
257 }
258
259 $option = 'nolink';
260
261 $result = '';
262 $linkstart = '';
263 $linkend = '';
264 $classfortooltip = 'classfortooltip';
265 $dataparams = '';
266 $params = [
267 'id' => $this->id,
268 'objecttype' => $this->element,
269 'option' => $option,
270 'nofetch' => 1,
271 ];
272 if (getDolGlobalInt('MAIN_ENABLE_AJAX_TOOLTIP')) {
273 $classfortooltip = 'classforajaxtooltip';
274 $dataparams = ' data-params="' . dol_escape_htmltag(json_encode($params)) . '"';
275 $label = '';
276 } else {
277 $label = implode($this->getTooltipContentArray($params));
278 }
279
280 $url = '';
281 //$url = DOL_URL_ROOT.'/adherents/card.php?rowid='.((int) $this->id);
282 //if ($option == 'subscription') {
283 // $url = DOL_URL_ROOT.'/adherents/subscription.php?rowid='.((int) $this->id);
284 //}
285
286 //if ($option != 'nolink') {
287 // // Add param to save lastsearch_values or not
288 // $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0);
289 // if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) {
290 // $add_save_lastsearch_values = 1;
291 // }
292 // if ($add_save_lastsearch_values) {
293 // $url .= '&save_lastsearch_values=1';
294 // }
295 //}
296
297 $linkstart .= '<a href="' . $url . '"';
298 $linkclose = "";
299 if (empty($notooltip)) {
300 if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) {
301 $langs->load("users");
302 $label = $langs->trans("ShowUser");
303 $linkclose .= ' alt="' . dol_escape_htmltag($label, 1) . '"';
304 }
305 $linkclose .= ($label ? ' title="' . dol_escape_htmltag($label, 1) . '"' : ' title="tocomplete"');
306 $linkclose .= $dataparams . ' class="' . $classfortooltip . ($morecss ? ' ' . $morecss : '') . '"';
307 }
308
309 $linkstart .= $linkclose . '>';
310 $linkend = '</a>';
311
312 if ($option === 'nolink') {
313 $linkstart = '';
314 $linkend = '';
315 }
316
317 $result .= $linkstart;
318 if ($withpictoimg) {
319 $result .= '<div class="inline-block nopadding valignmiddle">';
320 }
321 if ($withpictoimg) {
322 $paddafterimage = '';
323 if (abs($withpictoimg) == 1 || abs($withpictoimg) == 4) {
324 $morecss .= ' paddingrightonly';
325 }
326 // Only picto
327 if ($withpictoimg > 0) {
328 $picto = '<span class="nopadding' . ($morecss ? ' userimg' . $morecss : '') . '">' . img_object('', 'user', $paddafterimage . ' ' . ($notooltip ? '' : $dataparams), 0, 0, $notooltip ? 0 : 1) . '</span>';
329 } else {
330 // Picto must be a photo
331 $picto = '<span class="nopadding' . ($morecss ? ' userimg' . $morecss : '') . '"' . ($paddafterimage ? ' ' . $paddafterimage : '') . '>';
332 $picto .= Form::showphoto('memberphoto', $this, 0, 0, 0, 'userphoto' . (($withpictoimg == -3 || $withpictoimg == -4) ? 'small' : ''), 'mini', 0, 1);
333 $picto .= '</span>';
334 }
335 $result .= $picto;
336 }
337 if (($withpictoimg > -2 && $withpictoimg != 2) || $withpictoimg == -4) {
338 if (!getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) {
339 $result .= '<span class="nopadding valignmiddle' . ((!isset($this->statut) || $this->statut) ? '' : ' strikefordisabled') .
340 ($morecss ? ' usertext' . $morecss : '') . '">';
341 }
342 if ($mode == 'login') {
343 $result .= dol_trunc($this->login, $maxlen);
344 } elseif ($mode == 'ref') {
345 $result .= $this->ref;
346 } else {
347 $result .= $this->getFullName($langs, '', ($mode == 'firstname' ? 2 : ($mode == 'lastname' ? 4 : -1)), $maxlen);
348 }
349 if (!getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) {
350 $result .= '</span>';
351 }
352 }
353 if ($withpictoimg) {
354 $result .= '</div>';
355 }
356 $result .= $linkend;
357
358 //if ($addlinktonotes) {
359 // if ($this->note_private) {
360 // $notetoshow = $langs->trans("ViewPrivateNote").':<br>'.dol_string_nohtmltag($this->note_private, 1);
361 // $result .= ' <span class="note inline-block">';
362 // $result .= '<a href="'.DOL_URL_ROOT.'/adherents/note.php?id='.$this->id.'" class="classfortooltip" title="'.dol_escape_htmltag($notetoshow).'">';
363 // $result .= img_picto('', 'note');
364 // $result .= '</a>';
365 // $result .= '</span>';
366 // }
367 //}
368 global $action;
369 $hookmanager->initHooks(array($this->element . 'dao'));
370 $parameters = array('id' => $this->id, 'getnomurl' => &$result);
371 $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
372 if ($reshook > 0) {
373 $result = $hookmanager->resPrint;
374 } else {
375 $result .= $hookmanager->resPrint;
376 }
377 return $result;
378 }
379
386 public function getLibStatut($mode = 0)
387 {
388 return $this->LibStatut($this->status, $this->need_subscription, $this->datefin, $mode);
389 }
390
391 // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
392
402 public function LibStatut($status, $need_subscription, $date_end_subscription, $mode = 0)
403 {
404 // phpcs:enable
405 return $this->getMemberStatic()->LibStatut($status, $need_subscription, $date_end_subscription, $mode);
406 }
407
414 public function getBannerAddressForWebPortal($htmlkey)
415 {
416 global $conf, $langs, $form, $extralanguages;
417
418 $countriesusingstate = array('AU', 'US', 'IN', 'GB', 'ES', 'UK', 'TR'); // See also option MAIN_FORCE_STATE_INTO_ADDRESS
419
420 $contactid = 0;
421 $thirdpartyid = 0;
422 $elementforaltlanguage = $this->element;
423
424 $out = '';
425
426 $outdone = 0;
427 $coords = $this->getFullAddress(1, ', ', getDolGlobalInt('MAIN_SHOW_REGION_IN_STATE_SELECT'));
428 if ($coords) {
429 $address = dol_print_address($coords, 'address_' . $htmlkey . '_' . $this->id, $this->element, $this->id, 1, ', ');
430 if ($address) {
431 $out .= $address;
432 $outdone++;
433 }
434 $outdone++;
435
436 // List of extra languages
437 $arrayoflangcode = array();
438 if (getDolGlobalString('PDF_USE_ALSO_LANGUAGE_CODE')) {
439 $arrayoflangcode[] = getDolGlobalString('PDF_USE_ALSO_LANGUAGE_CODE');
440 }
441
442 if (is_array($arrayoflangcode) && count($arrayoflangcode)) {
443 if (!is_object($extralanguages)) {
444 include_once DOL_DOCUMENT_ROOT . '/core/class/extralanguages.class.php';
445 $extralanguages = new ExtraLanguages($this->db);
446 }
447 $extralanguages->fetch_name_extralanguages($elementforaltlanguage);
448
449 if (!empty($extralanguages->attributes[$elementforaltlanguage]['address']) || !empty($extralanguages->attributes[$elementforaltlanguage]['town'])) {
450 $out .= "<!-- alternatelanguage for '" . $elementforaltlanguage . "' set to fields '" . implode(',', $extralanguages->attributes[$elementforaltlanguage]) . "' -->\n";
452 if (!is_object($form)) {
453 $form = new Form($this->db);
454 }
455 $htmltext = '';
456 // If there is extra languages
457 foreach ($arrayoflangcode as $extralangcode) {
458 $s = picto_from_langcode($extralangcode, 'class="pictoforlang paddingright"');
459 // This also call dol_format_address()
460 $coords = $this->getFullAddress(1, ', ', $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT, $extralangcode);
461 $htmltext .= $s . dol_print_address($coords, 'address_' . $htmlkey . '_' . $this->id, $this->element, $this->id, 1, ', ');
462 }
463 $out .= $form->textwithpicto('', $htmltext, -1, 'language', 'opacitymedium paddingleft');
464 }
465 }
466 }
467
468 // If MAIN_FORCE_STATE_INTO_ADDRESS is on, state is already returned previously with getFullAddress
469 if (!in_array($this->country_code, $countriesusingstate) && !getDolGlobalString('MAIN_FORCE_STATE_INTO_ADDRESS')
470 && !getDolGlobalString('SOCIETE_DISABLE_STATE') && $this->state) {
471 if (getDolGlobalInt('MAIN_SHOW_REGION_IN_STATE_SELECT') == 1 && $this->region) {
472 $out .= ($outdone ? ' - ' : '') . $this->region . ' - ' . $this->state;
473 } else {
474 $out .= ($outdone ? ' - ' : '') . $this->state;
475 }
476 $outdone++;
477 }
478
479 if ($outdone) {
480 $out = '<div class="address inline-block">' . $out . '</div>';
481 }
482
483 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)) {
484 $out .= ($outdone ? '<br>' : '');
485 }
486 if (!empty($this->phone) && empty($this->phone_pro)) { // For objects that store pro phone into ->phone
487 $out .= dol_print_phone($this->phone, $this->country_code, $contactid, $thirdpartyid, '', '&nbsp;', 'phone', $langs->trans("PhonePro"));
488 $outdone++;
489 }
490 if (!empty($this->phone_pro)) {
491 $out .= dol_print_phone($this->phone_pro, $this->country_code, $contactid, $thirdpartyid, '', '&nbsp;', 'phone', $langs->trans("PhonePro"));
492 $outdone++;
493 }
494 if (!empty($this->phone_mobile)) {
495 $out .= dol_print_phone($this->phone_mobile, $this->country_code, $contactid, $thirdpartyid, '', '&nbsp;', 'mobile', $langs->trans("PhoneMobile"));
496 $outdone++;
497 }
498 if (!empty($this->phone_perso)) {
499 $out .= dol_print_phone($this->phone_perso, $this->country_code, $contactid, $thirdpartyid, '', '&nbsp;', 'phone', $langs->trans("PhonePerso"));
500 $outdone++;
501 }
502 if (!empty($this->office_phone)) {
503 $out .= dol_print_phone($this->office_phone, $this->country_code, $contactid, $thirdpartyid, '', '&nbsp;', 'phone', $langs->trans("PhonePro"));
504 $outdone++;
505 }
506 if (!empty($this->user_mobile)) {
507 $out .= dol_print_phone($this->user_mobile, $this->country_code, $contactid, $thirdpartyid, '', '&nbsp;', 'mobile', $langs->trans("PhoneMobile"));
508 $outdone++;
509 }
510 if (!empty($this->fax)) {
511 $out .= dol_print_phone($this->fax, $this->country_code, $contactid, $thirdpartyid, '', '&nbsp;', 'fax', $langs->trans("Fax"));
512 $outdone++;
513 }
514 if (!empty($this->office_fax)) {
515 $out .= dol_print_phone($this->office_fax, $this->country_code, $contactid, $thirdpartyid, '', '&nbsp;', 'fax', $langs->trans("Fax"));
516 $outdone++;
517 }
518
519 if ($out) {
520 $out .= '<div style="clear: both;"></div>';
521 }
522 $outdone = 0;
523 if (!empty($this->email)) {
524 $out .= dol_print_email($this->email, $this->id, $this->id, '', 0, 0, 1);
525 $outdone++;
526 }
527 if (!empty($this->url)) {
528 $out .= dol_print_url($this->url, '_blank', 0, 1);
529 $outdone++;
530 }
531
532 return $out;
533 }
534}
print $langs trans("AuditedSecurityEvents").'</strong >< span class="opacitymedium"></span >< br > status
Or an array listing all the potential status of the object: array: int of the status => translated la...
Definition security.php:634
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.
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...