<?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_reinvest');?></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_reinvest');?></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('reinvest_buy_package');?></a></li>
                  <li class="nav-item"><a class="nav-link" href="#tab2" data-toggle="tab"><?php echo $this->lang->line('reinvest_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="reinvest-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_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>
					  <p><?php echo $this->lang->line('reinvest_notice');?></p>
                      <div class="form-group row">
                        <label class="col-sm-2 col-form-label"><?php echo $this->lang->line('reinvest_package');?></label>
						<div class="col-sm-10">
							<?php if($package_type > 0) {?>
							<label class="custom-label"><?php echo $package_info['package_name']?></label>
							<?php } else {?>
							<select class="form-control" id="package_type" name="package_type">
							  <?php
								if($package->num_rows() > 0) {
									foreach($package->result() as $row) {
										echo '<option value="' . $row->package_id. '">' . $row->package_name . '</option>';
									}	
								}
							  ?>
							</select>
							<?php }?>
						</div>	
                      </div>
                      <div class="form-group row">
                        <label for="security_password" class="col-sm-2 col-form-label"><?php echo $this->lang->line('reinvest_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('reinvest_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="reinvest_submit()" type="button" class="btn btn-danger"><?php echo $this->lang->line('reinvest_buy_now');?></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('reinvest_date');?></th>
						<th><?php echo $this->lang->line('reinvest_package');?></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');?>		