2016-08-01 14:20:20 +02:00
|
|
|
<?php
|
|
|
|
|
2023-04-02 23:00:41 +02:00
|
|
|
/**
|
|
|
|
* This file is part of O3-Shop TinyMCE editor module.
|
2016-08-01 14:20:20 +02:00
|
|
|
*
|
2023-04-02 23:00:41 +02:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, version 3.
|
2016-08-01 14:20:20 +02:00
|
|
|
*
|
2023-04-02 23:00:41 +02:00
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* General Public License for more details.
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with O3-Shop. If not, see <http://www.gnu.org/licenses/>
|
2017-09-26 15:18:20 +02:00
|
|
|
*
|
2023-04-07 21:48:54 +02:00
|
|
|
* @copyright Copyright (c) 2022 Marat Bedoev, bestlife AG
|
2023-04-02 23:00:41 +02:00
|
|
|
* @copyright Copyright (c) 2023 O3-Shop (https://www.o3-shop.com)
|
|
|
|
* @license https://www.gnu.org/licenses/gpl-3.0 GNU General Public License 3 (GPLv3)
|
2016-08-01 14:20:20 +02:00
|
|
|
*/
|
|
|
|
|
2023-04-05 08:27:08 +02:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2023-04-08 22:47:11 +02:00
|
|
|
function checkAccess(string $action): void
|
2016-08-01 14:20:20 +02:00
|
|
|
{
|
2023-04-10 22:47:06 +02:00
|
|
|
if ($_COOKIE['filemanagerkey'] !== md5($_SERVER['DOCUMENT_ROOT'].$_COOKIE['admin_sid'])) {
|
|
|
|
die('Access Denied!!');
|
|
|
|
}
|
|
|
|
}
|