setDebugMode($newState, $session->uid); // redirect to clean the URL $cleanUrl = strtok($_SERVER["REQUEST_URI"], '?'); header("Location: $cleanUrl"); exit; } $dbg = $database->getDebugMode(); if(!empty($dbg['active'])) { $started = !empty($dbg['started_at']) ? date('H:i d.m.Y', $dbg['started_at']) : '-'; ?>