query("SELECT * FROM prices ORDER BY updated_at DESC LIMIT 1"); $latest_prices = $stmt->fetch(); if ($latest_prices) { $petrol_price = $latest_prices['petrol_price']; $diesel_price = $latest_prices['diesel_price']; } } catch (PDOException $e) { error_log("Could not fetch prices: " . $e->getMessage()); } // Fetch user's orders $orders = []; try { $stmt = $pdoconn->prepare("SELECT * FROM orders WHERE user_id = :user_id ORDER BY order_date DESC"); $stmt->execute([':user_id' => $user['id']]); $orders = $stmt->fetchAll(); } catch (PDOException $e) { error_log("Could not fetch orders: " . $e->getMessage()); } require_once 'includes/pexels.php'; $bg_image_data = pexels_get('https://api.pexels.com/v1/search?query=abstract+background&orientation=landscape&per_page=1&page=1'); $bg_image = ''; // Default empty if ($bg_image_data && !empty($bg_image_data['photos'])) { $photo = $bg_image_data['photos'][0]; $src = $photo['src']['large2x'] ?? ($photo['src']['large'] ?? $photo['src']['original']); $target = __DIR__ . '/assets/images/pexels/' . $photo['id'] . '.jpg'; download_to($src, $target); $bg_image = 'assets/images/pexels/' . $photo['id'] . '.jpg'; } ?> Customer Dashboard
Welcome, !

Dashboard

Welcome to your customer portal. Here you can view prices, place orders, and see your account history.

Today's Prices

Petrol: $ / litre

Diesel: $ / litre

Prices are updated daily.
Banking Details

Please use the following details for payments:

  • Bank A: 123-456-7890
  • Bank B: 098-765-4321
Place a New Order