добавлена защита от запуска без подключения ядра

This commit is contained in:
rsgrinko committed 2021-12-03 15:05:59 +03:00
1 parent 4132cc1186
commit fde908ba27
3 files changed
+23 -8

No files matched your search

+9
View File
@@ -5,6 +5,15 @@
E-mail: rsgrinko@gmail.com
Сайт: https://it-stories.ru
*/
/**
* Защита от запуска файла без подключения ядра
*/
if(!defined(CORE_LOADED) or CORE_LOADED !== true) {
die();
}
if(!CUser::is_user() and $_SERVER['REQUEST_URI'] !== '/login.php') {
header("Location: login.php");
die();