CMXX - First testing

This commit is contained in:
“VeLiTi”
2025-03-07 15:07:15 +01:00
parent 5dd2973a26
commit cd0e04981c
81 changed files with 697 additions and 325 deletions

View File

@@ -31,10 +31,10 @@ if (!isset($_SESSION['account_loggedin'])) {
exit;
}
// If the user is not admin redirect them back to the shopping cart home page
$stmt = $pdo->prepare('SELECT * FROM accounts WHERE id = ?');
$stmt->execute([ $_SESSION['account_id'] ]);
$account = $stmt->fetch(PDO::FETCH_ASSOC);
if (!$account || $account['role'] != 'Admin') {
$account = ioAPIv2('/v2/identity/userkey='.$_SESSION['account_id'].'&isverified=1','',$clientsecret);
$account = json_decode($account,true);
if (!$account || $account[0]['profile'] != 1) {
header('Location: ' . url('../index.php'));
exit;
}