@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | */ |
34 | 34 | function dolStripPhpCode($str, $replacewith = '') |
35 | 35 | { |
36 | - $str = str_replace('<?=', '<?php echo', $str); // replace a bad practive |
|
36 | + $str = str_replace('<?=', '<?php echo', $str); // replace a bad practive |
|
37 | 37 | |
38 | 38 | $newstr = ''; |
39 | 39 | |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | { |
80 | 80 | $str = str_replace('<?=', '<?php echo', $str); |
81 | 81 | $str = str_replace('<?php', '__LTINTPHP__', $str); |
82 | - $str = str_replace('<?', '<?php', $str); // replace the short_open_tag. It is recommended to set this to Off in php.ini |
|
82 | + $str = str_replace('<?', '<?php', $str); // replace the short_open_tag. It is recommended to set this to Off in php.ini |
|
83 | 83 | $str = str_replace('__LTINTPHP__', '<?php', $str); |
84 | 84 | |
85 | 85 | $newstr = ''; |
@@ -332,9 +332,9 @@ discard block |
||
332 | 332 | // at end we replace the '!~!~!~' only if we are in final parent page. |
333 | 333 | $content = preg_replace('/(href=")\/?([^:\"\!]*)\.php\?([^#\"<>]*)(#[^\"<>]*)?\"/', '\1!~!~!~'.DOL_URL_ROOT.'/public/website/index.php?website='.$website->ref.'&pageref=\2&\3\4"', $content, -1, $nbrep); |
334 | 334 | // Replace occurrence like _service_XXX.php with dolibarr URL |
335 | - $content = preg_replace('/([\'"])_service_([^\'"]+)\.php\1/', '\1!~!~!~' . DOL_URL_ROOT . '/public/website/index.php?website=' . $website->ref . '&pageref=_service_\2\1', $content, -1, $nbrep); |
|
335 | + $content = preg_replace('/([\'"])_service_([^\'"]+)\.php\1/', '\1!~!~!~'.DOL_URL_ROOT.'/public/website/index.php?website='.$website->ref.'&pageref=_service_\2\1', $content, -1, $nbrep); |
|
336 | 336 | // Replace occurrence like _library_XXX.php with dolibarr URL |
337 | - $content = preg_replace('/([\'"])_library_([^\'"]+)\.php\1/', '\1!~!~!~' . DOL_URL_ROOT . '/public/website/index.php?website=' . $website->ref . '&pageref=_library_\2\1', $content, -1, $nbrep); |
|
337 | + $content = preg_replace('/([\'"])_library_([^\'"]+)\.php\1/', '\1!~!~!~'.DOL_URL_ROOT.'/public/website/index.php?website='.$website->ref.'&pageref=_library_\2\1', $content, -1, $nbrep); |
|
338 | 338 | // Replace relative link without .php like /xxx#aaa or /xxx with dolibarr URL: ...href="....php" |
339 | 339 | $content = preg_replace('/(href=")\/?([a-zA-Z0-9\-_#]+)(\"|\?)/', '\1!~!~!~'.DOL_URL_ROOT.'/public/website/index.php?website='.$website->ref.'&pageref=\2\3', $content, -1, $nbrep); |
340 | 340 | |
@@ -432,7 +432,7 @@ discard block |
||
432 | 432 | } |
433 | 433 | |
434 | 434 | if (getDolGlobalString('WEBSITE_ADD_CSS_TO_BODY')) { |
435 | - $content = str_replace('<body id="bodywebsite" class="bodywebsite', '<body id="bodywebsite" class="bodywebsite ' . getDolGlobalString('WEBSITE_ADD_CSS_TO_BODY'), $content); |
|
435 | + $content = str_replace('<body id="bodywebsite" class="bodywebsite', '<body id="bodywebsite" class="bodywebsite '.getDolGlobalString('WEBSITE_ADD_CSS_TO_BODY'), $content); |
|
436 | 436 | } |
437 | 437 | |
438 | 438 | $content = dolReplaceSmileyCodeWithUTF8($content); |
@@ -469,7 +469,7 @@ discard block |
||
469 | 469 | $sql .= " WHERE rowid = ".((int) $websiteid); |
470 | 470 | |
471 | 471 | $resql = $db->query($sql); |
472 | - if (! $resql) { |
|
472 | + if (!$resql) { |
|
473 | 473 | return -1; |
474 | 474 | } |
475 | 475 | } |
@@ -557,7 +557,7 @@ discard block |
||
557 | 557 | unset($tmpwebsitepage); |
558 | 558 | } |
559 | 559 | if ($result > 0) { |
560 | - $currenturi = $_SERVER["REQUEST_URI"]; // Example: /public/website/index.php?website=mywebsite.com&pageref=mywebsite-home&nocache=1708177483 |
|
560 | + $currenturi = $_SERVER["REQUEST_URI"]; // Example: /public/website/index.php?website=mywebsite.com&pageref=mywebsite-home&nocache=1708177483 |
|
561 | 561 | $regtmp = array(); |
562 | 562 | if (preg_match('/&pageref=([^&]+)/', $currenturi, $regtmp)) { |
563 | 563 | if ($regtmp[0] == $containerref) { |
@@ -578,7 +578,7 @@ discard block |
||
578 | 578 | if ($newurl) { |
579 | 579 | if (!empty($parameters)) { |
580 | 580 | $separator = (parse_url($newurl, PHP_URL_QUERY) == null) ? '?' : '&'; |
581 | - $newurl = $newurl . $separator . http_build_query($parameters); |
|
581 | + $newurl = $newurl.$separator.http_build_query($parameters); |
|
582 | 582 | } |
583 | 583 | if ($permanent) { |
584 | 584 | header("Status: 301 Moved Permanently", false, 301); |
@@ -903,7 +903,7 @@ discard block |
||
903 | 903 | $hashtags = trim(implode(' #', array_map('trim', explode(',', $websitepage->keywords)))); |
904 | 904 | |
905 | 905 | // Open Graph |
906 | - $out .= '<meta name="og:type" content="website">'."\n"; // TODO If blogpost, use type article |
|
906 | + $out .= '<meta name="og:type" content="website">'."\n"; // TODO If blogpost, use type article |
|
907 | 907 | $out .= '<meta name="og:title" content="'.$websitepage->title.'">'."\n"; |
908 | 908 | if ($websitepage->image) { |
909 | 909 | $out .= '<meta name="og:image" content="'.$website->virtualhost.$image.'">'."\n"; |
@@ -1015,9 +1015,9 @@ discard block |
||
1015 | 1015 | $sql = "SELECT COUNT(rowid) as nb"; |
1016 | 1016 | $sql .= " FROM ".MAIN_DB_PREFIX."ecm_files"; |
1017 | 1017 | $sql .= " WHERE entity IN (".getEntity($object->element).")"; |
1018 | - $sql .= " AND src_object_type = '".$db->escape($object->element)."' AND src_object_id = ".((int) $object->id); // Filter on object |
|
1018 | + $sql .= " AND src_object_type = '".$db->escape($object->element)."' AND src_object_id = ".((int) $object->id); // Filter on object |
|
1019 | 1019 | $sql .= " AND ".$db->regexpsql('filename', $regexforimg, 1); |
1020 | - $sql .= " AND share IS NOT NULL"; // Only image that are public |
|
1020 | + $sql .= " AND share IS NOT NULL"; // Only image that are public |
|
1021 | 1021 | |
1022 | 1022 | $resql = $db->query($sql); |
1023 | 1023 | if ($resql) { |
@@ -1053,7 +1053,7 @@ discard block |
||
1053 | 1053 | $sql = "SELECT rowid, ref, share, filename, cover, position"; |
1054 | 1054 | $sql .= " FROM ".MAIN_DB_PREFIX."ecm_files"; |
1055 | 1055 | $sql .= " WHERE entity IN (".getEntity($object->element).")"; |
1056 | - $sql .= " AND src_object_type = '".$db->escape($object->element)."' AND src_object_id = ".((int) $object->id); // Filter on object |
|
1056 | + $sql .= " AND src_object_type = '".$db->escape($object->element)."' AND src_object_id = ".((int) $object->id); // Filter on object |
|
1057 | 1057 | $sql .= " AND ".$db->regexpsql('filename', $regexforimg, 1); |
1058 | 1058 | $sql .= $db->order("cover,position,rowid", "ASC,ASC,ASC"); |
1059 | 1059 | |
@@ -1345,7 +1345,7 @@ discard block |
||
1345 | 1345 | { |
1346 | 1346 | $dom = new DOMDocument(); |
1347 | 1347 | |
1348 | - libxml_use_internal_errors(false); // Avoid to fill memory with xml errors |
|
1348 | + libxml_use_internal_errors(false); // Avoid to fill memory with xml errors |
|
1349 | 1349 | if (LIBXML_VERSION < 20900) { |
1350 | 1350 | // Avoid load of external entities (security problem). |
1351 | 1351 | // Required only if LIBXML_VERSION < 20900 |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | |
95 | 95 | // Security check |
96 | 96 | $securekeyreceived = GETPOST('securekey', 'alpha'); |
97 | -$securekeytocompare = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY') . 'conferenceorbooth'.((int) $id), 'md5'); |
|
97 | +$securekeytocompare = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY').'conferenceorbooth'.((int) $id), 'md5'); |
|
98 | 98 | |
99 | 99 | if ($securekeytocompare != $securekeyreceived) { |
100 | 100 | print $langs->trans('MissingOrBadSecureKey'); |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | |
170 | 170 | if (getDolGlobalString('PROJECT_IMAGE_PUBLIC_SUGGEST_BOOTH')) { |
171 | 171 | print '<div class="backimagepublicsuggestbooth">'; |
172 | - print '<img id="idPROJECT_IMAGE_PUBLIC_SUGGEST_BOOTH" src="' . getDolGlobalString('PROJECT_IMAGE_PUBLIC_SUGGEST_BOOTH').'">'; |
|
172 | + print '<img id="idPROJECT_IMAGE_PUBLIC_SUGGEST_BOOTH" src="'.getDolGlobalString('PROJECT_IMAGE_PUBLIC_SUGGEST_BOOTH').'">'; |
|
173 | 173 | print '</div>'; |
174 | 174 | } |
175 | 175 | |
@@ -550,7 +550,7 @@ discard block |
||
550 | 550 | dol_syslog("Failed to send EMail to ".$sendto, LOG_ERR, 0, '_payment'); |
551 | 551 | } |
552 | 552 | |
553 | - $securekeyurl = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY') . 'conferenceorbooth'.((int) $id), 'md5'); |
|
553 | + $securekeyurl = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY').'conferenceorbooth'.((int) $id), 'md5'); |
|
554 | 554 | $redirection = $dolibarr_main_url_root.'/public/eventorganization/subscriptionok.php?id='.$id.'&securekey='.$securekeyurl; |
555 | 555 | header("Location: ".$redirection); |
556 | 556 | exit; |
@@ -582,7 +582,7 @@ discard block |
||
582 | 582 | print '<span class="opacitymedium">'.$langs->trans("EvntOrgRegistrationWelcomeMessage").'</span>'; |
583 | 583 | print '<br>'; |
584 | 584 | // Title |
585 | -print '<span class="eventlabel large">'.dol_escape_htmltag($project->title . ' '. $project->label).'</span><br>'; |
|
585 | +print '<span class="eventlabel large">'.dol_escape_htmltag($project->title.' '.$project->label).'</span><br>'; |
|
586 | 586 | print '</div>'; |
587 | 587 | |
588 | 588 |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | |
95 | 95 | // Security check |
96 | 96 | $securekeyreceived = GETPOST('securekey', 'alpha'); |
97 | -$securekeytocompare = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY') . 'conferenceorbooth'.((int) $id), 'md5'); |
|
97 | +$securekeytocompare = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY').'conferenceorbooth'.((int) $id), 'md5'); |
|
98 | 98 | |
99 | 99 | if ($securekeytocompare != $securekeyreceived) { |
100 | 100 | print $langs->trans('MissingOrBadSecureKey'); |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | |
171 | 171 | if (getDolGlobalString('PROJECT_IMAGE_PUBLIC_SUGGEST_CONFERENCE')) { |
172 | 172 | print '<div class="backimagepublicsuggestconference">'; |
173 | - print '<img id="idPROJECT_IMAGE_PUBLIC_SUGGEST_CONFERENCE" src="' . getDolGlobalString('PROJECT_IMAGE_PUBLIC_SUGGEST_CONFERENCE').'">'; |
|
173 | + print '<img id="idPROJECT_IMAGE_PUBLIC_SUGGEST_CONFERENCE" src="'.getDolGlobalString('PROJECT_IMAGE_PUBLIC_SUGGEST_CONFERENCE').'">'; |
|
174 | 174 | print '</div>'; |
175 | 175 | } |
176 | 176 | |
@@ -486,7 +486,7 @@ discard block |
||
486 | 486 | |
487 | 487 | if (!$error) { |
488 | 488 | $db->commit(); |
489 | - $securekeyurl = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY') . 'conferenceorbooth'.((int) $id), 'md5'); |
|
489 | + $securekeyurl = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY').'conferenceorbooth'.((int) $id), 'md5'); |
|
490 | 490 | $redirection = $dolibarr_main_url_root.'/public/eventorganization/subscriptionok.php?id='.((int) $id).'&securekey='.urlencode($securekeyurl); |
491 | 491 | header("Location: ".$redirection); |
492 | 492 | exit; |
@@ -518,7 +518,7 @@ discard block |
||
518 | 518 | print '<span class="opacitymedium">'.$langs->trans("EvntOrgRegistrationWelcomeMessage").'</span>'; |
519 | 519 | print '<br>'; |
520 | 520 | // Title |
521 | -print '<span class="eventlabel large">'.dol_escape_htmltag($project->title . ' '. $project->label).'</span><br>'; |
|
521 | +print '<span class="eventlabel large">'.dol_escape_htmltag($project->title.' '.$project->label).'</span><br>'; |
|
522 | 522 | print '</div>'; |
523 | 523 | |
524 | 524 | // Help text |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | require_once DOL_DOCUMENT_ROOT.'/societe/class/societeaccount.class.php'; |
53 | 53 | require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
54 | 54 | require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; |
55 | -require_once DOL_DOCUMENT_ROOT . '/comm/action/class/actioncomm.class.php'; |
|
55 | +require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; |
|
56 | 56 | |
57 | 57 | /** |
58 | 58 | * @var Conf $conf |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | $action = GETPOST('action', 'aZ09'); |
82 | 82 | $id = GETPOST('id'); |
83 | 83 | $securekeyreceived = GETPOST("securekey"); |
84 | -$securekeytocompare = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY') . 'conferenceorbooth'.((int) $id), 'md5'); |
|
84 | +$securekeytocompare = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY').'conferenceorbooth'.((int) $id), 'md5'); |
|
85 | 85 | |
86 | 86 | if ($securekeytocompare != $securekeyreceived) { |
87 | 87 | print $langs->trans('MissingOrBadSecureKey'); |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | |
219 | 219 | $head = ''; |
220 | 220 | if (getDolGlobalString('ONLINE_PAYMENT_CSS_URL')) { |
221 | - $head = '<link rel="stylesheet" type="text/css" href="' . getDolGlobalString('ONLINE_PAYMENT_CSS_URL').'?lang='.$langs->defaultlang.'">'."\n"; |
|
221 | + $head = '<link rel="stylesheet" type="text/css" href="'.getDolGlobalString('ONLINE_PAYMENT_CSS_URL').'?lang='.$langs->defaultlang.'">'."\n"; |
|
222 | 222 | } |
223 | 223 | |
224 | 224 | $conf->dol_hide_topmenu = 1; |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | |
279 | 279 | if (getDolGlobalString('PROJECT_IMAGE_PUBLIC_SUGGEST_BOOTH')) { |
280 | 280 | print '<div class="backimagepublicsuggestbooth">'; |
281 | - print '<img id="idPROJECT_IMAGE_PUBLIC_SUGGEST_BOOTH" src="' . getDolGlobalString('PROJECT_IMAGE_PUBLIC_SUGGEST_BOOTH').'">'; |
|
281 | + print '<img id="idPROJECT_IMAGE_PUBLIC_SUGGEST_BOOTH" src="'.getDolGlobalString('PROJECT_IMAGE_PUBLIC_SUGGEST_BOOTH').'">'; |
|
282 | 282 | print '</div>'; |
283 | 283 | } |
284 | 284 |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | // Security check |
82 | 82 | $id = GETPOSTINT("id"); |
83 | 83 | $securekeyreceived = GETPOST("securekey"); |
84 | -$securekeytocompare = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY') . 'conferenceorbooth'.((int) $id), 'md5'); |
|
84 | +$securekeytocompare = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY').'conferenceorbooth'.((int) $id), 'md5'); |
|
85 | 85 | |
86 | 86 | if ($securekeyreceived != $securekeytocompare) { |
87 | 87 | print $langs->trans('MissingOrBadSecureKey'); |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | |
140 | 140 | if (getDolGlobalString('EVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE')) { |
141 | 141 | print '<div class="backimagepubliceventorganizationsubscription">'; |
142 | - print '<img id="idEVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE" src="' . getDolGlobalString('EVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE').'">'; |
|
142 | + print '<img id="idEVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE" src="'.getDolGlobalString('EVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE').'">'; |
|
143 | 143 | print '</div>'; |
144 | 144 | } |
145 | 145 | |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | |
172 | 172 | $head = ''; |
173 | 173 | if (getDolGlobalString('ONLINE_PAYMENT_CSS_URL')) { |
174 | - $head = '<link rel="stylesheet" type="text/css" href="' . getDolGlobalString('ONLINE_PAYMENT_CSS_URL').'?lang='.$langs->defaultlang.'">'."\n"; |
|
174 | + $head = '<link rel="stylesheet" type="text/css" href="'.getDolGlobalString('ONLINE_PAYMENT_CSS_URL').'?lang='.$langs->defaultlang.'">'."\n"; |
|
175 | 175 | } |
176 | 176 | |
177 | 177 | $conf->dol_hide_topmenu = 1; |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | |
223 | 223 | if (getDolGlobalString('EVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE')) { |
224 | 224 | print '<div class="backimagepubliceventorganizationsubscription">'; |
225 | - print '<img id="idEVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE" src="' . getDolGlobalString('EVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE').'">'; |
|
225 | + print '<img id="idEVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE" src="'.getDolGlobalString('EVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE').'">'; |
|
226 | 226 | print '</div>'; |
227 | 227 | } |
228 | 228 |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | |
215 | 215 | if (getDolGlobalString('EVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE')) { |
216 | 216 | print '<div class="backimagepubliceventorganizationsubscription">'; |
217 | - print '<img id="idEVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE" src="' . getDolGlobalString('EVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE').'">'; |
|
217 | + print '<img id="idEVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE" src="'.getDolGlobalString('EVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE').'">'; |
|
218 | 218 | print '</div>'; |
219 | 219 | } |
220 | 220 | |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | } |
253 | 253 | |
254 | 254 | // Action called when page is submitted |
255 | -if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conference->status == 2 || !empty($project->id) && $project->status == Project::STATUS_VALIDATED)) { // Test on permission not required. Check are done on securitykey and mitigation |
|
255 | +if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conference->status == 2 || !empty($project->id) && $project->status == Project::STATUS_VALIDATED)) { // Test on permission not required. Check are done on securitykey and mitigation |
|
256 | 256 | $error = 0; |
257 | 257 | |
258 | 258 | $urlback = ''; |
@@ -362,7 +362,7 @@ discard block |
||
362 | 362 | |
363 | 363 | // If the registration has already been paid for this attendee |
364 | 364 | if (!empty($confattendee->date_subscription) && !empty($confattendee->amount)) { |
365 | - $securekeyurl = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY') . 'conferenceorbooth'.((int) $id), 'md5'); |
|
365 | + $securekeyurl = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY').'conferenceorbooth'.((int) $id), 'md5'); |
|
366 | 366 | $redirection = $dolibarr_main_url_root.'/public/eventorganization/subscriptionok.php?id='.((int) $id).'&securekey='.urlencode($securekeyurl); |
367 | 367 | |
368 | 368 | $mesg = $langs->trans("RegistrationAndPaymentWereAlreadyRecorded", $email); |
@@ -376,7 +376,7 @@ discard block |
||
376 | 376 | |
377 | 377 | $resultfetchthirdparty = 0; |
378 | 378 | |
379 | - $genericcompanyname = $langs->trans('EventParticipant').' '.($emailcompany ? $emailcompany : $email); // Keep this label simple so we can retrieve same thirdparty for another event |
|
379 | + $genericcompanyname = $langs->trans('EventParticipant').' '.($emailcompany ? $emailcompany : $email); // Keep this label simple so we can retrieve same thirdparty for another event |
|
380 | 380 | |
381 | 381 | // Getting the thirdparty or creating it |
382 | 382 | $thirdparty = new Societe($db); |
@@ -634,7 +634,7 @@ discard block |
||
634 | 634 | $redirection = $dolibarr_main_url_root.'/public/payment/newpayment.php?source='.urlencode((string) ($sourcetouse)).'&ref='.urlencode((string) ($reftouse)); |
635 | 635 | if (getDolGlobalString('PAYMENT_SECURITY_TOKEN')) { |
636 | 636 | if (getDolGlobalString('PAYMENT_SECURITY_TOKEN_UNIQUE')) { |
637 | - $redirection .= '&securekey='.dol_hash(getDolGlobalString('PAYMENT_SECURITY_TOKEN') . $sourcetouse . $reftouse, '2'); // Use the source in the hash to avoid duplicates if the references are identical |
|
637 | + $redirection .= '&securekey='.dol_hash(getDolGlobalString('PAYMENT_SECURITY_TOKEN').$sourcetouse.$reftouse, '2'); // Use the source in the hash to avoid duplicates if the references are identical |
|
638 | 638 | } else { |
639 | 639 | $redirection .= '&securekey='.urlencode(getDolGlobalString('PAYMENT_SECURITY_TOKEN')); |
640 | 640 | } |
@@ -698,7 +698,7 @@ discard block |
||
698 | 698 | dol_syslog("Failed to send EMail to ".$sendto, LOG_ERR, 0, '_payment'); |
699 | 699 | } |
700 | 700 | |
701 | - $securekeyurl = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY') . 'conferenceorbooth'.((int) $id), 'md5'); |
|
701 | + $securekeyurl = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY').'conferenceorbooth'.((int) $id), 'md5'); |
|
702 | 702 | $redirection = $dolibarr_main_url_root.'/public/eventorganization/subscriptionok.php?id='.((int) $id).'&securekey='.urlencode($securekeyurl); |
703 | 703 | |
704 | 704 | header("Location: ".$redirection); |
@@ -732,7 +732,7 @@ discard block |
||
732 | 732 | print '<span class="opacitymedium">'.$langs->trans("EvntOrgWelcomeMessage").'</span>'; |
733 | 733 | print '<br>'; |
734 | 734 | // Title |
735 | -print '<span class="eventlabel large">'.dol_escape_htmltag($project->title . ' '. $conference->label).'</span><br>'; |
|
735 | +print '<span class="eventlabel large">'.dol_escape_htmltag($project->title.' '.$conference->label).'</span><br>'; |
|
736 | 736 | print '</div>'; |
737 | 737 | |
738 | 738 | // Help text |
@@ -790,7 +790,7 @@ discard block |
||
790 | 790 | print ' - '; |
791 | 791 | print dol_print_date($project->date_end); |
792 | 792 | }*/ |
793 | - $maxattendees = $project->max_attendees; // Max attendeed for the project/event |
|
793 | + $maxattendees = $project->max_attendees; // Max attendeed for the project/event |
|
794 | 794 | } |
795 | 795 | |
796 | 796 | if ($maxattendees && $currentnbofattendees >= $maxattendees) { |
@@ -806,14 +806,14 @@ discard block |
||
806 | 806 | if ((!empty($conference->id) && $conference->status == ConferenceOrBooth::STATUS_CONFIRMED) || (!empty($project->id) && $project->status == Project::STATUS_VALIDATED)) { |
807 | 807 | if (empty($maxattendees) || $currentnbofattendees < $maxattendees) { |
808 | 808 | // Print form |
809 | - print '<form action="' . $_SERVER["PHP_SELF"] . '" method="POST" name="newmember">' . "\n"; |
|
810 | - print '<input type="hidden" name="token" value="' . newToken() . '" / >'; |
|
811 | - print '<input type="hidden" name="entity" value="' . $entity . '" />'; |
|
809 | + print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST" name="newmember">'."\n"; |
|
810 | + print '<input type="hidden" name="token" value="'.newToken().'" / >'; |
|
811 | + print '<input type="hidden" name="entity" value="'.$entity.'" />'; |
|
812 | 812 | print '<input type="hidden" name="action" value="add" />'; |
813 | - print '<input type="hidden" name="type" value="' . $type . '" />'; |
|
814 | - print '<input type="hidden" name="id" value="' . $conference->id . '" />'; |
|
815 | - print '<input type="hidden" name="fk_project" value="' . $project->id . '" />'; |
|
816 | - print '<input type="hidden" name="securekey" value="' . $securekeyreceived . '" />'; |
|
813 | + print '<input type="hidden" name="type" value="'.$type.'" />'; |
|
814 | + print '<input type="hidden" name="id" value="'.$conference->id.'" />'; |
|
815 | + print '<input type="hidden" name="fk_project" value="'.$project->id.'" />'; |
|
816 | + print '<input type="hidden" name="securekey" value="'.$securekeyreceived.'" />'; |
|
817 | 817 | |
818 | 818 | print '<br>'; |
819 | 819 | print '<br>'; |
@@ -833,24 +833,24 @@ discard block |
||
833 | 833 | }); |
834 | 834 | </script>'; |
835 | 835 | |
836 | - print '<table class="border" summary="form to subscribe" id="tablesubscribe">' . "\n"; |
|
836 | + print '<table class="border" summary="form to subscribe" id="tablesubscribe">'."\n"; |
|
837 | 837 | |
838 | 838 | // Firstname |
839 | 839 | print '<tr><td><span class="fieldrequired">'; |
840 | - print $langs->trans("Firstname") . '</span></td><td>'; |
|
840 | + print $langs->trans("Firstname").'</span></td><td>'; |
|
841 | 841 | print img_picto('', 'user', 'class="pictofixedwidth"'); |
842 | - print '<input type="text" name="firstname" maxlength="255" class="minwidth200 maxwidth300" value="' . dol_escape_htmltag($firstname) . '" required autofocus></td></tr>' . "\n"; |
|
842 | + print '<input type="text" name="firstname" maxlength="255" class="minwidth200 maxwidth300" value="'.dol_escape_htmltag($firstname).'" required autofocus></td></tr>'."\n"; |
|
843 | 843 | |
844 | 844 | // Lastname |
845 | 845 | print '<tr><td><span class="fieldrequired">'; |
846 | - print $langs->trans("Lastname") . '</span></td><td>'; |
|
846 | + print $langs->trans("Lastname").'</span></td><td>'; |
|
847 | 847 | print img_picto('', 'user', 'class="pictofixedwidth"'); |
848 | - print '<input type="text" name="lastname" maxlength="255" class="minwidth200 maxwidth300" value="' . dol_escape_htmltag($lastname) . '" required></td></tr>' . "\n"; |
|
848 | + print '<input type="text" name="lastname" maxlength="255" class="minwidth200 maxwidth300" value="'.dol_escape_htmltag($lastname).'" required></td></tr>'."\n"; |
|
849 | 849 | |
850 | 850 | |
851 | - print '<tr><td><span class="fieldrequired">' . $langs->trans("EmailAttendee") . '</span></td><td>'; |
|
851 | + print '<tr><td><span class="fieldrequired">'.$langs->trans("EmailAttendee").'</span></td><td>'; |
|
852 | 852 | print img_picto('', 'email', 'class="pictofixedwidth"'); |
853 | - print '<input type="text" name="email" maxlength="255" class="minwidth200 widthcentpercentminusx maxwidth300" value="' . dol_escape_htmltag(GETPOST('email')) . '" required></td></tr>' . "\n"; |
|
853 | + print '<input type="text" name="email" maxlength="255" class="minwidth200 widthcentpercentminusx maxwidth300" value="'.dol_escape_htmltag(GETPOST('email')).'" required></td></tr>'."\n"; |
|
854 | 854 | |
855 | 855 | // Company |
856 | 856 | print '<tr id="trcompany" class="trcompany"><td>'; |
@@ -863,21 +863,21 @@ discard block |
||
863 | 863 | } |
864 | 864 | print '</td><td>'; |
865 | 865 | print img_picto('', 'company', 'class="pictofixedwidth"'); |
866 | - 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"; |
|
866 | + 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"; |
|
867 | 867 | |
868 | 868 | // Email company for invoice |
869 | 869 | if ($project->price_registration) { |
870 | - print '<tr><td>' . $form->textwithpicto($langs->trans("EmailCompany"), $langs->trans("EmailCompanyForInvoice")) . '</td><td>'; |
|
870 | + print '<tr><td>'.$form->textwithpicto($langs->trans("EmailCompany"), $langs->trans("EmailCompanyForInvoice")).'</td><td>'; |
|
871 | 871 | print img_picto('', 'email', 'class="pictofixedwidth"'); |
872 | - print '<input type="text" name="emailcompany" maxlength="255" class="minwidth200 widthcentpercentminusx maxwidth300" value="' . dol_escape_htmltag(GETPOST('emailcompany')) . '"></td></tr>' . "\n"; |
|
872 | + print '<input type="text" name="emailcompany" maxlength="255" class="minwidth200 widthcentpercentminusx maxwidth300" value="'.dol_escape_htmltag(GETPOST('emailcompany')).'"></td></tr>'."\n"; |
|
873 | 873 | } |
874 | 874 | |
875 | 875 | // Address |
876 | - print '<tr><td>' . $langs->trans("Address") . '</td><td>' . "\n"; |
|
877 | - 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"; |
|
876 | + print '<tr><td>'.$langs->trans("Address").'</td><td>'."\n"; |
|
877 | + 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"; |
|
878 | 878 | |
879 | 879 | // Zip / Town |
880 | - print '<tr><td>' . $langs->trans('Zip') . ' / ' . $langs->trans('Town') . '</td><td>'; |
|
880 | + print '<tr><td>'.$langs->trans('Zip').' / '.$langs->trans('Town').'</td><td>'; |
|
881 | 881 | print $formcompany->select_ziptown(GETPOST('zipcode'), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6, 1); |
882 | 882 | print ' / '; |
883 | 883 | print $formcompany->select_ziptown(GETPOST('town'), 'town', array('zipcode', 'selectcountry_id', 'state_id'), 0, 1); |
@@ -906,7 +906,7 @@ discard block |
||
906 | 906 | print '</td></tr>'; |
907 | 907 | // State |
908 | 908 | if (!getDolGlobalString('SOCIETE_DISABLE_STATE')) { |
909 | - print '<tr><td>' . $langs->trans('State') . '</td><td>'; |
|
909 | + print '<tr><td>'.$langs->trans('State').'</td><td>'; |
|
910 | 910 | if ($country_code) { |
911 | 911 | print img_picto('', 'state', 'class="pictofixedwidth"'); |
912 | 912 | print $formcompany->select_state(GETPOST("state_id"), $country_code); |
@@ -917,17 +917,17 @@ discard block |
||
917 | 917 | } |
918 | 918 | |
919 | 919 | if ($project->price_registration) { |
920 | - print '<tr><td>' . $langs->trans('Price') . '</td><td>'; |
|
920 | + print '<tr><td>'.$langs->trans('Price').'</td><td>'; |
|
921 | 921 | print '<span class="amount price-registration">'.price($project->price_registration, 1, $langs, 1, -1, -1, $conf->currency).'</span>'; |
922 | 922 | print '</td></tr>'; |
923 | 923 | } |
924 | 924 | |
925 | 925 | // Other attributes |
926 | - $parameters['tpl_context'] = 'public'; // define template context to public |
|
926 | + $parameters['tpl_context'] = 'public'; // define template context to public |
|
927 | 927 | include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; |
928 | 928 | |
929 | 929 | $notetoshow = $note_public; |
930 | - print '<tr><td>' . $langs->trans('Note') . '</td><td>'; |
|
930 | + print '<tr><td>'.$langs->trans('Note').'</td><td>'; |
|
931 | 931 | if (getDolGlobalString('EVENTORGANIZATION_DEFAULT_NOTE_ON_REGISTRATION')) { |
932 | 932 | $notetoshow = str_replace('\n', "\n", getDolGlobalString('EVENTORGANIZATION_DEFAULT_NOTE_ON_REGISTRATION')); |
933 | 933 | } |
@@ -942,9 +942,9 @@ discard block |
||
942 | 942 | |
943 | 943 | // Save |
944 | 944 | print '<div class="center">'; |
945 | - print '<input type="submit" value="' . $langs->trans("Submit") . '" id="submitsave" class="button">'; |
|
945 | + print '<input type="submit" value="'.$langs->trans("Submit").'" id="submitsave" class="button">'; |
|
946 | 946 | if (!empty($backtopage)) { |
947 | - print ' <input type="submit" value="' . $langs->trans("Cancel") . '" id="submitcancel" class="button button-cancel">'; |
|
947 | + print ' <input type="submit" value="'.$langs->trans("Cancel").'" id="submitcancel" class="button button-cancel">'; |
|
948 | 948 | } |
949 | 949 | print '</div>'; |
950 | 950 |