SkidSec WebShell

Server Address : 2a02:4780:a:760:0:37cc:13e2:3

Web Server : LiteSpeed

Uname : Linux uk-fast-web660.main-hosting.eu 5.14.0-570.55.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Oct 21 05:27:51 EDT 2025 x86_64

PHP Version : 7.4.33



Current Path : /home/u936121314/public_html/ec/



Current File : /home/u936121314/public_html/ec/forget_password.php
<?php 
require 'top.php';
if(isset($_SESSION['USER_LOGIN']) && $_SESSION['USER_LOGIN']=='yes'){
	?>
		<script>
			window.location.href="my_order.php";
		</script> 
	<?php
}
?>
  <!-- Start Bradcaump area -->
  <div class="ht__bradcaump__area" style="background: rgba(0, 0, 0, 0) url(images/bg/4.jpg) no-repeat scroll center center / cover ;">
            <div class="ht__bradcaump__wrap">
                <div class="container">
                    <div class="row">
                        <div class="col-xs-12">
                            <div class="bradcaump__inner">
                                <nav class="bradcaump-inner">
                                  <a class="breadcrumb-item" href="index.php">Home</a>
                                  <span class="brd-separetor"><i class="zmdi zmdi-chevron-right"></i></span>
                                  <span class="breadcrumb-item active">Forgot Password</span>
                                </nav>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- End Bradcaump area -->
        <!-- Start Contact Area -->
		<section class="htc__contact__area ptb--100 bg__white">
			<div class="container">
				<div class="row">
					<div class="col-md-12">
						<div class="contact-form-wrap mt--60">
							<div class="col-xs-12">
								<div class="contact-title">
									<h2 class="title__line--6">Forgot Password</h2>
								</div>
							</div>
							<div class="col-xs-12">
								<form id="login-form" method="post">
									<div class="single-contact-form">
										<div class="contact-box name">
											<input type="text" name="email" id="email" placeholder="Your Email*" style="width:70%">
										</div>
										<span class="feild_error" id="email_error"></span>
										<div class="contact-btn">
											<button type="button" onclick="email_sent_otp()" class="fv-btn email_sent_otp">Send OTP</button>
										</div>
									</div>
									<div class="single-contact-form">
										<div class="contact-box name">
											<input type="text" class="email_verify_otp" name="email_otp" id="email_otp" placeholder="6 - digit OTP" style="width:70%" maxlength=6>
											<span id="email_otp_result"></span>
										</div>
										<span class="feild_error" id="verify_email_error"></span>
										<div class="contact-btn">
											<button type="button" onclick="email_verify_otp()" class="fv-btn email_verify_otp">Verify</button>
										</div>
									</div>
									<div class="single-contact-form update_password">
										<div class="contact-box name">
                                            <input type="password" class="new_password" name="password" id="password" placeholder="New Password*" style="width:70%">
										</div>
										<span class="feild_error" id="password_result"></span>
                                        <span class="feild_error" id="password_error"></span>
										<div class="contact-btn">
											<button type="button" id="update_btn" class="fv-btn new_password" onclick="update_password()" >Update</button>
										</div>
									</div>
								</form>
								<div class="form-output login_msg">
									<p class="form-messege feild_error"></p>
								</div>
							</div>
						</div> 
					</div>
				</div>
			</div>
        </section>
        <!-- End Contact Area -->
		<script>
			function email_sent_otp(){
				jQuery('#email_error').html("");
				var email = jQuery('#email').val();
				if (email==''){
					jQuery('#email_error').html("Please enter Email");
				}
				else{
					jQuery('.email_sent_otp').html("Wait...");
					jQuery('.email_sent_otp').attr('disabled',true);
					jQuery.ajax({
						url:'send_otp.php',
						type:'post',
						data:'email='+email+'&type=forgot',
						success:function(result){
							if(result=='done'){
								jQuery('#email').attr('disabled',true);
								jQuery('.email_verify_otp').show();
								jQuery('.email_sent_otp').hide();
							}
							else if(result=="not_found"){
								jQuery('#email_error').html('Email Id not registered!')
								jQuery('.email_sent_otp').attr('disabled',false);
								jQuery('.email_sent_otp').html("Send OTP");
							}
							else{
								jQuery('.email_sent_otp').attr('disabled',false);
								jQuery('#email_error').html("Try again Later");
							}
						}
					});

				}
			}
			function email_verify_otp(){
				jQuery('#verify_email_error').html("");
				jQuery('#email_error').html("");
				var otp = jQuery('#email_otp').val();
				if (otp==''){
					jQuery('#email_error').html("Please enter OTP");
				}
				else{
					jQuery.ajax({
					url:'check_otp.php',
					type:'post',
					data:'otp='+otp+'&type=email',
					success:function(result){
							if(result=='done'){
								jQuery('.email_verify_otp').hide();
								jQuery('#email_otp_result').html("Verified");
								jQuery('.update_password').show();
							}
							else{
								jQuery('#verify_email_error').html("Invalid OTP!");
							}
						}
					});
				}
			}
			function update_password(){
				jQuery('#email_otp_result').html("");
				jQuery('.new_password').attr('disabled',true)
				jQuery('#password_error').html("");
				var password = jQuery('#password').val();
				var email = jQuery('#email').val();
				if (password==''){
					jQuery('#password_error').html("Please enter password");
				}
				else{
					jQuery.ajax({
					url:'update_password.php',
					type:'post',
					data:'password='+password+'&email='+email+'&type=update',
					success:function(result){
							if(result=='done'){
								jQuery('#update_btn').hide();
								jQuery('#password_result').html("Password updated successfully. Login with new credentials");
							}
							else{
								jQuery('#password_error').html("Try again later");
							}
						}
					});
				}
			}
		</script>
<?php require 'footer.php';?>