26 if (!defined(
'NOLOGIN')) {
29 if (!defined(
'NOCSRFCHECK')) {
30 define(
"NOCSRFCHECK", 1);
32 if (!defined(
'NOIPCHECK')) {
33 define(
'NOIPCHECK',
'1');
35 if (!defined(
'NOBROWSERNOTIF')) {
36 define(
'NOBROWSERNOTIF',
'1');
38 if (!defined(
'NOIPCHECK')) {
39 define(
'NOIPCHECK',
'1');
46 $entity = (!empty($_GET[
'entity']) ? (int) $_GET[
'entity'] : (!empty($_POST[
'entity']) ? (int) $_POST[
'entity'] : 1));
47 if (is_numeric($entity)) {
48 define(
"DOLENTITY", $entity);
52 require
'../../main.inc.php';
53 require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
54 require_once DOL_DOCUMENT_ROOT.
'/core/class/extrafields.class.php';
55 require_once DOL_DOCUMENT_ROOT.
'/eventorganization/class/conferenceorbooth.class.php';
56 require_once DOL_DOCUMENT_ROOT.
'/eventorganization/class/conferenceorboothattendee.class.php';
57 require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
58 require_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
59 require_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/paymentterm.class.php';
60 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
61 require_once DOL_DOCUMENT_ROOT.
'/contact/class/contact.class.php';
62 require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
64 global $dolibarr_main_url_root;
70 $backtopage =
GETPOST(
'backtopage',
'alpha');
71 $action =
GETPOST(
'action',
'aZ09');
75 $emailcompany =
GETPOST(
"emailcompany");
76 $note_public =
GETPOST(
'note_public',
"restricthtml");
77 $firstname =
GETPOST(
'firstname');
78 $lastname =
GETPOST(
'lastname');
81 $type =
GETPOST(
'type',
'aZ09');
82 if ($type ==
'conf') {
91 if ($type ==
'conf') {
92 $resultconf = $conference->fetch($id);
93 if ($resultconf < 0) {
94 print
'Bad value for parameter id';
97 $resultproject = $project->fetch($conference->fk_project);
98 if ($resultproject < 0) {
100 $errmsg .= $project->error;
101 $errors = array_merge($errors, $project->errors);
105 $currentnbofattendees = 0;
106 if ($type ==
'global') {
107 $resultproject = $project->fetch($id);
108 if ($resultproject < 0) {
110 $errmsg .= $project->error;
111 $errors = array_merge($errors, $project->errors);
113 $sql =
"SELECT COUNT(*) as nb FROM ".MAIN_DB_PREFIX.
"eventorganization_conferenceorboothattendee";
114 $sql .=
" WHERE fk_project = ".((int) $project->id);
115 $sql .=
" AND status IN (0, 1)";
117 $resql = $db->query(
$sql);
119 $obj = $db->fetch_object($resql);
121 $currentnbofattendees = $obj->nb;
130 $securekeyreceived =
GETPOST(
'securekey',
'alpha');
134 if ($securekeytocompare != $securekeyreceived) {
135 print $langs->trans(
'MissingOrBadSecureKey');
140 $langs->loadLangs(array(
"main",
"companies",
"install",
"other",
"eventorganization"));
143 $hookmanager->initHooks(array(
'publicnewmembercard',
'globalcard'));
147 $user->loadDefaultValues();
150 if (empty($conf->eventorganization->enabled)) {
166 function llxHeaderVierge($title, $head =
"", $disablejs = 0, $disablehead = 0, $arrayofjs = [], $arrayofcss = [])
168 global $conf, $langs, $mysoc;
170 top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
172 print
'<body id="mainbody" class="publicnewmemberform">';
175 $urllogo = DOL_URL_ROOT.
'/theme/common/login_logo.png';
177 if (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.
'/logos/thumbs/'.$mysoc->logo_small)) {
178 $urllogo = DOL_URL_ROOT.
'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode(
'logos/thumbs/'.$mysoc->logo_small);
179 } elseif (!empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.
'/logos/'.$mysoc->logo)) {
180 $urllogo = DOL_URL_ROOT.
'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode(
'logos/'.$mysoc->logo);
181 } elseif (is_readable(DOL_DOCUMENT_ROOT.
'/theme/dolibarr_logo.svg')) {
182 $urllogo = DOL_URL_ROOT.
'/theme/dolibarr_logo.svg';
185 print
'<div class="center">';
188 print
'<div class="backgreypublicpayment">';
189 print
'<div class="logopublicpayment">';
190 print
'<img id="dolpaymentlogo" src="'.$urllogo.
'"';
194 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>';
200 print
'<div class="backimagepubliceventorganizationsubscription">';
201 print
'<img id="idEVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE" src="' .
getDolGlobalString(
'EVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE').
'">';
207 print
'<div class="divmainbodylarge">';
231 $parameters = array();
233 $reshook = $hookmanager->executeHooks(
'doActions', $parameters,
$object, $action);
239 if (empty($reshook) && $action ==
'add' && (!empty($conference->id) && $conference->status == 2 || !empty($project->id) && $project->status ==
Project::STATUS_VALIDATED)) {
248 $errmsg .= $langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Email")).
"<br>\n";
251 if (!
GETPOST(
"societe") && !empty((
float) $project->price_registration)) {
253 $errmsg .= $langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Company")).
"<br>\n";
257 $langs->load(
"errors");
258 $errmsg .= $langs->trans(
"ErrorBadEMail",
GETPOST(
"email")).
"<br>\n";
262 $errmsg .= $langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Country")).
"<br>\n";
271 if ($type ==
'global') {
272 $filter =
"(t.fk_project:=:".((int) $id).
") AND (t.email:=:'".$db->escape($email).
"')";
274 if ($type ==
'conf') {
275 $filter =
"(t.fk_actioncomm:=:".((int) $id).
") AND (t.email:=:'".$db->escape($email).
"')";
279 $resultfetchconfattendee = $confattendee->fetchAll(
'',
'', 0, 0, $filter);
281 if (is_array($resultfetchconfattendee) && count($resultfetchconfattendee) > 0) {
283 $confattendee = array_shift($resultfetchconfattendee);
286 $confattendee->date_creation =
dol_now();
287 $confattendee->date_subscription =
dol_now();
288 $confattendee->email = $email;
289 $confattendee->fk_project = $project->id;
290 $confattendee->fk_actioncomm = $id;
291 $confattendee->note_public = $note_public;
292 $confattendee->firstname = $firstname;
293 $confattendee->lastname = $lastname;
296 $nb_post_max =
getDolGlobalInt(
"MAIN_SECURITY_MAX_POST_ON_PUBLIC_PAGES_BY_IP_ADDRESS", 200);
301 if ($nb_post_max > 0) {
302 $sql =
"SELECT COUNT(ref) as nb_attendee";
303 $sql .=
" FROM ".MAIN_DB_PREFIX.
"eventorganization_conferenceorboothattendee";
304 $sql .=
" WHERE ip = '".$db->escape($confattendee->ip).
"'";
305 $sql .=
" AND date_creation > '".$db->idate($minmonthpost).
"'";
306 $resql = $db->query(
$sql);
308 $num = $db->num_rows($resql);
312 $obj = $db->fetch_object($resql);
313 $nb_post_ip = $obj->nb_attendee;
318 $resultconforbooth = -1;
320 if ($nb_post_max > 0 && $nb_post_ip >= $nb_post_max) {
322 $errmsg .= $langs->trans(
"AlreadyTooMuchPostOnThisIPAdress");
323 array_push($confattendee->errors, $langs->trans(
"AlreadyTooMuchPostOnThisIPAdress"));
326 $resultconfattendee = $confattendee->create($user);
328 if ($resultconfattendee < 0) {
330 $errmsg .= $confattendee->error;
331 $errors = array_merge($errors, $confattendee->errors);
339 if (!empty($confattendee->date_subscription) && !empty($confattendee->amount)) {
341 $redirection = $dolibarr_main_url_root.
'/public/eventorganization/subscriptionok.php?id='.((int) $id).
'&securekey='.urlencode($securekeyurl);
343 $mesg = $langs->trans(
"RegistrationAndPaymentWereAlreadyRecorded", $email);
348 header(
"Location: ".$redirection);
352 $resultfetchthirdparty = 0;
354 $genericcompanyname = $langs->trans(
'EventParticipant').
' '.($emailcompany ? $emailcompany : $email);
357 $thirdparty =
new Societe($db);
360 if (!empty($confattendee->fk_soc) && $confattendee->fk_soc > 0) {
361 $resultfetchthirdparty = $thirdparty->fetch($confattendee->fk_soc);
365 if ($resultfetchthirdparty <= 0 && !empty($societe) && !empty($emailcompany)) {
366 $resultfetchthirdparty = $thirdparty->fetch(
'', $societe,
'',
'',
'',
'',
'',
'',
'',
'', $emailcompany);
367 if ($resultfetchthirdparty > 0) {
369 $confattendee->fk_soc = $thirdparty->id;
370 $confattendee->update($user);
371 } elseif ($resultfetchthirdparty == -2) {
372 $thirdparty->error = $langs->trans(
"ErrorSeveralCompaniesWithNameContactUs", $mysoc->email);
376 if ($resultfetchthirdparty <= 0 && !empty($societe) && !empty($email) && $email != $emailcompany) {
377 $resultfetchthirdparty = $thirdparty->fetch(
'', $societe,
'',
'',
'',
'',
'',
'',
'',
'', $email);
378 if ($resultfetchthirdparty > 0) {
380 $confattendee->fk_soc = $thirdparty->id;
381 $confattendee->update($user);
382 } elseif ($resultfetchthirdparty == -2) {
383 $thirdparty->error = $langs->trans(
"ErrorSeveralCompaniesWithNameContactUs", $mysoc->email);
387 if ($resultfetchthirdparty <= 0 && !empty($emailcompany)) {
389 $resultfetchthirdparty = $thirdparty->fetch(
'',
'',
'',
'',
'',
'',
'',
'',
'',
'', $emailcompany);
390 if ($resultfetchthirdparty > 0) {
392 $confattendee->fk_soc = $thirdparty->id;
393 $confattendee->update($user);
394 } elseif ($resultfetchthirdparty == -2) {
395 $thirdparty->error = $langs->trans(
"ErrorSeveralCompaniesWithEmailContactUs", $mysoc->email);
398 if ($resultfetchthirdparty <= 0 && !empty($email) && $email != $emailcompany) {
400 $resultfetchthirdparty = $thirdparty->fetch(
'',
'',
'',
'',
'',
'',
'',
'',
'',
'', $email);
401 if ($resultfetchthirdparty > 0) {
403 $confattendee->fk_soc = $thirdparty->id;
404 $confattendee->update($user);
405 } elseif ($resultfetchthirdparty == -2) {
406 $thirdparty->error = $langs->trans(
"ErrorSeveralCompaniesWithEmailContactUs", $mysoc->email);
409 if ($resultfetchthirdparty <= 0 && !empty($genericcompanyname)) {
411 $resultfetchthirdparty = $thirdparty->fetch(
'', $genericcompanyname,
'',
'',
'',
'',
'',
'',
'',
'',
'');
412 if ($resultfetchthirdparty > 0) {
414 $confattendee->fk_soc = $thirdparty->id;
415 $confattendee->update($user);
416 } elseif ($resultfetchthirdparty == -2) {
417 $thirdparty->error = $langs->trans(
"ErrorSeveralCompaniesWithNameContactUs", $mysoc->email);
423 if ($resultfetchthirdparty <= 0 && !empty($email)) {
425 $resultfetchcontact = $contact->fetch(
'',
null,
'', $email);
426 if ($resultfetchcontact > 0 && $contact->fk_soc > 0) {
427 $thirdparty->fetch($contact->fk_soc);
428 $confattendee->fk_soc = $thirdparty->id;
429 $confattendee->update($user);
430 $resultfetchthirdparty = 1;
434 if ($resultfetchthirdparty <= 0 && !empty($societe)) {
436 $resultfetchthirdparty = $thirdparty->fetch(
'', $societe,
'',
'',
'',
'',
'',
'',
'',
'',
'');
437 if ($resultfetchthirdparty > 0) {
439 $confattendee->fk_soc = $thirdparty->id;
440 $confattendee->update($user);
441 } elseif ($resultfetchthirdparty == -2) {
442 $thirdparty->error =
"ErrorSeveralCompaniesWithNameContactUs";
448 if (empty((
float) $project->price_registration)) {
449 $resultfetchthirdparty = 1;
452 if ($resultfetchthirdparty < 0) {
455 $errmsg .= $thirdparty->error;
456 $errors = array_merge($errors, $thirdparty->errors);
457 } elseif ($resultfetchthirdparty == 0) {
459 if (!empty($societe)) {
460 $thirdparty->name = $societe;
462 $thirdparty->name = $genericcompanyname;
464 $thirdparty->address =
GETPOST(
"address");
465 $thirdparty->zip =
GETPOST(
"zipcode");
466 $thirdparty->town =
GETPOST(
"town");
467 $thirdparty->client = $thirdparty::PROSPECT;
468 $thirdparty->fournisseur = 0;
469 $thirdparty->country_id =
GETPOSTINT(
"country_id");
470 $thirdparty->state_id =
GETPOSTINT(
"state_id");
471 $thirdparty->email = ($emailcompany ? $emailcompany : $email);
475 if (substr($module, 0, 15) ==
'mod_codeclient_' && substr($module, -3) ==
'php') {
476 $module = substr($module, 0,
dol_strlen($module) - 4);
478 $dirsociete = array_merge(array(
'/core/modules/societe/'), $conf->modules_parts[
'societe']);
479 foreach ($dirsociete as $dirroot) {
485 $modCodeClient =
new $module($db);
487 if (empty($tmpcode) && !empty($modCodeClient->code_auto)) {
488 $tmpcode = $modCodeClient->getNextValue($thirdparty, 0);
490 $thirdparty->code_client = $tmpcode;
491 $readythirdparty = $thirdparty->create($user);
492 if ($readythirdparty < 0) {
494 $errmsg .= $thirdparty->error;
495 $errors = array_merge($errors, $thirdparty->errors);
497 $thirdparty->country_code =
getCountry($thirdparty->country_id, 2, $db, $langs);
498 $thirdparty->country =
getCountry($thirdparty->country_code, 0, $db, $langs);
501 $confattendee->fk_soc = $thirdparty->id;
502 $confattendee->update($user);
509 if (!empty((
float) $project->price_registration)) {
510 $outputlangs = $langs;
514 $outputlangs->loadLangs(array(
"eventorganization"));
517 $productforinvoicerow =
new Product($db);
518 $productforinvoicerow->id = 0;
522 $resultprod = $productforinvoicerow->fetch(
getDolGlobalString(
'SERVICE_CONFERENCE_ATTENDEE_SUBSCRIPTION'));
526 if ($resultprod < 0) {
528 $errmsg .= $productforinvoicerow->error;
529 $errors = array_merge($errors, $productforinvoicerow->errors);
532 if (empty($confattendee->fk_invoice)) {
534 $facture->socid = $thirdparty->id;
537 $facture->cond_reglement_id = $confattendee->cond_reglement_id;
538 $facture->fk_project = $project->id;
541 if (empty($facture->cond_reglement_id)) {
542 $paymenttermstatic =
new PaymentTerm($confattendee->db);
543 $facture->cond_reglement_id = $paymenttermstatic->getDefaultId();
544 if (empty($facture->cond_reglement_id)) {
546 $confattendee->error =
'ErrorNoPaymentTermRECEPFound';
547 $confattendee->errors[] = $confattendee->error;
550 $resultfacture = $facture->create($user);
551 if ($resultfacture <= 0) {
552 $confattendee->error = $facture->error;
553 $confattendee->errors = $facture->errors;
556 $confattendee->fk_invoice = $resultfacture;
557 $confattendee->update($user);
560 $facture->fetch($confattendee->fk_invoice);
571 $vattouse =
get_default_tva($mysoc, $thirdparty, $productforinvoicerow->id);
573 $labelforproduct = $outputlangs->trans(
"EventFee", $project->title);
574 if ($project->location) {
575 $labelforproduct .=
' - '.$project->location;
577 $date_start = $project->date_start_event;
578 $date_end = $project->date_end_event;
581 if (empty($facture->lines)) {
582 $pu_ttc = (
float) $project->price_registration;
584 $price_base_type =
'TTC';
586 $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);
588 $confattendee->error = $facture->error;
589 $confattendee->errors = $facture->errors;
604 $sourcetouse =
'organizedeventregistration';
605 $reftouse = $facture->id;
606 $redirection = $dolibarr_main_url_root.
'/public/payment/newpayment.php?source='.urlencode((
string) ($sourcetouse)).
'&ref='.urlencode((
string) ($reftouse));
609 $redirection .=
'&securekey='.dol_hash(
getDolGlobalString(
'PAYMENT_SECURITY_TOKEN') . $sourcetouse . $reftouse, 2);
611 $redirection .=
'&securekey='.urlencode(
getDolGlobalString(
'PAYMENT_SECURITY_TOKEN'));
615 header(
"Location: ".$redirection);
625 $confattendee->setStatut(1);
628 require_once DOL_DOCUMENT_ROOT.
'/core/class/CMailFile.class.php';
629 include_once DOL_DOCUMENT_ROOT.
'/core/class/html.formmail.class.php';
633 $outputlangs->setDefaultLang(empty($thirdparty->default_lang) ? $mysoc->default_lang : $thirdparty->default_lang);
635 $outputlangs->loadLangs(array(
"main",
"members",
"eventorganization"));
637 $arraydefaultmessage =
null;
640 if (!empty($labeltouse)) {
641 $arraydefaultmessage = $formmail->getEMailTemplate($db,
'eventorganization_send', $user, $outputlangs, $labeltouse, 1,
'');
644 if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) {
645 $subject = $arraydefaultmessage->topic;
646 $msg = $arraydefaultmessage->content;
655 $sendto = $thirdparty->email;
657 $urlback = $_SERVER[
"REQUEST_URI"];
661 $mailfile =
new CMailFile($subjecttosend, $sendto, $from, $texttosend, array(), array(), array(),
'',
'', 0, $ishtml);
663 $result = $mailfile->sendfile();
665 dol_syslog(
"EMail sent to ".$sendto, LOG_DEBUG, 0,
'_payment');
667 dol_syslog(
"Failed to send EMail to ".$sendto, LOG_ERR, 0,
'_payment');
671 $redirection = $dolibarr_main_url_root.
'/public/eventorganization/subscriptionok.php?id='.((int) $id).
'&securekey='.urlencode($securekeyurl);
673 header(
"Location: ".$redirection);
688 $form =
new Form($db);
694 print
'<div align="center">';
695 print
'<div id="divsubscribe">';
698 print
'<div class="center subscriptionformbanner subbanner justify margintoponly paddingtop marginbottomonly padingbottom">';
699 print
load_fiche_titre($langs->trans(
"NewRegistration"),
'',
'', 0, 0,
'center');
701 print
'<span class="opacitymedium">'.$langs->trans(
"EvntOrgWelcomeMessage").
'</span>';
704 print
'<span class="eventlabel large">'.dol_escape_htmltag($project->title .
' '. $conference->label).
'</span><br>';
708 print
'<div class="justify subscriptionformhelptext">';
710 if ($project->date_start_event || $project->date_end_event) {
711 print
'<br><span class="fa fa-calendar pictofixedwidth opacitymedium"></span>';
713 if ($project->date_start_event) {
715 $tmparray =
dol_getdate($project->date_start_event,
false,
'');
716 if ($tmparray[
'hours'] || $tmparray[
'minutes'] || $tmparray[
'minutes']) {
721 if ($project->date_start_event && $project->date_end_event) {
724 if ($project->date_end_event) {
726 $tmparray =
dol_getdate($project->date_end_event,
false,
'');
727 if ($tmparray[
'hours'] || $tmparray[
'minutes'] || $tmparray[
'minutes']) {
732 if ($project->date_start_event || $project->date_end_event) {
735 if ($project->location) {
736 print
'<span class="fa fa-map-marked-alt pictofixedwidth opacitymedium"></span>'.dol_escape_htmltag($project->location).
'<br>';
738 if ($project->note_public) {
739 print
'<br><span class="opacitymedium">'.dol_htmlentitiesbr($project->note_public).
'</span><br>';
746 if ($conference->id > 0) {
762 $maxattendees = $project->max_attendees;
765 if ($maxattendees && $currentnbofattendees >= $maxattendees) {
767 print
'<div class="warning">'.$langs->trans(
"MaxNbOfAttendeesReached").
'</div>';
775 if ((!empty($conference->id) && $conference->status == ConferenceOrBooth::STATUS_CONFIRMED) || (!empty($project->id) && $project->status ==
Project::STATUS_VALIDATED)) {
776 if (empty($maxattendees) || $currentnbofattendees < $maxattendees) {
778 print
'<form action="' . $_SERVER[
"PHP_SELF"] .
'" method="POST" name="newmember">' .
"\n";
779 print
'<input type="hidden" name="token" value="' .
newToken() .
'" / >';
780 print
'<input type="hidden" name="entity" value="' . $entity .
'" />';
781 print
'<input type="hidden" name="action" value="add" />';
782 print
'<input type="hidden" name="type" value="' . $type .
'" />';
783 print
'<input type="hidden" name="id" value="' . $conference->id .
'" />';
784 print
'<input type="hidden" name="fk_project" value="' . $project->id .
'" />';
785 print
'<input type="hidden" name="securekey" value="' . $securekeyreceived .
'" />';
794 print
'<script type="text/javascript">
795 jQuery(document).ready(function () {
796 jQuery(document).ready(function () {
797 jQuery("#selectcountry_id").change(function() {
798 document.newmember.action.value="create";
799 document.newmember.submit();
805 print
'<table class="border" summary="form to subscribe" id="tablesubscribe">' .
"\n";
808 print
'<tr><td><span class="fieldrequired">';
809 print $langs->trans(
"Firstname") .
'</span></td><td>';
810 print
img_picto(
'',
'user',
'class="pictofixedwidth"');
811 print
'<input type="text" name="firstname" maxlength="255" class="minwidth200 maxwidth300" value="' .
dol_escape_htmltag($firstname) .
'" required autofocus></td></tr>' .
"\n";
814 print
'<tr><td><span class="fieldrequired">';
815 print $langs->trans(
"Lastname") .
'</span></td><td>';
816 print
img_picto(
'',
'user',
'class="pictofixedwidth"');
817 print
'<input type="text" name="lastname" maxlength="255" class="minwidth200 maxwidth300" value="' .
dol_escape_htmltag($lastname) .
'" required></td></tr>' .
"\n";
820 print
'<tr><td><span class="fieldrequired">' . $langs->trans(
"EmailAttendee") .
'</span></td><td>';
821 print
img_picto(
'',
'email',
'class="pictofixedwidth"');
822 print
'<input type="text" name="email" maxlength="255" class="minwidth200 widthcentpercentminusx maxwidth300" value="' .
dol_escape_htmltag(
GETPOST(
'email')) .
'" required></td></tr>' .
"\n";
825 print
'<tr id="trcompany" class="trcompany"><td>';
826 if (!empty((
float) $project->price_registration)) {
827 print
'<span class="fieldrequired">';
829 print $langs->trans(
"Company");
830 if (!empty((
float) $project->price_registration)) {
834 print
img_picto(
'',
'company',
'class="pictofixedwidth"');
835 print
'<input type="text" name="societe" class="minwidth200 widthcentpercentminusx maxwidth300" value="' .
dol_escape_htmltag(
GETPOST(
'societe')) .
'"'.(empty((
float) $project->price_registration) ?
'' :
' required').
'></td></tr>' .
"\n";
838 if ($project->price_registration) {
839 print
'<tr><td>' . $form->textwithpicto($langs->trans(
"EmailCompany"), $langs->trans(
"EmailCompanyForInvoice")) .
'</td><td>';
840 print
img_picto(
'',
'email',
'class="pictofixedwidth"');
841 print
'<input type="text" name="emailcompany" maxlength="255" class="minwidth200 widthcentpercentminusx maxwidth300" value="' .
dol_escape_htmltag(
GETPOST(
'emailcompany')) .
'"></td></tr>' .
"\n";
845 print
'<tr><td>' . $langs->trans(
"Address") .
'</td><td>' .
"\n";
846 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";
849 print
'<tr><td>' . $langs->trans(
'Zip') .
' / ' . $langs->trans(
'Town') .
'</td><td>';
850 print $formcompany->select_ziptown(
GETPOST(
'zipcode'),
'zipcode', array(
'town',
'selectcountry_id',
'state_id'), 6, 1);
852 print $formcompany->select_ziptown(
GETPOST(
'town'),
'town', array(
'zipcode',
'selectcountry_id',
'state_id'), 0, 1);
856 print
'<tr><td><span class="fieldrequired">'.$langs->trans(
'Country').
'</span></td><td>';
857 print
img_picto(
'',
'country',
'class="pictofixedwidth"');
858 $country_id =
GETPOST(
'country_id');
860 $country_id =
getCountry($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE, 2, $db, $langs);
862 if (!$country_id && !empty($conf->geoipmaxmind->enabled)) {
866 $new_country_id =
getCountry($country_code, 3, $db, $langs);
868 if ($new_country_id) {
869 $country_id = $new_country_id;
873 $country_code =
getCountry($country_id, 2, $db, $langs);
874 print $form->select_country($country_id,
'country_id',
'', 0,
'minwidth200 widthcentpercentminusx maxwidth300');
878 print
'<tr><td>' . $langs->trans(
'State') .
'</td><td>';
880 print
img_picto(
'',
'state',
'class="pictofixedwidth"');
881 print $formcompany->select_state(
GETPOST(
"state_id"), $country_code);
888 if ($project->price_registration) {
889 print
'<tr><td>' . $langs->trans(
'Price') .
'</td><td>';
890 print
'<span class="amount price-registration">'.price($project->price_registration, 1, $langs, 1, -1, -1, $conf->currency).
'</span>';
894 $notetoshow = $note_public;
895 print
'<tr><td>' . $langs->trans(
'Note') .
'</td><td>';
897 $notetoshow = str_replace(
'\n',
"\n", $conf->global->EVENTORGANIZATION_DEFAULT_NOTE_ON_REGISTRATION);
899 print
'<textarea name="note_public" class="centpercent" rows="'.ROWS_9.
'">'.
dol_escape_htmltag($notetoshow, 0, 1).
'</textarea>';
907 print
'<div class="center">';
908 print
'<input type="submit" value="' . $langs->trans(
"Submit") .
'" id="submitsave" class="button">';
909 if (!empty($backtopage)) {
910 print
' <input type="submit" value="' . $langs->trans(
"Cancel") .
'" id="submitcancel" class="button button-cancel">';
920 print $langs->trans(
"ConferenceIsNotConfirmed");
924 print
'</div></div>';
if($user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
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=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.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
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).
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.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
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.
div float
Buy price without taxes.
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.