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.
"eventorganization_conferenceorboothattendee";
107 $sql .=
" WHERE fk_project = ".((int) $project->id);
109 $resql = $db->query($sql);
111 $obj = $db->fetch_object(
$resql);
113 $currentnbofattendees = $obj->nb;
122 $securekeyreceived =
GETPOST(
'securekey',
'alpha');
123 $securekeytocompare =
dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.
'conferenceorbooth'.$id,
'md5');
126 if ($securekeytocompare != $securekeyreceived) {
127 print $langs->trans(
'MissingOrBadSecureKey');
132 $langs->loadLangs(array(
"main",
"companies",
"install",
"other",
"eventorganization"));
135 $hookmanager->initHooks(array(
'publicnewmembercard',
'globalcard'));
139 $user->loadDefaultValues();
142 if (empty($conf->eventorganization->enabled)) {
158 function llxHeaderVierge($title, $head =
"", $disablejs = 0, $disablehead = 0, $arrayofjs =
'', $arrayofcss =
'')
160 global $user, $conf, $langs, $mysoc;
162 top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
164 print
'<body id="mainbody" class="publicnewmemberform">';
167 $urllogo = DOL_URL_ROOT.
'/theme/common/login_logo.png';
169 if (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.
'/logos/thumbs/'.$mysoc->logo_small)) {
170 $urllogo = DOL_URL_ROOT.
'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode(
'logos/thumbs/'.$mysoc->logo_small);
171 } elseif (!empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.
'/logos/'.$mysoc->logo)) {
172 $urllogo = DOL_URL_ROOT.
'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode(
'logos/'.$mysoc->logo);
173 } elseif (is_readable(DOL_DOCUMENT_ROOT.
'/theme/dolibarr_logo.svg')) {
174 $urllogo = DOL_URL_ROOT.
'/theme/dolibarr_logo.svg';
177 print
'<div class="center">';
180 print
'<div class="backgreypublicpayment">';
181 print
'<div class="logopublicpayment">';
182 print
'<img id="dolpaymentlogo" src="'.$urllogo.
'"';
185 if (empty($conf->global->MAIN_HIDE_POWERED_BY)) {
186 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>';
191 if (!empty($conf->global->EVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE)) {
192 print
'<div class="backimagepubliceventorganizationsubscription">';
193 print
'<img id="idEVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE" src="'.$conf->global->EVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE.
'">';
199 print
'<div class="divmainbodylarge">';
223 $parameters = array();
225 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
231 if (empty($reshook) && $action ==
'add' && (!empty($conference->id) && $conference->status!=2 || !empty($project->id) && $project->status ==
Project::STATUS_VALIDATED)) {
240 $errmsg .= $langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Email")).
"<br>\n";
243 if (!
GETPOST(
"societe") && !empty(floatval($project->price_registration))) {
245 $errmsg .= $langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Company")).
"<br>\n";
249 $langs->load(
"errors");
250 $errmsg .= $langs->trans(
"ErrorBadEMail",
GETPOST(
"email")).
"<br>\n";
254 $errmsg .= $langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Country")).
"<br>\n";
261 if ($type ==
'global') {
262 $filter = array(
't.fk_project'=>((
int) $id),
'customsql'=>
't.email="'.$db->escape($email).
'"');
264 if ($action ==
'conf') {
265 $filter = array(
't.fk_actioncomm'=>((
int) $id),
'customsql'=>
't.email="'.$db->escape($email).
'"');
269 $resultfetchconfattendee = $confattendee->fetchAll(
'',
'', 0, 0, $filter);
271 if (is_array($resultfetchconfattendee) && count($resultfetchconfattendee) > 0) {
273 $confattendee = array_shift($resultfetchconfattendee);
276 $confattendee->date_creation =
dol_now();
277 $confattendee->date_subscription =
dol_now();
278 $confattendee->email = $email;
279 $confattendee->fk_project = $project->id;
280 $confattendee->fk_actioncomm = $id;
281 $confattendee->note_public = $note_public;
283 $resultconfattendee = $confattendee->create($user);
284 if ($resultconfattendee < 0) {
286 $errmsg .= $confattendee->error;
287 $errors = array_merge($errors, $confattendee->errors);
295 if (!empty($confattendee->date_subscription) && !empty($confattendee->amount)) {
296 $securekeyurl =
dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.
'conferenceorbooth'.$id,
'master');
297 $redirection = $dolibarr_main_url_root.
'/public/eventorganization/subscriptionok.php?id='.((int) $id).
'&securekey='.urlencode($securekeyurl);
299 $mesg = $langs->trans(
"RegistrationAndPaymentWereAlreadyRecorded", $email);
304 Header(
"Location: ".$redirection);
308 $resultfetchthirdparty = 0;
310 $genericcompanyname = $langs->trans(
'EventParticipant').
' '.($emailcompany ? $emailcompany : $email);
313 $thirdparty =
new Societe($db);
316 if (!empty($confattendee->fk_soc) && $confattendee->fk_soc > 0) {
317 $resultfetchthirdparty = $thirdparty->fetch($confattendee->fk_soc);
319 if (empty($conf->global->EVENTORGANIZATION_DISABLE_RETREIVE_THIRDPARTY_FROM_NAME)) {
321 if ($resultfetchthirdparty <= 0 && !empty($societe) && !empty($emailcompany)) {
322 $resultfetchthirdparty = $thirdparty->fetch(
'', $societe,
'',
'',
'',
'',
'',
'',
'',
'', $emailcompany);
323 if ($resultfetchthirdparty > 0) {
325 $confattendee->fk_soc = $thirdparty->id;
326 $confattendee->update($user);
327 } elseif ($resultfetchthirdparty == -2) {
328 $thirdparty->error = $langs->trans(
"ErrorSeveralCompaniesWithNameContactUs", $mysoc->email);
332 if ($resultfetchthirdparty <= 0 && !empty($societe) && !empty($email) && $email != $emailcompany) {
333 $resultfetchthirdparty = $thirdparty->fetch(
'', $societe,
'',
'',
'',
'',
'',
'',
'',
'', $email);
334 if ($resultfetchthirdparty > 0) {
336 $confattendee->fk_soc = $thirdparty->id;
337 $confattendee->update($user);
338 } elseif ($resultfetchthirdparty == -2) {
339 $thirdparty->error = $langs->trans(
"ErrorSeveralCompaniesWithNameContactUs", $mysoc->email);
343 if ($resultfetchthirdparty <= 0 && !empty($emailcompany)) {
345 $resultfetchthirdparty = $thirdparty->fetch(
'',
'',
'',
'',
'',
'',
'',
'',
'',
'', $emailcompany);
346 if ($resultfetchthirdparty > 0) {
348 $confattendee->fk_soc = $thirdparty->id;
349 $confattendee->update($user);
350 } elseif ($resultfetchthirdparty == -2) {
351 $thirdparty->error = $langs->trans(
"ErrorSeveralCompaniesWithEmailContactUs", $mysoc->email);
354 if ($resultfetchthirdparty <= 0 && !empty($email) && $email != $emailcompany) {
356 $resultfetchthirdparty = $thirdparty->fetch(
'',
'',
'',
'',
'',
'',
'',
'',
'',
'', $email);
357 if ($resultfetchthirdparty > 0) {
359 $confattendee->fk_soc = $thirdparty->id;
360 $confattendee->update($user);
361 } elseif ($resultfetchthirdparty == -2) {
362 $thirdparty->error = $langs->trans(
"ErrorSeveralCompaniesWithEmailContactUs", $mysoc->email);
365 if ($resultfetchthirdparty <= 0 && !empty($genericcompanyname)) {
367 $resultfetchthirdparty = $thirdparty->fetch(
'', $genericcompanyname,
'',
'',
'',
'',
'',
'',
'',
'',
'');
368 if ($resultfetchthirdparty > 0) {
370 $confattendee->fk_soc = $thirdparty->id;
371 $confattendee->update($user);
372 } elseif ($resultfetchthirdparty == -2) {
373 $thirdparty->error = $langs->trans(
"ErrorSeveralCompaniesWithNameContactUs", $mysoc->email);
379 if ($resultfetchthirdparty <= 0 && !empty($email)) {
381 $resultfetchcontact = $contact->fetch(
'',
null,
'', $email);
382 if ($resultfetchcontact > 0 && $contact->fk_soc > 0) {
383 $thirdparty->fetch($contact->fk_soc);
384 $confattendee->fk_soc = $thirdparty->id;
385 $confattendee->update($user);
386 $resultfetchthirdparty = 1;
390 if ($resultfetchthirdparty <= 0 && !empty($societe)) {
392 $resultfetchthirdparty = $thirdparty->fetch(
'', $societe,
'',
'',
'',
'',
'',
'',
'',
'',
'');
393 if ($resultfetchthirdparty > 0) {
395 $confattendee->fk_soc = $thirdparty->id;
396 $confattendee->update($user);
397 } elseif ($resultfetchthirdparty == -2) {
398 $thirdparty->error =
"ErrorSeveralCompaniesWithNameContactUs";
404 if (empty(floatval($project->price_registration))) {
405 $resultfetchthirdparty = 1;
408 if ($resultfetchthirdparty < 0) {
411 $errmsg .= $thirdparty->error;
412 $errors = array_merge($errors, $thirdparty->errors);
413 } elseif ($resultfetchthirdparty == 0) {
415 if (!empty($societe)) {
416 $thirdparty->name = $societe;
418 $thirdparty->name = $genericcompanyname;
420 $thirdparty->address =
GETPOST(
"address");
421 $thirdparty->zip =
GETPOST(
"zipcode");
422 $thirdparty->town =
GETPOST(
"town");
423 $thirdparty->client = $thirdparty::PROSPECT;
424 $thirdparty->fournisseur = 0;
425 $thirdparty->country_id =
GETPOST(
"country_id",
'int');
426 $thirdparty->state_id =
GETPOST(
"state_id",
'int');
427 $thirdparty->email = ($emailcompany ? $emailcompany : $email);
430 $module = (!empty($conf->global->SOCIETE_CODECLIENT_ADDON) ? $conf->global->SOCIETE_CODECLIENT_ADDON :
'mod_codeclient_leopard');
431 if (substr($module, 0, 15) ==
'mod_codeclient_' && substr($module, -3) ==
'php') {
432 $module = substr($module, 0,
dol_strlen($module) - 4);
434 $dirsociete = array_merge(array(
'/core/modules/societe/'), $conf->modules_parts[
'societe']);
435 foreach ($dirsociete as $dirroot) {
441 $modCodeClient =
new $module($db);
443 if (empty($tmpcode) && !empty($modCodeClient->code_auto)) {
444 $tmpcode = $modCodeClient->getNextValue($thirdparty, 0);
446 $thirdparty->code_client = $tmpcode;
447 $readythirdparty = $thirdparty->create($user);
448 if ($readythirdparty < 0) {
450 $errmsg .= $thirdparty->error;
451 $errors = array_merge($errors, $thirdparty->errors);
453 $thirdparty->country_code =
getCountry($thirdparty->country_id, 2, $db, $langs);
454 $thirdparty->country =
getCountry($thirdparty->country_code, 0, $db, $langs);
457 $confattendee->fk_soc = $thirdparty->id;
458 $confattendee->update($user);
465 if (!empty(floatval($project->price_registration))) {
466 $outputlangs = $langs;
471 $productforinvoicerow =
new Product($db);
472 $productforinvoicerow->id = 0;
475 if ($conf->global->SERVICE_CONFERENCE_ATTENDEE_SUBSCRIPTION > 0) {
476 $resultprod = $productforinvoicerow->fetch($conf->global->SERVICE_CONFERENCE_ATTENDEE_SUBSCRIPTION);
480 if ($resultprod < 0) {
482 $errmsg .= $productforinvoicerow->error;
483 $errors = array_merge($errors, $productforinvoicerow->errors);
486 if (empty($confattendee->fk_invoice)) {
488 $facture->socid = $thirdparty->id;
491 $facture->cond_reglement_id = $confattendee->cond_reglement_id;
492 $facture->fk_project = $project->id;
495 if (empty($facture->cond_reglement_id)) {
496 $paymenttermstatic =
new PaymentTerm($confattendee->db);
497 $facture->cond_reglement_id = $paymenttermstatic->getDefaultId();
498 if (empty($facture->cond_reglement_id)) {
500 $confattendee->error =
'ErrorNoPaymentTermRECEPFound';
501 $confattendee->errors[] = $confattendee->error;
504 $resultfacture = $facture->create($user);
505 if ($resultfacture <= 0) {
506 $confattendee->error = $facture->error;
507 $confattendee->errors = $facture->errors;
510 $confattendee->fk_invoice = $resultfacture;
511 $confattendee->update($user);
514 $facture->fetch($confattendee->fk_invoice);
525 $vattouse =
get_default_tva($mysoc, $thirdparty, $productforinvoicerow->id);
527 $labelforproduct = $outputlangs->trans(
"EventFee", $project->title);
528 $date_start = $project->date_start;
529 $date_end = $project->date_end;
532 if (empty($facture->lines)) {
533 $pu_ttc = floatval($project->price_registration);
535 $price_base_type =
'TTC';
537 $result = $facture->addline($labelforproduct, $pu_ht, 1, $vattouse, 0, 0, $productforinvoicerow->id, 0, $date_start, $date_end, 0, 0,
'', $price_base_type, $pu_ttc, 1);
539 $confattendee->error = $facture->error;
540 $confattendee->errors = $facture->errors;
555 $sourcetouse =
'organizedeventregistration';
556 $reftouse = $facture->id;
557 $redirection = $dolibarr_main_url_root.
'/public/payment/newpayment.php?source='.urlencode($sourcetouse).
'&ref='.urlencode($reftouse);
558 if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) {
559 if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) {
560 $redirection .=
'&securekey='.dol_hash($conf->global->PAYMENT_SECURITY_TOKEN . $sourcetouse . $reftouse, 2);
562 $redirection .=
'&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN);
566 Header(
"Location: ".$redirection);
576 $confattendee->setStatut(1);
579 require_once DOL_DOCUMENT_ROOT.
'/core/class/CMailFile.class.php';
580 include_once DOL_DOCUMENT_ROOT.
'/core/class/html.formmail.class.php';
584 $outputlangs->setDefaultLang(empty($thirdparty->default_lang) ? $mysoc->default_lang : $thirdparty->default_lang);
586 $outputlangs->loadLangs(array(
"main",
"members"));
588 $arraydefaultmessage =
null;
590 $labeltouse = $conf->global->EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_EVENT;
591 if (!empty($labeltouse)) {
592 $arraydefaultmessage = $formmail->getEMailTemplate($db,
'eventorganization_send', $user, $outputlangs, $labeltouse, 1,
'');
595 if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) {
596 $subject = $arraydefaultmessage->topic;
597 $msg = $arraydefaultmessage->content;
606 $sendto = $thirdparty->email;
607 $from = $conf->global->MAILING_EMAIL_FROM;
608 $urlback = $_SERVER[
"REQUEST_URI"];
612 $mailfile =
new CMailFile($subjecttosend, $sendto, $from, $texttosend, array(), array(), array(),
'',
'', 0, $ishtml);
614 $result = $mailfile->sendfile();
616 dol_syslog(
"EMail sent to ".$sendto, LOG_DEBUG, 0,
'_payment');
618 dol_syslog(
"Failed to send EMail to ".$sendto, LOG_ERR, 0,
'_payment');
621 $securekeyurl =
dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.
'conferenceorbooth'.$id, 2);
622 $redirection = $dolibarr_main_url_root.
'/public/eventorganization/subscriptionok.php?id='.((int) $id).
'&securekey='.urlencode($securekeyurl);
624 Header(
"Location: ".$redirection);
645 print
load_fiche_titre($langs->trans(
"NewRegistration"),
'',
'', 0, 0,
'center');
648 print
'<div align="center">';
649 print
'<div id="divsubscribe">';
650 print
'<div class="center subscriptionformhelptext">';
654 print $langs->trans(
"EvntOrgWelcomeMessage");
656 print
'<span class="eventlabel">'.$project->title .
' '. $conference->label.
'</span>';
659 if ($conference->id > 0) {
675 $maxattendees = $project->max_attendees;
679 if ($maxattendees && $currentnbofattendees >= $maxattendees) {
681 print
'<div class="warning">'.$langs->trans(
"MaxNbOfAttendeesReached").
'</div>';
689 if ((!empty($conference->id) && $conference->status == ConferenceOrBooth::STATUS_CONFIRMED) || (!empty($project->id) && $project->status ==
Project::STATUS_VALIDATED)) {
690 if (empty($maxattendees) || $currentnbofattendees < $maxattendees) {
692 print
'<form action="' . $_SERVER[
"PHP_SELF"] .
'" method="POST" name="newmember">' .
"\n";
693 print
'<input type="hidden" name="token" value="' .
newToken() .
'" / >';
694 print
'<input type="hidden" name="entity" value="' . $entity .
'" />';
695 print
'<input type="hidden" name="action" value="add" />';
696 print
'<input type="hidden" name="type" value="' . $type .
'" />';
697 print
'<input type="hidden" name="id" value="' . $conference->id .
'" />';
698 print
'<input type="hidden" name="fk_project" value="' . $project->id .
'" />';
699 print
'<input type="hidden" name="securekey" value="' . $securekeyreceived .
'" />';
703 print
'<br><span class="opacitymedium">' . $langs->trans(
"FieldsWithAreMandatory",
'*') .
'</span><br>';
708 print
'<script type="text/javascript">
709 jQuery(document).ready(function () {
710 jQuery(document).ready(function () {
711 jQuery("#selectcountry_id").change(function() {
712 document.newmember.action.value="create";
713 document.newmember.submit();
719 print
'<table class="border" summary="form to subscribe" id="tablesubscribe">' .
"\n";
722 print
'<tr><td>' . $langs->trans(
"EmailAttendee") .
'<span style="color: red">*</span></td><td>';
723 print
img_picto(
'',
'email',
'class="pictofixedwidth"');
724 print
'<input type="text" name="email" maxlength="255" class="minwidth200 widthcentpercentminusx maxwidth300" value="' .
dol_escape_htmltag(
GETPOST(
'email')) .
'"></td></tr>' .
"\n";
727 print
'<tr id="trcompany" class="trcompany"><td>' . $langs->trans(
"Company");
728 if (!empty(floatval($project->price_registration))) {
729 print
'<span style="color: red">*</span>';
732 print
img_picto(
'',
'company',
'class="pictofixedwidth"');
733 print
'<input type="text" name="societe" class="minwidth200 widthcentpercentminusx maxwidth300" value="' .
dol_escape_htmltag(
GETPOST(
'societe')) .
'"></td></tr>' .
"\n";
736 if ($project->price_registration) {
737 print
'<tr><td>' .
$form->textwithpicto($langs->trans(
"EmailCompany"), $langs->trans(
"EmailCompanyForInvoice")) .
'</td><td>';
738 print
img_picto(
'',
'email',
'class="pictofixedwidth"');
739 print
'<input type="text" name="emailcompany" maxlength="255" class="minwidth200 widthcentpercentminusx maxwidth300" value="' .
dol_escape_htmltag(
GETPOST(
'emailcompany')) .
'"></td></tr>' .
"\n";
743 print
'<tr><td>' . $langs->trans(
"Address") .
'</td><td>' .
"\n";
744 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";
747 print
'<tr><td>' . $langs->trans(
'Zip') .
' / ' . $langs->trans(
'Town') .
'</td><td>';
748 print $formcompany->select_ziptown(
GETPOST(
'zipcode'),
'zipcode', array(
'town',
'selectcountry_id',
'state_id'), 6, 1);
750 print $formcompany->select_ziptown(
GETPOST(
'town'),
'town', array(
'zipcode',
'selectcountry_id',
'state_id'), 0, 1);
754 print
'<tr><td>' . $langs->trans(
'Country') .
'<span style="color: red">*</span></td><td>';
755 print
img_picto(
'',
'country',
'class="pictofixedwidth"');
756 $country_id =
GETPOST(
'country_id');
757 if (!$country_id && !empty($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE)) {
758 $country_id =
getCountry($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE, 2, $db, $langs);
760 if (!$country_id && !empty($conf->geoipmaxmind->enabled)) {
764 $new_country_id =
getCountry($country_code, 3, $db, $langs);
766 if ($new_country_id) {
767 $country_id = $new_country_id;
771 $country_code =
getCountry($country_id, 2, $db, $langs);
772 print
$form->select_country($country_id,
'country_id',
'', 0,
'minwidth200 widthcentpercentminusx maxwidth300');
775 if (empty($conf->global->SOCIETE_DISABLE_STATE)) {
776 print
'<tr><td>' . $langs->trans(
'State') .
'</td><td>';
778 print
img_picto(
'',
'state',
'class="pictofixedwidth"');
779 print $formcompany->select_state(
GETPOST(
"state_id"), $country_code);
786 if ($project->price_registration) {
787 print
'<tr><td>' . $langs->trans(
'Price') .
'</td><td>';
788 print
'<span class="amount price-registration">'.price($project->price_registration, 1, $langs, 1, -1, -1, $conf->currency).
'</span>';
792 $notetoshow = $note_public;
793 print
'<tr><td>' . $langs->trans(
'Note') .
'</td><td>';
794 if (!empty($conf->global->EVENTORGANIZATION_DEFAULT_NOTE_ON_REGISTRATION)) {
795 $notetoshow = str_replace(
'\n',
"\n", $conf->global->EVENTORGANIZATION_DEFAULT_NOTE_ON_REGISTRATION);
797 print
'<textarea name="note_public" class="centpercent" rows="'.ROWS_9.
'">'.
dol_escape_htmltag($notetoshow, 0, 1).
'</textarea>';
805 print
'<div class="center">';
806 print
'<input type="submit" value="' . $langs->trans(
"Submit") .
'" id="submitsave" class="button">';
807 if (!empty($backtopage)) {
808 print
' <input type="submit" value="' . $langs->trans(
"Cancel") .
'" id="submitcancel" class="button button-cancel">';
815 print
'</div></div>';
818 print $langs->trans(
"ConferenceIsNotConfirmed");