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');
37 if (!defined(
'NOIPCHECK')) {
38 define(
'NOIPCHECK',
'1');
45 $entity = (!empty($_GET[
'entity']) ? (int) $_GET[
'entity'] : (!empty($_POST[
'entity']) ? (int) $_POST[
'entity'] : 1));
46 if (is_numeric($entity)) {
47 define(
"DOLENTITY", $entity);
51 require
'../../main.inc.php';
52 require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
53 require_once DOL_DOCUMENT_ROOT.
'/core/class/extrafields.class.php';
54 require_once DOL_DOCUMENT_ROOT.
'/eventorganization/class/conferenceorbooth.class.php';
55 require_once DOL_DOCUMENT_ROOT.
'/eventorganization/class/conferenceorboothattendee.class.php';
56 require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
57 require_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
58 require_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/paymentterm.class.php';
59 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
60 require_once DOL_DOCUMENT_ROOT.
'/contact/class/contact.class.php';
61 require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
63 global $dolibarr_main_url_root;
69 $backtopage =
GETPOST(
'backtopage',
'alpha');
70 $action =
GETPOST(
'action',
'aZ09');
74 $emailcompany =
GETPOST(
"emailcompany");
75 $note_public =
GETPOST(
'note_public',
"restricthtml");
76 $firstname =
GETPOST(
'firstname');
77 $lastname =
GETPOST(
'lastname');
80 $type =
GETPOST(
'type',
'aZ09');
81 if ($type ==
'conf') {
90 if ($type ==
'conf') {
91 $resultconf = $conference->fetch($id);
92 if ($resultconf < 0) {
93 print
'Bad value for parameter id';
96 $resultproject = $project->fetch($conference->fk_project);
97 if ($resultproject < 0) {
99 $errmsg .= $project->error;
100 $errors = array_merge($errors, $project->errors);
104 $currentnbofattendees = 0;
105 if ($type ==
'global') {
106 $resultproject = $project->fetch($id);
107 if ($resultproject < 0) {
109 $errmsg .= $project->error;
110 $errors = array_merge($errors, $project->errors);
112 $sql =
"SELECT COUNT(*) as nb FROM ".MAIN_DB_PREFIX.
"eventorganization_conferenceorboothattendee";
113 $sql .=
" WHERE fk_project = ".((int) $project->id);
114 $sql .=
" AND status IN (0, 1)";
116 $resql = $db->query(
$sql);
118 $obj = $db->fetch_object($resql);
120 $currentnbofattendees = $obj->nb;
129 $securekeyreceived =
GETPOST(
'securekey',
'alpha');
133 if ($securekeytocompare != $securekeyreceived) {
134 print $langs->trans(
'MissingOrBadSecureKey');
139 $langs->loadLangs(array(
"main",
"companies",
"install",
"other",
"eventorganization"));
142 $hookmanager->initHooks(array(
'publicnewmembercard',
'globalcard'));
146 $user->loadDefaultValues();
149 if (empty($conf->eventorganization->enabled)) {
165 function llxHeaderVierge($title, $head =
"", $disablejs = 0, $disablehead = 0, $arrayofjs =
'', $arrayofcss =
'')
167 global $user, $conf, $langs, $mysoc;
169 top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
171 print
'<body id="mainbody" class="publicnewmemberform">';
174 $urllogo = DOL_URL_ROOT.
'/theme/common/login_logo.png';
176 if (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.
'/logos/thumbs/'.$mysoc->logo_small)) {
177 $urllogo = DOL_URL_ROOT.
'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode(
'logos/thumbs/'.$mysoc->logo_small);
178 } elseif (!empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.
'/logos/'.$mysoc->logo)) {
179 $urllogo = DOL_URL_ROOT.
'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode(
'logos/'.$mysoc->logo);
180 } elseif (is_readable(DOL_DOCUMENT_ROOT.
'/theme/dolibarr_logo.svg')) {
181 $urllogo = DOL_URL_ROOT.
'/theme/dolibarr_logo.svg';
184 print
'<div class="center">';
187 print
'<div class="backgreypublicpayment">';
188 print
'<div class="logopublicpayment">';
189 print
'<img id="dolpaymentlogo" src="'.$urllogo.
'"';
192 if (empty($conf->global->MAIN_HIDE_POWERED_BY)) {
193 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>';
198 if (!empty($conf->global->EVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE)) {
199 print
'<div class="backimagepubliceventorganizationsubscription">';
200 print
'<img id="idEVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE" src="'.$conf->global->EVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE.
'">';
206 print
'<div class="divmainbodylarge">';
230 $parameters = array();
232 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
238 if (empty($reshook) && $action ==
'add' && (!empty($conference->id) && $conference->status==2 || !empty($project->id) && $project->status ==
Project::STATUS_VALIDATED)) {
247 $errmsg .= $langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Email")).
"<br>\n";
250 if (!
GETPOST(
"societe") && !empty(floatval($project->price_registration))) {
252 $errmsg .= $langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Company")).
"<br>\n";
256 $langs->load(
"errors");
257 $errmsg .= $langs->trans(
"ErrorBadEMail",
GETPOST(
"email")).
"<br>\n";
261 $errmsg .= $langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Country")).
"<br>\n";
270 if ($type ==
'global') {
271 $filter = array(
't.fk_project'=>((
int) $id),
'customsql'=>
't.email="'.$db->escape($email).
'"');
273 if ($type ==
'conf') {
274 $filter = array(
't.fk_actioncomm'=>((
int) $id),
'customsql'=>
't.email="'.$db->escape($email).
'"');
278 $resultfetchconfattendee = $confattendee->fetchAll(
'',
'', 0, 0, $filter);
280 if (is_array($resultfetchconfattendee) && count($resultfetchconfattendee) > 0) {
282 $confattendee = array_shift($resultfetchconfattendee);
285 $confattendee->date_creation =
dol_now();
286 $confattendee->date_subscription =
dol_now();
287 $confattendee->email = $email;
288 $confattendee->fk_project = $project->id;
289 $confattendee->fk_actioncomm = $id;
290 $confattendee->note_public = $note_public;
291 $confattendee->firstname = $firstname;
292 $confattendee->lastname = $lastname;
295 $nb_post_max =
getDolGlobalInt(
"MAIN_SECURITY_MAX_POST_ON_PUBLIC_PAGES_BY_IP_ADDRESS", 200);
300 if ($nb_post_max > 0) {
301 $sql =
"SELECT COUNT(ref) as nb_attendee";
302 $sql .=
" FROM ".MAIN_DB_PREFIX.
"eventorganization_conferenceorboothattendee";
303 $sql .=
" WHERE ip = '".$db->escape($confattendee->ip).
"'";
304 $sql .=
" AND date_creation > '".$db->idate($minmonthpost).
"'";
305 $resql = $db->query(
$sql);
307 $num = $db->num_rows($resql);
311 $obj = $db->fetch_object($resql);
312 $nb_post_ip = $obj->nb_attendee;
317 $resultconforbooth = -1;
319 if ($nb_post_max > 0 && $nb_post_ip >= $nb_post_max) {
321 $errmsg .= $langs->trans(
"AlreadyTooMuchPostOnThisIPAdress");
322 array_push($confattendee->errors, $langs->trans(
"AlreadyTooMuchPostOnThisIPAdress"));
325 $resultconfattendee = $confattendee->create($user);
327 if ($resultconfattendee < 0) {
329 $errmsg .= $confattendee->error;
330 $errors = array_merge($errors, $confattendee->errors);
338 if (!empty($confattendee->date_subscription) && !empty($confattendee->amount)) {
339 $securekeyurl =
dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.
'conferenceorbooth'.$id,
'master');
340 $redirection = $dolibarr_main_url_root.
'/public/eventorganization/subscriptionok.php?id='.((int) $id).
'&securekey='.urlencode($securekeyurl);
342 $mesg = $langs->trans(
"RegistrationAndPaymentWereAlreadyRecorded", $email);
347 Header(
"Location: ".$redirection);
351 $resultfetchthirdparty = 0;
353 $genericcompanyname = $langs->trans(
'EventParticipant').
' '.($emailcompany ? $emailcompany : $email);
356 $thirdparty =
new Societe($db);
359 if (!empty($confattendee->fk_soc) && $confattendee->fk_soc > 0) {
360 $resultfetchthirdparty = $thirdparty->fetch($confattendee->fk_soc);
362 if (empty($conf->global->EVENTORGANIZATION_DISABLE_RETREIVE_THIRDPARTY_FROM_NAME)) {
364 if ($resultfetchthirdparty <= 0 && !empty($societe) && !empty($emailcompany)) {
365 $resultfetchthirdparty = $thirdparty->fetch(
'', $societe,
'',
'',
'',
'',
'',
'',
'',
'', $emailcompany);
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);
375 if ($resultfetchthirdparty <= 0 && !empty($societe) && !empty($email) && $email != $emailcompany) {
376 $resultfetchthirdparty = $thirdparty->fetch(
'', $societe,
'',
'',
'',
'',
'',
'',
'',
'', $email);
377 if ($resultfetchthirdparty > 0) {
379 $confattendee->fk_soc = $thirdparty->id;
380 $confattendee->update($user);
381 } elseif ($resultfetchthirdparty == -2) {
382 $thirdparty->error = $langs->trans(
"ErrorSeveralCompaniesWithNameContactUs", $mysoc->email);
386 if ($resultfetchthirdparty <= 0 && !empty($emailcompany)) {
388 $resultfetchthirdparty = $thirdparty->fetch(
'',
'',
'',
'',
'',
'',
'',
'',
'',
'', $emailcompany);
389 if ($resultfetchthirdparty > 0) {
391 $confattendee->fk_soc = $thirdparty->id;
392 $confattendee->update($user);
393 } elseif ($resultfetchthirdparty == -2) {
394 $thirdparty->error = $langs->trans(
"ErrorSeveralCompaniesWithEmailContactUs", $mysoc->email);
397 if ($resultfetchthirdparty <= 0 && !empty($email) && $email != $emailcompany) {
399 $resultfetchthirdparty = $thirdparty->fetch(
'',
'',
'',
'',
'',
'',
'',
'',
'',
'', $email);
400 if ($resultfetchthirdparty > 0) {
402 $confattendee->fk_soc = $thirdparty->id;
403 $confattendee->update($user);
404 } elseif ($resultfetchthirdparty == -2) {
405 $thirdparty->error = $langs->trans(
"ErrorSeveralCompaniesWithEmailContactUs", $mysoc->email);
408 if ($resultfetchthirdparty <= 0 && !empty($genericcompanyname)) {
410 $resultfetchthirdparty = $thirdparty->fetch(
'', $genericcompanyname,
'',
'',
'',
'',
'',
'',
'',
'',
'');
411 if ($resultfetchthirdparty > 0) {
413 $confattendee->fk_soc = $thirdparty->id;
414 $confattendee->update($user);
415 } elseif ($resultfetchthirdparty == -2) {
416 $thirdparty->error = $langs->trans(
"ErrorSeveralCompaniesWithNameContactUs", $mysoc->email);
422 if ($resultfetchthirdparty <= 0 && !empty($email)) {
424 $resultfetchcontact = $contact->fetch(
'',
null,
'', $email);
425 if ($resultfetchcontact > 0 && $contact->fk_soc > 0) {
426 $thirdparty->fetch($contact->fk_soc);
427 $confattendee->fk_soc = $thirdparty->id;
428 $confattendee->update($user);
429 $resultfetchthirdparty = 1;
433 if ($resultfetchthirdparty <= 0 && !empty($societe)) {
435 $resultfetchthirdparty = $thirdparty->fetch(
'', $societe,
'',
'',
'',
'',
'',
'',
'',
'',
'');
436 if ($resultfetchthirdparty > 0) {
438 $confattendee->fk_soc = $thirdparty->id;
439 $confattendee->update($user);
440 } elseif ($resultfetchthirdparty == -2) {
441 $thirdparty->error =
"ErrorSeveralCompaniesWithNameContactUs";
447 if (empty(floatval($project->price_registration))) {
448 $resultfetchthirdparty = 1;
451 if ($resultfetchthirdparty < 0) {
454 $errmsg .= $thirdparty->error;
455 $errors = array_merge($errors, $thirdparty->errors);
456 } elseif ($resultfetchthirdparty == 0) {
458 if (!empty($societe)) {
459 $thirdparty->name = $societe;
461 $thirdparty->name = $genericcompanyname;
463 $thirdparty->address =
GETPOST(
"address");
464 $thirdparty->zip =
GETPOST(
"zipcode");
465 $thirdparty->town =
GETPOST(
"town");
466 $thirdparty->client = $thirdparty::PROSPECT;
467 $thirdparty->fournisseur = 0;
468 $thirdparty->country_id =
GETPOST(
"country_id",
'int');
469 $thirdparty->state_id =
GETPOST(
"state_id",
'int');
470 $thirdparty->email = ($emailcompany ? $emailcompany : $email);
473 $module = (!empty($conf->global->SOCIETE_CODECLIENT_ADDON) ? $conf->global->SOCIETE_CODECLIENT_ADDON :
'mod_codeclient_leopard');
474 if (substr($module, 0, 15) ==
'mod_codeclient_' && substr($module, -3) ==
'php') {
475 $module = substr($module, 0,
dol_strlen($module) - 4);
477 $dirsociete = array_merge(array(
'/core/modules/societe/'), $conf->modules_parts[
'societe']);
478 foreach ($dirsociete as $dirroot) {
484 $modCodeClient =
new $module($db);
486 if (empty($tmpcode) && !empty($modCodeClient->code_auto)) {
487 $tmpcode = $modCodeClient->getNextValue($thirdparty, 0);
489 $thirdparty->code_client = $tmpcode;
490 $readythirdparty = $thirdparty->create($user);
491 if ($readythirdparty < 0) {
493 $errmsg .= $thirdparty->error;
494 $errors = array_merge($errors, $thirdparty->errors);
496 $thirdparty->country_code =
getCountry($thirdparty->country_id, 2, $db, $langs);
497 $thirdparty->country =
getCountry($thirdparty->country_code, 0, $db, $langs);
500 $confattendee->fk_soc = $thirdparty->id;
501 $confattendee->update($user);
508 if (!empty(floatval($project->price_registration))) {
509 $outputlangs = $langs;
514 $productforinvoicerow =
new Product($db);
515 $productforinvoicerow->id = 0;
518 if ($conf->global->SERVICE_CONFERENCE_ATTENDEE_SUBSCRIPTION > 0) {
519 $resultprod = $productforinvoicerow->fetch($conf->global->SERVICE_CONFERENCE_ATTENDEE_SUBSCRIPTION);
523 if ($resultprod < 0) {
525 $errmsg .= $productforinvoicerow->error;
526 $errors = array_merge($errors, $productforinvoicerow->errors);
529 if (empty($confattendee->fk_invoice)) {
531 $facture->socid = $thirdparty->id;
534 $facture->cond_reglement_id = $confattendee->cond_reglement_id;
535 $facture->fk_project = $project->id;
538 if (empty($facture->cond_reglement_id)) {
539 $paymenttermstatic =
new PaymentTerm($confattendee->db);
540 $facture->cond_reglement_id = $paymenttermstatic->getDefaultId();
541 if (empty($facture->cond_reglement_id)) {
543 $confattendee->error =
'ErrorNoPaymentTermRECEPFound';
544 $confattendee->errors[] = $confattendee->error;
547 $resultfacture = $facture->create($user);
548 if ($resultfacture <= 0) {
549 $confattendee->error = $facture->error;
550 $confattendee->errors = $facture->errors;
553 $confattendee->fk_invoice = $resultfacture;
554 $confattendee->update($user);
557 $facture->fetch($confattendee->fk_invoice);
568 $vattouse =
get_default_tva($mysoc, $thirdparty, $productforinvoicerow->id);
570 $labelforproduct = $outputlangs->trans(
"EventFee", $project->title);
571 if ($project->location) {
572 $labelforproduct .=
' - '.$project->location;
574 $date_start = $project->date_start_event;
575 $date_end = $project->date_end_event;
578 if (empty($facture->lines)) {
579 $pu_ttc = floatval($project->price_registration);
581 $price_base_type =
'TTC';
583 $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);
585 $confattendee->error = $facture->error;
586 $confattendee->errors = $facture->errors;
601 $sourcetouse =
'organizedeventregistration';
602 $reftouse = $facture->id;
603 $redirection = $dolibarr_main_url_root.
'/public/payment/newpayment.php?source='.urlencode($sourcetouse).
'&ref='.urlencode($reftouse);
604 if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) {
605 if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) {
606 $redirection .=
'&securekey='.dol_hash($conf->global->PAYMENT_SECURITY_TOKEN . $sourcetouse . $reftouse, 2);
608 $redirection .=
'&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN);
612 Header(
"Location: ".$redirection);
622 $confattendee->setStatut(1);
625 require_once DOL_DOCUMENT_ROOT.
'/core/class/CMailFile.class.php';
626 include_once DOL_DOCUMENT_ROOT.
'/core/class/html.formmail.class.php';
630 $outputlangs->setDefaultLang(empty($thirdparty->default_lang) ? $mysoc->default_lang : $thirdparty->default_lang);
632 $outputlangs->loadLangs(array(
"main",
"members"));
634 $arraydefaultmessage =
null;
637 if (!empty($labeltouse)) {
638 $arraydefaultmessage = $formmail->getEMailTemplate($db,
'eventorganization_send', $user, $outputlangs, $labeltouse, 1,
'');
641 if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) {
642 $subject = $arraydefaultmessage->topic;
643 $msg = $arraydefaultmessage->content;
652 $sendto = $thirdparty->email;
653 $from = $conf->global->MAILING_EMAIL_FROM;
654 $urlback = $_SERVER[
"REQUEST_URI"];
658 $mailfile =
new CMailFile($subjecttosend, $sendto, $from, $texttosend, array(), array(), array(),
'',
'', 0, $ishtml);
660 $result = $mailfile->sendfile();
662 dol_syslog(
"EMail sent to ".$sendto, LOG_DEBUG, 0,
'_payment');
664 dol_syslog(
"Failed to send EMail to ".$sendto, LOG_ERR, 0,
'_payment');
667 $securekeyurl =
dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.
'conferenceorbooth'.$id, 2);
668 $redirection = $dolibarr_main_url_root.
'/public/eventorganization/subscriptionok.php?id='.((int) $id).
'&securekey='.urlencode($securekeyurl);
670 Header(
"Location: ".$redirection);
691 print
'<div align="center">';
692 print
'<div id="divsubscribe">';
695 print
'<div class="center subscriptionformbanner subbanner justify margintoponly paddingtop marginbottomonly padingbottom">';
696 print
load_fiche_titre($langs->trans(
"NewRegistration"),
'',
'', 0, 0,
'center');
698 print
'<span class="opacitymedium">'.$langs->trans(
"EvntOrgWelcomeMessage").
'</span>';
701 print
'<span class="eventlabel large">'.dol_escape_htmltag($project->title .
' '. $conference->label).
'</span><br>';
705 print
'<div class="justify subscriptionformhelptext">';
707 if ($project->date_start_event || $project->date_end_event) {
708 print
'<br><span class="fa fa-calendar pictofixedwidth opacitymedium"></span>';
710 if ($project->date_start_event) {
712 $tmparray =
dol_getdate($project->date_start_event,
false,
'');
713 if ($tmparray[
'hours'] || $tmparray[
'minutes'] || $tmparray[
'minutes']) {
718 if ($project->date_start_event && $project->date_end_event) {
721 if ($project->date_end_event) {
723 $tmparray =
dol_getdate($project->date_end_event,
false,
'');
724 if ($tmparray[
'hours'] || $tmparray[
'minutes'] || $tmparray[
'minutes']) {
729 if ($project->date_start_event || $project->date_end_event) {
732 if ($project->location) {
733 print
'<span class="fa fa-map-marked-alt pictofixedwidth opacitymedium"></span>'.dol_escape_htmltag($project->location).
'<br>';
735 if ($project->note_public) {
736 print
'<br><span class="opacitymedium">'.dol_htmlentitiesbr($project->note_public).
'</span><br>';
743 if ($conference->id > 0) {
759 $maxattendees = $project->max_attendees;
762 if ($maxattendees && $currentnbofattendees >= $maxattendees) {
764 print
'<div class="warning">'.$langs->trans(
"MaxNbOfAttendeesReached").
'</div>';
772 if ((!empty($conference->id) && $conference->status == ConferenceOrBooth::STATUS_CONFIRMED) || (!empty($project->id) && $project->status ==
Project::STATUS_VALIDATED)) {
773 if (empty($maxattendees) || $currentnbofattendees < $maxattendees) {
775 print
'<form action="' . $_SERVER[
"PHP_SELF"] .
'" method="POST" name="newmember">' .
"\n";
776 print
'<input type="hidden" name="token" value="' .
newToken() .
'" / >';
777 print
'<input type="hidden" name="entity" value="' . $entity .
'" />';
778 print
'<input type="hidden" name="action" value="add" />';
779 print
'<input type="hidden" name="type" value="' . $type .
'" />';
780 print
'<input type="hidden" name="id" value="' . $conference->id .
'" />';
781 print
'<input type="hidden" name="fk_project" value="' . $project->id .
'" />';
782 print
'<input type="hidden" name="securekey" value="' . $securekeyreceived .
'" />';
791 print
'<script type="text/javascript">
792 jQuery(document).ready(function () {
793 jQuery(document).ready(function () {
794 jQuery("#selectcountry_id").change(function() {
795 document.newmember.action.value="create";
796 document.newmember.submit();
802 print
'<table class="border" summary="form to subscribe" id="tablesubscribe">' .
"\n";
805 print
'<tr><td><span class="fieldrequired">' . $langs->trans(
"Firstname") .
'</span></td><td>';
806 print
'<input type="text" name="firstname" maxlength="255" class="minwidth200 maxwidth300" value="' .
dol_escape_htmltag($firstname) .
'" required></td></tr>' .
"\n";
809 print
'<tr><td><span class="fieldrequired">' . $langs->trans(
"Lastname") .
'</span></td><td>';
810 print
'<input type="text" name="lastname" maxlength="255" class="minwidth200 maxwidth300" value="' .
dol_escape_htmltag($lastname) .
'" required></td></tr>' .
"\n";
813 print
'<tr><td><span class="fieldrequired">' . $langs->trans(
"EmailAttendee") .
'</span></td><td>';
814 print
img_picto(
'',
'email',
'class="pictofixedwidth"');
815 print
'<input type="text" name="email" maxlength="255" class="minwidth200 widthcentpercentminusx maxwidth300" value="' .
dol_escape_htmltag(
GETPOST(
'email')) .
'" required></td></tr>' .
"\n";
818 print
'<tr id="trcompany" class="trcompany"><td>';
819 if (!empty(floatval($project->price_registration))) {
820 print
'<span class="fieldrequired">';
822 print $langs->trans(
"Company");
823 if (!empty(floatval($project->price_registration))) {
827 print
img_picto(
'',
'company',
'class="pictofixedwidth"');
828 print
'<input type="text" name="societe" class="minwidth200 widthcentpercentminusx maxwidth300" value="' .
dol_escape_htmltag(
GETPOST(
'societe')) .
'"'.(empty(floatval($project->price_registration)) ?
'' :
' required').
'></td></tr>' .
"\n";
831 if ($project->price_registration) {
832 print
'<tr><td>' .
$form->textwithpicto($langs->trans(
"EmailCompany"), $langs->trans(
"EmailCompanyForInvoice")) .
'</td><td>';
833 print
img_picto(
'',
'email',
'class="pictofixedwidth"');
834 print
'<input type="text" name="emailcompany" maxlength="255" class="minwidth200 widthcentpercentminusx maxwidth300" value="' .
dol_escape_htmltag(
GETPOST(
'emailcompany')) .
'"></td></tr>' .
"\n";
838 print
'<tr><td>' . $langs->trans(
"Address") .
'</td><td>' .
"\n";
839 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";
842 print
'<tr><td>' . $langs->trans(
'Zip') .
' / ' . $langs->trans(
'Town') .
'</td><td>';
843 print $formcompany->select_ziptown(
GETPOST(
'zipcode'),
'zipcode', array(
'town',
'selectcountry_id',
'state_id'), 6, 1);
845 print $formcompany->select_ziptown(
GETPOST(
'town'),
'town', array(
'zipcode',
'selectcountry_id',
'state_id'), 0, 1);
849 print
'<tr><td><span class="fieldrequired">'.$langs->trans(
'Country').
'</span></td><td>';
850 print
img_picto(
'',
'country',
'class="pictofixedwidth"');
851 $country_id =
GETPOST(
'country_id');
852 if (!$country_id && !empty($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE)) {
853 $country_id =
getCountry($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE, 2, $db, $langs);
855 if (!$country_id && !empty($conf->geoipmaxmind->enabled)) {
859 $new_country_id =
getCountry($country_code, 3, $db, $langs);
861 if ($new_country_id) {
862 $country_id = $new_country_id;
866 $country_code =
getCountry($country_id, 2, $db, $langs);
867 print
$form->select_country($country_id,
'country_id',
'', 0,
'minwidth200 widthcentpercentminusx maxwidth300');
870 if (empty($conf->global->SOCIETE_DISABLE_STATE)) {
871 print
'<tr><td>' . $langs->trans(
'State') .
'</td><td>';
873 print
img_picto(
'',
'state',
'class="pictofixedwidth"');
874 print $formcompany->select_state(
GETPOST(
"state_id"), $country_code);
881 if ($project->price_registration) {
882 print
'<tr><td>' . $langs->trans(
'Price') .
'</td><td>';
883 print
'<span class="amount price-registration">'.price($project->price_registration, 1, $langs, 1, -1, -1, $conf->currency).
'</span>';
887 $notetoshow = $note_public;
888 print
'<tr><td>' . $langs->trans(
'Note') .
'</td><td>';
889 if (!empty($conf->global->EVENTORGANIZATION_DEFAULT_NOTE_ON_REGISTRATION)) {
890 $notetoshow = str_replace(
'\n',
"\n", $conf->global->EVENTORGANIZATION_DEFAULT_NOTE_ON_REGISTRATION);
892 print
'<textarea name="note_public" class="centpercent" rows="'.ROWS_9.
'">'.
dol_escape_htmltag($notetoshow, 0, 1).
'</textarea>';
900 print
'<div class="center">';
901 print
'<input type="submit" value="' . $langs->trans(
"Submit") .
'" id="submitsave" class="button">';
902 if (!empty($backtopage)) {
903 print
' <input type="submit" value="' . $langs->trans(
"Cancel") .
'" id="submitcancel" class="button button-cancel">';
913 print $langs->trans(
"ConferenceIsNotConfirmed");
917 print
'</div></div>';
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.
Class to send emails (with attachments or not) Usage: $mailfile = new CMailFile($subject,...
Class for ConferenceOrBoothAttendee.
Class for ConferenceOrBooth.
Class to manage invoices.
const STATUS_DRAFT
Draft status.
const TYPE_STANDARD
Standard invoice.
Class to manage payment terms records in dictionary.
Class to manage products or services.
Class to manage projects.
const STATUS_VALIDATED
Open/Validated status.
Class to manage third parties objects (customers, suppliers, prospects...)
Class to manage translations.
getCountry($searchkey, $withcode='', $dbtouse=0, $outputlangs='', $entconv=1, $searchlabel='')
Return country label, code or id from an id, code or label.
if(isModEnabled('facture') && $user->hasRight('facture', 'lire')) if((isModEnabled('fournisseur') &&empty($conf->global->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') &&!empty($user->rights->tax->charges->lire)) if(isModEnabled('facture') &&isModEnabled('commande') && $user->hasRight("commande", "lire") &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) $sql
Social contributions to pay.
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
dol_time_plus_duree($time, $duration_value, $duration_unit, $ruleforendofmonth=0)
Add a delay to a date.
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
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_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
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.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs='', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
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 dolibarr global constant int value.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
newToken()
Return the value of token currently saved into session with name 'newtoken'.
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 formated 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='', $arrayofcss='', $disableforlogin=0, $disablenofollow=0, $disablenoindex=0)
Ouput 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')
Returns a hash (non reversible encryption) of a string.