<?php $this->load->view('header');?>
		
    <section class="content-header">
      <div class="container-fluid">
        <div class="row mb-2">
          <div class="col-sm-6">
            <h1><?php echo $this->lang->line('hf_profile');?></h1>
          </div>
          <div class="col-sm-6">
            <ol class="breadcrumb float-sm-right">
              <li class="breadcrumb-item"><a href="<?php echo base_url();?>"><?php echo $this->lang->line('hf_home');?></a></li>
              <li class="breadcrumb-item active"><?php echo $this->lang->line('hf_profile');?></li>
            </ol>
          </div>
        </div>
      </div><!-- /.container-fluid -->
    </section>

    <!-- Main content -->
    <section class="content">
      <div class="container-fluid">
        <div class="row">
          <div class="col-md-12">
            <div class="card">
              <div class="card-header p-2">
                <ul class="nav nav-pills">
                  <li class="nav-item"><a class="nav-link active" href="#tab1" data-toggle="tab"><?php echo ((isset($is_profile_locked) && $is_profile_locked == 0) ? $this->lang->line('profile_edit_personal_info') : $this->lang->line('profile_personal_info'));?></a></li>
                  <li class="nav-item"><a class="nav-link" href="#tab2" data-toggle="tab"><?php echo $this->lang->line('profile_change_login_password');?></a></li>
                  <li class="nav-item"><a class="nav-link" href="#tab3" data-toggle="tab"><?php echo $this->lang->line('profile_change_security_password');?></a></li>
                </ul>
              </div><!-- /.card-header -->
              <div class="card-body">
                <div class="tab-content">
                  <div class="active tab-pane" id="tab1">
                    <form class="form-horizontal" id="profile-form">
					  <p><?php echo $this->lang->line('registration_personal_info');?></p>
                      <div class="form-group row">
                        <label for="username" class="col-sm-2 col-form-label"><?php echo $this->lang->line('registration_username');?></label>
                        <div class="col-sm-10">
                          <input type="text" class="form-control" id="username" name="username" value="<?php echo (isset($username) ? $username : '');?>" disabled="disabled">
                        </div>
                      </div>
                      <div class="form-group row">
                        <label for="full_name" class="col-sm-2 col-form-label"><?php echo $this->lang->line('registration_name');?></label>
                        <div class="col-sm-10">
                          <input type="text" class="form-control" id="full_name" name="full_name" placeholder="<?php echo $this->lang->line('registration_full_name_must_fill_in_message');?>" value="<?php echo (isset($full_name) ? $full_name : '');?>" <?php echo ((isset($is_profile_locked) && $is_profile_locked == 1) ? 'disabled="disabled"' : '');?>>
                        </div>
                      </div>
                      <div class="form-group row">
                        <label for="mobile_no" class="col-sm-2 col-form-label"><?php echo $this->lang->line('registration_mobile_number');?></label>
                        <div class="col-sm-10">
                          <input type="text" class="form-control" id="mobile_no" name="mobile_no" placeholder="<?php echo $this->lang->line('registration_mobile_no_must_fill_in_message');?>" value="<?php echo (isset($mobile_no) ? $mobile_no : '');?>" <?php echo ((isset($is_profile_locked) && $is_profile_locked == 1) ? 'disabled="disabled"' : '');?>>
                        </div>
                      </div>
                      <div class="form-group row">
                        <label for="email" class="col-sm-2 col-form-label"><?php echo $this->lang->line('registration_email');?></label>
                        <div class="col-sm-10">
                          <input type="email" class="form-control" id="email" name="email" placeholder="<?php echo $this->lang->line('registration_email_must_fill_in_message');?>" value="<?php echo (isset($email) ? $email : '');?>" <?php echo ((isset($is_profile_locked) && $is_profile_locked == 1) ? 'disabled="disabled"' : '');?>>
                        </div>
                      </div>
					  <div class="form-group row">
                        <label for="wallet_address" class="col-sm-2 col-form-label"><?php echo $this->lang->line('registration_wallet_address');?></label>
                        <div class="col-sm-10">
                          <input type="text" class="form-control" id="wallet_address" name="wallet_address" placeholder="<?php echo $this->lang->line('registration_wallet_address_must_fill_in_message');?>" value="<?php echo (isset($wallet_address) ? $wallet_address : '');?>" <?php echo ((isset($is_profile_locked) && $is_profile_locked == 1) ? 'disabled="disabled"' : '');?>>
                        </div>
                      </div>
					  <?php if(isset($is_profile_locked) && $is_profile_locked == 0) {?>
                      <div class="form-group row">
                        <div class="offset-sm-2 col-sm-10">
						  <input type="hidden" name="<?php echo $this->security->get_csrf_token_name(); ?>" value="<?php echo $this->security->get_csrf_hash(); ?>" />
                          <button onclick="profile_update()" type="button" class="btn btn-danger"><?php echo $this->lang->line('profile_submit');?></button>
                        </div>
                      </div>
					  <?php }?>
                    </form>
                  </div>
                  <!-- /.tab-pane -->
				  
                  <div class="tab-pane" id="tab2">
                    <form class="form-horizontal" id="login-password-form">
					  <p><?php echo $this->lang->line('profile_login_info_1');?></p>
					  <p><?php echo $this->lang->line('profile_login_info_2');?></p>
					  <p><?php echo $this->lang->line('profile_login_info_3');?></p>
                      <div class="form-group row">
                        <label for="old_login_password" class="col-sm-2 col-form-label"><?php echo $this->lang->line('profile_old_password');?></label>
                        <div class="col-sm-10">
                          <input type="password" class="form-control" id="old_login_password" name="old_login_password" placeholder="<?php echo $this->lang->line('profile_old_password_must_fill_in_message');?>">
                        </div>
                      </div>
                      <div class="form-group row">
                        <label for="login_password" class="col-sm-2 col-form-label"><?php echo $this->lang->line('profile_new_password');?></label>
                        <div class="col-sm-10">
                          <input type="password" class="form-control" id="login_password" name="login_password" placeholder="<?php echo $this->lang->line('profile_new_password_must_fill_in_message');?>">
                        </div>
                      </div>
                      <div class="form-group row">
                        <label for="confirm_login_password" class="col-sm-2 col-form-label"><?php echo $this->lang->line('profile_confirm_password');?></label>
                        <div class="col-sm-10">
                          <input type="password" class="form-control" id="confirm_login_password" name="confirm_login_password" placeholder="<?php echo $this->lang->line('profile_confirm_password_must_fill_in_message');?>">
                        </div>
                      </div>
                      <div class="form-group row">
                        <div class="offset-sm-2 col-sm-10">
                          <input type="hidden" name="<?php echo $this->security->get_csrf_token_name(); ?>" value="<?php echo $this->security->get_csrf_hash(); ?>" />
						  <button onclick="login_password_update()" type="button" class="btn btn-danger"><?php echo $this->lang->line('profile_submit');?></button>
                        </div>
                      </div>
                    </form>
                  </div>
                  <!-- /.tab-pane -->

                  <div class="tab-pane" id="tab3">
                    <form class="form-horizontal" id="security-password-form">
					  <p><?php echo $this->lang->line('profile_security_info_1');?></p>
					  <p><?php echo $this->lang->line('profile_security_info_2');?></p>
					  <p><?php echo $this->lang->line('profile_security_info_3');?></p>
					  <p><?php echo $this->lang->line('profile_security_info_4');?></p>
                      <div class="form-group row">
                        <label for="old_security_password" class="col-sm-2 col-form-label"><?php echo $this->lang->line('profile_old_password');?></label>
                        <div class="col-sm-10">
                          <input type="password" class="form-control" id="old_security_password" name="old_security_password" placeholder="<?php echo $this->lang->line('profile_old_password_must_fill_in_message');?>">
                        </div>
                      </div>
                      <div class="form-group row">
                        <label for="security_password" class="col-sm-2 col-form-label"><?php echo $this->lang->line('profile_new_password');?></label>
                        <div class="col-sm-10">
                          <input type="password" class="form-control" id="security_password" name="security_password" placeholder="<?php echo $this->lang->line('profile_new_password_must_fill_in_message');?>">
                        </div>
                      </div>
                      <div class="form-group row">
                        <label for="confirm_security_password" class="col-sm-2 col-form-label"><?php echo $this->lang->line('profile_confirm_password');?></label>
                        <div class="col-sm-10">
                          <input type="password" class="form-control" id="confirm_security_password" name="confirm_security_password" placeholder="<?php echo $this->lang->line('profile_confirm_password_must_fill_in_message');?>">
                        </div>
                      </div>
                      <div class="form-group row">
                        <div class="offset-sm-2 col-sm-10">
                          <input type="hidden" name="<?php echo $this->security->get_csrf_token_name(); ?>" value="<?php echo $this->security->get_csrf_hash(); ?>" />
						  <button onclick="security_password_update()" type="button" class="btn btn-danger"><?php echo $this->lang->line('profile_submit');?></button>
                        </div>
                      </div>
                    </form>
                  </div>
                  <!-- /.tab-pane -->
                </div>
                <!-- /.tab-content -->
              </div><!-- /.card-body -->
            </div>
            <!-- /.card -->
          </div>
          <!-- /.col -->
        </div>
        <!-- /.row -->
      </div><!-- /.container-fluid -->
    </section>
    <!-- /.content -->
		
<?php $this->load->view('footer');?>		