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 s.id AS schedule_id, s.schedule_name, s.reference_no, s.budget_allocated,
s.status, s.start_date, s.end_date, c.client_name, a.agency_name,
r.id AS request_id, r.additional_budget, r.new_end_date,
(SELECT SUM(cost) FROM schedule_items WHERE schedule_id = s.id) as total_content_cost,
DATEDIFF(CURRENT_DATE, s.start_date) as days_run
FROM schedules s
JOIN clients c ON s.client_id = c.id
JOIN agencies a ON s.agency_id = a.id
LEFT JOIN schedule_approval_requests r ON s.id = r.schedule_id AND r.status = 'Pending'
WHERE s.status IN ('Pending Approval', 'Pending Approval (Cost Review)')
GROUP BY s.id, r.id, c.client_name, a.agency_name
")->fetchAll();
$grouped = ['Pending Approval' => [], 'Pending Approval (Cost Review)' => []];
foreach ($requests as $req) { $grouped[$req['status']][] = $req; }
?>