diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 3b41682..0000000 --- a/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -/mvnw text eol=lf -*.cmd text eol=crlf diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 549e00a..0000000 --- a/.gitignore +++ /dev/null @@ -1,33 +0,0 @@ -HELP.md -target/ -!.mvn/wrapper/maven-wrapper.jar -!**/src/main/**/target/ -!**/src/test/**/target/ - -### STS ### -.apt_generated -.classpath -.factorypath -.project -.settings -.springBeans -.sts4-cache - -### IntelliJ IDEA ### -.idea -*.iws -*.iml -*.ipr - -### NetBeans ### -/nbproject/private/ -/nbbuild/ -/dist/ -/nbdist/ -/.nb-gradle/ -build/ -!**/src/main/**/build/ -!**/src/test/**/build/ - -### VS Code ### -.vscode/ diff --git a/.hintrc b/.hintrc new file mode 100644 index 0000000..8cc5c90 --- /dev/null +++ b/.hintrc @@ -0,0 +1,15 @@ +{ + "extends": [ + "development" + ], + "hints": { + "compat-api/css": [ + "default", + { + "ignore": [ + "text-size-adjust" + ] + } + ] + } +} \ No newline at end of file diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties deleted file mode 100644 index d58dfb7..0000000 --- a/.mvn/wrapper/maven-wrapper.properties +++ /dev/null @@ -1,19 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -wrapperVersion=3.3.2 -distributionType=only-script -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip diff --git a/ContactUs.php b/ContactUs.php new file mode 100644 index 0000000..d1e4931 --- /dev/null +++ b/ContactUs.php @@ -0,0 +1,152 @@ +alert("Your message has been sent successfully!");'; + } else { + echo ''; + } +} +?> + + + + + + + Contact Us - DonateEase + + + + +
+
+
+
+

Contact Us

+

If you have any questions, feel free to reach out to us using the form below.

+
+
+ + +
+
+ + +
+
+ + +
+ +
+
+

Email: support@donateease.com

+

Phone: +977 9803666391

+

Address: Maitidevi, Kathmandu, Nepal

+
+ +
+ +
+ + +
+
+ + diff --git a/Food.jpg b/Food.jpg new file mode 100644 index 0000000..57e3d56 Binary files /dev/null and b/Food.jpg differ diff --git a/about.php b/about.php new file mode 100644 index 0000000..8e01b07 --- /dev/null +++ b/about.php @@ -0,0 +1,258 @@ + + + + + + + + + About Us + + + + + +
+
+ DonateEase Image +
+
+
+

About Us

+

DonateEase is a platform designed to help individuals and organizations donate effortlessly. Our mission is to provide a seamless and secure way to donate to causes that matter, improving the lives of people in need.

+
+
+
+ +
+
+

Our Mission

+

Our mission is to connect people with causes that need their support the most. Through our platform, we aim to foster a community of kindness, making it easier to donate and contribute to various causes globally.

+
+ +
+

Our Vision

+

We envision a world where every person has the opportunity to give, and every cause receives the support it needs. Together, we can create a global network of givers, helping to make a real difference in the world.

+
+
+ + +
+

Our Team

+
+
+ Ashok Sedhain +

Ashok Sedhain

+

+977 9840200020

+ +
+
+ Diksha Rai +

Diksha Rai

+

+977 9842587018

+ +
+
+ Jyoti Yadav +

Jyoti Yadav

+

+977 9761782008

+ +
+
+ Niraj Pandit +

Niraj Pandit

+

+977 9842192040

+ +
+
+ Shristi Ghalan +

Shristi Ghalan

+

+977 9803666391

+ +
+
+
+ + + + + + + + diff --git a/admin_dashboard.php b/admin_dashboard.php new file mode 100644 index 0000000..c0a5b2d --- /dev/null +++ b/admin_dashboard.php @@ -0,0 +1,123 @@ +query("SELECT COUNT(*) AS count FROM users")->fetch_assoc()['count']; +$total_donations = $conn->query("SELECT COUNT(*) AS count FROM material_donations")->fetch_assoc()['count']; +$pending_donations = $conn->query("SELECT COUNT(*) AS count FROM material_donations WHERE status = 'pending'")->fetch_assoc()['count']; + +// Fetch users and donations +$users = $conn->query("SELECT * FROM users ORDER BY created_at DESC"); +$donations = $conn->query("SELECT * FROM material_donations ORDER BY created_at DESC"); +?> + + + + + + + Admin Dashboard + + + + + +
+

Admin Dashboard

+ + +
+
+
+
+

+

Total Users

+
+
+
+
+
+
+

+

Total Donations

+
+
+
+
+
+
+

+

Pending Approvals

+
+
+
+
+ + +

Manage Users

+ + + + + + + + + + + fetch_assoc()): ?> + + + + + + + + +
IDEmailRoleActions
+ Edit + Delete +
+ + +

Manage Donations

+ + + + + + + + + + + + + fetch_assoc()): ?> + + + + + + + + + + +
IDItem NameConditionQuantityStatusActions
+ + Approve + Reject + + Delete +
+
+ + diff --git a/approve_donation.php b/approve_donation.php new file mode 100644 index 0000000..8f39363 --- /dev/null +++ b/approve_donation.php @@ -0,0 +1,32 @@ +prepare("UPDATE material_donations SET status = 'approved' WHERE id = ?"); + $stmt->bind_param("i", $donation_id); + + if ($stmt->execute()) { + $_SESSION['success_message'] = "Donation approved successfully."; + } else { + $_SESSION['error_message'] = "Failed to approve the donation."; + } + + $stmt->close(); +} else { + $_SESSION['error_message'] = "Invalid donation ID."; +} + +header("Location: admin_dashboard.php"); +exit; +?> diff --git a/ashok.jpg b/ashok.jpg new file mode 100644 index 0000000..d7d664a Binary files /dev/null and b/ashok.jpg differ diff --git a/assets/css/style.css b/assets/css/style.css new file mode 100644 index 0000000..e69de29 diff --git a/blood.php b/blood.php new file mode 100644 index 0000000..a763c92 --- /dev/null +++ b/blood.php @@ -0,0 +1,271 @@ + + + + + + + + Blood Donation - Save Lives + + + +
+
+

Donate Blood, Save Lives

+

Become a Donor

+ +
+
+ +
+

Blood Donation Registration

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +

Thank you, ! You have successfully registered as a blood donor.

+ +
+ + + + diff --git a/bloodee.png b/bloodee.png new file mode 100644 index 0000000..3a2ed87 Binary files /dev/null and b/bloodee.png differ diff --git a/bloods.png b/bloods.png new file mode 100644 index 0000000..bcc80f2 Binary files /dev/null and b/bloods.png differ diff --git a/causes.php b/causes.php new file mode 100644 index 0000000..1a9e940 --- /dev/null +++ b/causes.php @@ -0,0 +1,142 @@ + + + + + + + + Causes + + + + + + + +
+

Explore Causes

+

Find a cause that resonates with you and make a difference today!

+
+ + +
+
+ Environment +

Protect the Environment

+

+ Support initiatives aimed at combating climate change, conserving + biodiversity, and reducing pollution. +

+ +
+
+ Education +

Education for All

+

+ Help provide access to quality education for underprivileged children + around the globe. +

+ +
+
+ Healthcare +

Healthcare Initiatives

+

+ Join efforts to improve healthcare systems and provide medical aid to + those in need. +

+ +
+
+ + + + + \ No newline at end of file diff --git a/clothes.jpg b/clothes.jpg new file mode 100644 index 0000000..5b619f6 Binary files /dev/null and b/clothes.jpg differ diff --git a/clothes.php b/clothes.php new file mode 100644 index 0000000..875daac --- /dev/null +++ b/clothes.php @@ -0,0 +1,255 @@ + + + + + + + Clothes Donation + + + + + + +
+
+

Clothes Donation

+

Thank you for your willingness to donate clothes. Please fill in the form step by step.

+
+ + +
+

Your Information

+
+
+ + +
+ +
+ + +
+ + +
+
+ + +
+

Clothes Details

+
+
+ + +
+ +
+ + +
+ + +
+
+ + +
+

Pickup Details

+
+
+ + +
+ +
+ +
+ +
+ + +
+ + +
+
+ + +
+

Review and Download Receipt

+
+

Your Details

+

Name:

+

Email:

+

Clothes Type:

+

Clothes Condition:

+

Pickup Location:

+

Message:

+
+ +
+
+ + + + + diff --git a/dashboard.php b/dashboard.php new file mode 100644 index 0000000..e285fbb --- /dev/null +++ b/dashboard.php @@ -0,0 +1,90 @@ +prepare("SELECT * FROM users WHERE email = ?"); +$stmt->bind_param("s", $user_email); +echo"$user_email"; +$stmt->execute(); +$result = $stmt->get_result(); +$user = $result->fetch_assoc(); + +if (!$user) { + echo "User not found."; + exit; +} + +?> + + + + + + User Dashboard + + + + + +
+

Welcome, !

+

You are logged in as:

+ +
+ +

Your Details

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Email
First Name
Last Name
Phone
Role
Account Created
+ +
+ +

Quick Actions

+
+ + Donate Material + Donate Money + Donate Blood + + View Available Donations + Submit a Request + + Admin Dashboard + +
+
+ + diff --git a/db_connection.php b/db_connection.php new file mode 100644 index 0000000..d2ae93b --- /dev/null +++ b/db_connection.php @@ -0,0 +1,12 @@ +connect_error) { + die("Connection failed: " . $conn->connect_error); +} +?> diff --git a/deekshya.jpg b/deekshya.jpg new file mode 100644 index 0000000..d061436 Binary files /dev/null and b/deekshya.jpg differ diff --git a/delete_user.php b/delete_user.php new file mode 100644 index 0000000..ef5081a --- /dev/null +++ b/delete_user.php @@ -0,0 +1,29 @@ +prepare("DELETE FROM users WHERE id = ?"); + $stmt->bind_param("i", $user_id); + + if ($stmt->execute()) { + header("Location: admin_dashboard.php"); + exit; + } else { + echo "Error deleting user."; + } +} else { + header("Location: admin_dashboard.php"); + exit; +} +?> diff --git a/disaster.html b/disaster.html new file mode 100644 index 0000000..e027ef2 --- /dev/null +++ b/disaster.html @@ -0,0 +1,133 @@ + + + + + + Disaster Relief +

Back To Home Page

+ + + + +
+
+
+

Disaster Relief

+
+

+ Natural disasters can strike anytime, leaving devastation in their wake. Immediate and effective disaster relief efforts + are essential to saving lives and helping communities rebuild. +

+

+ Our Mission: +

    +
  • Provide emergency supplies like food, water, and shelter to affected areas.
  • +
  • Support rebuilding efforts to restore homes and infrastructure.
  • +
  • Facilitate medical aid and healthcare services for disaster victims.
  • +
  • Offer long-term support for community resilience and preparedness.
  • +
+

+

+ Every donation makes a difference. Together, we can help communities recover and thrive after disasters. +

+
+
+
+
+ + diff --git a/disaster.jpg b/disaster.jpg new file mode 100644 index 0000000..cd1eee6 Binary files /dev/null and b/disaster.jpg differ diff --git a/donate1.css b/donate1.css new file mode 100644 index 0000000..495462e --- /dev/null +++ b/donate1.css @@ -0,0 +1,68 @@ +/* Global Styles */ +body { + margin: 0; + font-family: Arial, sans-serif; + background-color: #f8f9fa; + color: #333; +} + +/* Navbar */ + + +/* Main Content main */ +.main { + width: 80%; /* Limit the size of the main main */ + max-width: 600px; /* Restrict the maximum width */ + margin: 30px auto; /* Center the main horizontally */ + text-align: center; + background-color: white; /* Optional: background for the main */ + padding: 20px; + border-radius: 10px; + box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); +} + +.main h1 { + font-size: 1.8em; /* Slightly smaller title font size */ + margin-bottom: 20px; +} + +/* Categories Section */ +.categories { + display: grid; + grid-template-columns: repeat(2, 1fr); /* Two columns */ + gap: 15px; /* Smaller spacing between items */ + justify-items: center; + padding: 10px; +} + +.category-box { + background-color: #d6f5d6; + border-radius: 10px; + text-align: center; + padding: 15px; + width: 150px; /* Reduce the size of boxes */ + box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); + cursor: pointer; + transition: transform 0.3s, box-shadow 0.3s; +} + +.category-box:hover { + transform: translateY(-5px); + box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); +} + +.category-box img { + width: 80px; /* Smaller image */ + height: 80px; + object-fit: cover; + margin-bottom: 10px; + border-radius: 50%; +} + +.category-box h2 { + font-size: 1em; /* Reduce font size */ + color: #333; + margin-top: 10px; +} + + diff --git a/donate_material.php b/donate_material.php new file mode 100644 index 0000000..8e9b6e6 --- /dev/null +++ b/donate_material.php @@ -0,0 +1,214 @@ +prepare("SELECT id, first_name, last_name FROM users WHERE email = ?"); +$stmt->bind_param("s", $user_email); +$stmt->execute(); +$result = $stmt->get_result(); +$user = $result->fetch_assoc(); +$user_id = $user['id']; +$stmt->close(); + +// Handle form submission +if ($_SERVER['REQUEST_METHOD'] === 'POST') { + $item_name = $_POST['item_name']; + $condition = $_POST['condition']; + $quantity = $_POST['quantity']; + $latitude = $_POST['latitude']; + $longitude = $_POST['longitude']; + + // Validate inputs + if (empty($item_name) || empty($condition) || empty($quantity) || empty($latitude) || empty($longitude)) { + $error_message = "All fields are required, including location."; + } else { + // Insert donation into the database + $stmt = $conn->prepare("INSERT INTO material_donations (donor_id, item_name, conditions, quantity, latitude, longitude, status) VALUES (?, ?, ?, ?, ?, ?, 'pending')"); + + if ($stmt) { + $stmt->bind_param("issidd", $user_id, $item_name, $condition, $quantity, $latitude, $longitude); + $execute = $stmt->execute(); + + if ($execute) { + $success_message = "Your donation has been submitted successfully and is pending approval."; + header("Location: dashboard.php"); // Redirect to the dashboard after successful submission + exit; + } else { + $error_message = "Failed to submit your donation. Please try again. Error: " . $stmt->error; + } + } else { + $error_message = "Failed to prepare SQL query. Please check your database connection."; + } + + $stmt->close(); + } +} +?> + + + + + + + + Donate Materials + + + + + + + + + + + +
+

Donate Materials

+ + + +
+ +
+ + + +
+ +
+ + +
+
+ + +
+ +
+ + +
+ +
+ + +
+ + + + + +
+ +
+ +
+
+
+ + + + + + + + diff --git a/donation-forn.php b/donation-forn.php new file mode 100644 index 0000000..a3b6ea6 --- /dev/null +++ b/donation-forn.php @@ -0,0 +1,145 @@ +Thank you for your donation of $quantity units of $food_type.

"; + // echo "

Pickup Address: $pickup_address

"; + // echo "

Preferred Pickup Time: $pickup

"; + // echo "

Additional Comments: $comments

"; + } +?> + + + + + + + Donate to Organization + + + +
+
+

+ Donate to Organization +

+

+ Thank you for your willingness to help. Please fill out the donation + details below. +

+
+ + +
+

Donate Food

+
+ + + + + + + + + + + + + + + + +
+
+
+ + diff --git a/donation.jpg b/donation.jpg new file mode 100644 index 0000000..a61be6e Binary files /dev/null and b/donation.jpg differ diff --git a/donation_list.php b/donation_list.php new file mode 100644 index 0000000..850addd --- /dev/null +++ b/donation_list.php @@ -0,0 +1,77 @@ +prepare("SELECT * FROM material_donations WHERE user_id = ?"); + $stmt->bind_param("i", $user_id); + $stmt->execute(); + $result = $stmt->get_result(); + $donations = $result->fetch_all(MYSQLI_ASSOC); +} elseif ($role === 'recipient') { + // Fetch donations available for the recipient (donations by other users) + $stmt = $conn->prepare("SELECT * FROM material_donations WHERE user_id != ?"); + $stmt->bind_param("i", $user_id); + $stmt->execute(); + $result = $stmt->get_result(); + $donations = $result->fetch_all(MYSQLI_ASSOC); +} else { + // If the user is neither donor nor recipient (should not happen) + echo "Invalid role."; + exit; +} +?> + + + + + + + Donation List + + + + + +
+

+ + +
No donations available.
+ + + + + + + + + + + + + + + + + + + + +
Item NameConditionQuantityNotes
+ +
+ + diff --git a/donations.jpg b/donations.jpg new file mode 100644 index 0000000..e12d46d Binary files /dev/null and b/donations.jpg differ diff --git a/donations.php b/donations.php new file mode 100644 index 0000000..093827c --- /dev/null +++ b/donations.php @@ -0,0 +1,61 @@ + + + + + + + + Donation Categories + + + + + + + +
+

Choose Donation Category

+
+ +
+ Food Donation +

Food

+
+ + +
+ Monetary Donation +

Monetary

+
+ + +
+ Blood Donation +

Blood

+
+ + +
+ Clothes Donation +

Clothes

+
+
+
+ +
+
+
+ + + + + diff --git a/donor_profile.php b/donor_profile.php new file mode 100644 index 0000000..9cf770b --- /dev/null +++ b/donor_profile.php @@ -0,0 +1,108 @@ +prepare("SELECT id, first_name, last_name FROM users WHERE email = ?"); +$stmt->bind_param("s", $user_email); +$stmt->execute(); +$result = $stmt->get_result(); +$user = $result->fetch_assoc(); +$user_id = $user['id']; +$stmt->close(); + +// Handle form submission +if ($_SERVER['REQUEST_METHOD'] === 'POST') { + $blood_type = $_POST['blood_type']; + $availability = $_POST['availability']; + $last_donation_date = $_POST['last_donation_date']; + + // Validate inputs + if (empty($blood_type) || empty($availability) || empty($last_donation_date)) { + $error_message = "All fields are required."; + } else { + // Insert donor profile into the database + $stmt = $conn->prepare("INSERT INTO blood_donors (donor_id, blood_type, availability, last_donation_date) VALUES (?, ?, ?, ?)"); + $stmt->bind_param("isss", $user_id, $blood_type, $availability, $last_donation_date); + + if ($stmt->execute()) { + $success_message = "Your donor profile has been created successfully."; + } else { + $error_message = "Failed to create your donor profile. Please try again."; + } + + $stmt->close(); + } +} +?> + + + + + + + + Donor Profile + + + + + + +
+

Create Donor Profile

+ + + +
+ +
+ + + +
+ +
+ + +
+
+ + +
+ +
+ + +
+ +
+ + +
+ + +
+
+ + + + + diff --git a/edit_user.php b/edit_user.php new file mode 100644 index 0000000..477a834 --- /dev/null +++ b/edit_user.php @@ -0,0 +1,87 @@ +query("SELECT * FROM users WHERE id = $user_id")->fetch_assoc(); + + if (!$user) { + echo "User not found."; + exit; + } +} else { + header("Location: admin_dashboard.php"); + exit; +} + +// Update user details on form submission +if ($_SERVER['REQUEST_METHOD'] === 'POST') { + $email = $_POST['email']; + $role = $_POST['role']; + $first_name = $_POST['first_name']; + $last_name = $_POST['last_name']; + $phone = $_POST['phone']; + + $stmt = $conn->prepare("UPDATE users SET email = ?, role = ?, first_name = ?, last_name = ?, phone = ? WHERE id = ?"); + $stmt->bind_param("sssssi", $email, $role, $first_name, $last_name, $phone, $user_id); + + if ($stmt->execute()) { + header("Location: admin_dashboard.php"); + exit; + } else { + echo "Error updating user."; + } +} +?> + + + + + + + Edit User + + + + + +
+

Edit User

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+
+ + diff --git a/education.html b/education.html new file mode 100644 index 0000000..920824b --- /dev/null +++ b/education.html @@ -0,0 +1,129 @@ + + + + + + Education for All +

Back To Home Page

+ + + + +
+
+
+

Education for All

+
+

+ Education is the foundation for a brighter future. It empowers individuals to achieve their full potential and creates opportunities for economic and social development. +

+

+ Our Goals: +

    +
  • Provide access to quality education for underprivileged children.
  • +
  • Build schools in remote areas.
  • +
  • Offer scholarships for deserving students.
  • +
  • Promote adult literacy programs worldwide.
  • +
+

+
+
+
+
+ + diff --git a/education.jpg b/education.jpg new file mode 100644 index 0000000..f5b21f4 Binary files /dev/null and b/education.jpg differ diff --git a/fooddonation.php b/fooddonation.php new file mode 100644 index 0000000..f68783f --- /dev/null +++ b/fooddonation.php @@ -0,0 +1,131 @@ + + + + + + + + Food Donation + + + +
+
+

Food Donation

+

+ Join us in helping those in need by donating food and making a + difference in our community. +

+
+ + +
+

Enter Organization/Orphanage Name

+
+ + + + +
+
+
+ + + +Thank you for selecting: $organization_name

"; + } +?> diff --git a/foods.jpg b/foods.jpg new file mode 100644 index 0000000..e849d44 Binary files /dev/null and b/foods.jpg differ diff --git a/healthcare.html b/healthcare.html new file mode 100644 index 0000000..4786986 --- /dev/null +++ b/healthcare.html @@ -0,0 +1,133 @@ + + + + + + Health Access for All + +

Back To Home Page

+ + + + +
+
+
+

Health Access for All

+
+

+ Access to healthcare is a fundamental right that ensures the well-being of every individual. Together, we can make essential health services available to underserved communities. +

+

+ Our Objectives: +

    +
  • Deliver medical supplies to remote and underserved regions.
  • +
  • Provide free health checkups and preventive care.
  • +
  • Support vaccination drives to combat preventable diseases.
  • +
  • Empower local healthcare workers with training and resources.
  • +
+

+

+ By supporting health access initiatives, you are contributing to saving lives, improving health, and building stronger communities. +

+
+
+
+
+ + diff --git a/healthcare.jpg b/healthcare.jpg new file mode 100644 index 0000000..13bf786 Binary files /dev/null and b/healthcare.jpg differ diff --git a/includes/footer.php b/includes/footer.php new file mode 100644 index 0000000..07ea81b --- /dev/null +++ b/includes/footer.php @@ -0,0 +1,9 @@ + + + + + diff --git a/includes/header.php b/includes/header.php new file mode 100644 index 0000000..62fda1c --- /dev/null +++ b/includes/header.php @@ -0,0 +1,60 @@ + + + + + + + + + + DonateEase + + + + + + + diff --git a/index.php b/index.php new file mode 100644 index 0000000..d27cd01 --- /dev/null +++ b/index.php @@ -0,0 +1,380 @@ + + + +
+
+
+

Transform Lives with Your Support

+

+ Join us in creating a better future for those in need. Every + contribution makes a difference. +

+ Donate Now + Explore Causes +
+
+
+ + + + + +
+
+

What Our Donors Say

+
+
+

+ "DonateEase made it so simple to contribute to a cause I care + about. Seeing the impact of my donation is truly rewarding." +

+

- Dikshya Sharma

+
+
+

+ "The transparency of this platform builds trust. I know my money + is making a real difference." +

+

- Shristi Adhikari

+
+
+

+ "The transparency of this platform builds trust. I know my money + is making a real difference." +

+

- Jyoti Tamang

+
+
+
+
+ + +
+
+

Ready to Make a Difference?

+
+ Donate Now +
+
+
+
+
+ +
+
+ +

Welcome, ! You are logged in.

+ +

Welcome! Please log in to access more features.

+ + +
+
+ + + diff --git a/jyoti.jpg b/jyoti.jpg new file mode 100644 index 0000000..f4fe195 Binary files /dev/null and b/jyoti.jpg differ diff --git a/login.php b/login.php new file mode 100644 index 0000000..53d9ce6 --- /dev/null +++ b/login.php @@ -0,0 +1,66 @@ +prepare("SELECT * FROM users WHERE email = ?"); + $stmt->bind_param("s", $email); + $stmt->execute(); + $result = $stmt->get_result(); + $user = $result->fetch_assoc(); + + // Check if user exists and password is correct + if ($user && password_verify($password, $user['password'])) { + // Store user data in session + $_SESSION['user_email'] = $user['email']; + $_SESSION['role'] = $user['role']; + $_SESSION['user_id'] = $user['id']; + + // Redirect to user dashboard or admin dashboard based on role + if ($user['role'] === 'admin') { + header("Location: admin_dashboard.php"); + } else { + header("Location: dashboard.php"); + } + exit; + } else { + $error_message = "Invalid email or password."; + } +} +?> + + + + + + + Login + + + +
+

Login

+ + +
+ + +
+
+ + +
+
+ + +
+ +
+
+ + diff --git a/logout.php b/logout.php new file mode 100644 index 0000000..2986cb0 --- /dev/null +++ b/logout.php @@ -0,0 +1,14 @@ + diff --git a/monetary.php b/monetary.php new file mode 100644 index 0000000..4cda4d9 --- /dev/null +++ b/monetary.php @@ -0,0 +1,367 @@ + + + + + + + + Step-by-Step Donation with Payment Integration + + + + + + + +
+
+

Make a Difference Today!

+ + +
+
+
+ + +
+
+ + +
+ +
+
+ + +
+

Select Payment Method

+
+ + + +
+ +
+
+
+
+ +
+ + +
+

Enter Donation Amount

+
+ +
+ +
+
+
+ + + + + + + diff --git a/money.jpg b/money.jpg new file mode 100644 index 0000000..a87b739 Binary files /dev/null and b/money.jpg differ diff --git a/mvnw b/mvnw deleted file mode 100644 index 19529dd..0000000 --- a/mvnw +++ /dev/null @@ -1,259 +0,0 @@ -#!/bin/sh -# ---------------------------------------------------------------------------- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# ---------------------------------------------------------------------------- - -# ---------------------------------------------------------------------------- -# Apache Maven Wrapper startup batch script, version 3.3.2 -# -# Optional ENV vars -# ----------------- -# JAVA_HOME - location of a JDK home dir, required when download maven via java source -# MVNW_REPOURL - repo url base for downloading maven distribution -# MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven -# MVNW_VERBOSE - true: enable verbose log; debug: trace the mvnw script; others: silence the output -# ---------------------------------------------------------------------------- - -set -euf -[ "${MVNW_VERBOSE-}" != debug ] || set -x - -# OS specific support. -native_path() { printf %s\\n "$1"; } -case "$(uname)" in -CYGWIN* | MINGW*) - [ -z "${JAVA_HOME-}" ] || JAVA_HOME="$(cygpath --unix "$JAVA_HOME")" - native_path() { cygpath --path --windows "$1"; } - ;; -esac - -# set JAVACMD and JAVACCMD -set_java_home() { - # For Cygwin and MinGW, ensure paths are in Unix format before anything is touched - if [ -n "${JAVA_HOME-}" ]; then - if [ -x "$JAVA_HOME/jre/sh/java" ]; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - JAVACCMD="$JAVA_HOME/jre/sh/javac" - else - JAVACMD="$JAVA_HOME/bin/java" - JAVACCMD="$JAVA_HOME/bin/javac" - - if [ ! -x "$JAVACMD" ] || [ ! -x "$JAVACCMD" ]; then - echo "The JAVA_HOME environment variable is not defined correctly, so mvnw cannot run." >&2 - echo "JAVA_HOME is set to \"$JAVA_HOME\", but \"\$JAVA_HOME/bin/java\" or \"\$JAVA_HOME/bin/javac\" does not exist." >&2 - return 1 - fi - fi - else - JAVACMD="$( - 'set' +e - 'unset' -f command 2>/dev/null - 'command' -v java - )" || : - JAVACCMD="$( - 'set' +e - 'unset' -f command 2>/dev/null - 'command' -v javac - )" || : - - if [ ! -x "${JAVACMD-}" ] || [ ! -x "${JAVACCMD-}" ]; then - echo "The java/javac command does not exist in PATH nor is JAVA_HOME set, so mvnw cannot run." >&2 - return 1 - fi - fi -} - -# hash string like Java String::hashCode -hash_string() { - str="${1:-}" h=0 - while [ -n "$str" ]; do - char="${str%"${str#?}"}" - h=$(((h * 31 + $(LC_CTYPE=C printf %d "'$char")) % 4294967296)) - str="${str#?}" - done - printf %x\\n $h -} - -verbose() { :; } -[ "${MVNW_VERBOSE-}" != true ] || verbose() { printf %s\\n "${1-}"; } - -die() { - printf %s\\n "$1" >&2 - exit 1 -} - -trim() { - # MWRAPPER-139: - # Trims trailing and leading whitespace, carriage returns, tabs, and linefeeds. - # Needed for removing poorly interpreted newline sequences when running in more - # exotic environments such as mingw bash on Windows. - printf "%s" "${1}" | tr -d '[:space:]' -} - -# parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties -while IFS="=" read -r key value; do - case "${key-}" in - distributionUrl) distributionUrl=$(trim "${value-}") ;; - distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;; - esac -done <"${0%/*}/.mvn/wrapper/maven-wrapper.properties" -[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in ${0%/*}/.mvn/wrapper/maven-wrapper.properties" - -case "${distributionUrl##*/}" in -maven-mvnd-*bin.*) - MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ - case "${PROCESSOR_ARCHITECTURE-}${PROCESSOR_ARCHITEW6432-}:$(uname -a)" in - *AMD64:CYGWIN* | *AMD64:MINGW*) distributionPlatform=windows-amd64 ;; - :Darwin*x86_64) distributionPlatform=darwin-amd64 ;; - :Darwin*arm64) distributionPlatform=darwin-aarch64 ;; - :Linux*x86_64*) distributionPlatform=linux-amd64 ;; - *) - echo "Cannot detect native platform for mvnd on $(uname)-$(uname -m), use pure java version" >&2 - distributionPlatform=linux-amd64 - ;; - esac - distributionUrl="${distributionUrl%-bin.*}-$distributionPlatform.zip" - ;; -maven-mvnd-*) MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ ;; -*) MVN_CMD="mvn${0##*/mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;; -esac - -# apply MVNW_REPOURL and calculate MAVEN_HOME -# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-,maven-mvnd--}/ -[ -z "${MVNW_REPOURL-}" ] || distributionUrl="$MVNW_REPOURL$_MVNW_REPO_PATTERN${distributionUrl#*"$_MVNW_REPO_PATTERN"}" -distributionUrlName="${distributionUrl##*/}" -distributionUrlNameMain="${distributionUrlName%.*}" -distributionUrlNameMain="${distributionUrlNameMain%-bin}" -MAVEN_USER_HOME="${MAVEN_USER_HOME:-${HOME}/.m2}" -MAVEN_HOME="${MAVEN_USER_HOME}/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")" - -exec_maven() { - unset MVNW_VERBOSE MVNW_USERNAME MVNW_PASSWORD MVNW_REPOURL || : - exec "$MAVEN_HOME/bin/$MVN_CMD" "$@" || die "cannot exec $MAVEN_HOME/bin/$MVN_CMD" -} - -if [ -d "$MAVEN_HOME" ]; then - verbose "found existing MAVEN_HOME at $MAVEN_HOME" - exec_maven "$@" -fi - -case "${distributionUrl-}" in -*?-bin.zip | *?maven-mvnd-?*-?*.zip) ;; -*) die "distributionUrl is not valid, must match *-bin.zip or maven-mvnd-*.zip, but found '${distributionUrl-}'" ;; -esac - -# prepare tmp dir -if TMP_DOWNLOAD_DIR="$(mktemp -d)" && [ -d "$TMP_DOWNLOAD_DIR" ]; then - clean() { rm -rf -- "$TMP_DOWNLOAD_DIR"; } - trap clean HUP INT TERM EXIT -else - die "cannot create temp dir" -fi - -mkdir -p -- "${MAVEN_HOME%/*}" - -# Download and Install Apache Maven -verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." -verbose "Downloading from: $distributionUrl" -verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" - -# select .zip or .tar.gz -if ! command -v unzip >/dev/null; then - distributionUrl="${distributionUrl%.zip}.tar.gz" - distributionUrlName="${distributionUrl##*/}" -fi - -# verbose opt -__MVNW_QUIET_WGET=--quiet __MVNW_QUIET_CURL=--silent __MVNW_QUIET_UNZIP=-q __MVNW_QUIET_TAR='' -[ "${MVNW_VERBOSE-}" != true ] || __MVNW_QUIET_WGET='' __MVNW_QUIET_CURL='' __MVNW_QUIET_UNZIP='' __MVNW_QUIET_TAR=v - -# normalize http auth -case "${MVNW_PASSWORD:+has-password}" in -'') MVNW_USERNAME='' MVNW_PASSWORD='' ;; -has-password) [ -n "${MVNW_USERNAME-}" ] || MVNW_USERNAME='' MVNW_PASSWORD='' ;; -esac - -if [ -z "${MVNW_USERNAME-}" ] && command -v wget >/dev/null; then - verbose "Found wget ... using wget" - wget ${__MVNW_QUIET_WGET:+"$__MVNW_QUIET_WGET"} "$distributionUrl" -O "$TMP_DOWNLOAD_DIR/$distributionUrlName" || die "wget: Failed to fetch $distributionUrl" -elif [ -z "${MVNW_USERNAME-}" ] && command -v curl >/dev/null; then - verbose "Found curl ... using curl" - curl ${__MVNW_QUIET_CURL:+"$__MVNW_QUIET_CURL"} -f -L -o "$TMP_DOWNLOAD_DIR/$distributionUrlName" "$distributionUrl" || die "curl: Failed to fetch $distributionUrl" -elif set_java_home; then - verbose "Falling back to use Java to download" - javaSource="$TMP_DOWNLOAD_DIR/Downloader.java" - targetZip="$TMP_DOWNLOAD_DIR/$distributionUrlName" - cat >"$javaSource" <<-END - public class Downloader extends java.net.Authenticator - { - protected java.net.PasswordAuthentication getPasswordAuthentication() - { - return new java.net.PasswordAuthentication( System.getenv( "MVNW_USERNAME" ), System.getenv( "MVNW_PASSWORD" ).toCharArray() ); - } - public static void main( String[] args ) throws Exception - { - setDefault( new Downloader() ); - java.nio.file.Files.copy( java.net.URI.create( args[0] ).toURL().openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() ); - } - } - END - # For Cygwin/MinGW, switch paths to Windows format before running javac and java - verbose " - Compiling Downloader.java ..." - "$(native_path "$JAVACCMD")" "$(native_path "$javaSource")" || die "Failed to compile Downloader.java" - verbose " - Running Downloader.java ..." - "$(native_path "$JAVACMD")" -cp "$(native_path "$TMP_DOWNLOAD_DIR")" Downloader "$distributionUrl" "$(native_path "$targetZip")" -fi - -# If specified, validate the SHA-256 sum of the Maven distribution zip file -if [ -n "${distributionSha256Sum-}" ]; then - distributionSha256Result=false - if [ "$MVN_CMD" = mvnd.sh ]; then - echo "Checksum validation is not supported for maven-mvnd." >&2 - echo "Please disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 - exit 1 - elif command -v sha256sum >/dev/null; then - if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c >/dev/null 2>&1; then - distributionSha256Result=true - fi - elif command -v shasum >/dev/null; then - if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | shasum -a 256 -c >/dev/null 2>&1; then - distributionSha256Result=true - fi - else - echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." >&2 - echo "Please install either command, or disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 - exit 1 - fi - if [ $distributionSha256Result = false ]; then - echo "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised." >&2 - echo "If you updated your Maven version, you need to update the specified distributionSha256Sum property." >&2 - exit 1 - fi -fi - -# unzip and move -if command -v unzip >/dev/null; then - unzip ${__MVNW_QUIET_UNZIP:+"$__MVNW_QUIET_UNZIP"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -d "$TMP_DOWNLOAD_DIR" || die "failed to unzip" -else - tar xzf${__MVNW_QUIET_TAR:+"$__MVNW_QUIET_TAR"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -C "$TMP_DOWNLOAD_DIR" || die "failed to untar" -fi -printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/mvnw.url" -mv -- "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME" - -clean || : -exec_maven "$@" diff --git a/mvnw.cmd b/mvnw.cmd deleted file mode 100644 index 249bdf3..0000000 --- a/mvnw.cmd +++ /dev/null @@ -1,149 +0,0 @@ -<# : batch portion -@REM ---------------------------------------------------------------------------- -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. -@REM ---------------------------------------------------------------------------- - -@REM ---------------------------------------------------------------------------- -@REM Apache Maven Wrapper startup batch script, version 3.3.2 -@REM -@REM Optional ENV vars -@REM MVNW_REPOURL - repo url base for downloading maven distribution -@REM MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven -@REM MVNW_VERBOSE - true: enable verbose log; others: silence the output -@REM ---------------------------------------------------------------------------- - -@IF "%__MVNW_ARG0_NAME__%"=="" (SET __MVNW_ARG0_NAME__=%~nx0) -@SET __MVNW_CMD__= -@SET __MVNW_ERROR__= -@SET __MVNW_PSMODULEP_SAVE=%PSModulePath% -@SET PSModulePath= -@FOR /F "usebackq tokens=1* delims==" %%A IN (`powershell -noprofile "& {$scriptDir='%~dp0'; $script='%__MVNW_ARG0_NAME__%'; icm -ScriptBlock ([Scriptblock]::Create((Get-Content -Raw '%~f0'))) -NoNewScope}"`) DO @( - IF "%%A"=="MVN_CMD" (set __MVNW_CMD__=%%B) ELSE IF "%%B"=="" (echo %%A) ELSE (echo %%A=%%B) -) -@SET PSModulePath=%__MVNW_PSMODULEP_SAVE% -@SET __MVNW_PSMODULEP_SAVE= -@SET __MVNW_ARG0_NAME__= -@SET MVNW_USERNAME= -@SET MVNW_PASSWORD= -@IF NOT "%__MVNW_CMD__%"=="" (%__MVNW_CMD__% %*) -@echo Cannot start maven from wrapper >&2 && exit /b 1 -@GOTO :EOF -: end batch / begin powershell #> - -$ErrorActionPreference = "Stop" -if ($env:MVNW_VERBOSE -eq "true") { - $VerbosePreference = "Continue" -} - -# calculate distributionUrl, requires .mvn/wrapper/maven-wrapper.properties -$distributionUrl = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionUrl -if (!$distributionUrl) { - Write-Error "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties" -} - -switch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) { - "maven-mvnd-*" { - $USE_MVND = $true - $distributionUrl = $distributionUrl -replace '-bin\.[^.]*$',"-windows-amd64.zip" - $MVN_CMD = "mvnd.cmd" - break - } - default { - $USE_MVND = $false - $MVN_CMD = $script -replace '^mvnw','mvn' - break - } -} - -# apply MVNW_REPOURL and calculate MAVEN_HOME -# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-,maven-mvnd--}/ -if ($env:MVNW_REPOURL) { - $MVNW_REPO_PATTERN = if ($USE_MVND) { "/org/apache/maven/" } else { "/maven/mvnd/" } - $distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace '^.*'+$MVNW_REPO_PATTERN,'')" -} -$distributionUrlName = $distributionUrl -replace '^.*/','' -$distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$','' -$MAVEN_HOME_PARENT = "$HOME/.m2/wrapper/dists/$distributionUrlNameMain" -if ($env:MAVEN_USER_HOME) { - $MAVEN_HOME_PARENT = "$env:MAVEN_USER_HOME/wrapper/dists/$distributionUrlNameMain" -} -$MAVEN_HOME_NAME = ([System.Security.Cryptography.MD5]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join '' -$MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME" - -if (Test-Path -Path "$MAVEN_HOME" -PathType Container) { - Write-Verbose "found existing MAVEN_HOME at $MAVEN_HOME" - Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" - exit $? -} - -if (! $distributionUrlNameMain -or ($distributionUrlName -eq $distributionUrlNameMain)) { - Write-Error "distributionUrl is not valid, must end with *-bin.zip, but found $distributionUrl" -} - -# prepare tmp dir -$TMP_DOWNLOAD_DIR_HOLDER = New-TemporaryFile -$TMP_DOWNLOAD_DIR = New-Item -Itemtype Directory -Path "$TMP_DOWNLOAD_DIR_HOLDER.dir" -$TMP_DOWNLOAD_DIR_HOLDER.Delete() | Out-Null -trap { - if ($TMP_DOWNLOAD_DIR.Exists) { - try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } - catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } - } -} - -New-Item -Itemtype Directory -Path "$MAVEN_HOME_PARENT" -Force | Out-Null - -# Download and Install Apache Maven -Write-Verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." -Write-Verbose "Downloading from: $distributionUrl" -Write-Verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" - -$webclient = New-Object System.Net.WebClient -if ($env:MVNW_USERNAME -and $env:MVNW_PASSWORD) { - $webclient.Credentials = New-Object System.Net.NetworkCredential($env:MVNW_USERNAME, $env:MVNW_PASSWORD) -} -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 -$webclient.DownloadFile($distributionUrl, "$TMP_DOWNLOAD_DIR/$distributionUrlName") | Out-Null - -# If specified, validate the SHA-256 sum of the Maven distribution zip file -$distributionSha256Sum = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionSha256Sum -if ($distributionSha256Sum) { - if ($USE_MVND) { - Write-Error "Checksum validation is not supported for maven-mvnd. `nPlease disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." - } - Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash - if ((Get-FileHash "$TMP_DOWNLOAD_DIR/$distributionUrlName" -Algorithm SHA256).Hash.ToLower() -ne $distributionSha256Sum) { - Write-Error "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised. If you updated your Maven version, you need to update the specified distributionSha256Sum property." - } -} - -# unzip and move -Expand-Archive "$TMP_DOWNLOAD_DIR/$distributionUrlName" -DestinationPath "$TMP_DOWNLOAD_DIR" | Out-Null -Rename-Item -Path "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" -NewName $MAVEN_HOME_NAME | Out-Null -try { - Move-Item -Path "$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME" -Destination $MAVEN_HOME_PARENT | Out-Null -} catch { - if (! (Test-Path -Path "$MAVEN_HOME" -PathType Container)) { - Write-Error "fail to move MAVEN_HOME" - } -} finally { - try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } - catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } -} - -Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" diff --git a/niraj.jpg b/niraj.jpg new file mode 100644 index 0000000..10e98b9 Binary files /dev/null and b/niraj.jpg differ diff --git a/pom.xml b/pom.xml deleted file mode 100644 index 0899cdd..0000000 --- a/pom.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - 4.0.0 - - org.springframework.boot - spring-boot-starter-parent - 3.4.1 - - - com.donateease - demo - 0.0.1-SNAPSHOT - demo - Demo project for Spring Boot - - - - - - - - - - - - - - - 23 - - - - org.springframework.boot - spring-boot-starter-thymeleaf - - - org.springframework.boot - spring-boot-starter-web-services - - - - org.springframework.boot - spring-boot-devtools - runtime - true - - - com.mysql - mysql-connector-j - runtime - - - org.mariadb.jdbc - mariadb-java-client - runtime - - - org.springframework.boot - spring-boot-starter-test - test - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - - diff --git a/recipient_search.php b/recipient_search.php new file mode 100644 index 0000000..f778cdf --- /dev/null +++ b/recipient_search.php @@ -0,0 +1,101 @@ +prepare($sql); + if ($urgency !== "") { + $stmt->bind_param("ss", $blood_type, "%$urgency%"); + } else { + $stmt->bind_param("s", $blood_type); + } + $stmt->execute(); + $result = $stmt->get_result(); +} + +?> + + + + + + + + Search Blood Donors + + + + + + +
+

Search for Blood Donors

+ +
+
+ + +
+ +
+ + +
+ + +
+ + +

Donors List

+ + + + + + + + + + fetch_assoc()): ?> + + + + + + + +
NameBlood TypeAvailability
+ +
+ + + + + diff --git a/register.php b/register.php new file mode 100644 index 0000000..6e02ba9 --- /dev/null +++ b/register.php @@ -0,0 +1,97 @@ +prepare($query); + $stmt->bind_param("s", $email); + $stmt->execute(); + $result = $stmt->get_result(); + + if ($result->num_rows > 0) { + $error = "Email is already registered."; + } else { + // Hash the password + $hashed_password = password_hash($password, PASSWORD_BCRYPT); + + // Insert into the database + $query = "INSERT INTO users (email, password, role, first_name, last_name, phone) VALUES (?, ?, ?, ?, ?, ?)"; + $stmt = $conn->prepare($query); + $stmt->bind_param("ssssss", $email, $hashed_password, $role, $first_name, $last_name, $phone); + + if ($stmt->execute()) { + $_SESSION['success'] = "Registration successful. Please log in."; + header("Location: login.php"); + exit; + } else { + $error = "Registration failed. Please try again."; + } + } + } +} +?> + + + + + + Register + + + +
+

Register

+ +
+ +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+
+ + diff --git a/reject_donation.php b/reject_donation.php new file mode 100644 index 0000000..c173f41 --- /dev/null +++ b/reject_donation.php @@ -0,0 +1,32 @@ +prepare("UPDATE material_donations SET status = 'rejected' WHERE id = ?"); + $stmt->bind_param("i", $donation_id); + + if ($stmt->execute()) { + $_SESSION['success_message'] = "Donation rejected successfully."; + } else { + $_SESSION['error_message'] = "Failed to reject the donation. Please try again."; + } + + $stmt->close(); +} else { + $_SESSION['error_message'] = "Invalid donation ID."; +} + +header("Location: admin_dashboard.php"); +exit; +?> diff --git a/schedule_appointment.php b/schedule_appointment.php new file mode 100644 index 0000000..d62aba3 --- /dev/null +++ b/schedule_appointment.php @@ -0,0 +1,77 @@ +prepare("INSERT INTO appointments (donor_id, hospital_name, appointment_date) VALUES (?, ?, ?)"); + $stmt->bind_param("iss", $donor_id, $hospital_name, $appointment_date); + + if ($stmt->execute()) { + $success_message = "Appointment scheduled successfully."; + } else { + $error_message = "Failed to schedule the appointment."; + } + $stmt->close(); +} +?> + + + + + + + + Schedule Appointment + + + + + + +
+

Schedule Blood Donation Appointment

+ + + +
+ +
+ + + +
+ +
+ + +
+
+ + +
+ +
+ + +
+ + +
+
+ + + + + diff --git a/shristi.jpg b/shristi.jpg new file mode 100644 index 0000000..0a07115 Binary files /dev/null and b/shristi.jpg differ diff --git a/src/main/java/com/donateease/demo/DemoApplication.java b/src/main/java/com/donateease/demo/DemoApplication.java deleted file mode 100644 index ba3767a..0000000 --- a/src/main/java/com/donateease/demo/DemoApplication.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.donateease.demo; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class DemoApplication { - - public static void main(String[] args) { - SpringApplication.run(DemoApplication.class, args); - } - -} diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties deleted file mode 100644 index 2109a44..0000000 --- a/src/main/resources/application.properties +++ /dev/null @@ -1 +0,0 @@ -spring.application.name=demo diff --git a/src/test/java/com/donateease/demo/DemoApplicationTests.java b/src/test/java/com/donateease/demo/DemoApplicationTests.java deleted file mode 100644 index a498914..0000000 --- a/src/test/java/com/donateease/demo/DemoApplicationTests.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.donateease.demo; - -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; - -@SpringBootTest -class DemoApplicationTests { - - @Test - void contextLoads() { - } - -} diff --git a/thankyou.php b/thankyou.php new file mode 100644 index 0000000..755035f --- /dev/null +++ b/thankyou.php @@ -0,0 +1,108 @@ + + + + + + + + Thank You for Your Donation + + + + +
+
+

Thank You for Your Donation!

+

+ Your donation form has been successfully submitted. Below are the + details: +

+
+ +
+

+ Food Type: +

+

Quantity:

+

+ Preferred Pickup Time: +

+

+ Pickup Address: +

+

+ Additional Comments: +

+
+ + +
+ + + +