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(); // Fetch Available Shipments $availShipments = []; try { $stmt = db()->query("SELECT * FROM shipments WHERE status = 'posted' ORDER BY created_at DESC"); $availShipments = $stmt->fetchAll(); } catch (Throwable $e) {} render_header('Truck Owner Dashboard', 'owner'); $flash = get_flash(); ?>

Truck Owner Dashboard

Manage your trucks and view available shipments.

Add New Truck
My Trucks

No trucks registered yet.

Expired Approved Pending
Tons
Available Shipments

No shipments available at the moment.

Route Details Dates Action
Price: $
Tons •
Pick:
Drop:
View