Server IP : 103.53.40.154 / Your IP : 18.190.219.178 Web Server : Apache System : Linux md-in-35.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : ppcad7no ( 715) PHP Version : 8.2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0750) : /home2/ppcad7no/public_ftp/../ppcadsexpert.com/../adisgauges.com/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php include("site-header.php");?> <style> #error_style_pass{ color:white; font-size:13px; font-family:arial; background-color:#c32323; border-radius:7px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); box-sizing: border-box; padding:7px; margin-top:10px; width:280px; } .error_old_pass{ display:none; } .error_new_pass{ display:none; } .error_con_pass{ display:none; } </style> <?php $alert_msg=""; if(isset($_POST['pass_submit'])) { @extract($_REQUEST); $db_pas=db_scalar("select reg_pass from tbl_registration where reg_status='Active' and reg_id='$_SESSION[login_id]' "); if($db_pas==$old_pass) { if($db_pas==$new_pass) { $alert_msg="old_same"; }else { db_query("update tbl_registration set reg_pass='$new_pass' where reg_id='$_SESSION[login_id]'"); $alert_msg="done"; }} else { $alert_msg="error"; } } ?> <div class="page-content"> <div class="dlab-bnr-inr overlay-black-middle" style="background:url(<?=$site_url?>/images/inner-banner.jpg) no-repeat center; background-size:cover;"> <div class="container"> <div class="dlab-bnr-inr-entry"> <h1 class="text-white"> Change Password </h1> <ul class="list-inline"> <li><a href="<?=$site_url?>/index.html">Home</a></li> <li>|</li> <li> Change Password </li> </ul> </div> </div> </div> <div class="section-full content-inner bg-white contact-style-1"> <div class="container"> <div class="row"> <div class="col-md-3"></div> <div class="col-md-6 "> <?php if($alert_msg=="error"){?> <div class="alert alert-danger" role="alert"> <i class="fa fa-times-circle fa-lg" aria-hidden="true"></i> You entered wrong password ! </div> <?}?> <?php if($alert_msg=="old_same"){?> <div class="alert alert-danger" role="alert"> <i class="fa fa-times-circle fa-lg" aria-hidden="true"></i> New password should be different from old password ! </div> <?}?> <?php if($alert_msg=="done"){?> <div class="alert alert-success" role="alert"> <i class="fa fa-check-circle fa-lg" aria-hidden="true"></i> Password updated successfully. </div> <script type="text/javascript"> swal({title: "Successful", text: "Password Updated Successfully", showConfirmButton: true, allowEscapeKey : false, allowOutsideClick: false, type: "success"}, function(){ window.location.href='<?=$site_url?>/logout.html'; } ); </script> <?}?> <div class="p-a30 bg-gray clearfix m-b30 "> <h2>Change Password</h2> <div class="dzFormMsg"></div> <form action="" method="post" enctype="multipart/form-data" onsubmit="return checkValidationPass();" > <div class="row"> <div class="col-md-12"> <div class="form-group"> <div class="input-group"> <input type="password" class="form-control" placeholder="Enter current password" id="old_pass" name="old_pass" onkeyup="errOldPass();"> </div> <p id="error_style_pass" class="error_old_pass"></p> </div> </div> <div class="col-md-12"> <div class="form-group"> <div class="input-group"> <input type="password" class="form-control" placeholder="Enter new password" id="new_pass" name="new_pass" onkeyup="errNewPass();"> </div> <p id="error_style_pass" class="error_new_pass"></p> </div> </div> <div class="col-md-12"> <div class="form-group"> <div class="input-group"> <input type="password" class="form-control" placeholder="Enter confirm new password" id="con_pass" name="con_pass" onkeyup="errConPass();"> </div> <p id="error_style_pass" class="error_con_pass"></p> </div> </div> <div class="col-md-12"> <button name="pass_submit" id="pass_submit" type="submit" value="Submit" class="site-button "> <span>Submit</span> </button> </div> </div> </form> </div> </div> </div> </div> </div> </div> <?php include("site-footer.php");?> </div> </div> <script> function trimfield(str) { return str.replace(/^\s+|\s+$/g,''); } function checkValidationPass(){ var old_pass=document.getElementById("old_pass"); var new_pass=document.getElementById("new_pass"); var con_pass=document.getElementById("con_pass"); if(old_pass.value==""){ $('#old_pass').css({"border-color":"red"}); old_pass.focus(); $('.error_old_pass').fadeIn('slow'); $(".error_old_pass").html("Please enter your old password !"); return false; } if(new_pass.value==""){ $('#new_pass').css({"border-color":"red"}); new_pass.focus(); $('.error_new_pass').fadeIn('slow'); $(".error_new_pass").html("Please enter your new password !"); return false; } if(new_pass.value.length<8){ $('#new_pass').css({"border-color":"red"}); new_pass.focus(); $(".error_new_pass").html("Passwrod should be greater than 8 digit !"); $('.error_new_pass').fadeIn('slow'); return false; } if(con_pass.value==""){ $('#con_pass').css({"border-color":"red"}); con_pass.focus(); $('.error_con_pass').fadeIn('slow'); $(".error_con_pass").html("Please re-enter your password !"); return false; } if(new_pass.value!=con_pass.value){ $('#new_pass').css({"border-color":"red"}); $('#con_pass').css({"border-color":"red"}); con_pass.focus(); $('.error_con_pass').fadeIn('slow'); $(".error_con_pass").html("Password does not match !"); return false; } } function errOldPass(){ $('#old_pass').css({"border-color":"black"}); $('.error_old_pass').css({"display":"none"}); } function errNewPass(){ $('#new_pass').css({"border-color":"black"}); $('.error_new_pass').css({"display":"none"}); } function errConPass(){ $('#con_pass').css({"border-color":"black"}); $('.error_con_pass').css({"display":"none"}); } </script> <script src="<?=$site_url?>/js/jquery.min.js"></script> <script src="<?=$site_url?>/js/bootstrap.min.js"></script> <script src="<?=$site_url?>/js/bootstrap-select.min.js"></script> <script src="<?=$site_url?>/js/jquery.bootstrap-touchspin.js"></script> <script src="<?=$site_url?>/js/magnific-popup.js"></script> <script src="<?=$site_url?>/js/waypoints-min.js"></script> <script src="<?=$site_url?>/js/imagesloaded.js"></script> <script src="<?=$site_url?>/js/masonry-3.1.4.js"></script> <script src="<?=$site_url?>/js/masonry.filter.js"></script> <script src="<?=$site_url?>/js/owl.carousel.js"></script> <script src="<?=$site_url?>/js/custom.js"></script> <script src="<?=$site_url?>/js/dz.carousel.js"></script> <script src="<?=$site_url?>/js/switcher.min.js"></script> </body> </html>