<?php defined('BASEPATH') or exit('No direct script access allowed'); ?>
<!DOCTYPE html>
<html>
  <head>
    <title>Admin &gt; Daftar Member &gt; <?php echo html_escape($user->us_name);?></title>
    <?php include_once(VIEWPATH. 'includes/head.php'); ?>
  </head>
  <body>
    <?php include_once(VIEWPATH. 'admin/_navbar.php'); ?>
    <div class="container">
      <ul class="breadcrumb">
        <li><a href="<?php echo site_url();?>"><i class="fa fa-home"></i></a></li>
        <li><a href="<?php echo site_url('admin');?>">Admin Panel</a></li>
        <li><a href="<?php echo site_url('admin/users');?>">Member</a></li>
        <li class="active"><span><?php echo html_escape($user->us_name);?></span></li>
      </ul>
      <div class="row">
        <div class="col-sm-4 col-md-3">
          <?php include dirname(__FILE__).'/_sidebar.php';?>
        </div>
        <div class="col-sm-8 col-md-9">
          <div class="panel panel-default">
            <div class="panel-heading">
              <h3><i class="fa fa-edit"></i> Edit Akun</h3>
            </div>
            <div class="panel-body">
              <?php echo form_open();?>
                <div class="form-group">
                  <label for="user_name">Nama Pengguna</label>
                  <input class="form-control" type="text" name="user_username" id="user_username" value="<?php echo set_value('user_username', $user->us_username);?>"  maxlength="12" required="required"/>
                </div>
                <div class="form-group">
                  <label for="user_name">Nama Lengkap</label>
                  <input class="form-control" type="text" name="user_name" id="user_name" value="<?php echo set_value('user_name', $user->us_name);?>"  maxlength="32" required="required"/>
                </div>
                <div class="form-group">
                  <label for="user_email">Email</label>
                  <div class="input-group">
                    <span class="input-group-addon" data-toggle="tooltip" data-title="Terverifikasi"><input type="checkbox" name="email_verified" value="1" <?php echo (isset($user_set['email_verified']) && $user_set['email_verified'] == 1 ?'checked="checked"' : '');?>/></span>
                    <input class="form-control" type="email" name="user_email" id="user_email" value="<?php echo set_value('user_email', $user->us_email);?>"  maxlength="60" required="required"/>
                  </div>
                </div>
                <div class="form-group">
                  <label for="user_gender">Jenis Kelamin</label>
                  <select class="form-control" name="user_gender" id="user_gender">
                    <option value="male" <?php echo $user->us_gender == 'male' ? 'selected="selected"' : '';?>>Laki-laki</option>
                    <option value="female" <?php echo $user->us_gender == 'female' ? 'selected="selected"' : '';?>>Perempuan</option>
                  </select>
                </div>
                <div class="form-group">
                  <label for="user_location">Alamat Lengkap</label>
                  <input class="form-control" type="text" name="user_location" id="user_location" value="<?php echo set_value('user_location', $user->us_location);?>"  maxlength="160"/>
                </div>
                <div class="form-group">
                  <label for="user_phone">Nomor HP</label>
                  <div class="input-group">
                    <span class="input-group-addon" data-toggle="tooltip" data-title="Terverifikasi"><input type="checkbox" name="phone_verified" value="1" <?php echo (isset($user_set['phone_verified']) && $user_set['phone_verified'] == 1 ?'checked="checked"' : '');?>/></span>
                    <input class="form-control" type="number" name="user_phone" id="user_phone" value="<?php echo set_value('user_phone', $user->us_phone);?>" required="required"/>
                  </div>
                </div>
                <div class="form-group">
                  <label for="ktp_verified">Verifikasi KTP</label>
                  <select class="form-control" name="ktp_verified" id="ktp_verified">
                    <option value="1" <?php echo isset($user_set['ktp_verified']) && $user_set['ktp_verified'] == 1 ? 'selected="selected"' : '';?>>Terverifikasi</option>
                    <option value="0" <?php echo !isset($user_set['ktp_verified']) || $user_set['ktp_verified'] == 0 ? 'selected="selected"' : '';?>>Belum Terverifikasi</option>
                  </select>
                </div>
                <div class="form-group">
                  <label>Verifikasi kata sandi sebelum melakukan order di web?</label>
                  <div>
                    <div class="radio-inline"><label style="font-weight: normal;"><input type="radio" name="password_verify" value="yes"<?php echo (@$user_set['password_verify'] != 'no' ? ' checked="checked"' : '');?>/> Ya</label></div>
                    <div class="radio-inline"><label style="font-weight: normal;"><input type="radio" name="password_verify" value="no"<?php echo (@$user_set['password_verify'] == 'no' ? ' checked="checked"' : '');?>/> Tidak</label></div>
                  </div>
                </div>
                <div>
                  <button class="btn btn-primary" type="submit" name="submit" value="save">Simpan</button>
                </div>
              <?php echo form_close();?>
            </div>
          </div>
        </div>
      </div>
    </div>
    <?php include_once(VIEWPATH.'includes/foot.php'); ?>
  </body>
</html>