Update: 2026-08-07 05:03:39

This commit is contained in:
Hamza-Ayed
2026-08-07 05:03:39 +03:00
parent 8e7c4a7104
commit 977d238c84
18 changed files with 1830 additions and 128 deletions
+2 -10
View File
@@ -1,16 +1,8 @@
<?php
require_once __DIR__ . '/../connect.php';
// ‏فحص الدور — كان غائباً تماماً بينما شقيقه getComplaintAllData.php يفحصه.
// ‏مجلد serviceapp خارج بوّابة Admin/ المسارية، فكل ملف يحمي نفسه، وهذا
// ‏كان مكشوفاً: أي حامل JWT صالح يقدر يغلق أي شكوى ويكتب نص قرارها.
if ($role !== 'admin' && $role !== 'super_admin') {
http_response_code(403);
exit(json_encode([
'status' => 'failure',
'message' => 'Forbidden. Support access required.',
], JSON_UNESCAPED_UNICODE));
}
// ‏كان هذا الملف بلا أي فحص دور. الحماية الآن من البوّابة المسارية في
// ‏connect.php (service/admin/super_admin لكل ما تحت serviceapp/).
$id = filterRequest("id");
$status = filterRequest("statusComplaint");