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"]);
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_hash($chain, $type= '0')
Returns a hash of a string.
dol_now($mode= 'auto')
Return date for now.
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOCSRFCHECK')) 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_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename= '', $restricttologhandler= '', $logcontext=null)
Write log message into outputs.
accessforbidden($message= '', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...