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");
78 $type =
GETPOST(
'type',
'aZ09');
79 if ($type ==
'conf') {
88 if ($type ==
'conf') {
89 $resultconf = $conference->fetch($id);
90 if ($resultconf < 0) {
91 print
'Bad value for parameter id';
94 $resultproject = $project->fetch($conference->fk_project);
95 if ($resultproject < 0) {
97 $errmsg .= $project->error;
98 $errors = array_merge($errors, $project->errors);
102 $currentnbofattendees = 0;
103 if ($type ==
'global') {
104 $resultproject = $project->fetch($id);
105 if ($resultproject < 0) {
107 $errmsg .= $project->error;
108 $errors = array_merge($errors, $project->errors);
110 $sql =
"SELECT COUNT(*) as nb FROM ".MAIN_DB_PREFIX.
"eventorganization_conferenceorboothattendee";
111 $sql .=
" WHERE fk_project = ".((int) $project->id);
112 $sql .=
" AND status IN (0, 1)";
114 $resql = $db->query($sql);
116 $obj = $db->fetch_object(
$resql);
118 $currentnbofattendees = $obj->nb;
127 $securekeyreceived =
GETPOST(
'securekey',
'alpha');
128 $securekeytocompare =
dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.
'conferenceorbooth'.$id,
'md5');
131 if ($securekeytocompare != $securekeyreceived) {
132 print $langs->trans(
'MissingOrBadSecureKey');
137 $langs->loadLangs(array(
"main",
"companies",
"install",
"other",
"eventorganization"));
140 $hookmanager->initHooks(array(
'publicnewmembercard',
'globalcard'));
144 $user->loadDefaultValues();
147 if (empty($conf->eventorganization->enabled)) {
163 function llxHeaderVierge($title, $head =
"", $disablejs = 0, $disablehead = 0, $arrayofjs =
'', $arrayofcss =
'')
165 global $user, $conf, $langs, $mysoc;
167 top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
169 print
'<body id="mainbody" class="publicnewmemberform">';
172 $urllogo = DOL_URL_ROOT.
'/theme/common/login_logo.png';
174 if (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.
'/logos/thumbs/'.$mysoc->logo_small)) {
175 $urllogo = DOL_URL_ROOT.
'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode(
'logos/thumbs/'.$mysoc->logo_small);
176 } elseif (!empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.
'/logos/'.$mysoc->logo)) {
177 $urllogo = DOL_URL_ROOT.
'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode(
'logos/'.$mysoc->logo);
178 } elseif (is_readable(DOL_DOCUMENT_ROOT.
'/theme/dolibarr_logo.svg')) {
179 $urllogo = DOL_URL_ROOT.
'/theme/dolibarr_logo.svg';
182 print
'<div class="center">';
185 print
'<div class="backgreypublicpayment">';
186 print
'<div class="logopublicpayment">';
187 print
'<img id="dolpaymentlogo" src="'.$urllogo.
'"';
190 if (empty($conf->global->MAIN_HIDE_POWERED_BY)) {
191 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>';
196 if (!empty($conf->global->EVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE)) {
197 print
'<div class="backimagepubliceventorganizationsubscription">';
198 print
'<img id="idEVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE" src="'.$conf->global->EVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE.
'">';
204 print
'<div class="divmainbodylarge">';
228 $parameters = array();
230 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
236 if (empty($reshook) && $action ==
'add' && (!empty($conference->id) && $conference->status==2 || !empty($project->id) && $project->status ==
Project::STATUS_VALIDATED)) {
245 $errmsg .= $langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Email")).
"<br>\n";
248 if (!
GETPOST(
"societe") && !empty(floatval($project->price_registration))) {
250 $errmsg .= $langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Company")).
"<br>\n";
254 $langs->load(
"errors");
255 $errmsg .= $langs->trans(
"ErrorBadEMail",
GETPOST(
"email")).
"<br>\n";
259 $errmsg .= $langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Country")).
"<br>\n";
268 if ($type ==
'global') {
269 $filter = array(
't.fk_project'=>((
int) $id),
'customsql'=>
't.email="'.$db->escape($email).
'"');
271 if ($type ==
'conf') {
272 $filter = array(
't.fk_actioncomm'=>((
int) $id),
'customsql'=>
't.email="'.$db->escape($email).
'"');
276 $resultfetchconfattendee = $confattendee->fetchAll(
'',
'', 0, 0, $filter);
278 if (is_array($resultfetchconfattendee) && count($resultfetchconfattendee) > 0) {
280 $confattendee = array_shift($resultfetchconfattendee);
283 $confattendee->date_creation =
dol_now();
284 $confattendee->date_subscription =
dol_now();
285 $confattendee->email = $email;
286 $confattendee->fk_project = $project->id;
287 $confattendee->fk_actioncomm = $id;
288 $confattendee->note_public = $note_public;
291 $nb_post_max =
getDolGlobalInt(
"MAIN_SECURITY_MAX_POST_ON_PUBLIC_PAGES_BY_IP_ADDRESS", 200);
296 if ($nb_post_max > 0) {
297 $sql =
"SELECT COUNT(ref) as nb_attendee";
298 $sql .=
" FROM ".MAIN_DB_PREFIX.
"eventorganization_conferenceorboothattendee";
299 $sql .=
" WHERE ip = '".$db->escape($confattendee->ip).
"'";
300 $sql .=
" AND date_creation > '".$db->idate($minmonthpost).
"'";
301 $resql = $db->query($sql);
303 $num = $db->num_rows(
$resql);
307 $obj = $db->fetch_object(
$resql);
308 $nb_post_ip = $obj->nb_attendee;
313 $resultconforbooth = -1;
315 if ($nb_post_max > 0 && $nb_post_ip >= $nb_post_max) {
317 $errmsg .= $langs->trans(
"AlreadyTooMuchPostOnThisIPAdress");
318 array_push($confattendee->errors, $langs->trans(
"AlreadyTooMuchPostOnThisIPAdress"));
321 $resultconfattendee = $confattendee->create($user);
323 if ($resultconfattendee < 0) {
325 $errmsg .= $confattendee->error;
326 $errors = array_merge($errors, $confattendee->errors);
334 if (!empty($confattendee->date_subscription) && !empty($confattendee->amount)) {
335 $securekeyurl =
dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.
'conferenceorbooth'.$id,
'master');
336 $redirection = $dolibarr_main_url_root.
'/public/eventorganization/subscriptionok.php?id='.((int) $id).
'&securekey='.urlencode($securekeyurl);
338 $mesg = $langs->trans(
"RegistrationAndPaymentWereAlreadyRecorded", $email);
343 Header(
"Location: ".$redirection);
347 $resultfetchthirdparty = 0;
349 $genericcompanyname = $langs->trans(
'EventParticipant').
' '.($emailcompany ? $emailcompany : $email);
352 $thirdparty =
new Societe($db);
355 if (!empty($confattendee->fk_soc) && $confattendee->fk_soc > 0) {
356 $resultfetchthirdparty = $thirdparty->fetch($confattendee->fk_soc);
358 if (empty($conf->global->EVENTORGANIZATION_DISABLE_RETREIVE_THIRDPARTY_FROM_NAME)) {
360 if ($resultfetchthirdparty <= 0 && !empty($societe) && !empty($emailcompany)) {
361 $resultfetchthirdparty = $thirdparty->fetch(
'', $societe,
'',
'',
'',
'',
'',
'',
'',
'', $emailcompany);
362 if ($resultfetchthirdparty > 0) {
364 $confattendee->fk_soc = $thirdparty->id;
365 $confattendee->update($user);
366 } elseif ($resultfetchthirdparty == -2) {
367 $thirdparty->error = $langs->trans(
"ErrorSeveralCompaniesWithNameContactUs", $mysoc->email);
371 if ($resultfetchthirdparty <= 0 && !empty($societe) && !empty($email) && $email != $emailcompany) {
372 $resultfetchthirdparty = $thirdparty->fetch(
'', $societe,
'',
'',
'',
'',
'',
'',
'',
'', $email);
373 if ($resultfetchthirdparty > 0) {
375 $confattendee->fk_soc = $thirdparty->id;
376 $confattendee->update($user);
377 } elseif ($resultfetchthirdparty == -2) {
378 $thirdparty->error = $langs->trans(
"ErrorSeveralCompaniesWithNameContactUs", $mysoc->email);
382 if ($resultfetchthirdparty <= 0 && !empty($emailcompany)) {
384 $resultfetchthirdparty = $thirdparty->fetch(
'',
'',
'',
'',
'',
'',
'',
'',
'',
'', $emailcompany);
385 if ($resultfetchthirdparty > 0) {
387 $confattendee->fk_soc = $thirdparty->id;
388 $confattendee->update($user);
389 } elseif ($resultfetchthirdparty == -2) {
390 $thirdparty->error = $langs->trans(
"ErrorSeveralCompaniesWithEmailContactUs", $mysoc->email);
393 if ($resultfetchthirdparty <= 0 && !empty($email) && $email != $emailcompany) {
395 $resultfetchthirdparty = $thirdparty->fetch(
'',
'',
'',
'',
'',
'',
'',
'',
'',
'', $email);
396 if ($resultfetchthirdparty > 0) {
398 $confattendee->fk_soc = $thirdparty->id;
399 $confattendee->update($user);
400 } elseif ($resultfetchthirdparty == -2) {
401 $thirdparty->error = $langs->trans(
"ErrorSeveralCompaniesWithEmailContactUs", $mysoc->email);
404 if ($resultfetchthirdparty <= 0 && !empty($genericcompanyname)) {
406 $resultfetchthirdparty = $thirdparty->fetch(
'', $genericcompanyname,
'',
'',
'',
'',
'',
'',
'',
'',
'');
407 if ($resultfetchthirdparty > 0) {
409 $confattendee->fk_soc = $thirdparty->id;
410 $confattendee->update($user);
411 } elseif ($resultfetchthirdparty == -2) {
412 $thirdparty->error = $langs->trans(
"ErrorSeveralCompaniesWithNameContactUs", $mysoc->email);
418 if ($resultfetchthirdparty <= 0 && !empty($email)) {
420 $resultfetchcontact = $contact->fetch(
'',
null,
'', $email);
421 if ($resultfetchcontact > 0 && $contact->fk_soc > 0) {
422 $thirdparty->fetch($contact->fk_soc);
423 $confattendee->fk_soc = $thirdparty->id;
424 $confattendee->update($user);
425 $resultfetchthirdparty = 1;
429 if ($resultfetchthirdparty <= 0 && !empty($societe)) {
431 $resultfetchthirdparty = $thirdparty->fetch(
'', $societe,
'',
'',
'',
'',
'',
'',
'',
'',
'');
432 if ($resultfetchthirdparty > 0) {
434 $confattendee->fk_soc = $thirdparty->id;
435 $confattendee->update($user);
436 } elseif ($resultfetchthirdparty == -2) {
437 $thirdparty->error =
"ErrorSeveralCompaniesWithNameContactUs";
443 if (empty(floatval($project->price_registration))) {
444 $resultfetchthirdparty = 1;
447 if ($resultfetchthirdparty < 0) {
450 $errmsg .= $thirdparty->error;
451 $errors = array_merge($errors, $thirdparty->errors);
452 } elseif ($resultfetchthirdparty == 0) {
454 if (!empty($societe)) {
455 $thirdparty->name = $societe;
457 $thirdparty->name = $genericcompanyname;
459 $thirdparty->address =
GETPOST(
"address");
460 $thirdparty->zip =
GETPOST(
"zipcode");
461 $thirdparty->town =
GETPOST(
"town");
462 $thirdparty->client = $thirdparty::PROSPECT;
463 $thirdparty->fournisseur = 0;
464 $thirdparty->country_id =
GETPOST(
"country_id",
'int');
465 $thirdparty->state_id =
GETPOST(
"state_id",
'int');
466 $thirdparty->email = ($emailcompany ? $emailcompany : $email);
469 $module = (!empty($conf->global->SOCIETE_CODECLIENT_ADDON) ? $conf->global->SOCIETE_CODECLIENT_ADDON :
'mod_codeclient_leopard');
470 if (substr($module, 0, 15) ==
'mod_codeclient_' && substr($module, -3) ==
'php') {
471 $module = substr($module, 0,
dol_strlen($module) - 4);
473 $dirsociete = array_merge(array(
'/core/modules/societe/'), $conf->modules_parts[
'societe']);
474 foreach ($dirsociete as $dirroot) {
480 $modCodeClient =
new $module($db);
482 if (empty($tmpcode) && !empty($modCodeClient->code_auto)) {
483 $tmpcode = $modCodeClient->getNextValue($thirdparty, 0);
485 $thirdparty->code_client = $tmpcode;
486 $readythirdparty = $thirdparty->create($user);
487 if ($readythirdparty < 0) {
489 $errmsg .= $thirdparty->error;
490 $errors = array_merge($errors, $thirdparty->errors);
492 $thirdparty->country_code =
getCountry($thirdparty->country_id, 2, $db, $langs);
493 $thirdparty->country =
getCountry($thirdparty->country_code, 0, $db, $langs);
496 $confattendee->fk_soc = $thirdparty->id;
497 $confattendee->update($user);
504 if (!empty(floatval($project->price_registration))) {
505 $outputlangs = $langs;
510 $productforinvoicerow =
new Product($db);
511 $productforinvoicerow->id = 0;
514 if ($conf->global->SERVICE_CONFERENCE_ATTENDEE_SUBSCRIPTION > 0) {
515 $resultprod = $productforinvoicerow->fetch($conf->global->SERVICE_CONFERENCE_ATTENDEE_SUBSCRIPTION);
519 if ($resultprod < 0) {
521 $errmsg .= $productforinvoicerow->error;
522 $errors = array_merge($errors, $productforinvoicerow->errors);
525 if (empty($confattendee->fk_invoice)) {
527 $facture->socid = $thirdparty->id;
530 $facture->cond_reglement_id = $confattendee->cond_reglement_id;
531 $facture->fk_project = $project->id;
534 if (empty($facture->cond_reglement_id)) {
535 $paymenttermstatic =
new PaymentTerm($confattendee->db);
536 $facture->cond_reglement_id = $paymenttermstatic->getDefaultId();
537 if (empty($facture->cond_reglement_id)) {
539 $confattendee->error =
'ErrorNoPaymentTermRECEPFound';
540 $confattendee->errors[] = $confattendee->error;
543 $resultfacture = $facture->create($user);
544 if ($resultfacture <= 0) {
545 $confattendee->error = $facture->error;
546 $confattendee->errors = $facture->errors;
549 $confattendee->fk_invoice = $resultfacture;
550 $confattendee->update($user);
553 $facture->fetch($confattendee->fk_invoice);
564 $vattouse =
get_default_tva($mysoc, $thirdparty, $productforinvoicerow->id);
566 $labelforproduct = $outputlangs->trans(
"EventFee", $project->title);
567 if ($project->location) {
568 $labelforproduct .=
' - '.$project->location;
570 $date_start = $project->date_start_event;
571 $date_end = $project->date_end_event;
574 if (empty($facture->lines)) {
575 $pu_ttc = floatval($project->price_registration);
577 $price_base_type =
'TTC';
579 $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);
581 $confattendee->error = $facture->error;
582 $confattendee->errors = $facture->errors;
597 $sourcetouse =
'organizedeventregistration';
598 $reftouse = $facture->id;
599 $redirection = $dolibarr_main_url_root.
'/public/payment/newpayment.php?source='.urlencode($sourcetouse).
'&ref='.urlencode($reftouse);
600 if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) {
601 if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) {
602 $redirection .=
'&securekey='.dol_hash($conf->global->PAYMENT_SECURITY_TOKEN . $sourcetouse . $reftouse, 2);
604 $redirection .=
'&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN);
608 Header(
"Location: ".$redirection);
618 $confattendee->setStatut(1);
621 require_once DOL_DOCUMENT_ROOT.
'/core/class/CMailFile.class.php';
622 include_once DOL_DOCUMENT_ROOT.
'/core/class/html.formmail.class.php';
626 $outputlangs->setDefaultLang(empty($thirdparty->default_lang) ? $mysoc->default_lang : $thirdparty->default_lang);
628 $outputlangs->loadLangs(array(
"main",
"members"));
630 $arraydefaultmessage =
null;
633 if (!empty($labeltouse)) {
634 $arraydefaultmessage = $formmail->getEMailTemplate($db,
'eventorganization_send', $user, $outputlangs, $labeltouse, 1,
'');
637 if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) {
638 $subject = $arraydefaultmessage->topic;
639 $msg = $arraydefaultmessage->content;
648 $sendto = $thirdparty->email;
649 $from = $conf->global->MAILING_EMAIL_FROM;
650 $urlback = $_SERVER[
"REQUEST_URI"];
654 $mailfile =
new CMailFile($subjecttosend, $sendto, $from, $texttosend, array(), array(), array(),
'',
'', 0, $ishtml);
656 $result = $mailfile->sendfile();
658 dol_syslog(
"EMail sent to ".$sendto, LOG_DEBUG, 0,
'_payment');
660 dol_syslog(
"Failed to send EMail to ".$sendto, LOG_ERR, 0,
'_payment');
663 $securekeyurl =
dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.
'conferenceorbooth'.$id, 2);
664 $redirection = $dolibarr_main_url_root.
'/public/eventorganization/subscriptionok.php?id='.((int) $id).
'&securekey='.urlencode($securekeyurl);
666 Header(
"Location: ".$redirection);
687 print
'<div align="center">';
688 print
'<div id="divsubscribe">';
691 print
'<div class="center subscriptionformbanner subbanner justify margintoponly paddingtop marginbottomonly padingbottom">';
692 print
load_fiche_titre($langs->trans(
"NewRegistration"),
'',
'', 0, 0,
'center');
694 print
'<span class="opacitymedium">'.$langs->trans(
"EvntOrgWelcomeMessage").
'</span>';
697 print
'<span class="eventlabel large">'.dol_escape_htmltag($project->title .
' '. $conference->label).
'</span><br>';
701 print
'<div class="justify subscriptionformhelptext">';
703 if ($project->date_start_event || $project->date_end_event) {
704 print
'<br><span class="fa fa-calendar pictofixedwidth opacitymedium"></span>';
706 if ($project->date_start_event) {
708 $tmparray =
dol_getdate($project->date_start_event,
false,
'');
709 if ($tmparray[
'hours'] || $tmparray[
'minutes'] || $tmparray[
'minutes']) {
714 if ($project->date_start_event && $project->date_end_event) {
717 if ($project->date_end_event) {
719 $tmparray =
dol_getdate($project->date_end_event,
false,
'');
720 if ($tmparray[
'hours'] || $tmparray[
'minutes'] || $tmparray[
'minutes']) {
725 if ($project->date_start_event || $project->date_end_event) {
728 if ($project->location) {
729 print
'<span class="fa fa-map-marked-alt pictofixedwidth opacitymedium"></span>'.dol_escape_htmltag($project->location).
'<br>';
731 if ($project->note_public) {
732 print
'<br><span class="opacitymedium">'.dol_htmlentitiesbr($project->note_public).
'</span><br>';
739 if ($conference->id > 0) {
755 $maxattendees = $project->max_attendees;
758 if ($maxattendees && $currentnbofattendees >= $maxattendees) {
760 print
'<div class="warning">'.$langs->trans(
"MaxNbOfAttendeesReached").
'</div>';
768 if ((!empty($conference->id) && $conference->status == ConferenceOrBooth::STATUS_CONFIRMED) || (!empty($project->id) && $project->status ==
Project::STATUS_VALIDATED)) {
769 if (empty($maxattendees) || $currentnbofattendees < $maxattendees) {
771 print
'<form action="' . $_SERVER[
"PHP_SELF"] .
'" method="POST" name="newmember">' .
"\n";
772 print
'<input type="hidden" name="token" value="' .
newToken() .
'" / >';
773 print
'<input type="hidden" name="entity" value="' . $entity .
'" />';
774 print
'<input type="hidden" name="action" value="add" />';
775 print
'<input type="hidden" name="type" value="' . $type .
'" />';
776 print
'<input type="hidden" name="id" value="' . $conference->id .
'" />';
777 print
'<input type="hidden" name="fk_project" value="' . $project->id .
'" />';
778 print
'<input type="hidden" name="securekey" value="' . $securekeyreceived .
'" />';
787 print
'<script type="text/javascript">
788 jQuery(document).ready(function () {
789 jQuery(document).ready(function () {
790 jQuery("#selectcountry_id").change(function() {
791 document.newmember.action.value="create";
792 document.newmember.submit();
798 print
'<table class="border" summary="form to subscribe" id="tablesubscribe">' .
"\n";
801 print
'<tr><td><span class="fieldrequired">' . $langs->trans(
"EmailAttendee") .
'</span></td><td>';
802 print
img_picto(
'',
'email',
'class="pictofixedwidth"');
803 print
'<input type="text" name="email" maxlength="255" class="minwidth200 widthcentpercentminusx maxwidth300" value="' .
dol_escape_htmltag(
GETPOST(
'email')) .
'" required></td></tr>' .
"\n";
806 print
'<tr id="trcompany" class="trcompany"><td>';
807 if (!empty(floatval($project->price_registration))) {
808 print
'<span class="fieldrequired">';
810 print $langs->trans(
"Company");
811 if (!empty(floatval($project->price_registration))) {
815 print
img_picto(
'',
'company',
'class="pictofixedwidth"');
816 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";
819 if ($project->price_registration) {
820 print
'<tr><td>' .
$form->textwithpicto($langs->trans(
"EmailCompany"), $langs->trans(
"EmailCompanyForInvoice")) .
'</td><td>';
821 print
img_picto(
'',
'email',
'class="pictofixedwidth"');
822 print
'<input type="text" name="emailcompany" maxlength="255" class="minwidth200 widthcentpercentminusx maxwidth300" value="' .
dol_escape_htmltag(
GETPOST(
'emailcompany')) .
'"></td></tr>' .
"\n";
826 print
'<tr><td>' . $langs->trans(
"Address") .
'</td><td>' .
"\n";
827 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";
830 print
'<tr><td>' . $langs->trans(
'Zip') .
' / ' . $langs->trans(
'Town') .
'</td><td>';
831 print $formcompany->select_ziptown(
GETPOST(
'zipcode'),
'zipcode', array(
'town',
'selectcountry_id',
'state_id'), 6, 1);
833 print $formcompany->select_ziptown(
GETPOST(
'town'),
'town', array(
'zipcode',
'selectcountry_id',
'state_id'), 0, 1);
837 print
'<tr><td><span class="fieldrequired">'.$langs->trans(
'Country').
'</span></td><td>';
838 print
img_picto(
'',
'country',
'class="pictofixedwidth"');
839 $country_id =
GETPOST(
'country_id');
840 if (!$country_id && !empty($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE)) {
841 $country_id =
getCountry($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE, 2, $db, $langs);
843 if (!$country_id && !empty($conf->geoipmaxmind->enabled)) {
847 $new_country_id =
getCountry($country_code, 3, $db, $langs);
849 if ($new_country_id) {
850 $country_id = $new_country_id;
854 $country_code =
getCountry($country_id, 2, $db, $langs);
855 print
$form->select_country($country_id,
'country_id',
'', 0,
'minwidth200 widthcentpercentminusx maxwidth300');
858 if (empty($conf->global->SOCIETE_DISABLE_STATE)) {
859 print
'<tr><td>' . $langs->trans(
'State') .
'</td><td>';
861 print
img_picto(
'',
'state',
'class="pictofixedwidth"');
862 print $formcompany->select_state(
GETPOST(
"state_id"), $country_code);
869 if ($project->price_registration) {
870 print
'<tr><td>' . $langs->trans(
'Price') .
'</td><td>';
871 print
'<span class="amount price-registration">'.price($project->price_registration, 1, $langs, 1, -1, -1, $conf->currency).
'</span>';
875 $notetoshow = $note_public;
876 print
'<tr><td>' . $langs->trans(
'Note') .
'</td><td>';
877 if (!empty($conf->global->EVENTORGANIZATION_DEFAULT_NOTE_ON_REGISTRATION)) {
878 $notetoshow = str_replace(
'\n',
"\n", $conf->global->EVENTORGANIZATION_DEFAULT_NOTE_ON_REGISTRATION);
880 print
'<textarea name="note_public" class="centpercent" rows="'.ROWS_9.
'">'.
dol_escape_htmltag($notetoshow, 0, 1).
'</textarea>';
888 print
'<div class="center">';
889 print
'<input type="submit" value="' . $langs->trans(
"Submit") .
'" id="submitsave" class="button">';
890 if (!empty($backtopage)) {
891 print
' <input type="submit" value="' . $langs->trans(
"Cancel") .
'" id="submitcancel" class="button button-cancel">';
901 print $langs->trans(
"ConferenceIsNotConfirmed");
905 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') &&!empty($user->rights->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') &&!empty($user->rights->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)) $resql
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='')
Show tabs of a record.
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.
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.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages 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.
setEventMessage($mesgs, $style='mesgs')
Set event message in dol_events session object.
if(!function_exists('utf8_encode')) if(!function_exists('utf8_decode')) getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
getCommonSubstitutionArray($outputlangs, $onlykey=0, $exclude=null, $object=null)
Return array of possible common substitutions.
isValidEmail($address, $acceptsupervisorkey=0, $acceptuserkey=0)
Return true if email syntax is ok.
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.
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.