System: Windows NT WINDOWS18 10.0 build 17763 (Windows Server 2016) AMD64 | User: IWPD_3544(appclien)
Path: D:\Inetpub\vhosts\appclients.in\fruits-vegitables.nmvm.org
[Back to List]
<?php
include "includes/main-action.php";
$obj=new admin_main();
$sel_cs=$obj->select_all("menu","order by menu_id");
$sel_banner_top=$obj->select_all("adv_tbl1","order by adv_id desc limit 1");
$sel_banner_right=$obj->select_all("adv_tbl3","order by adv_id desc limit 2");
$sel_slider=$obj->select_all("adv_tbl2","order by adv_id desc");
//reset password
if(isset($_POST['ResetPassword'])){
require('phpmailer/class.phpmailer.php');
$otpIs = date('shi');
$_SESSION['custOTP']=$otpIs;
$_SESSION['number']=$_REQUEST['mobile'];
$email=$_REQUEST['mobile'];
$message='Your Otp Is '.$otpIs.' from samratcreative.com<br><br>';
$mail = new PHPMailer;
$mail->IsSMTP(); // Set mailer to use SMTP
$mail->Host = "samratcreative.com"; // Specify main and backup server
//$mail->Host = "Give IP Address"; // If the above does not work.
$mail->Port = 25; // Set the SMTP port
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = "order@samratcreative.com"; // SMTP username
$mail->Password = "Admin@@##$$01234"; // SMTP password
//$mail->SMTPSecure = "ssl"; // Enable encryption, 'ssl' also accepted
$mail->From = 'order@samratcreative.com';
$mail->FromName = 'Samratcreative';
$mail->AddAddress($email); // Add a recipient
$mail->IsHTML(true);
//send mail to customer
$sendmail_customer = $mail->AddAddress($email);
$mail->Subject = "Order Otp Is samratcreative.com";
$mail->Body = $message;
$mail->Send();
echo "<script>alert('OTP has sent to your resistered Email Id')</script>";
echo "<script>window.location='https://samratcreative.com/pass-forgot.php'</script>";
}
if(isset($_POST['changePass'])){
if($_POST['otpIS']==$_SESSION['custOTP']){
$respass = $_POST['password'];
mysqli_query($con,"UPDATE register SET cpassword='$respass' where cemail='$_SESSION[number]'");
unset($_SESSION['custID']);
unset($_SESSION['custOTP']);
echo "<script>alert('Your password has reset successfully!')</script>";
echo "<script>window.location='login.php'</script>";
}else{
echo "<script>alert('OTP does not matches,please try again.')</script>";
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Basic page needs
============================================ -->
<title><?php include('title.php')?> Reset Your Password</title>
<meta charset="utf-8">
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta name="author" content="">
<meta name="robots" content="index, follow" />
<!-- Mobile specific metas
============================================ -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<!-- Favicon
============================================ -->
<link rel="shortcut icon" type="image/png" href="<?php echo $url?>image/icon/favicon.png"/>
<!-- Libs CSS
============================================ -->
<link rel="stylesheet" href="<?php echo $url?>css/bootstrap/css/bootstrap.min.css">
<link href="<?php echo $url?>css/font-awesome/css/font-awesome.min.css" rel="stylesheet">
<link href="<?php echo $url?>js/datetimepicker/bootstrap-datetimepicker.min.css" rel="stylesheet">
<link href="<?php echo $url?>js/owl-carousel/owl.carousel.css" rel="stylesheet">
<link href="<?php echo $url?>css/themecss/lib.css" rel="stylesheet">
<link href="<?php echo $url?>js/jquery-ui/jquery-ui.min.css" rel="stylesheet">
<link href="<?php echo $url?>js/minicolors/miniColors.css" rel="stylesheet">
<!-- Theme CSS
============================================ -->
<link href="<?php echo $url?>css/themecss/so_searchpro.css" rel="stylesheet">
<link href="<?php echo $url?>css/themecss/so_megamenu.css" rel="stylesheet">
<link href="<?php echo $url?>css/themecss/so-categories.css" rel="stylesheet">
<link href="<?php echo $url?>css/themecss/so-listing-tabs.css" rel="stylesheet">
<link href="<?php echo $url?>css/themecss/so-category-slider.css" rel="stylesheet">
<link href="<?php echo $url?>css/themecss/so-newletter-popup.css" rel="stylesheet">
<link href="<?php echo $url?>css/footer/footer2.css" rel="stylesheet">
<link href="<?php echo $url?>css/header/header2.css" rel="stylesheet">
<link id="color_scheme" href="<?php echo $url?>css/home2.css" rel="stylesheet">
<link href="<?php echo $url?>css/responsive.css" rel="stylesheet">
<!-- Google web fonts
============================================ -->
<link href='https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700' rel='stylesheet' type='text/css'>
<style type="text/css">
body{font-family:'Poppins', sans-serif}
</style>
</head>
<body class="common-home res layout-2">
<div id="wrapper" class="wrapper-fluid banners-effect-7">
<!-- Header Container -->
<?php include "includes/topbar.php";?>
<!-- //Header Top -->
<!-- Header center -->
<?php include "includes/searchbar.php";?>
<!-- //Header center -->
<!-- Header Bottom -->
<?php include "includes/navbar.php";?>
</header>
<!-- Main Container -->
<div class="main-container container">
<ul class="breadcrumb">
<li><a href="<?php echo $url?>"><i class="fa fa-home"></i></a></li>
<li><a href="<?php echo $url?>#">Account</a></li>
<li><a href="<?php echo $url?>#">Login</a></li>
</ul>
<div class="row">
<div id="content" class="col-sm-12">
<div class="page-login">
<div class="account-border">
<div class="row">
<div class="col-sm-3"></div>
<div class="col-sm-6 customer-login">
<?php if(isset($_SESSION['custOTP']) && !empty($_SESSION['custOTP'])){?>
<form method="post" name="formReg">
<div class="well">
<h2><i class="fa fa-lock" aria-hidden="true"></i> Reset Your Password</h2>
<div class="form-group">
<label class="control-label " for="input-email">Enter OTP</label>
<input type="text" name="otpIS" class="form-control" autocomplete="off"/>
</div>
<div class="form-group">
<label class="control-label " for="input-password">Create a new Password</label>
<input type="password" name="password" id="input-password" class="form-control" autocomplete="off"/>
</div>
<div class="form-group">
<label class="control-label " for="input-password">Confirm Password</label>
<input type="password" name="confirmPass" value="" id="input-password" class="form-control" autocomplete="off"/>
</div>
</div>
<div class="bottom-form">
<a href="<?php echo $url?>register.php" class="forgot">Create a new account?</a>
<a href="<?php echo $url?>login.php" class="forgot">Login</a>
<input type="submit" value="Submit" name="changePass" class="btn btn-default pull-right" onClick="return checkFormValidation2()" />
</div>
</form>
<script>
function checkFormValidation2(){
if(document.formReg.otpIS.value==''){
alert("Enter OTP");
document.formReg.otpIS.focus();
return false;
}
if(document.formReg.password.value==''){
alert("Enter Your Password");
document.formReg.password.focus();
return false;
}
if(document.formReg.password.value!=document.formReg.confirmPass.value){
alert("Password and Confirm Password does not matches.");
document.formReg.confirmPass.focus();
return false;
}
else{
return true;
}
}
</script>
<?php }else{?>
<form method="post" name="formReg1">
<div class="well">
<h2><i class="fa fa-lock" aria-hidden="true"></i> Reset Your Password</h2>
<div class="form-group">
<label class="control-label " for="input-email">Enter Email Id</label>
<input type="email" name="mobile" class="form-control" />
</div>
</div>
<div class="bottom-form">
<a href="<?php echo $url?>register.php" class="forgot">Create a new account?</a>
<a href="<?php echo $url?>login.php" class="forgot">Login</a>
<input type="submit" value="Submit" name="ResetPassword" class="btn btn-default pull-right" onClick="return checkFormValidation1()" />
</div>
</form>
<!-----ajax to submit job category and profile for--->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="https://medisius.com/js/jquery.ui.shake.js"></script>
<script>
function checkFormValidation1(){
var phoneno = /^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/;
var mobileNo = document.getElementById('mobile').value;
if(mobileNo==''){
alert('Please enter Email Id');
document.getElementById('mobile').focus();
return false;
}else if(mobileNo.match(phoneno)){
var myData = 'mobileNo='+mobileNo;
//alert(mobileNo);
jQuery.ajax({
type: "POST", // HTTP method POST or GET
url: "checkRmobile.php", //Where to make Ajax calls
dataType:"text", // Data type, HTML, json etc.
data:myData, //Form variables
success:function(response){
//alert(response);
//reg("#responds").append(response);
if(response == "success"){
return true;
}
if(response == "mobileNotExists"){
alert('Your Email Id is not registered');
}
},
error:function (xhr, ajaxOptions, thrownError){
reg("#submitbtn").show(); //show submit button
reg("#LoadingImage").hide(); //hide loading image
alert(thrownError);
}
});
}else{
alert("Please Email Id number");
return false;
}
}//close of function
</script>
<?php }?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br/>
<br/>
<!-- //Main Container -->
<!-- Footer Container -->
<?php include "includes/footer.php" ?>
<!-- Include Libs & Plugins
============================================ -->
<!-- Placed at the end of the document so the pages load faster -->
<script type="text/javascript" src="<?php echo $url?>js/jquery-2.2.4.min.js"></script>
<script type="text/javascript" src="<?php echo $url?>js/bootstrap.min.js"></script>
<script type="text/javascript" src="<?php echo $url?>js/owl-carousel/owl.carousel.js"></script>
<script type="text/javascript" src="<?php echo $url?>js/slick-slider/slick.js"></script>
<script type="text/javascript" src="<?php echo $url?>js/themejs/libs.js"></script>
<script type="text/javascript" src="<?php echo $url?>js/unveil/jquery.unveil.js"></script>
<script type="text/javascript" src="<?php echo $url?>js/countdown/jquery.countdown.min.js"></script>
<script type="text/javascript" src="<?php echo $url?>js/dcjqaccordion/jquery.dcjqaccordion.2.8.min.js"></script>
<script type="text/javascript" src="<?php echo $url?>js/datetimepicker/moment.js"></script>
<script type="text/javascript" src="<?php echo $url?>js/datetimepicker/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="<?php echo $url?>js/jquery-ui/jquery-ui.min.js"></script>
<!-- Theme files
============================================ -->
<script type="text/javascript" src="<?php echo $url?>js/themejs/homepage.js"></script>
<script type="text/javascript" src="<?php echo $url?>js/themejs/so_megamenu.js"></script>
<script type="text/javascript" src="<?php echo $url?>js/themejs/addtocart.js"></script>
<script type="text/javascript" src="<?php echo $url?>js/themejs/application.js"></script>
<!-- -->
</body>
</html>