[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: sign.php
<?php error_reporting(0); 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 = test_input($_POST['full_name']); $username = test_input($_POST['username']); $business_name = test_input($_POST['business_name']); $phone = test_input($_POST['phone']); $location = test_input($_POST['location']); $country = test_input($_POST['country']); $currency = test_input($_POST['currency']); $password = test_input($_POST['password']); $confirm_password = test_input($_POST['confirm_password']); $email = test_input($_POST['email']); $countryCode = test_input($_POST['countryCode']); $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($email == $mail){ // $login_message = "<p class='alert alert-danger text-center ' role='alert'>Email already exist</p>"; // } if($email == ""){ $login_message = "<p class='alert alert-danger text-center ' role='alert'>Email already exist</p>"; } // if($password ==""){ // $login_message = "<p class='alert alert-danger text-center ' role='alert'>Password is required</p>"; // } if($confirm_password==""){ // $login_message = "<p class='alert alert-danger text-center ' role='alert'>Confirm is required</p>"; // } // if(!filter_var($email, FILTER_VALIDATE_EMAIL)) { // $login_message = "<p class='alert alert-danger text-center ' role='alert'>Invalid email format</p>"; // } // if($password != $confirm_password){ // $login_message = "<p class='alert alert-danger text-center ' role='alert'>Password do not match</p>"; // } // if($phone == ""){ // $login_message = "<p class='alert alert-danger text-center ' role='alert'>Phone number is required</p>"; // } // if($location == ""){ // $login_message = "<p class='alert alert-danger text-center ' role='alert'>Location is required</p>"; // } // if($email==""){ // $login_message = "<p class='alert alert-danger text-center ' role='alert'>Email is required</p>"; // } // if($business_name==""){ // $login_message = "<p class='alert alert-danger text-center ' role='alert'>Shop Name is required</p>"; // } // if($full_name == ""){ // $login_message = "<p class='alert alert-danger text-center ' role='alert'>Full name is required</p>"; // } // if($username == ""){ // $login_message = "<p class='alert alert-danger text-center ' role='alert'>Username is required</p>"; // } else{ $randomString = generateRandomString(5); // Change the length as needed $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 . ' + 14 days')); $finalnumber = $countryCode.''.$phone; $sms_message = "Hello $business_name,your verification code is $randomString"; $_SESSION['sms_code'] = $randomString; $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => 'https://sms.arkesel.com/api/v2/sms/send', CURLOPT_HTTPHEADER => ['api-key: Y1B1a1VaYXBEc3lDVnFCZnZxam8'], CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => http_build_query([ 'sender' => 'SalonFriend', 'message' => $sms_message, 'recipients' => [$finalnumber] ]), ]); $response = curl_exec($curl); curl_close($curl); if($response == true){ $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,$randomString,$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"; $add = 0; $delete = 0; $update = 0; foreach ($checkbox_value as $value) { $querye = 'insert into `role_permissions`(`page_name`, `status`, `business_name`, `type`, `add`, `updaterecord`, `deleterecord`) VALUES ("'.$value.'","'.$status.'","'.$convertedString.'","'.$account_type2.'","'.$add.'","'.$update.'","'.$delete.'")'; $stmt = mysqli_query($new, $querye); // if(!$stmt){ // die("QUERY FAILED" . mysqli_error($new)); // } } header("Location : verify"); } $subject = "Welcome to thesalonfriend"; $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;'> Hello ".$business_name."<br/>, Welcome to thesalonfriend! We are thrilled to have you on board and are excited to see you become part of our community. Thank you for choosing thesalonfriend. We're committed to providing you with a fantastic experience, and we can't wait to see all the amazing things you'll accomplish on our platform. Once again, welcome aboard! If you have any questions or need assistance, feel free to contact us anytime. Best regards,<br/> Thesalonfriend Team<br/> https://thesalonfriend.com <br/> support@thesalonfriend.com </td> </tr> <tr> </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()){ }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"></script> <!-- CSS Implementing Plugins --> <link rel="stylesheet" href="assets/vendor/bootstrap-icons/font/bootstrap-icons.css"> <link rel="shortcut icon" href="../assets/icon.png" type="image/x-icon"> <link rel="icon" href="../assets/icon.png" type="image/x-icon"> <!-- 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" id="formValidation" name="formValidation"> <?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="full_name" placeholder="First name"> </div> <!-- End Form --> </div> <div class="col-sm-6"> <!-- Form --> <div class="mb-6"> <input type="text" name="username" id="username" class="form-control form-control-lg" placeholder="Last name" autocomplete="off"> </div> <!-- End Form --> </div> </div> <div class="row"> <div class="col-sm-6"> <!-- Form --> <div class="mb-6"> <select class="form-control" id="country_select" name="country"> <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"> <input type="text" class="form-control" placeholder="country code" 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="row"> <div class="col-sm-6"> <!-- Form --> <div class="mb-6"> <label class="form-label">Business location</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> <!-- End Form --> </div> <div class="col-sm-6"> <!-- Form --> <div class="mb-6"> <label class="form-label">Select Currency</label> <select class="form-control" name="currency" required> <option value=""> Select Currency</option> <?php $so = mysqli_query($new,"SELECT distinct currency FROM countries "); while($fetch = mysqli_fetch_array($so)){ ?> <option value="<?php echo $fetch['currency'];?>"> <?php echo $fetch['currency'];?></option> <?php }?> </select> </div> <!-- End Form --> </div> </div> <div class="mb-6"> <label class="form-label" for="signupSrEmail">Email address</label> <input type="email" class="form-control form-control-lg" name="email" id="signupSrEmail" placeholder="Email address" required autocomplete="off"> <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 " 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-sm" style="width: 30%;">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 type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.5/jquery.validate.min.js"></script> <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 type="text/javascript"> $("#formValidation").validate({ rules:{ full_name:{ notEmpty: { message: 'Please type your lanquage you speak' } } }, submitHandler: function(form) { form.submit(); } }); </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.71 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