2022-11-21 22:56:44 +00:00
|
|
|
<?php
|
2022-11-21 23:57:29 +00:00
|
|
|
|
|
|
|
if (!isset($_COOKIE['_session']) || !file_exists('/tmp/apcontrol-sessions')) {
|
|
|
|
header('Location: login.php'); die;
|
|
|
|
}
|
|
|
|
|
|
|
|
$session = trim($_COOKIE['_session']);
|
|
|
|
$sessions = explode("\n", trim(file_get_contents('/tmp/apcontrol-sessions')));
|
|
|
|
if (!in_array($session, $sessions)) {
|
|
|
|
header('Location: login.php'); die;
|
|
|
|
}
|