From 3f3c2f83af646136aa49efb02500738797ce3d71 Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Fri, 5 Dec 2025 20:00:32 +0000 Subject: [PATCH] v1.incomplete4 --- dashboard.php | 99 ++++++++++------------------------- includes/header.php | 3 ++ services/emailnewsletters.php | 40 ++++++++++++++ services/smsnotifications.php | 40 ++++++++++++++ services/voicecalls.php | 40 ++++++++++++++ subscribe.php | 73 ++++++++++++++++---------- 6 files changed, 197 insertions(+), 98 deletions(-) create mode 100644 services/emailnewsletters.php create mode 100644 services/smsnotifications.php create mode 100644 services/voicecalls.php diff --git a/dashboard.php b/dashboard.php index f640c5e..3ae3842 100644 --- a/dashboard.php +++ b/dashboard.php @@ -1,86 +1,43 @@ prepare('SELECT s.name, s.description FROM services s JOIN user_services us ON s.id = us.service_id WHERE us.user_id = ?'); +$p->execute([$user_id]); +$services = $p->fetchAll(); + ?> -
- " . $_SESSION['message'] . "
"; - unset($_SESSION['message']); - } - if (isset($_SESSION['error'])) { - echo "
" . $_SESSION['error'] . "
"; - unset($_SESSION['error']); - } - ?> -
-
-

Welcome to your Dashboard, !

-

This is your central hub to manage your account and services. More features will be added soon.

-
-
- -
-
-

Your Subscribed Services

- prepare("SELECT s.name, s.description, us.id as user_service_id FROM services s JOIN user_services us ON s.id = us.service_id WHERE us.user_id = ? AND us.status = 'active'"); - $stmt->execute([$_SESSION['user_id']]); - $user_services = $stmt->fetchAll(PDO::FETCH_ASSOC); - - if (count($user_services) > 0) { - echo "
    "; - foreach ($user_services as $service) { - echo "
  • "; - echo "
    " . htmlspecialchars($service['name']) . ": " . htmlspecialchars($service['description']) . "
    "; - echo "Cancel"; - echo "
  • "; - } - echo "
"; - } else { - echo "

You are not subscribed to any services yet.

"; - } - ?> -
-
- -
-
-

Available Services

-
-
+
+

Dashboard

+

Welcome to your dashboard. Here are the services you are subscribed to:

- query("SELECT * FROM services"); - $services = $stmt->fetchAll(PDO::FETCH_ASSOC); - - foreach ($services as $service) { - ?> -
-
-
-
-

-

$ /

- Subscribe + +
+

You are not subscribed to any services yet.

+
+ + +
+
+
+
+

+ Go to service +
-
- + +
- + \ No newline at end of file diff --git a/includes/header.php b/includes/header.php index 766de5b..b0d496b 100644 --- a/includes/header.php +++ b/includes/header.php @@ -68,6 +68,9 @@ +