  <main>        
    <div class="page-banner">
      <div class="container page-titile-section">
        <div class="col-lg-12 col-md-12 mb-0 text-center">
          <ul class="breadcrumb mb-0">
          <li class="breadcrumb-item"><a href="<?php echo base_url(); ?>">Home</a></li>                    
          <li class="breadcrumb-item active">My Account</li>
        </ul> 
        <h2 class="page-banner-title">My Account</h2>
        </div>
      </div> 
    </div>            

    <?php $countrylist = $this->config->item('country_list'); ?>
    <div class="my-account">
      <div class="container">
        <div class="row">
          <div class="col-lg-3 col-md-3">
            <div class="user-sidebar">
              <p><a href="<?php echo base_url('user-profile'); ?>" class="active">Settings</a></p>
              <p><a href="<?php echo base_url(); ?>all-orders">Order History</a></p>
            </div>
          </div>
          <div class="col-lg-6 col-md-6">
            <div class="account-details">
              <div class="step1">
                <h2 class="account-title">Add Address</h2>
                <form method="post" action="<?php echo base_url("profile/updateBillingInformation"); ?>" id="saveUserProfileForm">
                  <input type="hidden" name="id" value="<?php echo $profile['id']; ?>">
                  <div class="row">
                    <div class="col-md-12">
                        <div class="alert alert-success alert-dismissible" role="alert" <?php if($this->session->flashdata('message')==''){ ?> style="display:none" <?php } ?> >
                            <button type="button" class="close" data-bs-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                            <?php echo $this->session->flashdata('message'); ?>
                        </div>
                        <div class="alert alert-danger alert-dismissible" role="alert" <?php if($this->session->flashdata('emessage')==''){ ?> style="display:none" <?php } ?> >
                            <button type="button" class="close" data-bs-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                            <?php echo $this->session->flashdata('emessage'); ?>
                        </div>
                    </div>
                  </div>
                  <div class="row">
                    <div class="col-lg-6 col-md-6">
                      <div class="form-group mb-4">
                        <input type="text" name="bname" placeholder="*First Name" class="form-control" value="<?php echo $profile['bname']; ?>" required>
                      </div>
                    </div>
                    <div class="col-lg-6 col-md-6">
                      <div class="form-group mb-4">
                        <input type="text" name="blast_name" placeholder="*Last Name" class="form-control" value="<?php echo $profile['blast_name']; ?>" required>
                      </div>
                    </div>
                    <div class="col-lg-6 col-md-6">
                      <div class="form-group mb-4">
                        <input type="text" name="bmobile_no" placeholder="*Mobile Number" class="form-control" value="<?php echo $profile['bmobile_no']; ?>" required>
                      </div>
                    </div>
                    <div class="col-lg-6 col-md-6">
                      <div class="form-group mb-4">
                        <input type="text" name="bemail" placeholder="*Email Address" class="form-control" value="<?php echo $profile['bemail']; ?>" required>
                      </div>
                    </div>
                    <div class="col-lg-6 col-md-6">
                      <div class="form-group mb-4">
                        <select class="form-control" name="scountry">
                          <option value="">Country</option>
                          <?php if(isset($countrylist) && !empty($countrylist)){ foreach($countrylist as $key=>$value): ?>
                            <option <?php echo($profile['bcountry']==$value)?'selected':''; ?> value="<?php echo $value; ?>"><?php echo $value; ?></option>
                          <?php endforeach; } ?>
                        </select>
                      </div>
                    </div>
                    <div class="col-lg-6 col-md-6">
                      <div class="form-group mb-4">
                        <input type="text" name="baddress1" placeholder="*Address" class="form-control" value="<?php echo $profile['baddress1']; ?>" required>
                      </div>
                    </div>
                    <div class="col-lg-6 col-md-6">
                      <div class="form-group mb-4">
                        <input type="text" name="baddress2" placeholder="Unit Number" class="form-control" value="<?php echo $profile['baddress2']; ?>" required>
                      </div>
                    </div>
                    <div class="col-lg-6 col-md-6">
                      <div class="form-group mb-4">
                        <input type="text" name="bpincode" placeholder="*Postal Code" class="form-control" value="<?php echo $profile['bpincode']; ?>" required>
                      </div>
                    </div>
                    <div class="col-lg-6 col-md-6">
                      <div class="form-group mb-4">
                        <input <?php echo($profile['isDefault']==1)?'checked':''; ?> type="checkbox" name="isDefault" value="1"> Default
                      </div>
                    </div>
                    <div class="col-lg-6 col-md-6 text-end">
                      <div class="form-group ">
                        <input type="submit" value="Update" class="btn btn-outline-primary">
                      </div>
                    </div>
                  </div>
                </form>
              </div>
              <a href="<?php echo base_url('logout'); ?>" class="signout-btn"><img src="<?php echo base_url(); ?>assets/user/img/home/logout.png" alt="logout" class="me-2"> SIGN OUT</a>
            </div>
          </div>
        </div>
      </div>
    </div>
  </main>