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');
41 $entity = (!empty($_GET[
'entity']) ? (int) $_GET[
'entity'] : (!empty($_POST[
'entity']) ? (int) $_POST[
'entity'] : 1));
42 if (is_numeric($entity)) {
43 define(
"DOLENTITY", $entity);
47 require
'../../main.inc.php';
48 require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
49 require_once DOL_DOCUMENT_ROOT.
'/core/class/extrafields.class.php';
50 require_once DOL_DOCUMENT_ROOT.
'/eventorganization/class/conferenceorbooth.class.php';
51 require_once DOL_DOCUMENT_ROOT.
'/eventorganization/class/conferenceorboothattendee.class.php';
52 require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
53 require_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
54 require_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/paymentterm.class.php';
55 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
56 require_once DOL_DOCUMENT_ROOT.
'/contact/class/contact.class.php';
57 require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.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";
263 if ($type ==
'global') {
264 $filter = array(
't.fk_project'=>((
int) $id),
'customsql'=>
't.email="'.$db->escape($email).
'"');
266 if ($type ==
'conf') {
267 $filter = array(
't.fk_actioncomm'=>((
int) $id),
'customsql'=>
't.email="'.$db->escape($email).
'"');
271 $resultfetchconfattendee = $confattendee->fetchAll(
'',
'', 0, 0, $filter);
273 if (is_array($resultfetchconfattendee) && count($resultfetchconfattendee) > 0) {
275 $confattendee = array_shift($resultfetchconfattendee);
278 $confattendee->date_creation =
dol_now();
279 $confattendee->date_subscription =
dol_now();
280 $confattendee->email = $email;
281 $confattendee->fk_project = $project->id;
282 $confattendee->fk_actioncomm = $id;
283 $confattendee->note_public = $note_public;
286 $nb_post_max =
getDolGlobalInt(
"MAIN_SECURITY_MAX_POST_ON_PUBLIC_PAGES_BY_IP_ADDRESS", 200);
291 if ($nb_post_max > 0) {
292 $sql =
"SELECT COUNT(ref) as nb_attendee";
293 $sql .=
" FROM ".MAIN_DB_PREFIX.
"eventorganization_conferenceorboothattendee";
294 $sql .=
" WHERE ip = '".$db->escape($confattendee->ip).
"'";
295 $sql .=
" AND date_creation > '".$db->idate($minmonthpost).
"'";
296 $resql = $db->query($sql);
298 $num = $db->num_rows(
$resql);
302 $obj = $db->fetch_object(
$resql);
303 $nb_post_ip = $obj->nb_attendee;
308 $resultconforbooth = -1;
310 if ($nb_post_max > 0 && $nb_post_ip >= $nb_post_max) {
312 $errmsg .= $langs->trans(
"AlreadyTooMuchPostOnThisIPAdress");
313 array_push($confattendee->errors, $langs->trans(
"AlreadyTooMuchPostOnThisIPAdress"));
316 $resultconfattendee = $confattendee->create($user);
318 if ($resultconfattendee < 0) {
320 $errmsg .= $confattendee->error;
321 $errors = array_merge($errors, $confattendee->errors);
329 if (!empty($confattendee->date_subscription) && !empty($confattendee->amount)) {
330 $securekeyurl =
dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.
'conferenceorbooth'.$id,
'master');
331 $redirection = $dolibarr_main_url_root.
'/public/eventorganization/subscriptionok.php?id='.((int) $id).
'&securekey='.urlencode($securekeyurl);
333 $mesg = $langs->trans(
"RegistrationAndPaymentWereAlreadyRecorded", $email);
338 Header(
"Location: ".$redirection);
342 $resultfetchthirdparty = 0;
344 $genericcompanyname = $langs->trans(
'EventParticipant').
' '.($emailcompany ? $emailcompany : $email);
347 $thirdparty =
new Societe($db);
350 if (!empty($confattendee->fk_soc) && $confattendee->fk_soc > 0) {
351 $resultfetchthirdparty = $thirdparty->fetch($confattendee->fk_soc);
353 if (empty($conf->global->EVENTORGANIZATION_DISABLE_RETREIVE_THIRDPARTY_FROM_NAME)) {
355 if ($resultfetchthirdparty <= 0 && !empty($societe) && !empty($emailcompany)) {
356 $resultfetchthirdparty = $thirdparty->fetch(
'', $societe,
'',
'',
'',
'',
'',
'',
'',
'', $emailcompany);
357 if ($resultfetchthirdparty > 0) {
359 $confattendee->fk_soc = $thirdparty->id;
360 $confattendee->update($user);
361 } elseif ($resultfetchthirdparty == -2) {
362 $thirdparty->error = $langs->trans(
"ErrorSeveralCompaniesWithNameContactUs", $mysoc->email);
366 if ($resultfetchthirdparty <= 0 && !empty($societe) && !empty($email) && $email != $emailcompany) {
367 $resultfetchthirdparty = $thirdparty->fetch(
'', $societe,
'',
'',
'',
'',
'',
'',
'',
'', $email);
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);
377 if ($resultfetchthirdparty <= 0 && !empty($emailcompany)) {
379 $resultfetchthirdparty = $thirdparty->fetch(
'',
'',
'',
'',
'',
'',
'',
'',
'',
'', $emailcompany);
380 if ($resultfetchthirdparty > 0) {
382 $confattendee->fk_soc = $thirdparty->id;
383 $confattendee->update($user);
384 } elseif ($resultfetchthirdparty == -2) {
385 $thirdparty->error = $langs->trans(
"ErrorSeveralCompaniesWithEmailContactUs", $mysoc->email);
388 if ($resultfetchthirdparty <= 0 && !empty($email) && $email != $emailcompany) {
390 $resultfetchthirdparty = $thirdparty->fetch(
'',
'',
'',
'',
'',
'',
'',
'',
'',
'', $email);
391 if ($resultfetchthirdparty > 0) {
393 $confattendee->fk_soc = $thirdparty->id;
394 $confattendee->update($user);
395 } elseif ($resultfetchthirdparty == -2) {
396 $thirdparty->error = $langs->trans(
"ErrorSeveralCompaniesWithEmailContactUs", $mysoc->email);
399 if ($resultfetchthirdparty <= 0 && !empty($genericcompanyname)) {
401 $resultfetchthirdparty = $thirdparty->fetch(
'', $genericcompanyname,
'',
'',
'',
'',
'',
'',
'',
'',
'');
402 if ($resultfetchthirdparty > 0) {
404 $confattendee->fk_soc = $thirdparty->id;
405 $confattendee->update($user);
406 } elseif ($resultfetchthirdparty == -2) {
407 $thirdparty->error = $langs->trans(
"ErrorSeveralCompaniesWithNameContactUs", $mysoc->email);
413 if ($resultfetchthirdparty <= 0 && !empty($email)) {
415 $resultfetchcontact = $contact->fetch(
'',
null,
'', $email);
416 if ($resultfetchcontact > 0 && $contact->fk_soc > 0) {
417 $thirdparty->fetch($contact->fk_soc);
418 $confattendee->fk_soc = $thirdparty->id;
419 $confattendee->update($user);
420 $resultfetchthirdparty = 1;
424 if ($resultfetchthirdparty <= 0 && !empty($societe)) {
426 $resultfetchthirdparty = $thirdparty->fetch(
'', $societe,
'',
'',
'',
'',
'',
'',
'',
'',
'');
427 if ($resultfetchthirdparty > 0) {
429 $confattendee->fk_soc = $thirdparty->id;
430 $confattendee->update($user);
431 } elseif ($resultfetchthirdparty == -2) {
432 $thirdparty->error =
"ErrorSeveralCompaniesWithNameContactUs";
438 if (empty(floatval($project->price_registration))) {
439 $resultfetchthirdparty = 1;
442 if ($resultfetchthirdparty < 0) {
445 $errmsg .= $thirdparty->error;
446 $errors = array_merge($errors, $thirdparty->errors);
447 } elseif ($resultfetchthirdparty == 0) {
449 if (!empty($societe)) {
450 $thirdparty->name = $societe;
452 $thirdparty->name = $genericcompanyname;
454 $thirdparty->address =
GETPOST(
"address");
455 $thirdparty->zip =
GETPOST(
"zipcode");
456 $thirdparty->town =
GETPOST(
"town");
457 $thirdparty->client = $thirdparty::PROSPECT;
458 $thirdparty->fournisseur = 0;
459 $thirdparty->country_id =
GETPOST(
"country_id",
'int');
460 $thirdparty->state_id =
GETPOST(
"state_id",
'int');
461 $thirdparty->email = ($emailcompany ? $emailcompany : $email);
464 $module = (!empty($conf->global->SOCIETE_CODECLIENT_ADDON) ? $conf->global->SOCIETE_CODECLIENT_ADDON :
'mod_codeclient_leopard');
465 if (substr($module, 0, 15) ==
'mod_codeclient_' && substr($module, -3) ==
'php') {
466 $module = substr($module, 0,
dol_strlen($module) - 4);
468 $dirsociete = array_merge(array(
'/core/modules/societe/'), $conf->modules_parts[
'societe']);
469 foreach ($dirsociete as $dirroot) {
475 $modCodeClient =
new $module($db);
477 if (empty($tmpcode) && !empty($modCodeClient->code_auto)) {
478 $tmpcode = $modCodeClient->getNextValue($thirdparty, 0);
480 $thirdparty->code_client = $tmpcode;
481 $readythirdparty = $thirdparty->create($user);
482 if ($readythirdparty < 0) {
484 $errmsg .= $thirdparty->error;
485 $errors = array_merge($errors, $thirdparty->errors);
487 $thirdparty->country_code =
getCountry($thirdparty->country_id, 2, $db, $langs);
488 $thirdparty->country =
getCountry($thirdparty->country_code, 0, $db, $langs);
491 $confattendee->fk_soc = $thirdparty->id;
492 $confattendee->update($user);
499 if (!empty(floatval($project->price_registration))) {
500 $outputlangs = $langs;
505 $productforinvoicerow =
new Product($db);
506 $productforinvoicerow->id = 0;
509 if ($conf->global->SERVICE_CONFERENCE_ATTENDEE_SUBSCRIPTION > 0) {
510 $resultprod = $productforinvoicerow->fetch($conf->global->SERVICE_CONFERENCE_ATTENDEE_SUBSCRIPTION);
514 if ($resultprod < 0) {
516 $errmsg .= $productforinvoicerow->error;
517 $errors = array_merge($errors, $productforinvoicerow->errors);
520 if (empty($confattendee->fk_invoice)) {
522 $facture->socid = $thirdparty->id;
525 $facture->cond_reglement_id = $confattendee->cond_reglement_id;
526 $facture->fk_project = $project->id;
529 if (empty($facture->cond_reglement_id)) {
530 $paymenttermstatic =
new PaymentTerm($confattendee->db);
531 $facture->cond_reglement_id = $paymenttermstatic->getDefaultId();
532 if (empty($facture->cond_reglement_id)) {
534 $confattendee->error =
'ErrorNoPaymentTermRECEPFound';
535 $confattendee->errors[] = $confattendee->error;
538 $resultfacture = $facture->create($user);
539 if ($resultfacture <= 0) {
540 $confattendee->error = $facture->error;
541 $confattendee->errors = $facture->errors;
544 $confattendee->fk_invoice = $resultfacture;
545 $confattendee->update($user);
548 $facture->fetch($confattendee->fk_invoice);
559 $vattouse =
get_default_tva($mysoc, $thirdparty, $productforinvoicerow->id);
561 $labelforproduct = $outputlangs->trans(
"EventFee", $project->title);
562 if ($project->location) {
563 $labelforproduct .=
' - '.$project->location;
565 $date_start = $project->date_start_event;
566 $date_end = $project->date_end_event;
569 if (empty($facture->lines)) {
570 $pu_ttc = floatval($project->price_registration);
572 $price_base_type =
'TTC';
574 $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);
576 $confattendee->error = $facture->error;
577 $confattendee->errors = $facture->errors;
592 $sourcetouse =
'organizedeventregistration';
593 $reftouse = $facture->id;
594 $redirection = $dolibarr_main_url_root.
'/public/payment/newpayment.php?source='.urlencode($sourcetouse).
'&ref='.urlencode($reftouse);
595 if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) {
596 if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) {
597 $redirection .=
'&securekey='.dol_hash($conf->global->PAYMENT_SECURITY_TOKEN . $sourcetouse . $reftouse, 2);
599 $redirection .=
'&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN);
603 Header(
"Location: ".$redirection);
613 $confattendee->setStatut(1);
616 require_once DOL_DOCUMENT_ROOT.
'/core/class/CMailFile.class.php';
617 include_once DOL_DOCUMENT_ROOT.
'/core/class/html.formmail.class.php';
621 $outputlangs->setDefaultLang(empty($thirdparty->default_lang) ? $mysoc->default_lang : $thirdparty->default_lang);
623 $outputlangs->loadLangs(array(
"main",
"members"));
625 $arraydefaultmessage =
null;
627 $labeltouse = $conf->global->EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_EVENT;
628 if (!empty($labeltouse)) {
629 $arraydefaultmessage = $formmail->getEMailTemplate($db,
'eventorganization_send', $user, $outputlangs, $labeltouse, 1,
'');
632 if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) {
633 $subject = $arraydefaultmessage->topic;
634 $msg = $arraydefaultmessage->content;
643 $sendto = $thirdparty->email;
644 $from = $conf->global->MAILING_EMAIL_FROM;
645 $urlback = $_SERVER[
"REQUEST_URI"];
649 $mailfile =
new CMailFile($subjecttosend, $sendto, $from, $texttosend, array(), array(), array(),
'',
'', 0, $ishtml);
651 $result = $mailfile->sendfile();
653 dol_syslog(
"EMail sent to ".$sendto, LOG_DEBUG, 0,
'_payment');
655 dol_syslog(
"Failed to send EMail to ".$sendto, LOG_ERR, 0,
'_payment');
658 $securekeyurl =
dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.
'conferenceorbooth'.$id, 2);
659 $redirection = $dolibarr_main_url_root.
'/public/eventorganization/subscriptionok.php?id='.((int) $id).
'&securekey='.urlencode($securekeyurl);
661 Header(
"Location: ".$redirection);
682 print
load_fiche_titre($langs->trans(
"NewRegistration"),
'',
'', 0, 0,
'center');
685 print
'<div align="center">';
686 print
'<div id="divsubscribe">';
687 print
'<div class="center subscriptionformhelptext">';
691 print
'<span class="opacitymedium">'.$langs->trans(
"EvntOrgWelcomeMessage").
'</span>';
693 print
'<span class="eventlabel">'.$project->title .
' '. $conference->label.
'</span><br>';
694 if ($project->date_start_event || $project->date_end_event) {
695 print
'<span class="fa fa-calendar pictofixedwidth"></span>';
697 if ($project->date_start_event) {
699 $tmparray =
dol_getdate($project->date_start_event,
false,
'');
700 if ($tmparray[
'hours'] || $tmparray[
'minutes'] || $tmparray[
'minutes']) {
705 if ($project->date_start_event && $project->date_end_event) {
708 if ($project->date_end_event) {
710 $tmparray =
dol_getdate($project->date_end_event,
false,
'');
711 if ($tmparray[
'hours'] || $tmparray[
'minutes'] || $tmparray[
'minutes']) {
716 if ($project->date_start_event || $project->date_end_event) {
719 if ($project->location) {
720 print
'<span class="fa fa-map-marked-alt pictofixedwidth"></span>'.$project->location.
'<br>';
724 if ($conference->id > 0) {
740 $maxattendees = $project->max_attendees;
744 if ($maxattendees && $currentnbofattendees >= $maxattendees) {
746 print
'<div class="warning">'.$langs->trans(
"MaxNbOfAttendeesReached").
'</div>';
754 if ((!empty($conference->id) && $conference->status == ConferenceOrBooth::STATUS_CONFIRMED) || (!empty($project->id) && $project->status ==
Project::STATUS_VALIDATED)) {
755 if (empty($maxattendees) || $currentnbofattendees < $maxattendees) {
757 print
'<form action="' . $_SERVER[
"PHP_SELF"] .
'" method="POST" name="newmember">' .
"\n";
758 print
'<input type="hidden" name="token" value="' .
newToken() .
'" / >';
759 print
'<input type="hidden" name="entity" value="' . $entity .
'" />';
760 print
'<input type="hidden" name="action" value="add" />';
761 print
'<input type="hidden" name="type" value="' . $type .
'" />';
762 print
'<input type="hidden" name="id" value="' . $conference->id .
'" />';
763 print
'<input type="hidden" name="fk_project" value="' . $project->id .
'" />';
764 print
'<input type="hidden" name="securekey" value="' . $securekeyreceived .
'" />';
773 print
'<script type="text/javascript">
774 jQuery(document).ready(function () {
775 jQuery(document).ready(function () {
776 jQuery("#selectcountry_id").change(function() {
777 document.newmember.action.value="create";
778 document.newmember.submit();
784 print
'<table class="border" summary="form to subscribe" id="tablesubscribe">' .
"\n";
787 print
'<tr><td><span class="fieldrequired">' . $langs->trans(
"EmailAttendee") .
'</span></td><td>';
788 print
img_picto(
'',
'email',
'class="pictofixedwidth"');
789 print
'<input type="text" name="email" maxlength="255" class="minwidth200 widthcentpercentminusx maxwidth300" value="' .
dol_escape_htmltag(
GETPOST(
'email')) .
'" required></td></tr>' .
"\n";
792 print
'<tr id="trcompany" class="trcompany"><td>';
793 if (!empty(floatval($project->price_registration))) {
794 print
'<span class="fieldrequired">';
796 print $langs->trans(
"Company");
797 if (!empty(floatval($project->price_registration))) {
801 print
img_picto(
'',
'company',
'class="pictofixedwidth"');
802 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";
805 if ($project->price_registration) {
806 print
'<tr><td>' .
$form->textwithpicto($langs->trans(
"EmailCompany"), $langs->trans(
"EmailCompanyForInvoice")) .
'</td><td>';
807 print
img_picto(
'',
'email',
'class="pictofixedwidth"');
808 print
'<input type="text" name="emailcompany" maxlength="255" class="minwidth200 widthcentpercentminusx maxwidth300" value="' .
dol_escape_htmltag(
GETPOST(
'emailcompany')) .
'"></td></tr>' .
"\n";
812 print
'<tr><td>' . $langs->trans(
"Address") .
'</td><td>' .
"\n";
813 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";
816 print
'<tr><td>' . $langs->trans(
'Zip') .
' / ' . $langs->trans(
'Town') .
'</td><td>';
817 print $formcompany->select_ziptown(
GETPOST(
'zipcode'),
'zipcode', array(
'town',
'selectcountry_id',
'state_id'), 6, 1);
819 print $formcompany->select_ziptown(
GETPOST(
'town'),
'town', array(
'zipcode',
'selectcountry_id',
'state_id'), 0, 1);
823 print
'<tr><td><span class="fieldrequired">'.$langs->trans(
'Country').
'</span></td><td>';
824 print
img_picto(
'',
'country',
'class="pictofixedwidth"');
825 $country_id =
GETPOST(
'country_id');
826 if (!$country_id && !empty($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE)) {
827 $country_id =
getCountry($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE, 2, $db, $langs);
829 if (!$country_id && !empty($conf->geoipmaxmind->enabled)) {
833 $new_country_id =
getCountry($country_code, 3, $db, $langs);
835 if ($new_country_id) {
836 $country_id = $new_country_id;
840 $country_code =
getCountry($country_id, 2, $db, $langs);
841 print
$form->select_country($country_id,
'country_id',
'', 0,
'minwidth200 widthcentpercentminusx maxwidth300');
844 if (empty($conf->global->SOCIETE_DISABLE_STATE)) {
845 print
'<tr><td>' . $langs->trans(
'State') .
'</td><td>';
847 print
img_picto(
'',
'state',
'class="pictofixedwidth"');
848 print $formcompany->select_state(
GETPOST(
"state_id"), $country_code);
855 if ($project->price_registration) {
856 print
'<tr><td>' . $langs->trans(
'Price') .
'</td><td>';
857 print
'<span class="amount price-registration">'.price($project->price_registration, 1, $langs, 1, -1, -1, $conf->currency).
'</span>';
861 $notetoshow = $note_public;
862 print
'<tr><td>' . $langs->trans(
'Note') .
'</td><td>';
863 if (!empty($conf->global->EVENTORGANIZATION_DEFAULT_NOTE_ON_REGISTRATION)) {
864 $notetoshow = str_replace(
'\n',
"\n", $conf->global->EVENTORGANIZATION_DEFAULT_NOTE_ON_REGISTRATION);
866 print
'<textarea name="note_public" class="centpercent" rows="'.ROWS_9.
'">'.
dol_escape_htmltag($notetoshow, 0, 1).
'</textarea>';
874 print
'<div class="center">';
875 print
'<input type="submit" value="' . $langs->trans(
"Submit") .
'" id="submitsave" class="button">';
876 if (!empty($backtopage)) {
877 print
' <input type="submit" value="' . $langs->trans(
"Cancel") .
'" id="submitcancel" class="button button-cancel">';
884 print
'</div></div>';
887 print $langs->trans(
"ConferenceIsNotConfirmed");
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.
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.