Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/monara/public_html/test.athavaneng.com/themes.php on line 99
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 226
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 227
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 228
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 229
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 230
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 231
query("SELECT setting_value FROM site_settings WHERE setting_key = 'audit_deadline_hours'")->fetchColumn() ?: 24;
// 2. FETCH DRAMA DETAILS
$stmt = $pdo->prepare("SELECT title, evaluation_start_at FROM dramas WHERE id = ?");
$stmt->execute([$drama_id]);
$drama = $stmt->fetch();
// --- STRICT SECURITY CHECK ---
// If drama doesn't exist OR manager hasn't started the evaluation, block access.
if (!$drama || !$drama['evaluation_start_at']) {
header("Location: dashboard.php?error=locked");
exit();
}
// 3. CALCULATE GLOBAL EXPIRY BASED ON MANUAL START TRIGGER
$start_time_unix = strtotime($drama['evaluation_start_at']);
$expiry_unix = $start_time_unix + ($deadline_hours * 3600);
$seconds_left = $expiry_unix - time();
$is_expired = ($seconds_left <= 0);
// 4. FETCH EPISODES LIST
$stmt = $pdo->prepare("SELECT * FROM episodes WHERE drama_id = ? ORDER BY ep_number ASC");
$stmt->execute([$drama_id]);
$episodes = $stmt->fetchAll();
include '../includes/header.php';
?>