<?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_convert');?></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_convert');?></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 $this->lang->line('convert_convert_request');?></a></li>
                  <li class="nav-item"><a class="nav-link" href="#tab2" data-toggle="tab"><?php echo $this->lang->line('convert_convert_history');?></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="convert-form">
					  <div class="row">
						<div class="col-12 col-sm-2">
						  <div class="info-box bg-light">
							<div class="info-box-content">
							  <span class="info-box-text text-center text-muted"><?php echo $this->lang->line('wallet_1');?></span>
							  <span class="info-box-number text-center text-muted mb-0"><?php echo (isset($v_unit) ? $v_unit : '');?></span>
							</div>
						  </div>
						</div>
						<div class="col-12 col-sm-2">
						  <div class="info-box bg-light">
							<div class="info-box-content">
							  <span class="info-box-text text-center text-muted"><?php echo $this->lang->line('wallet_2');?></span>
							  <span class="info-box-number text-center text-muted mb-0"><?php echo (isset($v_unit2) ? $v_unit2 : '');?></span>
							</div>
						  </div>
						</div>
						<div class="col-12 col-sm-2">
						  <div class="info-box bg-light">
							<div class="info-box-content">
							  <span class="info-box-text text-center text-muted"><?php echo $this->lang->line('wallet_3');?></span>
							  <span class="info-box-number text-center text-muted mb-0"><?php echo (isset($v_unit3) ? $v_unit3 : '');?></span>
							</div>
						  </div>
						</div>
						<div class="col-12 col-sm-2">
						  <div class="info-box bg-light">
							<div class="info-box-content">
							  <span class="info-box-text text-center text-muted"><?php echo $this->lang->line('wallet_4');?></span>
							  <span class="info-box-number text-center text-muted mb-0"><?php echo (isset($v_unit4) ? $v_unit4 : '');?></span>
							</div>
						  </div>
						</div>
						<div class="col-12 col-sm-2">
						  <div class="info-box bg-light">
							<div class="info-box-content">
							  <span class="info-box-text text-center text-muted"><?php echo $this->lang->line('wallet_5');?></span>
							  <span class="info-box-number text-center text-muted mb-0"><?php echo (isset($v_unit5) ? $v_unit5 : '');?></span>
							</div>
						  </div>
						</div>
					  </div>
					  <p><?php echo $this->lang->line('convert_warm_tips');?></p>
					  <p><?php echo str_replace('_VALUE_', (isset($setting['min_convert']) ? $setting['min_convert'] : 0), $this->lang->line('convert_notice_1'));?></p>
					  <p><?php echo str_replace('_VALUE_', (isset($setting['max_convert_per_day']) ? $setting['max_convert_per_day'] : 0), $this->lang->line('convert_notice_2'));?></p>
                      <div class="form-group row">
                        <label for="wallet_type" class="col-sm-2 col-form-label"><?php echo $this->lang->line('convert_wallet_type');?></label>
						<div class="col-sm-10">
							<select class="form-control" id="wallet_type" name="wallet_type">
							  <option value="1"><?php echo $this->lang->line('wallet_1') . ' => ' . $this->lang->line('wallet_2');?></option>
							  <option value="2"><?php echo $this->lang->line('wallet_1') . ' => ' . $this->lang->line('wallet_4');?></option>
							  <option value="3"><?php echo $this->lang->line('wallet_1') . ' => ' . $this->lang->line('wallet_5');?></option>
							  <option value="4"><?php echo $this->lang->line('wallet_2') . ' => ' . $this->lang->line('wallet_4');?></option>
							</select>
						</div>	
                      </div>
					  <div class="form-group row">
                        <label for="transaction_amount" class="col-sm-2 col-form-label"><?php echo $this->lang->line('convert_amount');?></label>
						<div class="col-sm-10">
							<input type="text" class="form-control" id="transaction_amount" name="transaction_amount" placeholder="<?php echo $this->lang->line('convert_amount_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('convert_security_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('convert_security_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="convert_submit()" type="button" class="btn btn-danger"><?php echo $this->lang->line('convert_submit');?></button>
                        </div>
                      </div>
                    </form>
                  </div>
                  <!-- /.tab-pane -->
				  
                  <div class="tab-pane" id="tab2">
                    <table id="table-listing" class="table table-bordered table-striped">
					  <thead>
					  <tr>
						<th><?php echo $this->lang->line('convert_date');?></th>
						<th><?php echo $this->lang->line('convert_wallet_type');?></th>
						<th><?php echo $this->lang->line('convert_out');?></th>
						<th><?php echo $this->lang->line('convert_in');?></th>
						<th><?php echo $this->lang->line('convert_status');?></th>
					  </tr>
					  </thead>
					</table>  
                  </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');?>		