prepare("INSERT INTO trucks (user_id, truck_type, load_capacity, plate_no, registration_expiry_date, insurance_expiry_date, is_approved) VALUES (?, ?, ?, ?, ?, ?, 0)"); $stmt->execute([$userId, $truckType, $loadCapacity, $plateNo, $regExpiry, $insExpiry]); set_flash('success', 'Truck added successfully, pending admin approval.'); } header('Location: ' . url_with_lang('truck_owner_dashboard.php')); exit; } $trucks = db()->prepare("SELECT * FROM trucks WHERE user_id = ?"); $trucks->execute([$userId]); $myTrucks = $trucks->fetchAll(); render_header('Truck Owner Dashboard', 'owner'); $flash = get_flash(); ?>
Manage your trucks and view their approval status.
| Truck Type | Capacity (T) | Plate No | Reg Expiry | Ins Expiry | Status |
|---|---|---|---|---|---|
| = e($truck['truck_type']) ?> | = e($truck['load_capacity']) ?> | = e($truck['plate_no']) ?> | = e($truck['registration_expiry_date']) ?> | = e($truck['insurance_expiry_date']) ?> | Expired Approved Pending |