<div class="breadcrumb-area bg--white-6 breadcrumb-bg-1 pt--60 pb--70 pt-lg--40 pb-lg--50 pt-md--30 pb-md--40">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-12 text-center">
                        <h1 class="page-title">My Account</h1>
                        <ul class="breadcrumb justify-content-center">
                            <li><a href="<?php echo base_url();?>orders" style="color:#fff;">Home</a></li>
                            <li class="current"><span style="color:#fff;">/</span></li>
                            <li class="current"><span style="color:#fff;">My Account</span></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
        <!-- Breadcrumb area End -->
		<div id="content" class="main-content-wrapper">
            <div class="page-content-inner">
                <div class="container">
                    <div class="row pt--50 pt-md--60 pt-sm--40 pb--50 pb-md--60 pb-sm--40">
                        <div class="col-12">
                        
                            <div class="user-dashboard-tab flex-column flex-md-row">
                                <div class="user-dashboard-tab__head nav flex-md-column" role="tablist"
                                    aria-orientation="vertical">
                                    <a class="nav-link" data-toggle="pill" role="tab" href="<?php echo base_url().'orders';?>"
                                        aria-controls="dashboard" aria-selected="true">My Orders</a>
                                    <a class="nav-link" data-toggle="pill" role="tab" href="<?php echo base_url().'my-address';?>"
                                        aria-controls="orders" aria-selected="true">My Address</a>
                                    <a class="nav-link" data-toggle="pill" role="tab" href="<?php echo base_url().'wishlist';?>"
                                        aria-controls="downloads" aria-selected="true">Wishlist</a>
                                    <a class="nav-link active" data-toggle="pill" role="tab" href="#"
                                        aria-controls="addresses" aria-selected="true">Change Password</a>
                                    <a class="nav-link" href="<?php echo base_url().'logout';?>">Logout</a>
                                </div>
                                <div class="user-dashboard-tab__content tab-content">
                                <div class="row">

                                <div class="col-sm-4">

                                    <div class="box">

                                        <div class="box-title">
                                        	<h2 class="text-danger">Hi, <?php echo $this->session->userdata("name");?></h2>

                                            <h3>Change Password</h3></div>

                                        <div class="box-content">

                                            <form id="changepass" method="post">

                                                <input type="hidden" name="uid" value="<?php echo $this->session->userdata("user");?>" />

                        

                                                <div class="form-group">

                        

                                                    <label>New Password</label>

                        

                                                    <input type="password" required name="npass" class="form-control"  />

                        

                                                </div>

                        

                                                <div class="form-group">

                        

                                                    <label>Confirm Password</label>

                        

                                                    <input type="password" required name="cpass" class="form-control" />

                        

                                                </div>

                        <br/>

                                                <button class="btn btn-success btn-block" type="submit">Change Password</button>

                        

                                            </form>

                                            </div>

                                    </div>

                                </div>

                                <div class="col-sm-4" style="display:none;">

                                    <div class="box">

                                        <div class="box-title">

                                            <h3>Update Profile</h3></div>

                                        <div class="box-content">

                                            <form id="update_profile" method="post">

                    	<input type="hidden" name="uid" value="<?php echo $this->session->userdata("user");?>" />



                        <!--<div class="form-group">



                            <label>Old Password</label>



                            <input type="password" required name="opass" class="form-control"  />



                        </div>-->

						<?php //$user=$this->db->get_where("users",array("id"=>$this->session->userdata("user")))->row();?>

                        <div class="form-group">



                            <label>Name</label>



                            <input type="text" required name="name" class="form-control"  value="<?php echo $user->first_name;?>" />



                        </div>



                        <div class="form-group">



                            <label>Mobile Number</label>



                            <input type="text" required name="mobile" class="form-control" value="<?php echo $user->mobile;?>" />

                            <input type="hidden" required name="oldmobile" class="form-control" value="<?php echo $user->mobile;?>" />



                        </div>



                        <button class="btn btn-success btn-block" type="submit">Update Profile</button>



                    </form>

                    <div id="change_myModal" class="modal fade" role="dialog">

                      <div class="modal-dialog modal-sm">

                        <!-- Modal content-->

                        <div class="modal-content">

                          <div class="modal-header">

                            <h4 class="modal-title">Verify OTP</h4>

                            <button type="button" class="close" data-dismiss="modal">&times;</button>

                          </div>

                          <div class="modal-body">

                            <form action="#" method="post" id="change_verify_otp">

                                <div class="form-group text-center">

            

                                    <p class="text-success text-center">We have sent an OTP to Your Mobile Number Please confirm the OTP.</p>

            

                                        <i class="fa fa-mobile fa-5x text-success "></i><br/>

            

            <input type="text" class="form-control" required name="otp" placeholder="6 Digit Code" style="margin-bottom:0px;font-size:20px;text-align:center;" />

            

            <a href="#" id="change_resend_otp">Resend OTP</a>

            </div>

                                        <b class="text-danger  text-center change_otp_error"></b>

            

                                        <button type="submit"  class="btn btn-warning">Verify OTP</button> 

                            <button type="button" class="btn btn-default pull-right" data-dismiss="modal">Close</button>

            

                                    

                           </form>

                          </div>

                        </div>

                    

                      </div>

                    </div>

      <script>

	  $(document).ready(function(){ //$("#change_myModal").modal();
$("#changepass").submit(function(e){e.preventDefault();

			 var formdata=$(this).serialize();

			 $.ajax({

				 type: "POST",

				 url: '<?php echo base_url();?>home/change_password',

				 data: {formdata:formdata},

				 success: function(res){

					 alert(res);

				 }

			 });

		 });
	  	 $("#change_verify_otp").submit(function(e){e.preventDefault();

			 var formdata=$(this).serialize();

			 $.ajax({

				 type: "POST",

				 url: '<?php echo base_url();?>home/change_verify_otp',

				 data: {formdata:formdata},

				 success: function(res){

					 alert(res);

				 }

			 });

		 });

		 

		 $("#update_profile").submit(function(e){e.preventDefault();

			 var formdata=$(this).serialize();

			 $.ajax({

				 type: "POST",

				 url: '<?php echo base_url();?>home/update_profile',

				 data: {formdata:formdata},

				 success: function(res){

					 if(res==1){

						 $("#change_myModal").modal();

					 }else{

					 alert(res);

					 }

				 }

			 });

		 });

	  });

	  </script>

                                        </div>

                                    </div>

                                </div>

                            </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- Main Content Wrapper Start -->
        
        <script>
		$(document).ready(function(){
			
		});
		</script>