
  <script>
            function toggePassword() {
                var upass = document.getElementById('upass');
                var toggleBtn = document.getElementById('toggleBtn');
                if (upass.type == "password") {
                    upass.type = "text";
                    toggleBtn.value = "Hide password";
                } else {
                    upass.type = "Password";
                    toggleBtn.value = "Show the password";
                }
            }

        </script>
		
		 <script>
            function toggePassword2() {
                var upass = document.getElementById('cupass');
                var toggleBtn = document.getElementById('toggleBtn');
                if (upass.type == "password") {
                    upass.type = "text";
                    toggleBtn.value = "Hide password";
                } else {
                    upass.type = "Password";
                    toggleBtn.value = "Show the password";
                }
            }

        </script>
<script>
            function toggePassword3() {
                var upass = document.getElementById('oldpassword---');
                var toggleBtn = document.getElementById('toggleBtn');
                if (upass.type == "password") {
                    upass.type = "text";
                    toggleBtn.value = "Hide password";
                } else {
                    upass.type = "Password";
                    toggleBtn.value = "Show the password";
                }
            }

        </script>
 
 <div class="row">
     
   	<div class="col-md-12">  
		<div class="panel panel-default" data-collapsed="0">
        	<div class="panel-heading">
            	<div class="panel-title" id="redcolor" >
            		<i class="entypo-plus-circled"></i>
				Password Details
            	</div>
            </div>
			<div class="panel-body">

			
										
					<div class="row">
						<div class="col-md-12">
							
							<div class="panel-body">
							
					
	
				<?PHP
$session_data = $this->session->userdata('logged_in');

     
 	$data['id'] = $session_data['id'];

$id=$data['id'];


				echo $this->session->flashdata('msg'); 
		
                 echo form_open('user/changepassword' , array('class' => 'form-horizontal form-groups-bordered validate', 'enctype' => 'multipart/form-data'));
				 if(validation_errors()):?>
<div class='alert alert-danger text-center'><?php echo validation_errors(); ?></div>
<?php endif;?>
					
	


	<div class="form-group">
    <label for="inputoldpassword" class="col-sm-2 control-label">	Old Password </label>
    <div class="col-sm-10">
		
		<input type="hidden" name="id"  value="<?php echo $id ;?>" id="id" class="form-control"  placeholder="enter old password first">

		<input type="password" name="oldpassword"  value="<?php echo set_value('oldpassword'); ?>" id="oldpassword" required class="form-control2"  placeholder="e.g. enter old password first">
		  
				

	</div>
  </div>	

	<div class="form-group">
    <label for="inputnewpassword" class="col-sm-2 control-label">	 New Password </label>
    <div class="col-sm-10">
		
		<input type="password" name="newpassword" id="upass" value="<?php echo set_value('newpassword'); ?>"placeholder="Enter Your New password" required class="form-control2"  ></td>

		  		
				
              <span class="fa fa-fw fa-eye field-icon toggle-password" onclick="toggePassword()"></span>
		
		
	</div>
  </div>	

  	<div class="form-group">
    <label for="inputcnewpassword" class="col-sm-2 control-label">	Confirm New Password </label>
    <div class="col-sm-10">
		
		<input type="password" name="cnewpassword"  id="cupass" value="<?php echo set_value('cnewpassword'); ?>"placeholder="Confirm Your New password" required class="form-control2"  ></td>

		  		
              <span class="fa fa-fw fa-eye field-icon toggle-password" onclick="toggePassword2()"></span>

	</div>
  </div>	


	 <div class="form-group">

    <div class="col-sm-offset-2 col-sm-10">
     
	         <button type="submit" name="btn_register" value="changepassword"class="btn btn-success"> Save / Update Password   </button>

    </div>
  </div>
			</div>							   
									<?php echo form_close();?>
								
							
						</div>
					</div>

					
			
			</div>
		</div>
  
  </div>
 
</div>





















