<?php	
	$ctrl_name = BASE_URL."/admin";
	$page_name = BASE_URL."/admin/changepassword";		
?>
<h1 class="page-header">Change Password</h1>          
<div class="bs-example table-responsive">
	<table align="center" width="100%" border="0">    	
    	 <?php if(!empty($error_msg)) {?>     
            <tr>
                <td align="center">  
                  <div class="col-lg-6 alert alert-danger" style="clear:right">
                    <?php echo $error_msg;?>
                 </div>             
                </td>
             </tr>   
         <?php } ?> 
        <tr>
        	<td align="center">       
             <div class="col-lg-12">
             <div class="well">
                  <form class="bs-example form-horizontal" id="profileFrm" name="profileFrm" action="<?php echo $page_name; ?>" method="post">
                    <fieldset>                  
                      <div class="form-group">
                          <label class="col-lg-2 control-label" for="fname">Old Password</label>
                        <div class="col-lg-10">
                          <input type="password" id="oldpass" name="oldpass" class="form-control" autofocus value="">
                        </div>
                      </div>
                      
                      <div class="form-group">
                          <label class="col-lg-2 control-label" for="fname">New Password</label>
                        <div class="col-lg-10">
                          <input type="password" id="newpass" name="newpass" class="form-control" value="">
                        </div>
                      </div>
                      
                       <div class="form-group">
                          <label class="col-lg-2 control-label" for="email">Confirm Password</label>
                        <div class="col-lg-10">
                          <input type="password" id="confirmpass" name="confirmpass" class="form-control" value="">
                        </div>
                      </div>
                      
                      <?php /*?><div class="form-group">
                          <label class="col-lg-2 control-label" for="email">Password</label>
                        <div class="col-lg-10">
                          <input type="password" placeholder="Password" id="password" name="password" class="form-control" value="">
						  <input type="hidden" id="oldpassword" name="oldpassword" value="<?php echo $UsersDetail->password?>">
                        </div>
                      </div>
                      <?php */?>
                      <div class="form-group">
                        <div class="col-lg-10 col-lg-offset-1">                    
                          <button class="btn btn-primary" name="Submit" type="submit" value="Submit">Update Profile</button>
                        </div>
                      </div>
                    </fieldset>
                  </form>
            </div>
          </div>
            </td>
        </tr>
    </table>
</div>
<script type="text/javascript">
$(document).ready(function() {
    $('#profileFrm').bootstrapValidator({
        message: 'This value is not valid',
        fields: {
			oldpass: {
                message: 'The Old Password is not valid',
                validators: {
                    notEmpty: {
                        message: 'The Old Password is required and can\'t be empty'
                    }
                }
            },newpass: {
                message: 'The Password is not valid',
                validators: {
                    notEmpty: {
                        message: 'The Password is required and can\'t be empty'
                    },identical: {
                        field: 'repass',
                        message: 'The password and its confirm are not the same'
                    }
                }
            },confirmpass: {
                message: 'The Confirm Password is not valid',
                validators: {
                   identical: {
                        field: 'newpass',
                        message: 'The password and its confirm are not the same'
                    }
                }
            }
        }
    });
});
</script>