Update: 2026-07-12 05:40:28

This commit is contained in:
Hamza-Ayed
2026-07-12 05:40:28 +03:00
parent 1fa517acc9
commit 24fb56f08f
75 changed files with 5051 additions and 9 deletions
@@ -0,0 +1,18 @@
<?php
// transit/enrollment/my_enrollments.php — الراكب يستعرض عضوياته في كل المؤسسات
require_once __DIR__ . '/../../transit/connect_app.php';
if ($transit_user_role !== 'passenger') jsonError('Only passengers can view enrollments', 403);
$st = $transit_con->prepare(
"SELECT e.id, e.org_id, e.status, e.verify_method, e.expires_at, e.created_at,
o.name_ar AS org_name, o.name_en AS org_name_en, o.type AS org_type, o.logo_url
FROM transit_enrollments e
JOIN transit_orgs o ON o.id = e.org_id
WHERE e.passenger_id = ?
ORDER BY e.created_at DESC"
);
$st->execute([$transit_user_id]);
jsonSuccess(['enrollments' => $st->fetchAll()]);