30 if (!defined(
'NOLOGIN')) {
33 if (!defined(
'NOCSRFCHECK')) {
34 define(
"NOCSRFCHECK", 1);
36 if (!defined(
'NOIPCHECK')) {
37 define(
'NOIPCHECK',
'1');
39 if (!defined(
'NOBROWSERNOTIF')) {
40 define(
'NOBROWSERNOTIF',
'1');
46 $entity = (!empty($_GET[
'e']) ? (int) $_GET[
'e'] : (!empty($_POST[
'e']) ? (int) $_POST[
'e'] : 1));
47 if (is_numeric($entity)) {
48 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/lib/payments.lib.php';
55 if (!empty($conf->paypal->enabled)) {
56 require_once DOL_DOCUMENT_ROOT.
'/paypal/lib/paypal.lib.php';
57 require_once DOL_DOCUMENT_ROOT.
'/paypal/lib/paypalfunctions.lib.php';
60 global $dolibarr_main_url_root, $mysoc;
62 $langs->loadLangs(array(
"main",
"companies",
"install",
"other",
"eventorganization"));
64 $object =
new stdClass();
70 $securekeyreceived =
GETPOST(
"securekey");
71 $securekeytocompare =
dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.
'conferenceorbooth'.$id, 2);
73 if ($securekeyreceived != $securekeytocompare) {
74 print $langs->trans(
'MissingOrBadSecureKey');
79 if (empty($conf->eventorganization->enabled)) {
99 foreach ($_POST as $k => $v) {
100 $tracepost .=
"{$k} - {$v}\n";
102 dol_syslog(
"POST=".$tracepost, LOG_DEBUG, 0,
'_payment');
105 if (!empty($conf->global->ONLINE_PAYMENT_CSS_URL)) {
106 $head =
'<link rel="stylesheet" type="text/css" href="'.$conf->global->ONLINE_PAYMENT_CSS_URL.
'?lang='.$langs->defaultlang.
'">'.
"\n";
109 $conf->dol_hide_topmenu = 1;
110 $conf->dol_hide_leftmenu = 1;
112 $replacemainarea = (empty($conf->dol_hide_leftmenu) ?
'<div>' :
'').
'<div>';
113 llxHeader($head, $langs->trans(
"PaymentForm"),
'',
'', 0, 0,
'',
'',
'',
'onlinepaymentbody', $replacemainarea);
117 print
'<span id="dolpaymentspan"></span>'.
"\n";
118 print
'<div id="dolpaymentdiv" class="center">'.
"\n";
123 $logosmall = $mysoc->logo_small;
124 $logo = $mysoc->logo;
125 $paramlogo =
'ONLINE_PAYMENT_LOGO_'.$suffix;
126 if (!empty($conf->global->$paramlogo)) {
127 $logosmall = $conf->global->$paramlogo;
128 } elseif (!empty($conf->global->ONLINE_PAYMENT_LOGO)) {
129 $logosmall = $conf->global->ONLINE_PAYMENT_LOGO;
135 if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.
'/logos/thumbs/'.$logosmall)) {
136 $urllogo = DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/thumbs/'.$logosmall);
137 $urllogofull = $dolibarr_main_url_root.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/thumbs/'.$logosmall);
138 } elseif (!empty($logo) && is_readable($conf->mycompany->dir_output.
'/logos/'.$logo)) {
139 $urllogo = DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/'.$logo);
140 $urllogofull = $dolibarr_main_url_root.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/'.$logo);
145 print
'<div class="backgreypublicpayment">';
146 print
'<div class="logopublicpayment">';
147 print
'<img id="dolpaymentlogo" src="'.$urllogo.
'"';
150 if (empty($conf->global->MAIN_HIDE_POWERED_BY)) {
151 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>';
156 if (!empty($conf->global->EVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE)) {
157 print
'<div class="backimagepubliceventorganizationsubscription">';
158 print
'<img id="idEVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE" src="'.$conf->global->EVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE.
'">';
162 print
'<br><br><br>';
164 print $langs->trans(
"SubscriptionOk");
169 htmlPrintOnlinePaymentFooter($mysoc, $langs, 0, $suffix);
173 unset($_SESSION[
"FinalPaymentAmt"]);
174 unset($_SESSION[
"TRANSACTIONID"]);