├── .gitignore
├── todo.txt
├── screenshots
└── image.png
├── assets
├── fonts
│ ├── fa-brands-400.eot
│ ├── fa-brands-400.ttf
│ ├── fa-brands-400.woff
│ ├── fa-regular-400.eot
│ ├── fa-regular-400.ttf
│ ├── fa-solid-900.eot
│ ├── fa-solid-900.ttf
│ ├── fa-solid-900.woff
│ ├── fa-solid-900.woff2
│ ├── fa-brands-400.woff2
│ ├── fa-regular-400.woff
│ ├── fa-regular-400.woff2
│ ├── Nunito-31cb3cc7f0a41186c0be5225caa408c3.woff2
│ ├── Nunito-49507be8926ed86b54f246864dfb2b91.woff2
│ ├── Nunito-4c5c6c8d60cf38c7a442b766dfd3ac9f.woff2
│ ├── Nunito-56f97c8310e9868d5e4f649ff0cc0536.woff2
│ ├── Nunito-58050dbecc5a1ef8ffb017fb99b15294.woff2
│ ├── Nunito-61492c245979f8a0f42bffcedfa474e6.woff2
│ ├── Nunito-6c46e979458f0c7829f6f041688f5621.woff2
│ ├── Nunito-7cdc9c521e8cbc9c2263ff91673131a3.woff2
│ ├── Nunito-a0bd6b56ae8ca0f4f4b94d0767c38ac6.woff2
│ └── Nunito-a1952f5f0721495404bb0f6f7eed5a72.woff2
├── img
│ └── avatars
│ │ └── avatar1.jpeg
├── js
│ ├── bs-init.js
│ ├── main.js
│ ├── listTable.js
│ ├── togglepassword.js
│ ├── dataTables.bootstrap5.min.js
│ ├── theme.js
│ └── buttons.print.min.js
└── css
│ └── Navbar-Right-Links-icons.css
├── html
├── assets
│ ├── fonts
│ │ ├── fa-brands-400.eot
│ │ ├── fa-brands-400.ttf
│ │ ├── fa-brands-400.woff
│ │ ├── fa-regular-400.eot
│ │ ├── fa-regular-400.ttf
│ │ ├── fa-solid-900.eot
│ │ ├── fa-solid-900.ttf
│ │ ├── fa-solid-900.woff
│ │ ├── fa-solid-900.woff2
│ │ ├── fa-brands-400.woff2
│ │ ├── fa-regular-400.woff
│ │ ├── fa-regular-400.woff2
│ │ ├── Nunito-31cb3cc7f0a41186c0be5225caa408c3.woff2
│ │ ├── Nunito-49507be8926ed86b54f246864dfb2b91.woff2
│ │ ├── Nunito-4c5c6c8d60cf38c7a442b766dfd3ac9f.woff2
│ │ ├── Nunito-56f97c8310e9868d5e4f649ff0cc0536.woff2
│ │ ├── Nunito-58050dbecc5a1ef8ffb017fb99b15294.woff2
│ │ ├── Nunito-61492c245979f8a0f42bffcedfa474e6.woff2
│ │ ├── Nunito-6c46e979458f0c7829f6f041688f5621.woff2
│ │ ├── Nunito-7cdc9c521e8cbc9c2263ff91673131a3.woff2
│ │ ├── Nunito-a0bd6b56ae8ca0f4f4b94d0767c38ac6.woff2
│ │ └── Nunito-a1952f5f0721495404bb0f6f7eed5a72.woff2
│ ├── img
│ │ └── avatars
│ │ │ ├── avatar1.jpeg
│ │ │ ├── avatar2.jpeg
│ │ │ ├── avatar3.jpeg
│ │ │ ├── avatar4.jpeg
│ │ │ └── avatar5.jpeg
│ ├── js
│ │ ├── bs-init.js
│ │ └── theme.js
│ └── css
│ │ └── Navbar-Right-Links-icons.css
├── payments.html
├── logs.html
├── index.html
├── reports.html
├── login.html
├── status.html
├── staff.html
└── dashboard.html
├── functions
├── authentication.php
├── logout.php
├── remove-staff.php
├── remove-member.php
├── connection.php
├── views
│ ├── member-profile.php
│ ├── reports.php
│ ├── rooms.php
│ ├── activity.php
│ ├── get-data.php
│ ├── staff.php
│ ├── dashboard-count.php
│ ├── members.php
│ ├── members-status.php
│ └── dashboard-chart.php
├── login.php
├── add-staff.php
├── payment.php
├── update-staff.php
├── updat-staff.php
├── update-member.php
├── add-member.php
└── setup.php
├── LICENSE
├── .github
└── workflows
│ └── static.yml
├── README.MD
├── reciept.php
├── reports.php
├── logs.php
├── index.php
├── status.php
├── dashboard.php
└── staff.php
/.gitignore:
--------------------------------------------------------------------------------
1 | functions/img/*
--------------------------------------------------------------------------------
/todo.txt:
--------------------------------------------------------------------------------
1 | membership status & reciept ASAP
--------------------------------------------------------------------------------
/screenshots/image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/screenshots/image.png
--------------------------------------------------------------------------------
/assets/fonts/fa-brands-400.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/assets/fonts/fa-brands-400.eot
--------------------------------------------------------------------------------
/assets/fonts/fa-brands-400.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/assets/fonts/fa-brands-400.ttf
--------------------------------------------------------------------------------
/assets/fonts/fa-brands-400.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/assets/fonts/fa-brands-400.woff
--------------------------------------------------------------------------------
/assets/fonts/fa-regular-400.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/assets/fonts/fa-regular-400.eot
--------------------------------------------------------------------------------
/assets/fonts/fa-regular-400.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/assets/fonts/fa-regular-400.ttf
--------------------------------------------------------------------------------
/assets/fonts/fa-solid-900.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/assets/fonts/fa-solid-900.eot
--------------------------------------------------------------------------------
/assets/fonts/fa-solid-900.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/assets/fonts/fa-solid-900.ttf
--------------------------------------------------------------------------------
/assets/fonts/fa-solid-900.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/assets/fonts/fa-solid-900.woff
--------------------------------------------------------------------------------
/assets/fonts/fa-solid-900.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/assets/fonts/fa-solid-900.woff2
--------------------------------------------------------------------------------
/assets/img/avatars/avatar1.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/assets/img/avatars/avatar1.jpeg
--------------------------------------------------------------------------------
/assets/fonts/fa-brands-400.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/assets/fonts/fa-brands-400.woff2
--------------------------------------------------------------------------------
/assets/fonts/fa-regular-400.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/assets/fonts/fa-regular-400.woff
--------------------------------------------------------------------------------
/assets/fonts/fa-regular-400.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/assets/fonts/fa-regular-400.woff2
--------------------------------------------------------------------------------
/html/assets/fonts/fa-brands-400.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/html/assets/fonts/fa-brands-400.eot
--------------------------------------------------------------------------------
/html/assets/fonts/fa-brands-400.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/html/assets/fonts/fa-brands-400.ttf
--------------------------------------------------------------------------------
/html/assets/fonts/fa-brands-400.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/html/assets/fonts/fa-brands-400.woff
--------------------------------------------------------------------------------
/html/assets/fonts/fa-regular-400.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/html/assets/fonts/fa-regular-400.eot
--------------------------------------------------------------------------------
/html/assets/fonts/fa-regular-400.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/html/assets/fonts/fa-regular-400.ttf
--------------------------------------------------------------------------------
/html/assets/fonts/fa-solid-900.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/html/assets/fonts/fa-solid-900.eot
--------------------------------------------------------------------------------
/html/assets/fonts/fa-solid-900.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/html/assets/fonts/fa-solid-900.ttf
--------------------------------------------------------------------------------
/html/assets/fonts/fa-solid-900.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/html/assets/fonts/fa-solid-900.woff
--------------------------------------------------------------------------------
/html/assets/fonts/fa-solid-900.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/html/assets/fonts/fa-solid-900.woff2
--------------------------------------------------------------------------------
/html/assets/img/avatars/avatar1.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/html/assets/img/avatars/avatar1.jpeg
--------------------------------------------------------------------------------
/html/assets/img/avatars/avatar2.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/html/assets/img/avatars/avatar2.jpeg
--------------------------------------------------------------------------------
/html/assets/img/avatars/avatar3.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/html/assets/img/avatars/avatar3.jpeg
--------------------------------------------------------------------------------
/html/assets/img/avatars/avatar4.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/html/assets/img/avatars/avatar4.jpeg
--------------------------------------------------------------------------------
/html/assets/img/avatars/avatar5.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/html/assets/img/avatars/avatar5.jpeg
--------------------------------------------------------------------------------
/html/assets/fonts/fa-brands-400.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/html/assets/fonts/fa-brands-400.woff2
--------------------------------------------------------------------------------
/html/assets/fonts/fa-regular-400.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/html/assets/fonts/fa-regular-400.woff
--------------------------------------------------------------------------------
/html/assets/fonts/fa-regular-400.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/html/assets/fonts/fa-regular-400.woff2
--------------------------------------------------------------------------------
/assets/fonts/Nunito-31cb3cc7f0a41186c0be5225caa408c3.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/assets/fonts/Nunito-31cb3cc7f0a41186c0be5225caa408c3.woff2
--------------------------------------------------------------------------------
/assets/fonts/Nunito-49507be8926ed86b54f246864dfb2b91.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/assets/fonts/Nunito-49507be8926ed86b54f246864dfb2b91.woff2
--------------------------------------------------------------------------------
/assets/fonts/Nunito-4c5c6c8d60cf38c7a442b766dfd3ac9f.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/assets/fonts/Nunito-4c5c6c8d60cf38c7a442b766dfd3ac9f.woff2
--------------------------------------------------------------------------------
/assets/fonts/Nunito-56f97c8310e9868d5e4f649ff0cc0536.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/assets/fonts/Nunito-56f97c8310e9868d5e4f649ff0cc0536.woff2
--------------------------------------------------------------------------------
/assets/fonts/Nunito-58050dbecc5a1ef8ffb017fb99b15294.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/assets/fonts/Nunito-58050dbecc5a1ef8ffb017fb99b15294.woff2
--------------------------------------------------------------------------------
/assets/fonts/Nunito-61492c245979f8a0f42bffcedfa474e6.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/assets/fonts/Nunito-61492c245979f8a0f42bffcedfa474e6.woff2
--------------------------------------------------------------------------------
/assets/fonts/Nunito-6c46e979458f0c7829f6f041688f5621.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/assets/fonts/Nunito-6c46e979458f0c7829f6f041688f5621.woff2
--------------------------------------------------------------------------------
/assets/fonts/Nunito-7cdc9c521e8cbc9c2263ff91673131a3.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/assets/fonts/Nunito-7cdc9c521e8cbc9c2263ff91673131a3.woff2
--------------------------------------------------------------------------------
/assets/fonts/Nunito-a0bd6b56ae8ca0f4f4b94d0767c38ac6.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/assets/fonts/Nunito-a0bd6b56ae8ca0f4f4b94d0767c38ac6.woff2
--------------------------------------------------------------------------------
/assets/fonts/Nunito-a1952f5f0721495404bb0f6f7eed5a72.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/assets/fonts/Nunito-a1952f5f0721495404bb0f6f7eed5a72.woff2
--------------------------------------------------------------------------------
/html/assets/fonts/Nunito-31cb3cc7f0a41186c0be5225caa408c3.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/html/assets/fonts/Nunito-31cb3cc7f0a41186c0be5225caa408c3.woff2
--------------------------------------------------------------------------------
/html/assets/fonts/Nunito-49507be8926ed86b54f246864dfb2b91.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/html/assets/fonts/Nunito-49507be8926ed86b54f246864dfb2b91.woff2
--------------------------------------------------------------------------------
/html/assets/fonts/Nunito-4c5c6c8d60cf38c7a442b766dfd3ac9f.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/html/assets/fonts/Nunito-4c5c6c8d60cf38c7a442b766dfd3ac9f.woff2
--------------------------------------------------------------------------------
/html/assets/fonts/Nunito-56f97c8310e9868d5e4f649ff0cc0536.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/html/assets/fonts/Nunito-56f97c8310e9868d5e4f649ff0cc0536.woff2
--------------------------------------------------------------------------------
/html/assets/fonts/Nunito-58050dbecc5a1ef8ffb017fb99b15294.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/html/assets/fonts/Nunito-58050dbecc5a1ef8ffb017fb99b15294.woff2
--------------------------------------------------------------------------------
/html/assets/fonts/Nunito-61492c245979f8a0f42bffcedfa474e6.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/html/assets/fonts/Nunito-61492c245979f8a0f42bffcedfa474e6.woff2
--------------------------------------------------------------------------------
/html/assets/fonts/Nunito-6c46e979458f0c7829f6f041688f5621.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/html/assets/fonts/Nunito-6c46e979458f0c7829f6f041688f5621.woff2
--------------------------------------------------------------------------------
/html/assets/fonts/Nunito-7cdc9c521e8cbc9c2263ff91673131a3.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/html/assets/fonts/Nunito-7cdc9c521e8cbc9c2263ff91673131a3.woff2
--------------------------------------------------------------------------------
/html/assets/fonts/Nunito-a0bd6b56ae8ca0f4f4b94d0767c38ac6.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/html/assets/fonts/Nunito-a0bd6b56ae8ca0f4f4b94d0767c38ac6.woff2
--------------------------------------------------------------------------------
/html/assets/fonts/Nunito-a1952f5f0721495404bb0f6f7eed5a72.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashJProgramming/GMS/HEAD/html/assets/fonts/Nunito-a1952f5f0721495404bb0f6f7eed5a72.woff2
--------------------------------------------------------------------------------
/functions/authentication.php:
--------------------------------------------------------------------------------
1 |
9 |
--------------------------------------------------------------------------------
/assets/js/bs-init.js:
--------------------------------------------------------------------------------
1 | document.addEventListener('DOMContentLoaded', function() {
2 |
3 | var charts = document.querySelectorAll('[data-bss-chart]');
4 |
5 | for (var chart of charts) {
6 | chart.chart = new Chart(chart, JSON.parse(chart.dataset.bssChart));
7 | }
8 | }, false);
--------------------------------------------------------------------------------
/functions/logout.php:
--------------------------------------------------------------------------------
1 | prepare($sql);
8 | $stmt->bindParam(':id', $id);
9 | $stmt->execute();
10 |
11 | generate_logs('Remove staff', $id . '| Boarder details were removed');
12 | header('Location: ../staff.php?type=success&message=Staff details were removed successfully');
13 | exit;
14 |
--------------------------------------------------------------------------------
/functions/remove-member.php:
--------------------------------------------------------------------------------
1 | prepare($sql);
8 | $stmt->bindParam(':id', $id);
9 | $stmt->execute();
10 |
11 | generate_logs('Remove member', $id . '| Boarder details were removed');
12 | header('Location: ../members.php?type=success&message=Member details were removed successfully');
13 | exit;
14 |
--------------------------------------------------------------------------------
/functions/connection.php:
--------------------------------------------------------------------------------
1 | connect_error);
6 | }
7 |
8 | function generate_logs($type, $logs)
9 | {
10 | if (session_status() == PHP_SESSION_NONE) {
11 | session_start();
12 | }
13 | global $db;
14 | $sql = "INSERT INTO logs (user_id, logs, type) VALUES (:user_id, :logs, :type)";
15 | $stmt = $db->prepare($sql);
16 | $stmt->bindParam(':user_id', $_SESSION['id']);
17 | $stmt->bindParam(':logs', $logs);
18 | $stmt->bindParam(':type', $type);
19 | $stmt->execute();
20 | }
21 |
--------------------------------------------------------------------------------
/functions/views/member-profile.php:
--------------------------------------------------------------------------------
1 | prepare($sql);
8 | $stmt->execute();
9 | $results = $stmt->fetch();
10 |
11 | $fullname = $results['fullname'];
12 | $phone = $results['phone'];
13 | $address = $results['address'];
14 | $room = $results['room'];
15 | $rent = $results['rent'];
16 | $type = $results['type'];
17 | $profile_picture = $results['profile_picture'];
18 | $proof_of_identity = $results['proof_of_identity'];
--------------------------------------------------------------------------------
/functions/views/reports.php:
--------------------------------------------------------------------------------
1 | prepare($sql);
8 | $stmt->execute();
9 | $results = $stmt->fetchAll();
10 |
11 | foreach ($results as $row) {
12 | ?>
13 |
14 | =$row['fullname']?> |
15 | =$row['address']?> |
16 | =$row['phone']?> |
17 | =$row['type']?> |
18 | ₱=number_format($row['total'], 2)?> |
19 | ₱=number_format($row['amount'], 2)?> |
20 | =$row['start_date']?> |
21 |
22 |
--------------------------------------------------------------------------------
/functions/views/rooms.php:
--------------------------------------------------------------------------------
1 | prepare($sql);
6 | $stmt->execute();
7 | $results = $stmt->fetchAll();
8 |
9 |
10 | foreach ($results as $row) {
11 |
12 | ?>
13 |
14 | |
15 | |
16 | ₱ |
17 |
18 |
19 |
20 | |
21 |
22 |
23 | prepare($sql);
6 | $stmt->execute();
7 | $results = $stmt->fetchAll();
8 |
9 |
10 | foreach ($results as $row) {
11 |
12 | $sql = 'SELECT username FROM users WHERE id = :id';
13 | $stmt = $db->prepare($sql);
14 | $stmt->bindParam(':id', $row['user_id']);
15 | $stmt->execute();
16 | $user = $stmt->fetch();
17 | ?>
18 |
19 | |
20 |  |
21 | |
22 | |
23 | |
24 |
25 |
28 |
29 |
30 |
31 | prepare($sql);
8 | $stmt->execute();
9 | $results = $stmt->fetchAll();
10 |
11 | foreach ($results as $row) {
12 | $roomId = $row['id'];
13 | $roomPax = $row['pax'];
14 | $roomRent = $row['rent'];
15 | $sql = 'SELECT COUNT(*) AS boarders_count FROM boarders WHERE room = :roomId';
16 | $stmt = $db->prepare($sql);
17 | $stmt->bindParam(':roomId', $roomId);
18 | $stmt->execute();
19 | $boardersCount = $stmt->fetchColumn();
20 | $available = $roomPax - $boardersCount;
21 | if ($roomPax > $boardersCount) {
22 | ?>
23 |
24 | prepare($sql);
11 | $stmt->execute([$username]);
12 | $user = $stmt->fetch(PDO::FETCH_ASSOC);
13 |
14 | if ($user && password_verify($password, $user['password'])) {
15 |
16 | session_start();
17 | $_SESSION['username'] = $username;
18 | $_SESSION['level'] = $user['level'];
19 | $_SESSION['id'] = $user['id'];
20 | if (isset($_POST['remember'])) {
21 | setcookie('username', $username, time() + (86400 * 30), "/");
22 | setcookie('password', $password, time() + (86400 * 30), "/");
23 | } else {
24 | setcookie('username', '', time() - 3600, "/");
25 | setcookie('password', '', time() - 3600, "/");
26 | }
27 | generate_logs('Login', $username.'| Logged in');
28 | header('location: ../dashboard.php');
29 | } else {
30 | // Show an error message
31 | header('location: ../index.php?type=error&message=Wrong username or password');
32 | }
33 |
--------------------------------------------------------------------------------
/functions/add-staff.php:
--------------------------------------------------------------------------------
1 | prepare($sql);
12 | $stmt->bindParam(':username', $username);
13 | $stmt->bindParam(':phone', $phone);
14 | $stmt->execute();
15 | $count = $stmt->rowCount();
16 |
17 | if ($count > 0) {
18 | header('Location: ../staff.php?type=error&message=Staff already exists');
19 | exit;
20 | }
21 |
22 | $sql = "INSERT INTO `users` (`fullname`, `phone`, `address`, `username`, `password`, `level`) VALUES (:fullname, :phone, :address, :username, :password, 1)";
23 | $stmt = $db->prepare($sql);
24 | $stmt->bindParam(':fullname', $fullname);
25 | $stmt->bindParam(':phone', $phone);
26 | $stmt->bindParam(':address', $address);
27 | $stmt->bindParam(':username', $username);
28 | $stmt->bindParam(':password', password_hash($password, PASSWORD_DEFAULT));
29 | $stmt->execute();
30 |
31 | header('Location: ../staff.php?type=success&message=Staff details were added successfully');
--------------------------------------------------------------------------------
/functions/payment.php:
--------------------------------------------------------------------------------
1 | prepare($sql);
24 | $stmt->bindParam(':member', $id);
25 | $stmt->bindParam(':type', $type);
26 | $stmt->bindParam(':amount', $amount);
27 | $stmt->bindParam(':total', $total);
28 | $stmt->execute();
29 |
30 | $paymentId = $db->lastInsertId();
31 |
32 | $sql = "UPDATE members SET start_date = CURDATE() WHERE id = :id";
33 | $stmt = $db->prepare($sql);
34 | $stmt->bindParam(':id', $id);
35 | $stmt->execute();
36 |
37 | generate_logs('Payment', $id . '| Payment was made');
38 | header('Location: ../reciept.php?id=' . $paymentId);
39 | // header('Location: ../rentals.php?type=success&message=Payment was made successfully');
40 | ?>
--------------------------------------------------------------------------------
/assets/css/Navbar-Right-Links-icons.css:
--------------------------------------------------------------------------------
1 | .bs-icon {
2 | --bs-icon-size: .75rem;
3 | display: flex;
4 | flex-shrink: 0;
5 | justify-content: center;
6 | align-items: center;
7 | font-size: var(--bs-icon-size);
8 | width: calc(var(--bs-icon-size) * 2);
9 | height: calc(var(--bs-icon-size) * 2);
10 | color: var(--bs-primary);
11 | }
12 |
13 | .bs-icon-xs {
14 | --bs-icon-size: 1rem;
15 | width: calc(var(--bs-icon-size) * 1.5);
16 | height: calc(var(--bs-icon-size) * 1.5);
17 | }
18 |
19 | .bs-icon-sm {
20 | --bs-icon-size: 1rem;
21 | }
22 |
23 | .bs-icon-md {
24 | --bs-icon-size: 1.5rem;
25 | }
26 |
27 | .bs-icon-lg {
28 | --bs-icon-size: 2rem;
29 | }
30 |
31 | .bs-icon-xl {
32 | --bs-icon-size: 2.5rem;
33 | }
34 |
35 | .bs-icon.bs-icon-primary {
36 | color: var(--bs-white);
37 | background: var(--bs-primary);
38 | }
39 |
40 | .bs-icon.bs-icon-primary-light {
41 | color: var(--bs-primary);
42 | background: rgba(var(--bs-primary-rgb), .2);
43 | }
44 |
45 | .bs-icon.bs-icon-semi-white {
46 | color: var(--bs-primary);
47 | background: rgba(255, 255, 255, .5);
48 | }
49 |
50 | .bs-icon.bs-icon-rounded {
51 | border-radius: .5rem;
52 | }
53 |
54 | .bs-icon.bs-icon-circle {
55 | border-radius: 50%;
56 | }
57 |
58 |
--------------------------------------------------------------------------------
/html/assets/css/Navbar-Right-Links-icons.css:
--------------------------------------------------------------------------------
1 | .bs-icon {
2 | --bs-icon-size: .75rem;
3 | display: flex;
4 | flex-shrink: 0;
5 | justify-content: center;
6 | align-items: center;
7 | font-size: var(--bs-icon-size);
8 | width: calc(var(--bs-icon-size) * 2);
9 | height: calc(var(--bs-icon-size) * 2);
10 | color: var(--bs-primary);
11 | }
12 |
13 | .bs-icon-xs {
14 | --bs-icon-size: 1rem;
15 | width: calc(var(--bs-icon-size) * 1.5);
16 | height: calc(var(--bs-icon-size) * 1.5);
17 | }
18 |
19 | .bs-icon-sm {
20 | --bs-icon-size: 1rem;
21 | }
22 |
23 | .bs-icon-md {
24 | --bs-icon-size: 1.5rem;
25 | }
26 |
27 | .bs-icon-lg {
28 | --bs-icon-size: 2rem;
29 | }
30 |
31 | .bs-icon-xl {
32 | --bs-icon-size: 2.5rem;
33 | }
34 |
35 | .bs-icon.bs-icon-primary {
36 | color: var(--bs-white);
37 | background: var(--bs-primary);
38 | }
39 |
40 | .bs-icon.bs-icon-primary-light {
41 | color: var(--bs-primary);
42 | background: rgba(var(--bs-primary-rgb), .2);
43 | }
44 |
45 | .bs-icon.bs-icon-semi-white {
46 | color: var(--bs-primary);
47 | background: rgba(255, 255, 255, .5);
48 | }
49 |
50 | .bs-icon.bs-icon-rounded {
51 | border-radius: .5rem;
52 | }
53 |
54 | .bs-icon.bs-icon-circle {
55 | border-radius: 50%;
56 | }
57 |
58 |
--------------------------------------------------------------------------------
/functions/update-staff.php:
--------------------------------------------------------------------------------
1 | prepare($sql);
13 | $stmt->bindParam(':username', $username);
14 | $stmt->bindParam(':phone', $phone);
15 | $stmt->bindParam(':id', $id);
16 | $stmt->execute();
17 | $count = $stmt->rowCount();
18 |
19 | if ($count > 0) {
20 | header('Location: ../staff.php?type=error&message=Staff already exists');
21 | exit;
22 | }
23 |
24 | $sql = "UPDATE `users` SET `fullname` = :fullname, `phone` = :phone, `address` = :address, `username` = :username, `password` = :password WHERE `id` = :id";
25 | $stmt = $db->prepare($sql);
26 | $stmt->bindParam(':id', $id);
27 | $stmt->bindParam(':fullname', $fullname);
28 | $stmt->bindParam(':phone', $phone);
29 | $stmt->bindParam(':address', $address);
30 | $stmt->bindParam(':username', $username);
31 | $stmt->bindParam(':password', password_hash($password, PASSWORD_DEFAULT));
32 | $stmt->execute();
33 |
34 | header('Location: ../staff.php?type=success&message=Staff details were updated successfully');
--------------------------------------------------------------------------------
/functions/views/staff.php:
--------------------------------------------------------------------------------
1 | 0';
5 | $stmt = $db->prepare($sql);
6 | $stmt->execute();
7 | $results = $stmt->fetchAll();
8 |
9 | foreach ($results as $row) {
10 | ?>
11 |
12 | | =$row['id']?> |
13 | =$row['username'] ? : 'None';?> |
14 | =$row['fullname']? : 'None'?> |
15 | =$row['address']? : 'None'?> |
16 | =$row['phone']? : 'None'?> |
17 | =$row['created_at']?> |
18 |
19 |
20 | |
21 |
22 | prepare($sql);
15 | $stmt->bindParam(':id', $id);
16 | $stmt->bindParam(':fullname', $fullname);
17 | $stmt->bindParam(':phone', $phone);
18 | $stmt->execute();
19 | $count = $stmt->rowCount();
20 |
21 | if ($count > 0) {
22 | header('Location: ../members.php?type=error&message=Member already exists');
23 | exit;
24 | }
25 |
26 | $sql = "UPDATE `members` SET `fullname` = :fullname , `sex` = :sex , `phone` = :phone , `address` = :address , `type` = :type , `start_date` = :start_date , `birthdate` = :birthdate WHERE `id` = :id";
27 | $stmt = $db->prepare($sql);
28 | $stmt->bindParam(':id', $id);
29 | $stmt->bindParam(':fullname', $fullname);
30 | $stmt->bindParam(':sex', $sex);
31 | $stmt->bindParam(':phone', $phone);
32 | $stmt->bindParam(':address', $address);
33 | $stmt->bindParam(':type', $type);
34 | $stmt->bindParam(':start_date', $start_date);
35 | $stmt->bindParam(':birthdate', $birthdate);
36 | $stmt->execute();
37 |
38 | header('Location: ../members.php?type=success&message=Member was updated successfully');
39 |
--------------------------------------------------------------------------------
/functions/update-member.php:
--------------------------------------------------------------------------------
1 | prepare($sql);
15 | $stmt->bindParam(':id', $id);
16 | $stmt->bindParam(':fullname', $fullname);
17 | $stmt->bindParam(':phone', $phone);
18 | $stmt->execute();
19 | $count = $stmt->rowCount();
20 |
21 | if ($count > 0) {
22 | header('Location: ../members.php?type=error&message=Member already exists');
23 | exit;
24 | }
25 |
26 | $sql = "UPDATE `members` SET `fullname` = :fullname , `sex` = :sex , `phone` = :phone , `address` = :address , `type` = :type , `start_date` = :start_date , `birthdate` = :birthdate WHERE `id` = :id";
27 | $stmt = $db->prepare($sql);
28 | $stmt->bindParam(':id', $id);
29 | $stmt->bindParam(':fullname', $fullname);
30 | $stmt->bindParam(':sex', $sex);
31 | $stmt->bindParam(':phone', $phone);
32 | $stmt->bindParam(':address', $address);
33 | $stmt->bindParam(':type', $type);
34 | $stmt->bindParam(':start_date', $start_date);
35 | $stmt->bindParam(':birthdate', $birthdate);
36 | $stmt->execute();
37 |
38 | header('Location: ../members.php?type=success&message=Member was updated successfully');
39 |
--------------------------------------------------------------------------------
/functions/views/dashboard-count.php:
--------------------------------------------------------------------------------
1 | prepare($sql);
8 | $stmt->execute();
9 | $result = $stmt->fetch();
10 | $monthlyEarnings = $result['monthlyEarnings'];
11 | return $monthlyEarnings;
12 | }
13 |
14 | function calculateYearlyEarnings() {
15 | global $db;
16 | $sql = 'SELECT SUM(total) AS yearlyEarnings FROM payments WHERE YEAR(created_at) = YEAR(CURRENT_DATE())';
17 | $stmt = $db->prepare($sql);
18 | $stmt->execute();
19 | $result = $stmt->fetch();
20 | $yearlyEarnings = $result['yearlyEarnings'];
21 | return $yearlyEarnings;
22 | }
23 |
24 | function countTotalActiveMembers() {
25 | global $db;
26 | $sql = 'SELECT COUNT(*) AS totalActiveMembers FROM `members` WHERE DATE_ADD(start_date, INTERVAL 1 MONTH) > CURDATE()';
27 | $stmt = $db->prepare($sql);
28 | $stmt->execute();
29 | $result = $stmt->fetch();
30 | $totalActiveMembers = $result['totalActiveMembers'];
31 | return $totalActiveMembers;
32 | }
33 |
34 | function countTotalMembers() {
35 | global $db;
36 | $sql = 'SELECT COUNT(*) AS totalMembers FROM members';
37 | $stmt = $db->prepare($sql);
38 | $stmt->execute();
39 | $result = $stmt->fetch();
40 | $totalMembers = $result['totalMembers'];
41 | return $totalMembers;
42 | }
--------------------------------------------------------------------------------
/functions/views/members.php:
--------------------------------------------------------------------------------
1 | prepare($sql);
6 | $stmt->execute();
7 | $results = $stmt->fetchAll();
8 |
9 | foreach ($results as $row) {
10 | $age = date_diff(date_create($row['birthdate']), date_create('now'))->y;
11 | ?>
12 |
13 | | =$row['id']?> |
14 | =$row['fullname']?> |
15 | =$row['address']?> |
16 | =$row['phone']?> |
17 | =$age?> |
18 | =$row['sex']?> |
19 | =$row['type']?> |
20 | =$row['birthdate']?> |
21 | =$row['start_date']?> |
22 |
23 |
24 | |
25 |
26 | ';
11 | let title = 'Show password';
12 | btnclass = btnclass ?? '';
13 | return $(this).replaceWith(
14 | $('')
15 | .append($(''))
16 | .append('')
17 | );
18 | });
19 | };
20 |
21 | })(jQuery);
22 |
23 | $(() => {
24 |
25 | $(document).on('click', '[data-role="togglepassword"]', function () {
26 | let target = $(this).data('target');
27 | let is_password = $(target).attr('type') === 'password';
28 | $(target).attr('type', (is_password ? 'text' : 'password'));
29 | $(this).html('');
30 | $(this).attr('title', is_password ? 'Show password' : 'Hide password');
31 | });
32 |
33 | });
34 |
--------------------------------------------------------------------------------
/functions/views/members-status.php:
--------------------------------------------------------------------------------
1 | prepare($sql);
7 | $stmt->execute();
8 | $results = $stmt->fetchAll();
9 |
10 | foreach ($results as $row) {
11 | $age = date_diff(date_create($row['birthdate']), date_create('now'))->y;
12 | $daysDue = $row['days_due'];
13 | $class = '';
14 | $text = '';
15 | if ($daysDue > 0) {
16 | $class = 'badge bg-success';
17 | $text = 'Expire in ' . $daysDue . ' days';
18 | } elseif ($daysDue == 0) {
19 | $class = 'badge bg-warning';
20 | $text = 'Expire Today';
21 | } else {
22 | $class = 'badge bg-danger';
23 | $text = 'Expired';
24 | }
25 |
26 | if ($row['type'] == 'Regular') {
27 | $text_type =$row['type'].' - ₱300';
28 | } elseif ($row['type'] == 'Premium') {
29 | $text_type =$row['type'].' - ₱500';
30 | } else {
31 | $text_type =$row['type'].' - ₱800';
32 | }
33 | ?>
34 |
35 | =$row['fullname']?> |
36 | =$row['address']?> |
37 | =$row['phone']?> |
38 | =$age?> |
39 | =$row['sex']?> |
40 | =$text_type?> |
41 | =$row['start_date']?> |
42 | = $text ?> |
43 |
44 |
47 | |
48 |
49 |
52 |
--------------------------------------------------------------------------------
/functions/add-member.php:
--------------------------------------------------------------------------------
1 | prepare($sql);
16 | $stmt->bindParam(':fullname', $fullname);
17 | $stmt->bindParam(':phone', $phone);
18 | $stmt->execute();
19 | $count = $stmt->rowCount();
20 |
21 | if ($count > 0) {
22 | header('Location: ../members.php?type=error&message=Member already exists');
23 | exit;
24 | }
25 |
26 | if ($type == 'Regular'){
27 | $total = 300;
28 | } elseif ($type == 'Premium'){
29 | $total = 500;
30 | } else {
31 | $total = 800;
32 | }
33 |
34 | $change = $amount - $total;
35 |
36 | if ($change < 0) {
37 | header('Location: ../members.php?type=error&message=Amount is not enough');
38 | exit;
39 | }
40 |
41 | $sql = "INSERT INTO `members` (`fullname`, `sex`, `phone`, `address`, `type`, `start_date`, `birthdate`)
42 | VALUES (:fullname, :sex, :phone, :address, :type, :start_date, :birthdate)";
43 | $stmt = $db->prepare($sql);
44 | $stmt->bindParam(':fullname', $fullname);
45 | $stmt->bindParam(':sex', $sex);
46 | $stmt->bindParam(':phone', $phone);
47 | $stmt->bindParam(':address', $address);
48 | $stmt->bindParam(':type', $type);
49 | $stmt->bindParam(':start_date', $start_date);
50 | $stmt->bindParam(':birthdate', $birthdate);
51 | $stmt->execute();
52 |
53 | $id = $db->lastInsertId();
54 |
55 | $sql = "INSERT INTO payments (member, type, amount, total) VALUES (:member, :type, :amount, :total)";
56 | $stmt = $db->prepare($sql);
57 | $stmt->bindParam(':member', $id);
58 | $stmt->bindParam(':type', $type);
59 | $stmt->bindParam(':amount', $amount);
60 | $stmt->bindParam(':total', $total);
61 | $stmt->execute();
62 |
63 | $paymentId = $db->lastInsertId();
64 |
65 | $sql = "UPDATE members SET start_date = CURDATE() WHERE id = :id";
66 | $stmt = $db->prepare($sql);
67 | $stmt->bindParam(':id', $id);
68 | $stmt->execute();
69 |
70 | generate_logs('Payment', $id . '| Payment was made');
71 | header('Location: ../reciept.php?id=' . $paymentId);
72 |
--------------------------------------------------------------------------------
/assets/js/dataTables.bootstrap5.min.js:
--------------------------------------------------------------------------------
1 | /*! DataTables Bootstrap 5 integration
2 | * 2020 SpryMedia Ltd - datatables.net/license
3 | */
4 | !function(t){var n,r;"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(e){return t(e,window,document)}):"object"==typeof exports?(n=require("jquery"),r=function(e,a){a.fn.dataTable||require("datatables.net")(e,a)},"undefined"!=typeof window?module.exports=function(e,a){return e=e||window,a=a||n(e),r(e,a),t(a,0,e.document)}:(r(window,n),module.exports=t(n,window,window.document))):t(jQuery,window,document)}(function(x,e,r,i){"use strict";var o=x.fn.dataTable;return x.extend(!0,o.defaults,{dom:"<'row'<'col-sm-12 col-md-6'l><'col-sm-12 col-md-6'f>><'row dt-row'<'col-sm-12'tr>><'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",renderer:"bootstrap"}),x.extend(o.ext.classes,{sWrapper:"dataTables_wrapper dt-bootstrap5",sFilterInput:"form-control form-control-sm",sLengthSelect:"form-select form-select-sm",sProcessing:"dataTables_processing card",sPageButton:"paginate_button page-item"}),o.ext.renderer.pageButton.bootstrap=function(d,e,s,a,l,c){function u(e,a){for(var t,n,r=function(e){e.preventDefault(),x(e.currentTarget).hasClass("disabled")||b.page()==e.data.action||b.page(e.data.action).draw("page")},i=0,o=a.length;i",{class:m.sPageButton+" "+f,id:0===s&&"string"==typeof t?d.sTableId+"_"+t:null}).append(x("",{href:n?null:"#","aria-controls":d.sTableId,"aria-disabled":n?"true":null,"aria-label":w[t],"aria-role":"link","aria-current":"active"===f?"page":null,"data-dt-idx":t,tabindex:d.iTabIndex,class:"page-link"}).html(p)).appendTo(e),d.oApi._fnBindAction(n,{action:t},r))}}var p,f,t,b=new o.Api(d),m=d.oClasses,g=d.oLanguage.oPaginate,w=d.oLanguage.oAria.paginate||{},e=x(e);try{t=e.find(r.activeElement).data("dt-idx")}catch(e){}var n=e.children("ul.pagination");n.length?n.empty():n=e.html("").children("ul").addClass("pagination"),u(n,a),t!==i&&e.find("[data-dt-idx="+t+"]").trigger("focus")},o});
--------------------------------------------------------------------------------
/assets/js/theme.js:
--------------------------------------------------------------------------------
1 | (function() {
2 | "use strict"; // Start of use strict
3 |
4 | var sidebar = document.querySelector('.sidebar');
5 | var sidebarToggles = document.querySelectorAll('#sidebarToggle, #sidebarToggleTop');
6 |
7 | if (sidebar) {
8 |
9 | var collapseEl = sidebar.querySelector('.collapse');
10 | var collapseElementList = [].slice.call(document.querySelectorAll('.sidebar .collapse'))
11 | var sidebarCollapseList = collapseElementList.map(function (collapseEl) {
12 | return new bootstrap.Collapse(collapseEl, { toggle: false });
13 | });
14 |
15 | for (var toggle of sidebarToggles) {
16 |
17 | // Toggle the side navigation
18 | toggle.addEventListener('click', function(e) {
19 | document.body.classList.toggle('sidebar-toggled');
20 | sidebar.classList.toggle('toggled');
21 |
22 | if (sidebar.classList.contains('toggled')) {
23 | for (var bsCollapse of sidebarCollapseList) {
24 | bsCollapse.hide();
25 | }
26 | };
27 | });
28 | }
29 |
30 | // Close any open menu accordions when window is resized below 768px
31 | window.addEventListener('resize', function() {
32 | var vw = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);
33 |
34 | if (vw < 768) {
35 | for (var bsCollapse of sidebarCollapseList) {
36 | bsCollapse.hide();
37 | }
38 | };
39 | });
40 | }
41 |
42 | // Prevent the content wrapper from scrolling when the fixed side navigation hovered over
43 |
44 | var fixedNaigation = document.querySelector('body.fixed-nav .sidebar');
45 |
46 | if (fixedNaigation) {
47 | fixedNaigation.on('mousewheel DOMMouseScroll wheel', function(e) {
48 | var vw = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);
49 |
50 | if (vw > 768) {
51 | var e0 = e.originalEvent,
52 | delta = e0.wheelDelta || -e0.detail;
53 | this.scrollTop += (delta < 0 ? 1 : -1) * 30;
54 | e.preventDefault();
55 | }
56 | });
57 | }
58 |
59 | var scrollToTop = document.querySelector('.scroll-to-top');
60 |
61 | if (scrollToTop) {
62 |
63 | // Scroll to top button appear
64 | window.addEventListener('scroll', function() {
65 | var scrollDistance = window.pageYOffset;
66 |
67 | //check if user is scrolling up
68 | if (scrollDistance > 100) {
69 | scrollToTop.style.display = 'block';
70 | } else {
71 | scrollToTop.style.display = 'none';
72 | }
73 | });
74 | }
75 |
76 | })(); // End of use strict
77 |
--------------------------------------------------------------------------------
/html/assets/js/theme.js:
--------------------------------------------------------------------------------
1 | (function() {
2 | "use strict"; // Start of use strict
3 |
4 | var sidebar = document.querySelector('.sidebar');
5 | var sidebarToggles = document.querySelectorAll('#sidebarToggle, #sidebarToggleTop');
6 |
7 | if (sidebar) {
8 |
9 | var collapseEl = sidebar.querySelector('.collapse');
10 | var collapseElementList = [].slice.call(document.querySelectorAll('.sidebar .collapse'))
11 | var sidebarCollapseList = collapseElementList.map(function (collapseEl) {
12 | return new bootstrap.Collapse(collapseEl, { toggle: false });
13 | });
14 |
15 | for (var toggle of sidebarToggles) {
16 |
17 | // Toggle the side navigation
18 | toggle.addEventListener('click', function(e) {
19 | document.body.classList.toggle('sidebar-toggled');
20 | sidebar.classList.toggle('toggled');
21 |
22 | if (sidebar.classList.contains('toggled')) {
23 | for (var bsCollapse of sidebarCollapseList) {
24 | bsCollapse.hide();
25 | }
26 | };
27 | });
28 | }
29 |
30 | // Close any open menu accordions when window is resized below 768px
31 | window.addEventListener('resize', function() {
32 | var vw = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);
33 |
34 | if (vw < 768) {
35 | for (var bsCollapse of sidebarCollapseList) {
36 | bsCollapse.hide();
37 | }
38 | };
39 | });
40 | }
41 |
42 | // Prevent the content wrapper from scrolling when the fixed side navigation hovered over
43 |
44 | var fixedNaigation = document.querySelector('body.fixed-nav .sidebar');
45 |
46 | if (fixedNaigation) {
47 | fixedNaigation.on('mousewheel DOMMouseScroll wheel', function(e) {
48 | var vw = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);
49 |
50 | if (vw > 768) {
51 | var e0 = e.originalEvent,
52 | delta = e0.wheelDelta || -e0.detail;
53 | this.scrollTop += (delta < 0 ? 1 : -1) * 30;
54 | e.preventDefault();
55 | }
56 | });
57 | }
58 |
59 | var scrollToTop = document.querySelector('.scroll-to-top');
60 |
61 | if (scrollToTop) {
62 |
63 | // Scroll to top button appear
64 | window.addEventListener('scroll', function() {
65 | var scrollDistance = window.pageYOffset;
66 |
67 | //check if user is scrolling up
68 | if (scrollDistance > 100) {
69 | scrollToTop.style.display = 'block';
70 | } else {
71 | scrollToTop.style.display = 'none';
72 | }
73 | });
74 | }
75 |
76 | })(); // End of use strict
77 |
--------------------------------------------------------------------------------
/assets/js/buttons.print.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * Print button for Buttons and DataTables.
3 | * 2016 SpryMedia Ltd - datatables.net/license
4 | */
5 | !function(n){var o,r;"function"==typeof define&&define.amd?define(["jquery","datatables.net","datatables.net-buttons"],function(t){return n(t,window,document)}):"object"==typeof exports?(o=require("jquery"),r=function(t,e){e.fn.dataTable||require("datatables.net")(t,e),e.fn.dataTable.Buttons||require("datatables.net-buttons")(t,e)},"undefined"!=typeof window?module.exports=function(t,e){return t=t||window,e=e||o(t),r(t,e),n(e,t,t.document)}:(r(window,o),module.exports=n(o,window,window.document))):n(jQuery,window,document)}(function(m,b,t,p){"use strict";function h(t){return n.href=t,-1===(t=n.host).indexOf("/")&&0!==n.pathname.indexOf("/")&&(t+="/"),n.protocol+"//"+t+n.pathname+n.search}var e=m.fn.dataTable,n=t.createElement("a");return e.ext.buttons.print={className:"buttons-print",text:function(t){return t.i18n("buttons.print","Print")},action:function(t,e,n,o){function r(t,e){for(var n="",o=0,r=t.length;o"+i+""+e+">"}return n+"
"}var i=e.buttons.exportData(m.extend({decodeEntities:!1},o.exportOptions)),a=e.buttons.exportInfo(o),s=e.columns(o.exportOptions.columns).flatten().map(function(t){return e.settings()[0].aoColumns[e.column(t).index()].sClass}).toArray(),u='';o.header&&(u+=""+r(i.header,"th")+""),u+="";for(var d=0,c=i.body.length;d",o.footer&&i.footer&&(u+=""+r(i.footer,"th")+""),u+="
";var l=b.open("","");if(l){l.document.close();var f=""+a.title+"";m("style, link").each(function(){f+=function(t){t=m(t).clone()[0];return"link"===t.nodeName.toLowerCase()&&(t.href=h(t.href)),t.outerHTML}(this)});try{l.document.head.innerHTML=f}catch(t){m(l.document.head).html(f)}l.document.body.innerHTML=""+a.title+"
"+(a.messageTop||"")+"
"+u+""+(a.messageBottom||"")+"
",m(l.document.body).addClass("dt-print-view"),m("img",l.document.body).each(function(t,e){e.setAttribute("src",h(e.getAttribute("src")))}),o.customize&&o.customize(l,o,e);a=function(){o.autoPrint&&(l.print(),l.close())};navigator.userAgent.match(/Trident\/\d.\d/)?a():l.setTimeout(a,1e3)}else e.buttons.info(e.i18n("buttons.printErrorTitle","Unable to open print view"),e.i18n("buttons.printErrorMsg","Please allow popups in your browser for this site to be able to view the print view."),5e3)},title:"*",messageTop:"*",messageBottom:"*",exportOptions:{},header:!0,footer:!1,autoPrint:!0,customize:null},e});
--------------------------------------------------------------------------------
/functions/setup.php:
--------------------------------------------------------------------------------
1 | setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
9 | $db->exec($query);
10 | $db->exec("USE $database");
11 |
12 | $db->exec("
13 | CREATE TABLE IF NOT EXISTS users (
14 | id INT PRIMARY KEY AUTO_INCREMENT,
15 | username VARCHAR(255),
16 | password VARCHAR(255),
17 | fullname VARCHAR(255),
18 | address VARCHAR(255),
19 | phone VARCHAR(255),
20 | level VARCHAR(255),
21 | created_at DATETIME DEFAULT CURRENT_TIMESTAMP
22 | )
23 | ");
24 |
25 |
26 | $db->exec("
27 | CREATE TABLE IF NOT EXISTS members (
28 | id INT PRIMARY KEY AUTO_INCREMENT,
29 | fullname VARCHAR(255),
30 | phone VARCHAR(255),
31 | sex varchar(255),
32 | address VARCHAR(255),
33 | type VARCHAR(255),
34 | birthdate DATE,
35 | start_date DATE,
36 | created_at DATETIME DEFAULT CURRENT_TIMESTAMP
37 | )
38 | ");
39 |
40 | $db->exec("
41 | CREATE TABLE IF NOT EXISTS payments (
42 | id INT PRIMARY KEY AUTO_INCREMENT,
43 | member INT,
44 | type VARCHAR(255),
45 | amount DECIMAL(10,2),
46 | total DECIMAL(10,2),
47 | created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
48 | FOREIGN KEY (member) REFERENCES members(id) ON DELETE CASCADE
49 | )
50 | ");
51 |
52 | $db->exec("
53 | CREATE TABLE IF NOT EXISTS logs (
54 | id INT PRIMARY KEY AUTO_INCREMENT,
55 | user_id int,
56 | logs TEXT,
57 | type TEXT,
58 | created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
59 | FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
60 | )
61 | ");
62 |
63 |
64 | $db->beginTransaction();
65 |
66 | $stmt = $db->prepare("SELECT COUNT(*) FROM `users` WHERE `username` = 'admin'");
67 | $stmt->execute();
68 | $userExists = $stmt->fetchColumn();
69 |
70 | if (!$userExists) {
71 | $stmt = $db->prepare("INSERT INTO `users` (`username`, `password`, `level`) VALUES (:username, :password, :level)");
72 | $stmt->bindValue(':username', 'admin');
73 | $stmt->bindValue(':password', '$2y$10$WgL2d2fzi6IiGiTfXvdBluTLlMroU8zBtIcRut7SzOB6j9i/LbA4K');
74 | $stmt->bindValue(':level', 0);
75 | $stmt->execute();
76 | }
77 |
78 | $db->commit();
79 | } catch (PDOException $e) {
80 | die("Error creating database: " . $e->getMessage());
81 | }
82 |
--------------------------------------------------------------------------------
/README.MD:
--------------------------------------------------------------------------------
1 | ## GMS - Gym Membership System
2 | 
3 |
4 | ## Installation & Setup
5 | ### XAMPP
6 | - Download XAMPP from [here](https://www.apachefriends.org/download.html)
7 | - Install XAMPP
8 | - Clone this repository to your `xampp/htdocs` folder
9 | - `git clone https://github.com/HashJProgramming/GMS`
10 | - Open XAMPP Control Panel
11 | - Start Apache and MySQL
12 | - Open your browser and go to `localhost/GMS`
13 | - Enjoy!
14 |
15 | Here you can change the `xampp/htdocs/index.php` to redirect to the `GMS` folder.
16 | ```php
17 |
27 | ```
28 |
29 | ## XAMPP Specifications
30 |
31 | | Tool | Version |
32 | |-----------------|-------------------------------------|
33 | | Database Server | 10.4.28-MariaDB - mariadb.org binary distribution |
34 | | Web Server | Apache/2.4.56 (Win64) OpenSSL/1.1.1t PHP/8.2.4 |
35 | | Database Client | libmysql - mysqlnd 8.2.4 |
36 | | PHP | 8.2.4 |
37 | | phpMyAdmin | 5.2.1 (up to date) |
38 |
39 | ## Administrator Credentials
40 | | Username | Password |
41 | |----------|----------|
42 | | admin | admin |
43 |
44 | ## LICENSE
45 | ```
46 | MIT License
47 |
48 | Copyright (c) 2023 Joshua Ambalong
49 |
50 | Permission is hereby granted, free of charge, to any person obtaining a copy
51 | of this software and associated documentation files (the "Software"), to deal
52 | in the Software without restriction, including without limitation the rights
53 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
54 | copies of the Software, and to permit persons to whom the Software is
55 | furnished to do so, subject to the following conditions:
56 |
57 | The above copyright notice and this permission notice shall be included in all
58 | copies or substantial portions of the Software.
59 |
60 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
61 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
62 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
63 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
64 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
65 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
66 | SOFTWARE.
67 | ```
--------------------------------------------------------------------------------
/functions/views/dashboard-chart.php:
--------------------------------------------------------------------------------
1 | prepare($sql);
14 | $stmt->execute();
15 |
16 | $labels = [];
17 | $data = [];
18 | while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
19 | $labels[] = $row['year'];
20 | $data[] = $row['total_sales'];
21 | }
22 | $chartData = [
23 | 'labels' => $labels,
24 | 'datasets' => [
25 | [
26 | 'label' => 'Yearly Earnings',
27 | 'fill' => true,
28 | 'data' => $data,
29 | 'backgroundColor' => 'rgba(78, 115, 223, 0.05)',
30 | 'borderColor' => 'rgba(78, 115, 223, 1)'
31 | ]
32 | ]
33 | ];
34 |
35 | $chartDataJson = json_encode($chartData);
36 | ?>
37 |
38 | prepare($sql);
52 | $stmt->execute();
53 |
54 | $labels = [];
55 | $data = [];
56 | while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
57 | $monthName = date("M", mktime(0, 0, 0, $row['month'], 10));
58 | $labels[] = $monthName . ' ' . $row['year'];
59 | $data[] = $row['total_sales'];
60 | }
61 | $chartData = [
62 | 'labels' => $labels,
63 | 'datasets' => [
64 | [
65 | 'label' => 'Earnings',
66 | 'fill' => true,
67 | 'data' => $data,
68 | 'backgroundColor' => 'rgba(78, 115, 223, 0.05)',
69 | 'borderColor' => 'rgba(78, 115, 223, 1)'
70 | ]
71 | ]
72 | ];
73 |
74 |
75 | $chartDataJson = json_encode($chartData);
76 | ?>
77 |
78 | prepare($sql);
92 | $stmt->execute();
93 |
94 | $row = $stmt->fetch(PDO::FETCH_ASSOC);
95 | $maleCount = $row['male_count'];
96 | $femaleCount = $row['female_count'];
97 | $referralCount = $row['referral_count'];
98 |
99 | $chartData = [
100 | 'type' => 'doughnut',
101 | 'data' => [
102 | 'labels' => ['Male', 'Female', 'Referral'],
103 | 'datasets' => [
104 | [
105 | 'label' => '',
106 | 'backgroundColor' => ['#4e73df', '#1cc88a'],
107 | 'borderColor' => ['#ffffff', '#ffffff'],
108 | 'data' => [$maleCount, $femaleCount, $referralCount]
109 | ]
110 | ]
111 | ],
112 | 'options' => [
113 | 'maintainAspectRatio' => false,
114 | 'legend' => [
115 | 'display' => false,
116 | 'labels' => [
117 | 'fontStyle' => 'normal'
118 | ]
119 | ],
120 | 'title' => [
121 | 'fontStyle' => 'normal'
122 | ]
123 | ]
124 | ];
125 |
126 | $chartDataJson = json_encode($chartData);
127 | ?>
128 |
129 |
2 |
3 |
4 |
5 |
6 |
7 | Dashboard - GMS
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
39 |
40 |
41 |
42 |
43 |
[title]
44 |
45 |
46 |
47 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/reciept.php:
--------------------------------------------------------------------------------
1 | prepare($sql);
9 | $stmt->bindParam(':id', $id);
10 | $stmt->execute();
11 | $result = $stmt->fetch();
12 |
13 | $boarder = $result['fullname'];
14 | $total = $result['total'];
15 | $amount = $result['amount'];
16 | $change = $amount - $total ;
17 |
18 | function getRentalReciept(){
19 | global $db;
20 | global $id;
21 | $sql = "SELECT p.*, b.* FROM `payments` p INNER JOIN `members` b ON p.member = b.id WHERE p.id = :id";
22 | $stmt = $db->prepare($sql);
23 | $stmt->bindParam(':id', $id);
24 | $stmt->execute();
25 | $result = $stmt->fetchAll();
26 | foreach($result as $row){
27 | ?>
28 |
29 | | = $row['fullname']?> |
30 | Type #= $row['type']?> |
31 | ₱= number_format($row['total'], 2)?> |
32 | ₱= number_format($row['amount'], 2)?> |
33 |
34 |
40 |
41 |
42 |
43 |
44 |
45 |
46 | GMS
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | GMS - Gym Membership System
60 | Street Unknown, Pagadian City
61 | Phone (+63) 000-000-000
62 | Date:
63 | |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 | | Rental Reciept |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 | | MEMBER: |
90 | |
91 | |
92 | INVOICE # |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 | | MEMBER |
106 | TYPE |
107 | PRICE |
108 | AMOUNT |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 | TOTAL ₱ CHANGE ₱ |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
155 |
156 |
157 |
--------------------------------------------------------------------------------
/html/logs.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Dashboard - GMS
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
38 |
39 |
40 |
41 |
42 |
Users Activity Logs
43 |
44 |
45 |
48 |
49 |
50 |
51 |
52 |
53 | | ID |
54 | User |
55 | Type |
56 | Logs |
57 | Date |
58 |
59 |
60 |
61 |
62 | | 1 |
63 | Airi Satou |
64 | admin |
65 | None |
66 | 2008/11/28 |
67 |
68 |
69 | | 2 |
70 | Airi Satou |
71 | admin |
72 | None |
73 | 2008/11/28 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
--------------------------------------------------------------------------------
/html/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | GMS
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
32 |
33 |
34 |
35 |
36 |
40 |
41 |
42 |
43 |
Welcome Back!
44 |
45 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
79 |
80 |
81 |
82 |
83 |
84 |
--------------------------------------------------------------------------------
/html/reports.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Dashboard - GMS
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
38 |
39 |
40 |
41 |
42 |
Reports
43 |
44 |
45 |
48 |
49 |
50 |
51 |
52 |
53 | | Fullname |
54 | Address |
55 | Phone |
56 | Membeship |
57 | Total |
58 | Amount |
59 | Type |
60 | Start date |
61 |
62 |
63 |
64 |
65 | Airi Satou |
66 | Pagadian City |
67 | 0000000000 |
68 | ₱0.00 |
69 | ₱0.00 |
70 | ₱0.00 |
71 | Regular |
72 | 2008/11/28 |
73 |
74 |
75 | Airi Satou |
76 | Pagadian City |
77 | 0000000000 |
78 | ₱0.00 |
79 | ₱0.00 |
80 | ₱0.00 |
81 | VIP |
82 | 2008/11/28 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
--------------------------------------------------------------------------------
/reports.php:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | Dashboard - GMS
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
41 |
42 |
43 |
44 |
45 |
Reports
46 |
47 |
48 |
51 |
52 |
53 |
54 |
55 |
56 | | Fullname |
57 | Address |
58 | Phone |
59 | Membeship |
60 | Total |
61 | Amount |
62 | Start date |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
107 |
128 |
129 |
130 |
--------------------------------------------------------------------------------
/logs.php:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | Dashboard - GMS
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
41 |
42 |
43 |
44 |
45 |
Users Activity Logs
46 |
47 |
48 |
51 |
52 |
53 |
54 |
55 |
56 | | ID |
57 | User |
58 | Type |
59 | Logs |
60 | Date |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
105 |
126 |
127 |
128 |
--------------------------------------------------------------------------------
/html/login.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | GMS
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
32 |
33 |
34 |
35 |
36 |
40 |
41 |
42 |
43 |
Welcome Back!
44 |
45 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
80 |
81 |
82 |
83 |
84 |
85 |
--------------------------------------------------------------------------------
/index.php:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | GMS
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
38 |
39 |
40 |
41 |
42 |
46 |
47 |
48 |
49 |
Welcome Back!
50 |
51 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
108 |
109 |
110 |
--------------------------------------------------------------------------------
/html/status.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Dashboard - GMS
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
38 |
39 |
40 |
41 |
42 |
Members Status
43 |
44 |
45 |
48 |
49 |
50 |
51 |
52 |
53 | | Fullname |
54 | Address |
55 | Phone |
56 | Age |
57 | Sex |
58 | Type |
59 | Start date |
60 | Status |
61 | Option |
62 |
63 |
64 |
65 |
66 | Airi Satou |
67 | Pagadian City |
68 | 0000000000 |
69 | 33 |
70 | Female |
71 | Regular |
72 | 2008/11/28 |
73 | Expired - 2 Days Ago |
74 | |
75 |
76 |
77 | Airi Satou |
78 | Pagadian City |
79 | 0000000000 |
80 | 33 |
81 | Female |
82 | VIP |
83 | 2008/11/28 |
84 | Active - Due in 31 Days |
85 | |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
102 |
103 |
104 |
119 |
120 |
121 |
122 |
123 |
124 |
--------------------------------------------------------------------------------
/status.php:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | Dashboard - GMS
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
41 |
42 |
43 |
44 |
45 |
Members Status
46 |
47 |
48 |
51 |
52 |
53 |
54 |
55 |
56 | | Fullname |
57 | Address |
58 | Phone |
59 | Age |
60 | Sex |
61 | Type |
62 | Start date |
63 | Status |
64 | Option |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
84 |
85 |
86 |
87 |
88 |
89 |
92 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
126 |
162 |
163 |
164 |
--------------------------------------------------------------------------------
/html/staff.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Dashboard - GMS
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
38 |
39 |
40 |
41 |
42 |
Staff Management
43 |
44 |
45 |
48 |
49 |
50 |
51 |
52 |
53 | | Fullname |
54 | Address |
55 | Phone |
56 | Created At |
57 | Option |
58 |
59 |
60 |
61 |
62 | Airi Satou |
63 | Pagadian City |
64 | 0000000000 |
65 | 2008/11/28 |
66 | |
67 |
68 |
69 | Airi Satou |
70 | Pagadian City |
71 | 0000000000 |
72 | 2008/11/28 |
73 | |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
90 |
91 |
92 |
107 |
122 |
123 |
124 |
125 |
128 |
129 |
Are you sure you want to remove this staff?
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
--------------------------------------------------------------------------------
/dashboard.php:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | Dashboard - GMS
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
43 |
44 |
45 |
46 |
47 |
Dashboard
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
Earnings (monthly)
56 |
₱=number_format(calculateMonthlyEarnings())?>
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
Earnings (annual)
69 |
₱=number_format(calculateYearlyEarnings())?>
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
Active Member
82 |
=countTotalActiveMembers()?>
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
Members
95 |
=countTotalMembers()?>
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
112 |
113 |
=month_chart()?>
114 |
115 |
116 |
117 |
118 |
119 |
125 |
126 |
=yearly_chart()?>
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
140 |
141 |
=get_gender_piechart()?>
142 |
Male Female
143 |
144 |
145 |
146 |
147 |
148 |
149 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
--------------------------------------------------------------------------------
/staff.php:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | Dashboard - GMS
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
41 |
42 |
43 |
44 |
45 |
Staff Management
46 |
47 |
48 |
51 |
52 |
53 |
54 |
55 |
56 | | ID |
57 | Username |
58 | Fullname |
59 | Address |
60 | Phone |
61 | Created At |
62 | Option |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
82 |
83 |
84 |
85 |
86 |
87 |
90 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
109 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
129 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
162 |
204 |
205 |
206 |
--------------------------------------------------------------------------------
/html/dashboard.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Dashboard - GMS
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
38 |
39 |
40 |
41 |
42 |
Dashboard
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
Earnings (monthly)
51 |
₱0.00
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
Earnings (annual)
64 |
₱0.00
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
Active Member
77 |
0
78 |
79 |
80 |
81 |
82 |
83 |
84 |
97 |
98 |
99 |
115 |
116 |
117 |
126 |
127 |
128 |
Male Female
129 |
130 |
131 |
132 |
133 |
134 |
135 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
--------------------------------------------------------------------------------