<?php include_once('header.php'); 

if(!empty($_POST['newpassword']))
$pass=change_password();
?>

<!-- START SECTION TOP -->
	<section class="section-top">
		<div class="container">
			<div class="col-lg-10 offset-lg-1 text-center">
				<div class="section-top-title wow fadeInRight" data-wow-duration="1s" data-wow-delay="0.3s" data-wow-offset="0">
					<h1>Change Password Page</h1>
					<ul>
						<li><a href="dashboard.php">Dashboard</a></li>
						<li> / Change Password</li>
					</ul>
				</div><!-- //.HERO-TEXT -->
			</div><!--- END COL -->
		</div><!--- END CONTAINER -->
	</section>	
	<!-- END SECTION TOP -->
    
     <?php
		  if(!empty($_GET['fail']))
		  {
		  ?>
          	<div class="alert alert-danger w-50 container mt-4" align="center"><strong style="color:black"> <centrer> Invalid Old Password </strong> </center> </div>
            <?php
			}
			if(!empty($_GET['succ']))
		  {
		  ?>
          	<div class="alert alert-success w-50 container mt-4" align="center"><strong style="color:black"> <centrer> Password Changed Successfully </strong> </center></div>
            <?php
			}
			?>

	<!-- START LOGIN -->
	<section class="login_register section-padding">
		<div class="container">
			<div class="row">
            	 <form method="post" action="<?php $_SERVER['PHP_SELF']; ?>" id="form1" enctype="multipart/form-data" onSubmit="return validate_change_password();">				
				<div class="col-lg-6 offset-lg-3 col-xs-12">
					<div class="login">
						<div class="form-group">
							<label for="">Old Password</label> <div class="err"></div>
							 <input name="oldpassword" type="password" class="form-control" id="oldpassword">
						</div>
						<div class="form-group">
							<label for="">New Password</label>  <div class="err"></div>
							 <input name="newpassword" type="password" class="form-control col-md-8" id="newpassword">
						</div>
                        
                        <div class="form-group">
							<label for="">Confirm Password</label>  <div class="err"></div>
							 <input name="cnfpassword" type="password" class="form-control" id="cnfpassword"/>
						</div>
                        
						<div class="form-group col-lg-12">
							<button class="btn_one" type="submit" name="submit">Submit</button>
						</div>
					</div>
				</div><!--- END COL -->	
                </form>
			</div><!--- END ROW -->
		</div><!--- END CONTAINER -->
	</section>
	<!-- END LOGIN -->


<?php include_once('footer.php'); ?>