<?php include("../check.php"); ?>
<!DOCTYPE html>
<html>

<head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252">

    <?php include("common/head.php") ?>
    <script src="../ckeditor1/ckeditor/ckeditor.js"></script>

</head>
<body class="fixed-navbar fixed-sidebar">

<?php include("common/header.php") ?>


<?php include("common/aside.php") ?>

<div id="wrapper">

<div class="small-header transition animated fadeIn">
    <div class="hpanel">
        <div class="panel-body">
            <div id="hbreadcrumb" class="pull-right">
                <ol class="hbreadcrumb breadcrumb">
                    <li><a href="<?=$baseurl; ?>welcome/"><i class="fa fa-home"></i> Dashboard</a></li>
                </ol>
            </div>
        </div>
    </div>
</div>

<div class="content animate-panel">
<script>
    function updatePassword() { 
        $('#updatePasswordBTN').prop("disabled", true);
        $("#updatePasswordBTN").fadeIn(100).html('<i class="fa fa-spin fa-spinner"></i> updating..');
        var a = $('#c_password').val();
		var b = $('#new_password').val();
		var c = $('#r_password').val();
		
        var dataString = { a:a,b:b,c:c }; 
        var url = 'password-handler.php';
        $.ajax({
            type: "POST",
            url: url,
            data: dataString,
            cache: false,
            success: function(result) {
                $("#passwordResult").fadeIn(100).html(result);
                $('#updatePasswordBTN').prop("disabled", false);
                $("#updatePasswordBTN").fadeIn(100).html('<i class="fa fa-check"></i> Save Changes');
            }
        });
    }
</script>
<div>

    <div class="row">
        <div class="col-lg-5 col-md-5 col-sm-8 col-xs-12">
            <div class="hpanel">
                <div class="panel-heading">
                    <div class="panel-tools">
                        <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                        <a class="closebox"><i class="fa fa-times"></i></a>
                    </div>
                    Reset Password
                </div>
                <div class="panel-body">
                <form action="#" class="form-horizontal col-md-12">
                <div class="form-group">
                	<label class="col-md-12 control-label"><b>Login ID</b> :  <?php echo  $user_id; ?></label>
                	<div style="clear:both;"></div>
                    <div class="col-md-12" style="padding-bottom:10px;"><input type="password" class="form-control" id="c_password" onclick="removeerror('c_password');" placeholder="Enter Current password"></div>
                    <div style="clear:both;"></div>
                    <div class="col-md-12"><input type="password" maxlength="30" class="form-control" id="new_password" onclick="removeerror('new_password');" placeholder="Enter new password"></div>
                    <div style="clear:both;"></div>
                    <div class="col-md-12" style="padding-top:10px;"><input type="password" maxlength="30" class="form-control" id="r_password" onclick="removeerror('r_password');" placeholder="Enter Re-type password"></div>
                </div>
                <div class="hr-line-dashed"></div>
                <div class="form-group">
                    <div class="col-sm-8">
                        <button class="btn btn-success" id="updatePasswordBTN" onClick="updatePassword();" type="button"><i class="fa fa-check"></i> Save Changes</button>
                    </div>
                </div>
                <div id="passwordResult"></div>
                </form>
                </div>
            </div>
        </div>
        <div class="col-lg-5 col-md-5 col-sm-8 col-xs-12">
            <div class="hpanel">
                <div class="panel-heading">
                    <div class="panel-tools">
                        <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                        <a class="closebox"><i class="fa fa-times"></i></a>
                    </div>
                    Password Criteria
                </div>
                <div class="panel-body">
                <div style="font-weight:normal;"><i>Passwords must meet or exceed these criteria:</i>
                 <ul>
                     <li>Changed at least every 180 days.</li>
                     <li>Between 8 and 30 characters long.</li>
                     <li>Use at least 3 of the following types of characters:
                      <ol>
                          <li>(a) uppercase letters</li>
                          <li>(b) lowercase letters</li>
                          <li>(c) numbers, and/or </li>
                          <li>(d) special characters</li>
                      </ol>
                     </li>
                 </ul>
                </div>
                </div>
            </div>
        </div>
        
    </div>


</div>

</div>

 
    <?php include("common/footer.php") ?>

</div>

<?php include("common/js.php") ?>

</body>

</html>