24 if (!defined(
'NOLOGIN')) {
27 if (!defined(
'NOCSRFCHECK')) {
28 define(
"NOCSRFCHECK", 1);
30 if (!defined(
'NOIPCHECK')) {
31 define(
'NOIPCHECK',
'1');
33 if (!defined(
'NOBROWSERNOTIF')) {
34 define(
'NOBROWSERNOTIF',
'1');
36 if (!defined(
'NOIPCHECK')) {
37 define(
'NOIPCHECK',
'1');
43 $entity = (!empty($_GET[
'entity']) ? (int) $_GET[
'entity'] : (!empty($_POST[
'entity']) ? (int) $_POST[
'entity'] : 1));
44 if (is_numeric($entity)) {
45 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.
'/eventorganization/class/conferenceorboothattendee.class.php';
53 require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
54 require_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
55 require_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/paymentterm.class.php';
56 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
57 require_once DOL_DOCUMENT_ROOT.
'/contact/class/contact.class.php';
59 global $dolibarr_main_url_root;
65 $backtopage =
GETPOST(
'backtopage',
'alpha');
66 $action =
GETPOST(
'action',
'aZ09');
70 $emailcompany =
GETPOST(
"emailcompany");
71 $note_public =
GETPOST(
'note_public',
"restricthtml");
74 $type =
GETPOST(
'type',
'aZ09');
75 if ($type ==
'conf') {
84 if ($type ==
'conf') {
85 $resultconf = $conference->fetch($id);
86 if ($resultconf < 0) {
87 print
'Bad value for parameter id';
90 $resultproject = $project->fetch($conference->fk_project);
91 if ($resultproject < 0) {
93 $errmsg .= $project->error;
94 $errors = array_merge($errors, $project->errors);
98 $currentnbofattendees = 0;
99 if ($type ==
'global') {
100 $resultproject = $project->fetch($id);
101 if ($resultproject < 0) {
103 $errmsg .= $project->error;
104 $errors = array_merge($errors, $project->errors);
106 $sql =
"SELECT COUNT(*) as nb FROM ".MAIN_DB_PREFIX.
"projet";
107 $sql .=
" WHERE ".MAIN_DB_PREFIX.
"eventorganization_conferenceorboothattendee = ".((int) $project->id);
111 $obj = $db->fetch_object(
$resql);
113 $currentnbofattendees = $obj->nb;
120 $securekeyreceived =
GETPOST(
'securekey',
'alpha');
121 $securekeytocompare =
dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.
'conferenceorbooth'.$id,
'md5');
124 if ($securekeytocompare != $securekeyreceived) {
125 print $langs->trans(
'MissingOrBadSecureKey');
130 $langs->loadLangs(array(
"main",
"companies",
"install",
"other",
"eventorganization"));
133 $hookmanager->initHooks(array(
'publicnewmembercard',
'globalcard'));
137 $user->loadDefaultValues();
140 if (empty($conf->eventorganization->enabled)) {
156 function llxHeaderVierge($title, $head =
"", $disablejs = 0, $disablehead = 0, $arrayofjs =
'', $arrayofcss =
'')
158 global $user, $conf, $langs, $mysoc;
160 top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
162 print
'<body id="mainbody" class="publicnewmemberform">';
165 $urllogo = DOL_URL_ROOT.
'/theme/common/login_logo.png';
167 if (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.
'/logos/thumbs/'.$mysoc->logo_small)) {
168 $urllogo = DOL_URL_ROOT.
'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode(
'logos/thumbs/'.$mysoc->logo_small);
169 } elseif (!empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.
'/logos/'.$mysoc->logo)) {
170 $urllogo = DOL_URL_ROOT.
'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode(
'logos/'.$mysoc->logo);
171 } elseif (is_readable(DOL_DOCUMENT_ROOT.
'/theme/dolibarr_logo.svg')) {
172 $urllogo = DOL_URL_ROOT.
'/theme/dolibarr_logo.svg';
175 print
'<div class="center">';
178 print
'<div class="backgreypublicpayment">';
179 print
'<div class="logopublicpayment">';
180 print
'<img id="dolpaymentlogo" src="'.$urllogo.
'"';
183 if (empty($conf->global->MAIN_HIDE_POWERED_BY)) {
184 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>';
189 if (!empty($conf->global->EVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE)) {
190 print
'<div class="backimagepubliceventorganizationsubscription">';
191 print
'<img id="idEVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE" src="'.$conf->global->EVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE.
'">';
197 print
'<div class="divmainbodylarge">';
221 $parameters = array();
223 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
229 if (empty($reshook) && $action ==
'add' && (!empty($conference->id) && $conference->status!=2 || !empty($project->id) && $project->status ==
Project::STATUS_VALIDATED)) {
238 $errmsg .= $langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Email")).
"<br>\n";
241 if (!
GETPOST(
"societe") && !empty(floatval($project->price_registration))) {
243 $errmsg .= $langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Company")).
"<br>\n";
247 $langs->load(
"errors");
248 $errmsg .= $langs->trans(
"ErrorBadEMail",
GETPOST(
"email")).
"<br>\n";
252 $errmsg .= $langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Country")).
"<br>\n";
259 if ($type ==
'global') {
260 $filter = array(
't.fk_project'=>((
int) $id),
'customsql'=>
't.email="'.$db->escape($email).
'"');
262 if ($action ==
'conf') {
263 $filter = array(
't.fk_actioncomm'=>((
int) $id),
'customsql'=>
't.email="'.$db->escape($email).
'"');
267 $resultfetchconfattendee = $confattendee->fetchAll(
'',
'', 0, 0, $filter);
269 if (is_array($resultfetchconfattendee) && count($resultfetchconfattendee) > 0) {
271 $confattendee = array_shift($resultfetchconfattendee);
274 $confattendee->date_creation =
dol_now();
275 $confattendee->date_subscription =
dol_now();
276 $confattendee->email = $email;
277 $confattendee->fk_project = $project->id;
278 $confattendee->fk_actioncomm = $id;
279 $confattendee->note_public = $note_public;
281 $resultconfattendee = $confattendee->create($user);
282 if ($resultconfattendee < 0) {
284 $errmsg .= $confattendee->error;
285 $errors = array_merge($errors, $confattendee->errors);
293 if (!empty($confattendee->date_subscription) && !empty($confattendee->amount)) {
294 $securekeyurl =
dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.
'conferenceorbooth'.$id,
'master');
295 $redirection = $dolibarr_main_url_root.
'/public/eventorganization/subscriptionok.php?id='.((int) $id).
'&securekey='.urlencode($securekeyurl);
297 $mesg = $langs->trans(
"RegistrationAndPaymentWereAlreadyRecorded", $email);
302 Header(
"Location: ".$redirection);
306 $resultfetchthirdparty = 0;
308 $genericcompanyname = $langs->trans(
'EventParticipant').
' '.($emailcompany ? $emailcompany : $email);
311 $thirdparty =
new Societe($db);
314 if (!empty($confattendee->fk_soc) && $confattendee->fk_soc > 0) {
315 $resultfetchthirdparty = $thirdparty->fetch($confattendee->fk_soc);
317 if (empty($conf->global->EVENTORGANIZATION_DISABLE_RETREIVE_THIRDPARTY_FROM_NAME)) {
319 if ($resultfetchthirdparty <= 0 && !empty($societe) && !empty($emailcompany)) {
320 $resultfetchthirdparty = $thirdparty->fetch(
'', $societe,
'',
'',
'',
'',
'',
'',
'',
'', $emailcompany);
321 if ($resultfetchthirdparty > 0) {
323 $confattendee->fk_soc = $thirdparty->id;
324 $confattendee->update($user);
325 } elseif ($resultfetchthirdparty == -2) {
326 $thirdparty->error = $langs->trans(
"ErrorSeveralCompaniesWithNameContactUs", $mysoc->email);
330 if ($resultfetchthirdparty <= 0 && !empty($societe) && !empty($email) && $email != $emailcompany) {
331 $resultfetchthirdparty = $thirdparty->fetch(
'', $societe,
'',
'',
'',
'',
'',
'',
'',
'', $email);
332 if ($resultfetchthirdparty > 0) {
334 $confattendee->fk_soc = $thirdparty->id;
335 $confattendee->update($user);
336 } elseif ($resultfetchthirdparty == -2) {
337 $thirdparty->error = $langs->trans(
"ErrorSeveralCompaniesWithNameContactUs", $mysoc->email);
341 if ($resultfetchthirdparty <= 0 && !empty($emailcompany)) {
343 $resultfetchthirdparty = $thirdparty->fetch(
'',
'',
'',
'',
'',
'',
'',
'',
'',
'', $emailcompany);
344 if ($resultfetchthirdparty > 0) {
346 $confattendee->fk_soc = $thirdparty->id;
347 $confattendee->update($user);
348 } elseif ($resultfetchthirdparty == -2) {
349 $thirdparty->error = $langs->trans(
"ErrorSeveralCompaniesWithEmailContactUs", $mysoc->email);
352 if ($resultfetchthirdparty <= 0 && !empty($email) && $email != $emailcompany) {
354 $resultfetchthirdparty = $thirdparty->fetch(
'',
'',
'',
'',
'',
'',
'',
'',
'',
'', $email);
355 if ($resultfetchthirdparty > 0) {
357 $confattendee->fk_soc = $thirdparty->id;
358 $confattendee->update($user);
359 } elseif ($resultfetchthirdparty == -2) {
360 $thirdparty->error = $langs->trans(
"ErrorSeveralCompaniesWithEmailContactUs", $mysoc->email);
363 if ($resultfetchthirdparty <= 0 && !empty($genericcompanyname)) {
365 $resultfetchthirdparty = $thirdparty->fetch(
'', $genericcompanyname,
'',
'',
'',
'',
'',
'',
'',
'',
'');
366 if ($resultfetchthirdparty > 0) {
368 $confattendee->fk_soc = $thirdparty->id;
369 $confattendee->update($user);
370 } elseif ($resultfetchthirdparty == -2) {
371 $thirdparty->error = $langs->trans(
"ErrorSeveralCompaniesWithNameContactUs", $mysoc->email);
377 if ($resultfetchthirdparty <= 0 && !empty($email)) {
379 $resultfetchcontact = $contact->fetch(
'', null,
'', $email);
380 if ($resultfetchcontact > 0 && $contact->fk_soc > 0) {
381 $thirdparty->fetch($contact->fk_soc);
382 $confattendee->fk_soc = $thirdparty->id;
383 $confattendee->update($user);
384 $resultfetchthirdparty = 1;
388 if ($resultfetchthirdparty <= 0 && !empty($societe)) {
390 $resultfetchthirdparty = $thirdparty->fetch(
'', $societe,
'',
'',
'',
'',
'',
'',
'',
'',
'');
391 if ($resultfetchthirdparty > 0) {
393 $confattendee->fk_soc = $thirdparty->id;
394 $confattendee->update($user);
395 } elseif ($resultfetchthirdparty == -2) {
396 $thirdparty->error =
"ErrorSeveralCompaniesWithNameContactUs";
402 if (empty(floatval($project->price_registration))) {
403 $resultfetchthirdparty = 1;
406 if ($resultfetchthirdparty < 0) {
409 $errmsg .= $thirdparty->error;
410 $errors = array_merge($errors, $thirdparty->errors);
411 } elseif ($resultfetchthirdparty == 0) {
413 if (!empty($societe)) {
414 $thirdparty->name = $societe;
416 $thirdparty->name = $genericcompanyname;
418 $thirdparty->address =
GETPOST(
"address");
419 $thirdparty->zip =
GETPOST(
"zipcode");
420 $thirdparty->town =
GETPOST(
"town");
421 $thirdparty->client = $thirdparty::PROSPECT;
422 $thirdparty->fournisseur = 0;
423 $thirdparty->country_id =
GETPOST(
"country_id",
'int');
424 $thirdparty->state_id =
GETPOST(
"state_id",
'int');
425 $thirdparty->email = ($emailcompany ? $emailcompany : $email);
428 $module = (!empty($conf->global->SOCIETE_CODECLIENT_ADDON) ? $conf->global->SOCIETE_CODECLIENT_ADDON :
'mod_codeclient_leopard');
429 if (substr($module, 0, 15) ==
'mod_codeclient_' && substr($module, -3) ==
'php') {
430 $module = substr($module, 0,
dol_strlen($module) - 4);
432 $dirsociete = array_merge(array(
'/core/modules/societe/'), $conf->modules_parts[
'societe']);
433 foreach ($dirsociete as $dirroot) {
439 $modCodeClient =
new $module($db);
441 if (empty($tmpcode) && !empty($modCodeClient->code_auto)) {
442 $tmpcode = $modCodeClient->getNextValue($thirdparty, 0);
444 $thirdparty->code_client = $tmpcode;
445 $readythirdparty = $thirdparty->create($user);
446 if ($readythirdparty < 0) {
448 $errmsg .= $thirdparty->error;
449 $errors = array_merge($errors, $thirdparty->errors);
451 $thirdparty->country_code =
getCountry($thirdparty->country_id, 2, $db, $langs);
452 $thirdparty->country =
getCountry($thirdparty->country_code, 0, $db, $langs);
455 $confattendee->fk_soc = $thirdparty->id;
456 $confattendee->update($user);
463 if (!empty(floatval($project->price_registration))) {
464 $outputlangs = $langs;
469 $productforinvoicerow =
new Product($db);
470 $productforinvoicerow->id = 0;
473 if ($conf->global->SERVICE_CONFERENCE_ATTENDEE_SUBSCRIPTION > 0) {
474 $resultprod = $productforinvoicerow->fetch($conf->global->SERVICE_CONFERENCE_ATTENDEE_SUBSCRIPTION);
478 if ($resultprod < 0) {
480 $errmsg .= $productforinvoicerow->error;
481 $errors = array_merge($errors, $productforinvoicerow->errors);
484 if (empty($confattendee->fk_invoice)) {
486 $facture->socid = $thirdparty->id;
489 $facture->cond_reglement_id = $confattendee->cond_reglement_id;
490 $facture->fk_project = $project->id;
493 if (empty($facture->cond_reglement_id)) {
494 $paymenttermstatic =
new PaymentTerm($confattendee->db);
495 $facture->cond_reglement_id = $paymenttermstatic->getDefaultId();
496 if (empty($facture->cond_reglement_id)) {
498 $confattendee->error =
'ErrorNoPaymentTermRECEPFound';
499 $confattendee->errors[] = $confattendee->error;
502 $resultfacture = $facture->create($user);
503 if ($resultfacture <= 0) {
504 $confattendee->error = $facture->error;
505 $confattendee->errors = $facture->errors;
508 $confattendee->fk_invoice = $resultfacture;
509 $confattendee->update($user);
512 $facture->fetch($confattendee->fk_invoice);
523 $vattouse =
get_default_tva($mysoc, $thirdparty, $productforinvoicerow->id);
525 $labelforproduct = $outputlangs->trans(
"EventFee", $project->title);
526 $date_start = $project->date_start;
527 $date_end = $project->date_end;
530 if (empty($facture->lines)) {
531 $result = $facture->addline($labelforproduct, floatval($project->price_registration), 1, $vattouse, 0, 0, $productforinvoicerow->id, 0, $date_start, $date_end, 0, 0,
'',
'HT', 0, 1);
533 $confattendee->error = $facture->error;
534 $confattendee->errors = $facture->errors;
549 $sourcetouse =
'organizedeventregistration';
550 $reftouse = $facture->id;
551 $redirection = $dolibarr_main_url_root.
'/public/payment/newpayment.php?source='.urlencode($sourcetouse).
'&ref='.urlencode($reftouse);
552 if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) {
553 if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) {
554 $redirection .=
'&securekey='.dol_hash($conf->global->PAYMENT_SECURITY_TOKEN . $sourcetouse . $reftouse, 2);
556 $redirection .=
'&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN);
560 Header(
"Location: ".$redirection);
570 $confattendee->setStatut(1);
573 require_once DOL_DOCUMENT_ROOT.
'/core/class/CMailFile.class.php';
574 include_once DOL_DOCUMENT_ROOT.
'/core/class/html.formmail.class.php';
578 $outputlangs->setDefaultLang(empty($thirdparty->default_lang) ? $mysoc->default_lang : $thirdparty->default_lang);
580 $outputlangs->loadLangs(array(
"main",
"members"));
582 $arraydefaultmessage = null;
584 $labeltouse = $conf->global->EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_EVENT;
585 if (!empty($labeltouse)) {
586 $arraydefaultmessage = $formmail->getEMailTemplate($db,
'eventorganization_send', $user, $outputlangs, $labeltouse, 1,
'');
589 if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) {
590 $subject = $arraydefaultmessage->topic;
591 $msg = $arraydefaultmessage->content;
600 $sendto = $thirdparty->email;
601 $from = $conf->global->MAILING_EMAIL_FROM;
602 $urlback = $_SERVER[
"REQUEST_URI"];
606 $mailfile =
new CMailFile($subjecttosend, $sendto, $from, $texttosend, array(), array(), array(),
'',
'', 0, $ishtml);
608 $result = $mailfile->sendfile();
610 dol_syslog(
"EMail sent to ".$sendto, LOG_DEBUG, 0,
'_payment');
612 dol_syslog(
"Failed to send EMail to ".$sendto, LOG_ERR, 0,
'_payment');
615 $securekeyurl =
dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.
'conferenceorbooth'.$id, 2);
616 $redirection = $dolibarr_main_url_root.
'/public/eventorganization/subscriptionok.php?id='.((int) $id).
'&securekey='.urlencode($securekeyurl);
618 Header(
"Location: ".$redirection);
639 print
load_fiche_titre($langs->trans(
"NewRegistration"),
'',
'', 0, 0,
'center');
642 print
'<div align="center">';
643 print
'<div id="divsubscribe">';
644 print
'<div class="center subscriptionformhelptext justify">';
648 print $langs->trans(
"EvntOrgWelcomeMessage", $project->title .
' '. $conference->label);
651 if ($conference->id) {
652 print $langs->trans(
"Date").
': ';
654 if ($conference->date_end) {
659 print $langs->trans(
"Date").
': ';
661 if ($project->date_end) {
665 $maxattendees = $project->max_attendees;
669 if ($maxattendees && $currentnbofattendees >= $maxattendees) {
671 print
'<div class="warning">'.$langs->trans(
"MaxNbOfAttendeesReached").
'</div>';
680 if ((!empty($conference->id) && $conference->status == ConferenceOrBooth::STATUS_CONFIRMED) || (!empty($project->id) && $project->status ==
Project::STATUS_VALIDATED)) {
681 if (empty($maxattendees) || $currentnbofattendees < $maxattendees) {
683 print
'<form action="' . $_SERVER[
"PHP_SELF"] .
'" method="POST" name="newmember">' .
"\n";
684 print
'<input type="hidden" name="token" value="' .
newToken() .
'" / >';
685 print
'<input type="hidden" name="entity" value="' . $entity .
'" />';
686 print
'<input type="hidden" name="action" value="add" />';
687 print
'<input type="hidden" name="type" value="' . $type .
'" />';
688 print
'<input type="hidden" name="id" value="' . $conference->id .
'" />';
689 print
'<input type="hidden" name="fk_project" value="' . $project->id .
'" />';
690 print
'<input type="hidden" name="securekey" value="' . $securekeyreceived .
'" />';
694 print
'<br><span class="opacitymedium">' . $langs->trans(
"FieldsWithAreMandatory",
'*') .
'</span><br>';
699 print
'<script type="text/javascript">
700 jQuery(document).ready(function () {
701 jQuery(document).ready(function () {
702 jQuery("#selectcountry_id").change(function() {
703 document.newmember.action.value="create";
704 document.newmember.submit();
710 print
'<table class="border" summary="form to subscribe" id="tablesubscribe">' .
"\n";
713 print
'<tr><td>' . $langs->trans(
"EmailAttendee") .
'<span style="color: red">*</span></td><td>';
714 print
img_picto(
'',
'email',
'class="pictofixedwidth"');
715 print
'<input type="text" name="email" maxlength="255" class="minwidth200 widthcentpercentminusx maxwidth300" value="' .
dol_escape_htmltag(
GETPOST(
'email')) .
'"></td></tr>' .
"\n";
718 print
'<tr id="trcompany" class="trcompany"><td>' . $langs->trans(
"Company");
719 if (!empty(floatval($project->price_registration))) {
720 print
'<span style="color: red">*</span>';
723 print
img_picto(
'',
'company',
'class="pictofixedwidth"');
724 print
'<input type="text" name="societe" class="minwidth200 widthcentpercentminusx maxwidth300" value="' .
dol_escape_htmltag(
GETPOST(
'societe')) .
'"></td></tr>' .
"\n";
727 if ($project->price_registration) {
728 print
'<tr><td>' . $langs->trans(
"EmailCompanyForInvoice") .
'</td><td>';
729 print
img_picto(
'',
'email',
'class="pictofixedwidth"');
730 print
'<input type="text" name="emailcompany" maxlength="255" class="minwidth200 widthcentpercentminusx maxwidth300" value="' .
dol_escape_htmltag(
GETPOST(
'emailcompany')) .
'"></td></tr>' .
"\n";
734 print
'<tr><td>' . $langs->trans(
"Address") .
'</td><td>' .
"\n";
735 print
'<textarea name="address" id="address" wrap="soft" class="centpercent" rows="' . ROWS_2 .
'">' .
dol_escape_htmltag(
GETPOST(
'address',
'restricthtml'), 0, 1) .
'</textarea></td></tr>' .
"\n";
738 print
'<tr><td>' . $langs->trans(
'Zip') .
' / ' . $langs->trans(
'Town') .
'</td><td>';
739 print $formcompany->select_ziptown(
GETPOST(
'zipcode'),
'zipcode', array(
'town',
'selectcountry_id',
'state_id'), 6, 1);
741 print $formcompany->select_ziptown(
GETPOST(
'town'),
'town', array(
'zipcode',
'selectcountry_id',
'state_id'), 0, 1);
745 print
'<tr><td>' . $langs->trans(
'Country') .
'<span style="color: red">*</span></td><td>';
746 print
img_picto(
'',
'country',
'class="pictofixedwidth"');
747 $country_id =
GETPOST(
'country_id');
748 if (!$country_id && !empty($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE)) {
749 $country_id =
getCountry($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE, 2, $db, $langs);
751 if (!$country_id && !empty($conf->geoipmaxmind->enabled)) {
755 $new_country_id =
getCountry($country_code, 3, $db, $langs);
757 if ($new_country_id) {
758 $country_id = $new_country_id;
762 $country_code =
getCountry($country_id, 2, $db, $langs);
763 print
$form->select_country($country_id,
'country_id',
'', 0,
'minwidth200 widthcentpercentminusx maxwidth300');
766 if (empty($conf->global->SOCIETE_DISABLE_STATE)) {
767 print
'<tr><td>' . $langs->trans(
'State') .
'</td><td>';
769 print
img_picto(
'',
'state',
'class="pictofixedwidth"');
770 print $formcompany->select_state(
GETPOST(
"state_id"), $country_code);
777 if ($project->price_registration) {
778 print
'<tr><td>' . $langs->trans(
'Price') .
'</td><td>';
779 print
price($project->price_registration, 1, $langs, 1, -1, -1, $conf->currency);
783 $notetoshow = $note_public;
784 print
'<tr><td>' . $langs->trans(
'Note') .
'</td><td>';
785 if (!empty($conf->global->EVENTORGANIZATION_DEFAULT_NOTE_ON_REGISTRATION)) {
786 $notetoshow = str_replace(
'\n',
"\n", $conf->global->EVENTORGANIZATION_DEFAULT_NOTE_ON_REGISTRATION);
788 print
'<textarea name="note_public" class="centpercent" rows="'.ROWS_9.
'">'.
dol_escape_htmltag($notetoshow, 0, 1).
'</textarea>';
796 print
'<div class="center">';
797 print
'<input type="submit" value="' . $langs->trans(
"Submit") .
'" id="submitsave" class="button">';
798 if (!empty($backtopage)) {
799 print
' <input type="submit" value="' . $langs->trans(
"Cancel") .
'" id="submitcancel" class="button button-cancel">';
806 print
'</div></div>';
809 print $langs->trans(
"ConferenceIsNotConfirmed");
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.
Class for ConferenceOrBoothAttendee.
dol_hash($chain, $type= '0')
Returns a hash of a string.
const TYPE_STANDARD
Standard invoice.
if($cancel &&!$id) if($action== 'add'&&!$cancel) if($action== 'delete') if($id) $form
Actions.
printCommonFooter($zone= 'private')
Print common footer : conf->global->MAIN_HTML_FOOTER js for switch of menu hider js for conf->global-...
Class to manage products or services.
dol_now($mode= 'auto')
Return date for now.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags= '', $escapeonlyhtmltags=0)
Returns text escaped for inclusion in HTML alt or title tags, or into values of HTML input fields...
const STATUS_VALIDATED
Open/Validated status.
price($amount, $form=0, $outlangs= '', $trunc=1, $rounding=-1, $forcerounding=-1, $currency_code= '')
Function to format a value into an amount for visual output Function used into PDF and HTML pages...
isValidEmail($address, $acceptsupervisorkey=0, $acceptuserkey=0)
Return true if email syntax is ok.
getCommonSubstitutionArray($outputlangs, $onlykey=0, $exclude=null, $object=null)
Return array of possible common substitutions.
setEventMessages($mesg, $mesgs, $style= 'mesgs', $messagekey= '')
Set event messages in dol_events session object.
Class to manage third parties objects (customers, suppliers, prospects...)
Class to manage projects.
load_fiche_titre($titre, $morehtmlright= '', $picto= 'generic', $pictoisfullpath=0, $id= '', $morecssontable= '', $morehtmlcenter= '')
Load a title with picto.
dol_strlen($string, $stringencoding= 'UTF-8')
Make a strlen call.
Class to send emails (with attachments or not) Usage: $mailfile = new CMailFile($subject,$sendto,$replyto,$message,$filepath,$mimetype,$filename,$cc,$ccc,$deliveryreceipt,$msgishtml,$errors_to,$css,$trackid,$moreinheader,$sendcontext,$replyto); $mailfile->sendfile();.
img_picto($titlealt, $picto, $moreatt= '', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt= '', $morecss= '', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename= '', $restricttologhandler= '', $logcontext=null)
Write log message into outputs.
const STATUS_DRAFT
Draft status.
accessforbidden($message= '', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
Class to manage translations.
dol_user_country()
Return country code for current user.
if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) if(!defined('NOLOGIN')) if(!defined('NOCSRFCHECK')) if(!defined('NOIPCHECK')) llxHeaderVierge()
Header function.
if(isModEnabled('facture')&&!empty($user->rights->facture->lire)) if((isModEnabled('fournisseur')&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)&&$user->rights->fournisseur->facture->lire)||(isModEnabled('supplier_invoice')&&$user->rights->supplier_invoice->lire)) if(isModEnabled('don')&&!empty($user->rights->don->lire)) if(isModEnabled('tax')&&!empty($user->rights->tax->charges->lire)) if(isModEnabled('facture')&&isModEnabled('commande')&&$user->rights->commande->lire &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) $resql
Social contributions to pay.
dol_get_fiche_head($links=array(), $active= '', $title= '', $notab=0, $picto= '', $pictoisfullpath=0, $morehtmlright= '', $morecss= '', $limittoshow=0, $moretabssuffix= '')
Show tabs of a record.
dol_print_date($time, $format= '', $tzoutput= 'auto', $outputlangs= '', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
llxFooterVierge()
Footer function.
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...
Class for ConferenceOrBooth.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
top_htmlhead($head, $title= '', $disablejs=0, $disablehead=0, $arrayofjs= '', $arrayofcss= '', $disableforlogin=0, $disablenofollow=0, $disablenoindex=0)
Ouput html header of a page.
make_substitutions($text, $substitutionarray, $outputlangs=null, $converttextinhtmlifnecessary=0)
Make substitution into a text string, replacing keys with vals from $substitutionarray (oldval=>newva...
Class to manage invoices.
dol_htmloutput_errors($mesgstring= '', $mesgarray=array(), $keepembedded=0)
Print formated error messages to output (Used to show messages on html output).
getCountry($searchkey, $withcode= '', $dbtouse=0, $outputlangs= '', $entconv=1, $searchlabel= '')
Return country label, code or id from an id, code or label.
Class to manage payment terms records in dictionary.
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...
dol_textishtml($msg, $option=0)
Return if a text is a html content.