<?php
session_start();
if(!isset ($_SESSION['user_id'])){
    header("Location:../login.php?msg=Log in first");
    exit();
}else{
	include('../Server/connection.php');
	include('includes/session.php');
?>


<!DOCTYPE html>
<html lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!-- Meta, title, CSS, favicons, etc. -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <?php
	include 'title.php';
	?>
	
	<link type = "image/png" rel="icon" href="images/brvision.png" />

    <!-- Bootstrap -->
    <link href="../vendors/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome -->
    <link href="../vendors/font-awesome/css/font-awesome.min.css" rel="stylesheet">
    <!-- NProgress -->
    <link href="../vendors/nprogress/nprogress.css" rel="stylesheet">
	
	 <!-- bootstrap-daterangepicker -->
    <link href="../vendors/bootstrap-daterangepicker/daterangepicker.css" rel="stylesheet">
    <!-- bootstrap-datetimepicker -->
    <link href="../vendors/bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.css" rel="stylesheet">
	
	<!-- bootstrap-datetimepicker -->
    <link href="../vendors/bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.css" rel="stylesheet">
    
    <!-- Custom Theme Style -->
    <link href="../build/css/custom.min.css" rel="stylesheet">
	
	 <link rel="stylesheet" href="assets/css/fv.css" type="text/css"/>
	
	
	
  </head>

  <body class="nav-md">
  
    <div class="container body">
	
    <?php
	//include 'header.php';
	?>
	
      <div class="main_container">
        <div class="col-md-3 left_col">
          <div class="left_col scroll-view">
		  
            <?php  
		include 'includes/role.php';
               ?>

            <div class="clearfix"></div>
            
			<?php
            include 'includes/profile.php';
			print '</br></br>';
			include 'includes/menu.php';
			?>

           

        <!-- page content -->
        <div class="right_col" role="main">
          <div class="">
		  
			
			
            <div class="clearfix"></div>

            <div class="row">
              <div class="col-md-12 col-sm-12 col-xs-12">
                <div class="x_panel">
                  <div class="x_title">
				  
                    <a href="dashboard.php">  <h2><span class="glyphicon glyphicon-step-backward"></span> Back</h2></a>
					
					
                    <ul class="nav navbar-right panel_toolbox">
                      <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                      </li>
                      
                     
                    </ul>
                    <div class="clearfix"></div>
                  </div>
                  <div class="x_content" style="overflow: auto;">
				  
				  <?php if (isset($_SESSION['success_message']) && !empty($_SESSION['success_message'])) { ?>
                        <div class="success-message" style="margin-bottom: 20px;font-size: 20px;color: green;"><?php echo $_SESSION['success_message']; ?></div>
                        <?php
                        unset($_SESSION['success_message']);
                    }
                    ?>	

                    <form action="php_action/change_pass_script.php"   method="post" class="form-horizontal form-label-left" novalidate>

                      
					  
                      <span class="section">Change Your Password</span>
					  
					  
					 
					 <div class="field item form-group">
                        <label for="password" class="control-label col-md-3">Current Password</label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
						<input  type="password" style="width:100%;margin-left:0%;" placeholder="Current Password" name="CurrentPassword" id = "pswd1"  class="form-control col-md-7 col-xs-12" pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*]).{6,}" title="Minimum 6 Characters Including An Upper And Lower Case Letter, A Number And A Unique Character" required />
						  <input type="checkbox" onclick="myFunction()">
                        </div>
                      </div>
					  
					  
					  <div class="field item form-group">
                        <label for="password" class="control-label col-md-3">New Password</label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
						<input  type="password" style="width:100%;margin-left:0%;" placeholder="New Password" name="password" id = "pswd2"  class="form-control col-md-7 col-xs-12" pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*]).{6,}" title="Minimum 6 Characters Including An Upper And Lower Case Letter, A Number And A Unique Character" required />
                        <input type="checkbox" onclick="myFunction1()">
						</div>
                      </div>
					  
                      <div class="field item form-group">
                        <label for="password2" class="control-label col-md-3 col-sm-3 col-xs-12">Confirm New Password</label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                        <input  type="password" style="width:100%;margin-left:0%;" placeholder="Confirm New Password" name="password2" id = "pswd3"  class="form-control col-md-7 col-xs-12" data-validate-linked='password' required='required'/>
                        <input type="checkbox" onclick="myFunction2()">
						</div>
                      </div>
					 
				
					  <div class="ln_solid"></div>
                      <div class="form-group">
                        <div class="col-md-6 col-md-offset-3">
						  <button class="btn btn-success"><span class="glyphicon glyphicon-registration-save"> </span> Change Password</button>
                        </div>
                      </div>
                    </form>
					
			<script>
		
  function myFunction() {
    var x = document.getElementById("pswd1");
    if (x.type === "password") {
      x.type = "text";
    } else {
      x.type = "password";
    }
  }
  
  function myFunction1() {
    var x = document.getElementById("pswd2");
    if (x.type === "password") {
      x.type = "text";
    } else {
      x.type = "password";
    }
  }
  
  
  function myFunction2() {
    var x = document.getElementById("pswd3");
    if (x.type === "password") {
      x.type = "text";
    } else {
      x.type = "password";
    }
  }

		</script>		
					
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <!-- /page content -->

		<?php
		include 'includes/footer.php';
		?>
		
        
      </div>
    </div>

    <!-- jQuery -->
    <script src="../vendors/jquery/dist/jquery.min.js"></script>
	
	<script src="assets/js/multifield.js"></script>
    <script src="assets/js/validator.js"></script>
	<script>
		// initialize a validator instance from the "FormValidator" constructor.
        // A "<form>" element is optionally passed as an argument, but is not a must
		var validator = new FormValidator({"events" : ['blur', 'input', 'change']}, document.forms[0]);


        // on form "submit" event
		document.forms[0].onsubmit = function(e){
			var submit = true,
				validatorResult = validator.checkAll(this);

			console.log(validatorResult);
			return !!validatorResult.valid;
		};


        // on form "reset" event
        document.forms[0].onreset = function(e){
            validator.reset();
        };

        // stuff related ONLY for this demo page:
		$('.toggleValidationTooltips').change(function(){
			validator.settings.alerts = !this.checked;

			if( this.checked )
				$('form .alert').remove();
		}).prop('checked',false);
	</script>
	
	
    <!-- Bootstrap -->
    <script src="../vendors/bootstrap/dist/js/bootstrap.min.js"></script>
    <!-- FastClick -->
    <script src="../vendors/fastclick/lib/fastclick.js"></script>
    <!-- NProgress -->
    <script src="../vendors/nprogress/nprogress.js"></script>
	
    <!-- validator -->
    <!--<script src="../vendors/validator/validator.js"></script>-->
	
	<!-- bootstrap-daterangepicker -->
    <script src="../vendors/moment/min/moment.min.js"></script>
	
	<!-- bootstrap-datetimepicker -->    
    <script src="../vendors/bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js"></script>

    <!-- Custom Theme Scripts -->
    <script src="../build/js/custom.min.js"></script>
	
	
	
  </body>
</html>



<?php
}
?>