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);
52 require
'../../main.inc.php';
53 require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
54 require_once DOL_DOCUMENT_ROOT.
'/core/lib/payments.lib.php';
57 require_once DOL_DOCUMENT_ROOT.
'/paypal/lib/paypal.lib.php';
58 require_once DOL_DOCUMENT_ROOT.
'/paypal/lib/paypalfunctions.lib.php';
61 global $dolibarr_main_url_root, $mysoc;
63 $langs->loadLangs(array(
"main",
"companies",
"install",
"other",
"eventorganization"));
65 $object =
new stdClass();
71 $securekeyreceived =
GETPOST(
"securekey");
72 $securekeytocompare =
dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.
'conferenceorbooth'.$id, 2);
74 if ($securekeyreceived != $securekeytocompare) {
75 print $langs->trans(
'MissingOrBadSecureKey');
80 if (empty($conf->eventorganization->enabled)) {
100 foreach ($_POST as $k => $v) {
101 $tracepost .=
"{$k} - {$v}\n";
103 dol_syslog(
"POST=".$tracepost, LOG_DEBUG, 0,
'_payment');
106 if (!empty($conf->global->ONLINE_PAYMENT_CSS_URL)) {
107 $head =
'<link rel="stylesheet" type="text/css" href="'.$conf->global->ONLINE_PAYMENT_CSS_URL.
'?lang='.$langs->defaultlang.
'">'.
"\n";
110 $conf->dol_hide_topmenu = 1;
111 $conf->dol_hide_leftmenu = 1;
113 $replacemainarea = (empty($conf->dol_hide_leftmenu) ?
'<div>' :
'').
'<div>';
114 llxHeader($head, $langs->trans(
"PaymentForm"),
'',
'', 0, 0,
'',
'',
'',
'onlinepaymentbody', $replacemainarea);
118 print
'<span id="dolpaymentspan"></span>'.
"\n";
119 print
'<div id="dolpaymentdiv" class="center">'.
"\n";
124 $logosmall = $mysoc->logo_small;
125 $logo = $mysoc->logo;
126 $paramlogo =
'ONLINE_PAYMENT_LOGO_'.$suffix;
127 if (!empty($conf->global->$paramlogo)) {
128 $logosmall = $conf->global->$paramlogo;
129 } elseif (!empty($conf->global->ONLINE_PAYMENT_LOGO)) {
130 $logosmall = $conf->global->ONLINE_PAYMENT_LOGO;
136 if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.
'/logos/thumbs/'.$logosmall)) {
137 $urllogo = DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/thumbs/'.$logosmall);
138 $urllogofull = $dolibarr_main_url_root.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/thumbs/'.$logosmall);
139 } elseif (!empty($logo) && is_readable($conf->mycompany->dir_output.
'/logos/'.$logo)) {
140 $urllogo = DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/'.$logo);
141 $urllogofull = $dolibarr_main_url_root.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/'.$logo);
146 print
'<div class="backgreypublicpayment">';
147 print
'<div class="logopublicpayment">';
148 print
'<img id="dolpaymentlogo" src="'.$urllogo.
'"';
151 if (empty($conf->global->MAIN_HIDE_POWERED_BY)) {
152 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>';
157 if (!empty($conf->global->EVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE)) {
158 print
'<div class="backimagepubliceventorganizationsubscription">';
159 print
'<img id="idEVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE" src="'.$conf->global->EVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE.
'">';
163 print
'<br><br><br>';
165 print $langs->trans(
"SubscriptionOk");
170 htmlPrintOnlinePaymentFooter($mysoc, $langs, 0, $suffix);
174 unset($_SESSION[
"FinalPaymentAmt"]);
175 unset($_SESSION[
"TRANSACTIONID"]);
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
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_now($mode='auto')
Return date for now.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
isModEnabled($module)
Is Dolibarr module enabled.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
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.