dolibarr  16.0.5
smpcb.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2020 Andreu Bisquerra Gaya <jove@bisquerra.com>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
24 if (!defined('NOCSRFCHECK')) {
25  define('NOCSRFCHECK', '1');
26 }
27 if (!defined('NOTOKENRENEWAL')) {
28  define('NOTOKENRENEWAL', '1');
29 }
30 if (!defined('NOREQUIREMENU')) {
31  define('NOREQUIREMENU', '1');
32 }
33 if (!defined('NOREQUIREHTML')) {
34  define('NOREQUIREHTML', '1');
35 }
36 if (!defined('NOREQUIREAJAX')) {
37  define('NOREQUIREAJAX', '1');
38 }
39 
40 require '../main.inc.php';
41 
42 if (empty($user->rights->takepos->run)) {
44 }
45 
46 if (GETPOSTISSET('status')) {
47  die(strtoupper($_SESSION['SMP_CURRENT_PAYMENT']));
48 }
49 
50 if (GETPOST('smp-status')) {
51  print '<html lang="en">';
52  print '<head>';
53  print '<meta charset="utf-8">
54 
55  <title>The HTML5 Herald</title>
56  <meta name="description" content="The HTML5 Herald">
57  <meta name="author" content="SitePoint">
58 
59  <link rel="stylesheet" href="css/styles.css?v=1.0">';
60 
61  print '</head>';
62 
63  print '<body>';
64  $_SESSION['SMP_CURRENT_PAYMENT'] = GETPOST('smp-status');
65 
66  print '<script type="application/javascript">
67  window.onload = function() {
68  window.close();
69  };
70  </script>';
71 
72  print "Transaction status registered, you can close this";
73 
74  print '</body></html>';
75  exit();
76 }
77 
78 print 'NOOP';
GETPOST
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
Definition: functions.lib.php:484
GETPOSTISSET
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
Definition: functions.lib.php:386
accessforbidden
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 ...
Definition: security.lib.php:933