dolibarr/htdocs/takepos/smpcb.php

46 lines
1.1 KiB
PHP
Raw Normal View History

2019-11-25 23:15:39 +01:00
<?php
if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1');
if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1');
if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1');
if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1');
if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1');
require '../main.inc.php';
if (empty($user->rights->takepos->run)) {
2020-03-23 15:46:16 +01:00
accessforbidden();
}
2019-11-25 23:15:39 +01:00
if (isset($_GET['status'])) {
2019-11-25 23:19:50 +01:00
die(strtoupper($_SESSION['SMP_CURRENT_PAYMENT']));
}
2019-11-25 23:15:39 +01:00
if ($_GET['smp-status']) {
2019-11-25 23:19:50 +01:00
print '<html lang="en">
2019-11-25 23:15:39 +01:00
<head>
<meta charset="utf-8">
<title>The HTML5 Herald</title>
<meta name="description" content="The HTML5 Herald">
<meta name="author" content="SitePoint">
<link rel="stylesheet" href="css/styles.css?v=1.0">
</head>
<body>';
2019-11-25 23:19:50 +01:00
$_SESSION['SMP_CURRENT_PAYMENT'] = $_GET['smp-status'];
2019-11-25 23:15:39 +01:00
2019-11-25 23:19:50 +01:00
print '<script type="application/javascript">
2019-11-25 23:15:39 +01:00
window.onload = function() {
window.close();
};
</script>';
2019-11-25 23:19:50 +01:00
print "Transaction status registered, you can close this";
2019-11-25 23:15:39 +01:00
2019-11-25 23:19:50 +01:00
die('</body></html>');
}
2019-11-25 23:15:39 +01:00
print 'NOOP';