12 lines
321 B
PHP
12 lines
321 B
PHP
<?php
|
|
|
|
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;
|
|
}
|