Files
CLOAK/datatable/auth.php
T

19 lines
511 B
PHP
Raw Normal View History

2026-06-15 22:42:59 +08:00
<?php
/**
* 日志 datatable 接口鉴权
*/
if (!function_exists('cloak_datatable_require_auth')) {
function cloak_datatable_require_auth()
{
if (session_status() !== PHP_SESSION_ACTIVE) {
session_start();
}
if (empty($_SESSION['password']) || $_SESSION['password'] != LOGIN_PASSWORD) {
unset($_SESSION['password']);
unset($_SESSION['check_result']);
http_response_code(404);
die('404 Not Found');
}
}
}