From c40a79e66053463a0a1e48db5061210f293ba24b Mon Sep 17 00:00:00 2001 From: nsavinda Date: Mon, 30 Oct 2023 20:11:34 +0530 Subject: [PATCH] feat: customer profile edit --- app/controllers/Customer.php | 14 ++ app/controllers/Profile.php | 18 +- app/views/customer/profile.view.php | 329 +++++++++++++++++++++++++ app/views/profile.view.php | 97 +++++++- public/assets/css/customer-profile.css | 121 ++++++++- 5 files changed, 576 insertions(+), 3 deletions(-) create mode 100644 app/controllers/Customer.php create mode 100755 app/views/customer/profile.view.php diff --git a/app/controllers/Customer.php b/app/controllers/Customer.php new file mode 100644 index 00000000..c921a734 --- /dev/null +++ b/app/controllers/Customer.php @@ -0,0 +1,14 @@ +view('customer/profile'); + } +} \ No newline at end of file diff --git a/app/controllers/Profile.php b/app/controllers/Profile.php index 19df606d..2641d419 100755 --- a/app/controllers/Profile.php +++ b/app/controllers/Profile.php @@ -4,6 +4,22 @@ class Profile { use Controller; public function index(string $a = '', string $b = '', string $c = ''):void { - $this->view('profile'); + + $user = $_SESSION['USER']; + // echo $user->role; + + if ($user->role == 'customer') { + $this->view('customer/profile'); + } else if ($user->role == 'guide') { + $this->view('guide/profile'); + } else if ($user->role == 'admin') { + $this->view('rental-service/profile'); + } + + // else { + // $this->view('profile'); + // } + + // $this->view('profile'); } } \ No newline at end of file diff --git a/app/views/customer/profile.view.php b/app/views/customer/profile.view.php new file mode 100755 index 00000000..844cb71d --- /dev/null +++ b/app/views/customer/profile.view.php @@ -0,0 +1,329 @@ + + +
+ +
+ +
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+
Name : name ?>
+
+
+
NIC : nic ?>
+
+
+
Role : Customer
+
+
+ +
+
+
Email : email ?>
+
+
+
Mobile : number ?>
+
+
+
Address : address ?>
+
+
+ +
+ +
+ +
+ + + + +
+ +
+
+ + + + + + + +
+
+
+
Total Booking
+
+ +
+
+
03
+
+ +
+
+
Equipment Booking
+
+ +
+
+
02
+
+ +
+
+
Guide Booking
+
+ +
+
+
01
+
+
> + + + +
+
+ +
+ +
+
+
Recent Booking
+
+ +
+
+ +
+
+
Booking Type : Equipment Booking
+
+
+
Name : Glazers Camping
+
+
+
Date : 20/08/2023
+
+
+
Time : 10:00
+
+ +
+
+
+ + + +
+
+ +
+ +
Booking History
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameStatusTypeDateTime
Glazers CampingUpcomingEquipment02/12/202310.00
Glazers CampingUpcomingEquipment02/12/202310.00
SarathDoneGuide01/09/202310.00
+
+
+
+ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/views/profile.view.php b/app/views/profile.view.php index 463d6684..844cb71d 100755 --- a/app/views/profile.view.php +++ b/app/views/profile.view.php @@ -9,7 +9,7 @@
-
@@ -56,6 +56,54 @@ + +
+ +
+
+ + + + + + +
@@ -227,6 +275,53 @@ --> + + + + + + + + +