<?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_registration');?></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_registration');?></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('registration_add_new_member');?></a></li>
                  <li class="nav-item"><a class="nav-link" href="#tab2" data-toggle="tab"><?php echo $this->lang->line('registration_registration_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="register-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>
					  <div class="form-group row">
                        <label for="package_type" class="col-sm-2 col-form-label"><?php echo $this->lang->line('registration_package');?></label>
						<div class="col-sm-10">
							<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>
						</div>	
                      </div>
					  <div class="form-group row" id="wallet_panel_1" style="display: none;">
                        <label for="amount_1" class="col-sm-2 col-form-label"><?php echo $this->lang->line('wallet_3');?></label>
                        <div class="col-sm-10">
                          <input type="text" class="form-control" id="amount_1" name="amount_1" placeholder="0">
                        </div>
                      </div>
					  <div class="form-group row" id="wallet_panel_2" style="display: none;">
                        <label for="amount_2" class="col-sm-2 col-form-label"><?php echo $this->lang->line('wallet_5');?></label>
                        <div class="col-sm-10">
                          <input type="text" class="form-control" id="amount_2" name="amount_2" placeholder="0">
                        </div>
                      </div>
					  <div class="form-group row">
                        <label for="prefix" class="col-sm-2 col-form-label"><?php echo $this->lang->line('registration_prefix');?></label>
						<div class="col-sm-10">
							<select class="form-control" id="prefix" name="prefix">
							  <option value="mtb">MTB</option>
							  <option value="win">WIN</option>
							</select>
						</div>	
                      </div>
                      <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" placeholder="<?php echo $this->lang->line('registration_username_must_fill_in_message');?>">
                        </div>
                      </div>
                      <div class="form-group row">
                        <label for="password" class="col-sm-2 col-form-label"><?php echo $this->lang->line('registration_password');?></label>
                        <div class="col-sm-10">
                          <input type="password" class="form-control" id="password" name="password" placeholder="<?php echo $this->lang->line('registration_password_must_fill_in_message');?>">
                        </div>
                      </div>
					  <div class="form-group row">
                        <label for="confirm_password" class="col-sm-2 col-form-label"><?php echo $this->lang->line('registration_confirm_password');?></label>
                        <div class="col-sm-10">
                          <input type="password" class="form-control" id="confirm_password" name="confirm_password" placeholder="<?php echo $this->lang->line('registration_confirm_password_must_fill_in_message');?>">
                        </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');?>">
                        </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');?>">
                        </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');?>">
                        </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="register_submit()" type="button" class="btn btn-danger"><?php echo $this->lang->line('registration_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('registration_date');?></th>
						<th><?php echo $this->lang->line('registration_username');?></th>
						<th><?php echo $this->lang->line('registration_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');?>		