One Hat Cyber Team
Your IP :
216.73.216.186
Server IP :
88.222.243.152
Server :
Linux in-mum-web1837.main-hosting.eu 5.14.0-503.34.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Mar 27 06:00:50 EDT 2025 x86_64
Server Software :
LiteSpeed
PHP Version :
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
u322583024
/
domains
/
awaha.in
/
public_html
/
Edit File:
register.php
<?php session_start(); include 'admin/connection.inc.php'; if ($_SERVER['REQUEST_METHOD'] === 'POST') { $name = $conn->real_escape_string($_POST['name']); $email = $conn->real_escape_string($_POST['email']); $password = $conn->real_escape_string($_POST['password']); $confirm_password = $conn->real_escape_string($_POST['confirm_password']); $role = 'Customer'; // Default role for new users // Check if the email already exists $checkEmailQuery = "SELECT id FROM users WHERE email = '$email'"; $result = $conn->query($checkEmailQuery); if ($result->num_rows > 0) { // Email already exists - Show SweetAlert and redirect echo "<script src='https://cdn.jsdelivr.net/npm/sweetalert2@11'></script>"; echo "<script> document.addEventListener('DOMContentLoaded', function() { Swal.fire({ icon: 'error', title: 'Oops...', text: 'Email already exists. Please use a different email.', confirmButtonText: 'OK' }).then(function() { window.location.href = 'register.php'; }); }); </script>"; exit; } // Validate password match if ($password !== $confirm_password) { echo "<script src='https://cdn.jsdelivr.net/npm/sweetalert2@11'></script>"; echo "<script> document.addEventListener('DOMContentLoaded', function() { Swal.fire({ icon: 'error', title: 'Oops...', text: 'Password and Confirm Password do not match.', confirmButtonText: 'OK' }).then(function() { window.location.href = 'register.php'; }); }); </script>"; exit; } // Hash password for security $hashed_password = password_hash($password, PASSWORD_DEFAULT); // Insert user into the database $sql = "INSERT INTO users (name, email, password, role) VALUES ('$name', '$email', '$hashed_password', '$role')"; if ($conn->query($sql) === TRUE) { echo "<script src='https://cdn.jsdelivr.net/npm/sweetalert2@11'></script>"; echo "<script> document.addEventListener('DOMContentLoaded', function() { Swal.fire({ icon: 'success', title: 'Registration Successful!', text: 'You can now log in.', confirmButtonText: 'OK' }).then(function() { window.location.href = 'login.php'; }); }); </script>"; } else { echo "<script src='https://cdn.jsdelivr.net/npm/sweetalert2@11'></script>"; echo "<script> document.addEventListener('DOMContentLoaded', function() { Swal.fire({ icon: 'error', title: 'Error', text: '" . $conn->error . "', confirmButtonText: 'OK' }).then(function() { window.location.href = 'register.php'; }); }); </script>"; } // Close the connection $conn->close(); } ?> <!DOCTYPE html> <html lang="zxx"> <head> <!--====== Required meta tags ======--> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <meta name="description" content="eCommerce,shop,fashion"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <!--====== Title ======--> <title>Awaha</title> <!--====== Favicon Icon ======--> <link rel="shortcut icon" href="assets/images/logo/awaha.png" type="image/png"> <!--====== Google Fonts ======--> <link href="https://fonts.googleapis.com/css2?family=Aoboshi+One&family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap" rel="stylesheet"> <!--====== Flaticon css ======--> <link rel="stylesheet" href="assets/fonts/flaticon/flaticon_pesco.css"> <!--====== FontAwesome css ======--> <link rel="stylesheet" href="assets/fonts/fontawesome/css/all.min.css"> <!--====== Bootstrap css ======--> <link rel="stylesheet" href="assets/vendor/bootstrap/css/bootstrap.min.css"> <!--====== Slick-popup css ======--> <link rel="stylesheet" href="assets/vendor/slick/slick.css"> <!--====== Nice Select css ======--> <link rel="stylesheet" href="assets/vendor/nice-select/css/nice-select.css"> <!--====== Magnific-popup css ======--> <link rel="stylesheet" href="assets/vendor/magnific-popup/dist/magnific-popup.css"> <!--====== Jquery UI css ======--> <link rel="stylesheet" href="assets/vendor/jquery-ui/jquery-ui.min.css"> <!--====== Animate css ======--> <link rel="stylesheet" href="assets/vendor/aos/aos.css"> <!--====== Default css ======--> <link rel="stylesheet" href="assets/css/default.css"> <!--====== Style css ======--> <link rel="stylesheet" href="assets/css/style.css"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css"> <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <style> body { font-family: 'Poppins', sans-serif; background-color: #f8f9fa; } .main-bg { padding-top: 60px; padding-bottom: 80px; } .section-title h2 { font-size: 2.5rem; color: #333; } .section-title p { color: #777; font-size: 1rem; } .form-container { background: #fff; border-radius: 12px; padding: 30px; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); } .form-title { font-size: 1.8rem; color: #333; } .form-label { font-size: 1rem; color: #555; } .form-control { border: 1px solid #ddd; padding: 12px 20px; font-size: 1rem; background-color: #f7f7f7; transition: all 0.3s ease; } .form-control:focus { background-color: #fff; border-color: #007bff; outline: none; box-shadow: 0 0 5px rgba(0, 123, 255, 0.5); } .btn-primary { background-color: #af8791 !important; border: none; transition: all 0.3s ease; } .btn-primary:hover { background-color: #2575fc; box-shadow: 0 4px 10px rgba(37, 117, 252, 0.3); } a { text-decoration: none; } a:hover { text-decoration: underline; } .shadow-lg { box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1); } </style> <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css" rel="stylesheet"> </head> <body> <!--====== Start Overlay ======--> <div class="offcanvas__overlay"></div> <!--====== Start Sidemenu-wrapper-cart Area ======--> <div class="sidemenu-wrapper-cart"> <div class="sidemenu-content"> <div class="widget widget-shopping-cart"> <h4>My cart</h4> <div class="sidemenu-cart-close"><i class="far fa-times"></i></div> <div class="widget-shopping-cart-content"> <ul class="pesco-mini-cart-list"> <li class="sidebar-cart-item"> <a href="#" class="remove-cart"><i class="far fa-trash-alt"></i></a> <a href="#"> <img src="assets/images/products/cart-1.jpg" alt="cart image"> leggings with mesh panels </a> <span class="quantity">1 × <span><span class="currency">$</span>940.00</span></span> </li> <li class="sidebar-cart-item"> <a href="#" class="remove-cart"><i class="far fa-trash-alt"></i></a> <a href="#"> <img src="assets/images/products/cart-2.jpg" alt="cart image"> Summer dress with belt </a> <span class="quantity">1 × <span><span class="currency">$</span>940.00</span></span> </li> <li class="sidebar-cart-item"> <a href="#" class="remove-cart"><i class="far fa-trash-alt"></i></a> <a href="#"> <img src="assets/images/products/cart-3.jpg" alt="cart image"> Floral print sundress </a> <span class="quantity">1 × <span><span class="currency">$</span>940.00</span></span> </li> <li class="sidebar-cart-item"> <a href="#" class="remove-cart"><i class="far fa-trash-alt"></i></a> <a href="#"> <img src="assets/images/products/cart-4.jpg" alt="cart image"> Sheath Gown Red Colors </a> <span class="quantity">1 × <span><span class="currency">$</span>940.00</span></span> </li> </ul> <div class="cart-mini-total"> <div class="cart-total"> <span><strong>Subtotal:</strong></span> <span class="amount">1 × <span><span class="currency">$</span>940.00</span></span> </div> </div> <div class="cart-button-box"> <a href="checkout.html" class="theme-btn style-one">Proceed to checkout</a> </div> </div> </div> </div> </div><!--====== End Sidemenu-wrapper-cart Area ======--> <!--====== Start Header Section ======--> <?php include 'header.php' ?> <!--====== End Header Section ======--> <!--====== Main Bg ======--> <main class="main-bg"> <section class="work-processing-section py-5"> <div class="container"> <div class="row"> <div class="col-lg-12"> <!-- Section Title --> <div class="section-title text-center mb-5"> <h2 class="display-4 fw-bold">Welcome</h2> <p class="text-muted">Your journey begins here. Register or log in to explore.</p> </div> </div> </div> <div class="row align-items-center shadow-lg rounded" style="background: #fff; overflow: hidden;"> <div class="col-lg-12"> <div class="row"> <!-- Registration Form --> <div class="col-lg-6 col-12 p-5"> <form id="registerForm" action="register.php" method="POST"> <div class="mb-3"> <label for="name" class="form-label">Full Name</label> <input type="text" class="form-control" id="name" name="name" required> </div> <div class="mb-3"> <label for="email" class="form-label">Email Address</label> <input type="email" class="form-control" id="email" name="email" required> </div> <div class="mb-3"> <label for="password" class="form-label">Password</label> <input type="password" class="form-control" id="password" name="password" required> </div> <div class="mb-3"> <label for="confirm_password" class="form-label">Confirm Password</label> <input type="password" class="form-control" id="confirm_password" name="confirm_password" required> </div> <button type="submit" class="btn btn-primary">Register</button> </form> </div> <!-- Additional Content --> <div class="col-lg-6 col-12 p-5 bg-light"> <h3 class="fw-bold mb-4">Why Join Us?</h3> <ul class="list-unstyled"> <li class="mb-3"> <i class="bi bi-check-circle text-success me-2"></i> Discover premium-quality soaps crafted with minimal chemicals. </li> <li class="mb-3"> <i class="bi bi-check-circle text-success me-2"></i> Gentle on skin, suitable for all skin types. </li> <li class="mb-3"> <i class="bi bi-check-circle text-success me-2"></i> Eco-friendly packaging to reduce environmental impact. </li> <li class="mb-3"> <i class="bi bi-check-circle text-success me-2"></i> A wide range of delightful fragrances to choose from. </li> <li class="mb-3"> <i class="bi bi-check-circle text-success me-2"></i> Transparent ingredient list for informed choices. </li> <li class="mb-3"> <i class="bi bi-check-circle text-success me-2"></i> Exclusive discounts and offers for registered members. </li> <li class="mb-3"> <i class="bi bi-check-circle text-success me-2"></i> Personalized recommendations based on your preferences. </li> <li class="mb-3"> <i class="bi bi-check-circle text-success me-2"></i> Support a brand that values sustainability and customer well-being. </li> </ul> <p class="mt-4">Already have an account? <a href="login.php" class="text-primary fw-bold">Log in here</a>. </p> </div> </div> </div> </div> </div> </section> </main> <!--====== Start Footer Main ======--> <?php include 'footer.php' ?> <!-- SweetAlert CDN --> <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script> <script> document.addEventListener('DOMContentLoaded', function () { const registerForm = document.getElementById('registerForm'); registerForm.addEventListener('submit', function (e) { e.preventDefault(); // Prevent default form submission const name = document.getElementById('name').value; const email = document.getElementById('email').value; const password = document.getElementById('password').value; const confirmPassword = document.getElementById('confirm_password').value; if (password !== confirmPassword) { Swal.fire({ icon: 'error', title: 'Oops...', text: 'Password and confirm password do not match', confirmButtonText: 'OK' }); return; } // You can now submit the form manually via AJAX or regular form submission registerForm.submit(); }); }); </script> <!--====== End Footer Main ======--> <!--====== Back To Top ======--> <div class="back-to-top" ><i class="far fa-angle-up"></i></div> <!--====== Jquery js ======--> <script src="assets/vendor/jquery-3.7.1.min.js"></script> <!--====== Bootstrap js ======--> <script src="assets/vendor/popper/popper.min.js"></script> <!--====== Bootstrap js ======--> <script src="assets/vendor/bootstrap/js/bootstrap.min.js"></script> <!--====== Slick js ======--> <script src="assets/vendor/slick/slick.min.js"></script> <!--====== Magnific js ======--> <script src="assets/vendor/magnific-popup/dist/jquery.magnific-popup.min.js"></script> <!--====== Nice-select js ======--> <script src="assets/vendor/nice-select/js/jquery.nice-select.min.js"></script> <!--====== Jquery Ui js ======--> <script src="assets/vendor/jquery-ui/jquery-ui.min.js"></script> <!--====== SimplyCountdown js ======--> <script src="assets/vendor/simplyCountdown.min.js"></script> <!--====== Aos js ======--> <script src="assets/vendor/aos/aos.js"></script> <!--====== Main js ======--> <script src="assets/js/theme.js"></script> </body> <!-- Mirrored from html.pixelfit.agency/pesco/about-us.html by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 13 Jan 2025 07:39:14 GMT --> </html>
Simpan