<?php
function adm_check() {
global $time;
if (!isset($_SESSION['adm_auth']) || $_SESSION['adm_auth'] < $time) {
header('Location: /panel/?return=' . urlencode($_SERVER['REQUEST_URI']) . (SID ? '&' . SID : null));
exit;
}
if (isset($_SESSION['adm_auth']) && $_SESSION['adm_auth'] > $time) {
$_SESSION['adm_auth'] = $time + 600;
}
}