<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0">
	<title>Change Password | Admin Panel</title>

	<!-- Favicons -->
<link rel="shortcut icon" type="image/x-icon" href="../UserProfile/images/logo/logo.png">

	<!-- Bootstrap CSS -->
	<link rel="stylesheet" href="assets/plugins/bootstrap/css/bootstrap.min.css">

	<!-- Fontawesome CSS -->
	<link rel="stylesheet" href="assets/plugins/fontawesome/css/fontawesome.min.css">
	<link rel="stylesheet" href="assets/plugins/fontawesome/css/all.min.css">
	 
	<!-- Animate CSS -->
	<link rel="stylesheet" href="assets/css/animate.min.css">

	<!-- Main CSS -->
	<link rel="stylesheet" href="assets/css/admin.css">
		<!-- Datatables CSS -->
	<link rel="stylesheet" href="assets/plugins/datatables/datatables.min.css">

</head>

<body>
	<div class="main-wrapper">
	
		<!-- Header -->
	<?php include 'include/header.php'; ?>
		<!-- /Header -->
		
		<!-- Sidebar -->
		<?php include 'include/leftmenu.php'; ?>
		<!-- /Sidebar -->
		
		<div class="page-wrapper">
			<div class="content container-fluid">
			
				<!-- Page Header -->
				<div class="page-header">
					<div class="row">
						<div class="col">
							<h5 class="page-title text-white">Change Password-<?php echo $user_Loign=$_SESSION['admin_name']; ?></h5>
    					<p style="text-align: center;color: green;"> <?php echo $_REQUEST['msg'];?></p>
						</div>
						<div class="col-auto text-right">
							<!--<a class="btn btn-white filter-btn" href="javascript:void(0);" id="filter_search">-->
							<!--	<i class="fas fa-filter"></i>-->
							<!--</a>-->
						</div>
					</div>
				</div>
				<form action="Apk/ChangePassword" method="post" id="frm">
					<div class="card filter-card">
						<div class="card-body pb-0">
							<div class="row filter-row">
									<div class="col-sm-6 col-md-4">
									<div class="form-group">
										<label>Old Password</label>
										<input class="form-control" type="password" name="oldpassword" id="oldpassword" value="" required>
									</div>
								</div>
								<div class="col-sm-6 col-md-4">
									<div class="form-group">
										<label>New Password</label>
										<input class="form-control" type="password" name="newpassword" id="newpassword" value="" required>
									</div>
								</div>
                                <div class="col-sm-6 col-md-4">
									<div class="form-group">
										<label>Confirm Password</label>
										<input class="form-control" type="password" name="confirmpassword" id="confirmpassword" value="" required>
									</div>
								</div>
							    <div class="col-sm-6 col-md-3">
									<div class="form-group">
										<button class="btn btn-success btn-block" type="button" onClick="submitP()">Submit</button>
									</div>
								</div>
							</div>
						</div>
					</div>
				</form>
			
               	</div> 
	</div>
		</div> 
	</div>

	<!-- jQuery -->
	<script src="assets/js/jquery-3.5.0.min.js"></script>

	<!-- Bootstrap Core JS -->
	<script src="assets/js/popper.min.js"></script>
	<script src="assets/plugins/bootstrap/js/bootstrap.min.js"></script>

	<!-- Slimscroll JS -->
	<script src="assets/plugins/slimscroll/jquery.slimscroll.min.js"></script>
		<script src="assets/plugins/datatables/jquery.dataTables.min.js"></script>
	<script src="assets/plugins/datatables/datatables.min.js"></script> 

	<!-- Custom JS -->
	<script src="assets/js/admin.js"></script>
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
<script>
    function getOTP()
    {
        $(".btnotp").attr("disabled","true");
        var dataStringr="OTP";
        $.ajax({
             type: "POST",
             url: "UPIOtp.php",
             data: dataStringr,
             cache: false,
             success: function(status) {
                swal($.trim(status));
             }
             });
    }

function submitP()
{
    var oldpassword=$.trim($("#oldpassword").val());
    var newpassword=$.trim($("#newpassword").val());
    var confirmpassword=$.trim($("#confirmpassword").val());
    if(oldpassword=='')
    {
        alert("Fill Old Password");
        return;
    }
    else if(newpassword.length<6)
    {
        alert("Minimum Length is 6 Charactor ");
        return;
    }
    else if(confirmpassword=='')
    {
        alert("Fill Confirm Password ");
        return;
    }
    else if(newpassword!=confirmpassword)
    {
        alert("New Passowrd and Confirm Password not match ");
        return;        
    }
    else
    {
        $("#frm").submit();
    }
}
</script>
</body>

</html>


