dolibarr  13.0.2
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')) define('NOCSRFCHECK', '1');
25 if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1');
26 if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1');
27 if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1');
28 if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1');
29 
30 require '../main.inc.php';
31 
32 if (empty($user->rights->takepos->run)) {
34 }
35 
36 if (GETPOSTISSET('status')) {
37  die(strtoupper($_SESSION['SMP_CURRENT_PAYMENT']));
38 }
39 
40 if (GETPOST('smp-status')) {
41  print '<html lang="en">';
42  print '<head>';
43  print '<meta charset="utf-8">
44 
45  <title>The HTML5 Herald</title>
46  <meta name="description" content="The HTML5 Herald">
47  <meta name="author" content="SitePoint">
48 
49  <link rel="stylesheet" href="css/styles.css?v=1.0">';
50 
51  print '</head>';
52 
53  print '<body>';
54  $_SESSION['SMP_CURRENT_PAYMENT'] = GETPOST('smp-status');
55 
56  print '<script type="application/javascript">
57  window.onload = function() {
58  window.close();
59  };
60  </script>';
61 
62  print "Transaction status registered, you can close this";
63 
64  print '</body></html>';
65  exit();
66 }
67 
68 print 'NOOP';
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname.
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 ...
print
Draft customers invoices.
Definition: index.php:89