dolibarr 24.0.0-beta
smpcb.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2020 Andreu Bisquerra Gaya <jove@bisquerra.com>
3 * Copyright (C) 2025 Frédéric France <frederic.france@free.fr>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <https://www.gnu.org/licenses/>.
17 */
18
25if (!defined('NOTOKENRENEWAL')) {
26 define('NOTOKENRENEWAL', '1');
27}
28if (!defined('NOREQUIREMENU')) {
29 define('NOREQUIREMENU', '1');
30}
31if (!defined('NOREQUIREHTML')) {
32 define('NOREQUIREHTML', '1');
33}
34if (!defined('NOREQUIREAJAX')) {
35 define('NOREQUIREAJAX', '1');
36}
37
38// Load Dolibarr environment
39require '../main.inc.php';
44if (!$user->hasRight('takepos', 'run')) {
46}
47
48if (GETPOSTISSET('status')) {
49 die(strtoupper($_SESSION['SMP_CURRENT_PAYMENT']));
50}
51
52
53/*
54 * View
55 */
56
57top_httphead('text/html', 1);
58
59if (GETPOST('smp-status')) {
60 print '<html lang="en">';
61 print '<head>';
62 print '<meta charset="utf-8">
63
64 <title>The HTML5 Herald</title>
65 <meta name="description" content="The HTML5 Herald">
66 <meta name="author" content="SitePoint">
67
68 <link rel="stylesheet" href="css/styles.css?v=1.0">';
69
70 print '</head>';
71
72 print '<body>';
73 $_SESSION['SMP_CURRENT_PAYMENT'] = GETPOST('smp-status');
74
75 print '<script type="application/javascript">
76 window.onload = function() {
77 window.close();
78 }
79 </script>';
80
81 print "Transaction status registered, you can close this";
82
83 print '</body></html>';
84 exit();
85}
86
87print 'NOOP';
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
if(!defined( 'NOREQUIREMENU')) if(!empty(GETPOST('seteventmessages', 'alpha'))) if(!function_exists("llxHeader")) top_httphead($contenttype='text/html', $forcenocache=0)
Show HTTP header.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.