25 if (!defined(
'NOLOGIN')) {
28 if (!defined(
'NOCSRFCHECK')) {
29 define(
"NOCSRFCHECK", 1);
31 if (!defined(
'NOIPCHECK')) {
32 define(
'NOIPCHECK',
'1');
34 if (!defined(
'NOBROWSERNOTIF')) {
35 define(
'NOBROWSERNOTIF',
'1');
42 $entity = (!empty($_GET[
'entity']) ? (int) $_GET[
'entity'] : (!empty($_POST[
'entity']) ? (int) $_POST[
'entity'] : 1));
43 if (is_numeric($entity)) {
44 define(
"DOLENTITY", $entity);
48 require
'../../main.inc.php';
49 require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
50 require_once DOL_DOCUMENT_ROOT.
'/core/class/extrafields.class.php';
51 require_once DOL_DOCUMENT_ROOT.
'/eventorganization/class/conferenceorbooth.class.php';
52 require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
53 require_once DOL_DOCUMENT_ROOT.
'/contact/class/contact.class.php';
54 require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
55 require_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
56 require_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/paymentterm.class.php';
57 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
58 require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
60 global $dolibarr_main_url_root;
66 $backtopage =
GETPOST(
'backtopage',
'alpha');
67 $action =
GETPOST(
'action',
'aZ09');
69 $eventtype =
GETPOST(
"eventtype");
79 $resultproject = $project->fetch($id);
80 if ($resultproject < 0) {
82 $errmsg .= $project->error;
86 $securekeyreceived =
GETPOST(
'securekey',
'alpha');
89 if ($securekeytocompare != $securekeyreceived) {
90 print $langs->trans(
'MissingOrBadSecureKey');
95 $langs->loadLangs(array(
"main",
"companies",
"install",
"other",
"eventorganization"));
98 $hookmanager->initHooks(array(
'publicnewmembercard',
'globalcard'));
102 $user->loadDefaultValues();
105 $arrayofconfboothtype = $cactioncomm->liste_array(
'',
'id',
'', 0,
"module='booth@eventorganization'");
108 if (empty($conf->eventorganization->enabled)) {
124 function llxHeaderVierge($title, $head =
"", $disablejs = 0, $disablehead = 0, $arrayofjs = [], $arrayofcss = [])
126 global $user, $conf, $langs, $mysoc;
128 top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
130 print
'<body id="mainbody" class="publicnewmemberform">';
133 $urllogo = DOL_URL_ROOT.
'/theme/common/login_logo.png';
135 if (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.
'/logos/thumbs/'.$mysoc->logo_small)) {
136 $urllogo = DOL_URL_ROOT.
'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode(
'logos/thumbs/'.$mysoc->logo_small);
137 } elseif (!empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.
'/logos/'.$mysoc->logo)) {
138 $urllogo = DOL_URL_ROOT.
'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode(
'logos/'.$mysoc->logo);
139 } elseif (is_readable(DOL_DOCUMENT_ROOT.
'/theme/dolibarr_logo.svg')) {
140 $urllogo = DOL_URL_ROOT.
'/theme/dolibarr_logo.svg';
143 print
'<div class="center">';
147 print
'<div class="backgreypublicpayment">';
148 print
'<div class="logopublicpayment">';
149 print
'<img id="dolpaymentlogo" src="'.$urllogo.
'"';
153 print
'<div class="poweredbypublicpayment opacitymedium right"><a class="poweredbyhref" href="https://www.dolibarr.org?utm_medium=website&utm_source=poweredby" target="dolibarr" rel="noopener">'.$langs->trans(
"PoweredBy").
'<br><img class="poweredbyimg" src="'.DOL_URL_ROOT.
'/theme/dolibarr_logo.svg" width="80px"></a></div>';
159 print
'<div class="backimagepublicsuggestbooth">';
160 print
'<img id="idPROJECT_IMAGE_PUBLIC_SUGGEST_BOOTH" src="' .
getDolGlobalString(
'PROJECT_IMAGE_PUBLIC_SUGGEST_BOOTH').
'">';
166 print
'<div class="divmainbodylarge">';
190 $parameters = array();
192 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $project, $action);
198 if (empty($reshook) && $action ==
'add') {
207 $errmsg .= $langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Name")).
"<br>\n";
211 $errmsg .= $langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Email")).
"<br>\n";
213 if (!
GETPOST(
"country_id") && !empty((
float) $project->price_booth)) {
215 $errmsg .= $langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Country")).
"<br>\n";
219 $errmsg .= $langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Societe")).
"<br>\n";
223 $errmsg .= $langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Label")).
"<br>\n";
227 $errmsg .= $langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Note")).
"<br>\n";
231 $langs->load(
"errors");
232 $errmsg .= $langs->trans(
"ErrorBadEMail",
GETPOST(
"email")).
"<br>\n";
237 $thirdparty =
new Societe($db);
238 $resultfetchthirdparty = $thirdparty->fetch(
'', $societe);
240 if ($resultfetchthirdparty < 0) {
243 $errmsg .= $thirdparty->error;
244 $errors = array_merge($errors, $thirdparty->errors);
245 } elseif ($resultfetchthirdparty == 0) {
247 $genericcompanyname =
'Unknown company';
249 if (!empty($societe)) {
250 $thirdparty->name = $societe;
252 $thirdparty->name = $genericcompanyname;
254 $thirdparty->address =
GETPOST(
"address");
255 $thirdparty->zip =
GETPOST(
"zipcode");
256 $thirdparty->town =
GETPOST(
"town");
257 $thirdparty->client = $thirdparty::PROSPECT;
258 $thirdparty->fournisseur = 0;
259 $thirdparty->country_id =
GETPOSTINT(
"country_id");
260 $thirdparty->state_id =
GETPOSTINT(
"state_id");
261 $thirdparty->email = ($emailcompany ? $emailcompany : $email);
265 if (substr($module, 0, 15) ==
'mod_codeclient_' && substr($module, -3) ==
'php') {
266 $module = substr($module, 0,
dol_strlen($module) - 4);
268 $dirsociete = array_merge(array(
'/core/modules/societe/'), $conf->modules_parts[
'societe']);
269 foreach ($dirsociete as $dirroot) {
275 $modCodeClient =
new $module($db);
277 if (empty($tmpcode) && !empty($modCodeClient->code_auto)) {
278 $tmpcode = $modCodeClient->getNextValue($thirdparty, 0);
280 $thirdparty->code_client = $tmpcode;
281 $readythirdparty = $thirdparty->create($user);
282 if ($readythirdparty < 0) {
284 $errmsg .= $thirdparty->error;
285 $errors = array_merge($errors, $thirdparty->errors);
287 $thirdparty->country_code =
getCountry($thirdparty->country_id, 2, $db, $langs);
288 $thirdparty->country =
getCountry($thirdparty->country_code, 0, $db, $langs);
294 $resultcontact = $contact->fetch(
'',
'',
'', $email);
295 if ($resultcontact <= 0) {
297 $contact->socid = $thirdparty->id;
298 $contact->lastname = (string)
GETPOST(
"lastname",
'alpha');
299 $contact->firstname = (string)
GETPOST(
"firstname",
'alpha');
300 $contact->address = (string)
GETPOST(
"address",
'alpha');
301 $contact->zip = (string)
GETPOST(
"zipcode",
'alpha');
302 $contact->town = (string)
GETPOST(
"town",
'alpha');
303 $contact->country_id =
GETPOSTINT(
"country_id");
305 $contact->email = $email;
306 $contact->statut = 1;
308 $resultcreatecontact = $contact->create($user);
309 if ($resultcreatecontact < 0) {
311 $errmsg .= $contact->error;
320 $resultcategory = $category->fetch(
getDolGlobalString(
'EVENTORGANIZATION_CATEG_THIRDPARTY_BOOTH'));
322 if ($resultcategory <= 0) {
324 $errmsg .= $category->error;
326 $resultsetcategory = $thirdparty->setCategoriesCommon(array($category->id), Categorie::TYPE_CUSTOMER,
false);
327 if ($resultsetcategory < 0) {
329 $errmsg .= $thirdparty->error;
331 $thirdparty->fournisseur = 1;
335 if (substr($module, 0, 15) ==
'mod_codeclient_' && substr($module, -3) ==
'php') {
336 $module = substr($module, 0,
dol_strlen($module) - 4);
338 $dirsociete = array_merge(array(
'/core/modules/societe/'), $conf->modules_parts[
'societe']);
339 foreach ($dirsociete as $dirroot) {
345 $modCodeFournisseur =
new $module($db);
346 if (empty($tmpcode) && !empty($modCodeFournisseur->code_auto)) {
347 $tmpcode = $modCodeFournisseur->getNextValue($thirdparty, 1);
349 $thirdparty->code_fournisseur = $tmpcode;
351 $res = $thirdparty->update(0, $user, 1, 1, 1);
363 $conforbooth->label = $label;
364 $conforbooth->fk_soc = $thirdparty->id;
365 $conforbooth->fk_project = $project->id;
366 $conforbooth->note = $note;
367 $conforbooth->fk_action = $eventtype;
368 $conforbooth->datep = $datestart;
369 $conforbooth->datep2 = $dateend;
370 $conforbooth->datec =
dol_now();
374 $nb_post_max =
getDolGlobalInt(
"MAIN_SECURITY_MAX_POST_ON_PUBLIC_PAGES_BY_IP_ADDRESS", 200);
380 if ($nb_post_max > 0) {
381 $sql =
"SELECT COUNT(ref) as nb_confs";
382 $sql .=
" FROM ".MAIN_DB_PREFIX.
"actioncomm";
383 $sql .=
" WHERE ip = '".$db->escape($conforbooth->ip).
"'";
384 $sql .=
" AND datec > '".$db->idate($minmonthpost).
"'";
385 $resql = $db->query(
$sql);
387 $num = $db->num_rows($resql);
391 $obj = $db->fetch_object($resql);
392 $nb_post_ip = $obj->nb_confs;
397 $resultconforbooth = 0;
399 if ($nb_post_max > 0 && $nb_post_ip >= $nb_post_max) {
401 $errmsg .= $langs->trans(
"AlreadyTooMuchPostOnThisIPAdress");
402 array_push($conforbooth->errors, $langs->trans(
"AlreadyTooMuchPostOnThisIPAdress"));
405 $resultconforbooth = $conforbooth->create($user);
407 if ($resultconforbooth <= 0) {
409 $errmsg .= $conforbooth->error;
412 $resultaddcontact = $conforbooth->add_contact($contact->id,
'RESPONSIBLE');
413 if ($resultaddcontact < 0) {
415 $errmsg .= $conforbooth->error;
418 if (!empty((
float) $project->price_booth)) {
419 $productforinvoicerow =
new Product($db);
420 $resultprod = $productforinvoicerow->fetch(
getDolGlobalString(
'SERVICE_BOOTH_LOCATION'));
421 if ($resultprod < 0) {
423 $errmsg .= $productforinvoicerow->error;
427 $facture->socid = $thirdparty->id;
430 $facture->cond_reglement_id = $contact->cond_reglement_id;
431 $facture->fk_project = $project->id;
433 if (empty($facture->cond_reglement_id)) {
434 $paymenttermstatic =
new PaymentTerm($contact->db);
435 $facture->cond_reglement_id = $paymenttermstatic->getDefaultId();
436 if (empty($facture->cond_reglement_id)) {
438 $contact->error =
'ErrorNoPaymentTermRECEPFound';
439 $contact->errors[] = $contact->error;
442 $resultfacture = $facture->create($user);
443 if ($resultfacture <= 0) {
444 $contact->error = $facture->error;
445 $contact->errors = $facture->errors;
449 $facture->add_object_linked($conforbooth->element, $conforbooth->id);
455 $vattouse =
get_default_tva($mysoc, $thirdparty, $productforinvoicerow->id);
456 $result = $facture->addline($langs->trans(
"BoothLocationFee", $conforbooth->label,
dol_print_date($conforbooth->datep,
'%d/%m/%y %H:%M:%S'),
dol_print_date($conforbooth->datep2,
'%d/%m/%y %H:%M:%S')), (
float) $project->price_booth, 1, $vattouse, 0, 0, $productforinvoicerow->id, 0,
dol_now(),
'', 0, 0,
'',
'HT', 0, 1);
458 $contact->error = $facture->error;
459 $contact->errors = $facture->errors;
480 $conforbooth->status = ConferenceOrBooth::STATUS_SUGGESTED;
481 $conforbooth->update($user);
492 require_once DOL_DOCUMENT_ROOT.
'/core/class/CMailFile.class.php';
493 include_once DOL_DOCUMENT_ROOT.
'/core/class/html.formmail.class.php';
497 $outputlangs->setDefaultLang(empty($thirdparty->default_lang) ? $mysoc->default_lang : $thirdparty->default_lang);
499 $outputlangs->loadLangs(array(
"main",
"members",
"eventorganization"));
501 $arraydefaultmessage =
null;
504 if (!empty($labeltouse)) {
505 $arraydefaultmessage = $formmail->getEMailTemplate($db,
'conferenceorbooth', $user, $outputlangs, $labeltouse, 1,
'');
508 if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) {
509 $subject = $arraydefaultmessage->topic;
510 $msg = $arraydefaultmessage->content;
519 $sendto = $thirdparty->email;
521 $urlback = $_SERVER[
"REQUEST_URI"];
522 $trackid =
'proj'.$project->id;
526 $mailfile =
new CMailFile($subjecttosend, $sendto, $from, $texttosend, array(), array(), array(),
'',
'', 0, $ishtml,
'',
'', $trackid);
528 $result = $mailfile->sendfile();
530 dol_syslog(
"EMail sent to ".$sendto, LOG_DEBUG, 0,
'_payment');
532 dol_syslog(
"Failed to send EMail to ".$sendto, LOG_ERR, 0,
'_payment');
536 $redirection = $dolibarr_main_url_root.
'/public/eventorganization/subscriptionok.php?id='.$id.
'&securekey='.$securekeyurl;
537 header(
"Location: ".$redirection);
549 $form =
new Form($db);
555 print
'<div align="center">';
556 print
'<div id="divsubscribe">';
561 print
'<div class="center subscriptionformbanner subbanner justify margintoponly paddingtop marginbottomonly padingbottom">';
562 print
load_fiche_titre($langs->trans(
"NewSuggestionOfBooth"),
'',
'', 0, 0,
'center');
564 print
'<span class="opacitymedium">'.$langs->trans(
"EvntOrgRegistrationWelcomeMessage").
'</span>';
567 print
'<span class="eventlabel large">'.dol_escape_htmltag($project->title .
' '. $project->label).
'</span><br>';
572 print
'<div class="justify subscriptionformhelptext">';
574 if ($project->date_start_event || $project->date_end_event) {
575 print
'<br><span class="fa fa-calendar pictofixedwidth opacitymedium"></span>';
577 if ($project->date_start_event) {
579 $tmparray =
dol_getdate($project->date_start_event,
false,
'');
580 if ($tmparray[
'hours'] || $tmparray[
'minutes'] || $tmparray[
'minutes']) {
585 if ($project->date_start_event && $project->date_end_event) {
588 if ($project->date_end_event) {
590 $tmparray =
dol_getdate($project->date_end_event,
false,
'');
591 if ($tmparray[
'hours'] || $tmparray[
'minutes'] || $tmparray[
'minutes']) {
596 if ($project->date_start_event || $project->date_end_event) {
599 if ($project->location) {
600 print
'<span class="fa fa-map-marked-alt pictofixedwidth opacitymedium"></span>'.dol_escape_htmltag($project->location).
'<br>';
602 if ($project->note_public) {
603 print
'<br><span class="opacitymedium">'.dol_htmlentitiesbr($project->note_public).
'</span><br>';
614 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST" name="newmember">'.
"\n";
615 print
'<input type="hidden" name="token" value="'.newToken().
'" / >';
616 print
'<input type="hidden" name="entity" value="'.$entity.
'" />';
617 print
'<input type="hidden" name="action" value="add" />';
618 print
'<input type="hidden" name="id" value="'.$id.
'" />';
619 print
'<input type="hidden" name="securekey" value="'.$securekeyreceived.
'" />';
622 print
'<br><span class="opacitymedium">'.$langs->trans(
"FieldsWithAreMandatory",
'*').
'</span><br>';
627 print
'<script type="text/javascript">
628 jQuery(document).ready(function () {
629 jQuery(document).ready(function () {
630 jQuery("#selectcountry_id").change(function() {
631 document.newmember.action.value="create";
632 document.newmember.submit();
638 print
'<table class="border" summary="form to subscribe" id="tablesubscribe">'.
"\n";
641 print
'<tr><td><label for="lastname">'.$langs->trans(
"Lastname").
'<span class="star">*</span></label></td>';
642 print
'<td colspan="3"><input name="lastname" id="lastname" type="text" class="maxwidth100onsmartphone" maxlength="80" value="'.dol_escape_htmltag(
GETPOST(
"lastname",
'alpha') ?
GETPOST(
"lastname",
'alpha') :
$object->lastname).
'" autofocus="autofocus"></td>';
645 print
'<tr><td>'.$langs->trans(
"Email").
'<span class="star">*</span></td><td><input type="text" name="email" maxlength="255" class="minwidth150" value="'.
dol_escape_htmltag(
GETPOST(
'email')).
'"></td></tr>'.
"\n";
647 print
'<tr id="trcompany" class="trcompany"><td>'.$langs->trans(
"Company").
'<span class="star">*</span>';
648 print
' </td><td><input type="text" name="societe" class="minwidth150" value="'.dol_escape_htmltag(
GETPOST(
'societe')).
'"></td></tr>'.
"\n";
650 print
'<tr><td>'.$langs->trans(
"Address").
'</td><td>'.
"\n";
651 print
'<textarea name="address" id="address" wrap="soft" class="quatrevingtpercent" rows="'.ROWS_3.
'">'.
dol_escape_htmltag(
GETPOST(
'address',
'restricthtml'), 0, 1).
'</textarea></td></tr>'.
"\n";
653 print
'<tr><td>'.$langs->trans(
'Zip').
' / '.$langs->trans(
'Town').
'</td><td>';
654 print $formcompany->select_ziptown(
GETPOST(
'zipcode'),
'zipcode', array(
'town',
'selectcountry_id',
'state_id'), 6, 1);
656 print $formcompany->select_ziptown(
GETPOST(
'town'),
'town', array(
'zipcode',
'selectcountry_id',
'state_id'), 0, 1);
659 print
'<tr><td>'.$langs->trans(
'Country');
660 print
'<span class="star">*</span>';
662 $country_id =
GETPOST(
'country_id');
664 $country_id =
getCountry($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE, 2, $db, $langs);
666 if (!$country_id && !empty($conf->geoipmaxmind->enabled)) {
670 $new_country_id =
getCountry($country_code, 3, $db, $langs);
672 if ($new_country_id) {
673 $country_id = $new_country_id;
677 $country_code =
getCountry($country_id, 2, $db, $langs);
678 print $form->select_country($country_id,
'country_id');
682 print
'<tr><td>'.$langs->trans(
'State').
'</td><td>';
684 print $formcompany->select_state(
GETPOST(
"state_id"), $country_code);
691 print
'<tr><td>'.$langs->trans(
"Format").
'<span class="star">*</span></td>'.
"\n";
692 print
'<td>'.Form::selectarray(
'eventtype', $arrayofconfboothtype, $eventtype, 1).
'</td>';
694 print
'<tr><td>'.$langs->trans(
"LabelOfBooth").
'<span class="star">*</span></td>'.
"\n";
695 print
'</td><td><input type="text" name="label" class="minwidth150" value="'.dol_escape_htmltag(
GETPOST(
'label')).
'"></td></tr>'.
"\n";
697 print
'<tr><td>'.$langs->trans(
"Description").
'<span class="star">*</span></td>'.
"\n";
698 print
'<td><textarea name="note" id="note" wrap="soft" class="quatrevingtpercent" rows="'.ROWS_3.
'">'.
dol_escape_htmltag(
GETPOST(
'note',
'restricthtml'), 0, 1).
'</textarea></td></tr>'.
"\n";
706 print
'<div class="center">';
708 print
'<input type="submit" value="'.$langs->trans(
"SuggestBooth").
'" name="suggestbooth" id="suggestbooth" class="button">';
715 print
'</div></div>';
if($user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Class to manage different types of events.
Class to send emails (with attachments or not) Usage: $mailfile = new CMailFile($subject,...
Class to manage categories.
Class for ConferenceOrBooth.
Class to manage invoices.
const TYPE_STANDARD
Standard invoice.
Class to manage payment terms records in dictionary.
Class to manage products or services.
Class to manage projects.
Class to manage third parties objects (customers, suppliers, prospects...)
Class to manage translations.
getCountry($searchkey, $withcode='', $dbtouse=null, $outputlangs=null, $entconv=1, $searchlabel='')
Return country label, code or id from an id, code or label.
if(isModEnabled('invoice') && $user->hasRight('facture', 'lire')) if((isModEnabled('fournisseur') &&!getDolGlobalString('MAIN_USE_NEW_SUPPLIERMOD') && $user->hasRight("fournisseur", "facture", "lire"))||(isModEnabled('supplier_invoice') && $user->hasRight("supplier_invoice", "lire"))) if(isModEnabled('don') && $user->hasRight('don', 'lire')) if(isModEnabled('tax') && $user->hasRight('tax', 'charges', 'lire')) if(isModEnabled('invoice') &&isModEnabled('order') && $user->hasRight("commande", "lire") &&!getDolGlobalString('WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER')) $sql
Social contributions to pay.
dol_time_plus_duree($time, $duration_value, $duration_unit, $ruleforendofmonth=0)
Add a delay to a date.
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed information (by default a local PHP server timestamp) Rep...
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
dol_user_country()
Return country code for current user.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
setEventMessage($mesgs, $style='mesgs', $noduplicate=0)
Set event message in dol_events session object.
printCommonFooter($zone='private')
Print common footer : conf->global->MAIN_HTML_FOOTER js for switch of menu hider js for conf->global-...
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
if(!function_exists('dol_getprefix')) dol_include_once($relpath, $classname='')
Make an include_once using default root and alternate root if it fails.
dol_now($mode='auto')
Return date for now.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
complete_substitutions_array(&$substitutionarray, $outputlangs, $object=null, $parameters=null, $callfunc="completesubstitutionarray")
Complete the $substitutionarray with more entries coming from external module that had set the "subst...
make_substitutions($text, $substitutionarray, $outputlangs=null, $converttextinhtmlifnecessary=0)
Make substitution into a text string, replacing keys with vals from $substitutionarray (oldval=>newva...
dol_textishtml($msg, $option=0)
Return if a text is a html content.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
getCommonSubstitutionArray($outputlangs, $onlykey=0, $exclude=null, $object=null, $include=null)
Return array of possible common substitutions.
isValidEmail($address, $acceptsupervisorkey=0, $acceptuserkey=0)
Return true if email syntax is ok.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
getUserRemoteIP()
Return the IP of remote user.
get_default_tva(Societe $thirdparty_seller, Societe $thirdparty_buyer, $idprod=0, $idprodfournprice=0)
Function that return vat rate of a product line (according to seller, buyer and product vat rate) VAT...
dol_htmloutput_errors($mesgstring='', $mesgarray=array(), $keepembedded=0)
Print formatted error messages to output (Used to show messages on html output).
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
dol_getdate($timestamp, $fast=false, $forcetimezone='')
Return an array with locale date info.
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...
top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs=array(), $arrayofcss=array(), $disableforlogin=0, $disablenofollow=0, $disablenoindex=0)
Output html header of a page.
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)
Returns a hash (non reversible encryption) of a string.
if(empty($conf->eventorganization->enabled)) llxHeaderVierge($title, $head="", $disablejs=0, $disablehead=0, $arrayofjs=[], $arrayofcss=[])
Show header for new member.
llxFooterVierge()
Show footer for new member.