<style type="text/css">
  .imgBtn{
    position:absolute;z-index:2;top:0;left:0;filter: alpha(opacity=0);-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";opacity:0;background-color:transparent;color:transparent;
  }
  .format_txt{
    font-size: 11px;
    color: red;
  }
  .label-info{
    background-color: #7d296e !important;
  }
</style>
<script type="text/javascript">
  $(document).ready(function () {

$(".loader-wrapper").hide();
  })

  function showLoader()
    {
      $(".loader-wrapper").show();
    }
</script>
<div id="page-wrapper">
  <div class="container-fluid"> 
    <!-- Page Heading -->
    <div class="row">
      <div class="col-lg-12">
        <h4 class="page-header">  Import excel file for Agent</h4>
      </div>
      <div id="status_div" class="col-md-5">
       
                        
            <?php if($this->session->flashdata('err')) { ?>
              <?php echo $this->session->flashdata('err');?>
            <?php } ?>
       
      </div>

      <div class="clearfix"></div>
      <div class="col-md-4">
      <div class="bg-widget">
    
<!--<div class="col-lg-9"> -->
                	  
                          <?php $attributes = array('id' => 'upload','method'=>'post');
                        echo form_open_multipart('user/do_file_upload', $attributes);
                        ?>
                        
                    
                    

                     <!-- <div class="form-group">  
                       <?php $arr = array(
                                      'name'          => 'attachment',
                                      'id'            => 'attachment',
                                      'class'         => 'imgBtn',
                                      'type'          => 'file'
                                    
                                      
                              );
                        echo form_input($arr);?>  
                       
                    </div> -->


                      <div style="position:relative;">
    <a class='btn btn-default btn-sm' href='javascript:;'>
    <i class="fa fa-file-excel-o fa-lg" aria-hidden="true"></i>
      Choose File...
      <input id="attachment" type="file" style='position:absolute;z-index:2;top:0;left:0;filter: alpha(opacity=0);-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";opacity:0;background-color:transparent;color:transparent;' name="attachment" size="40"  onchange='$("#upload-file-info").html($(this).val());'>
      <span class='label label-info' id="upload-file-info"></span>
    </a>
    &nbsp;
    
  </div>





                    <div class="form-group format_txt"><?php echo form_label('This feature support only .xls and .xlsx formats');?></div>    
                    <div class="text-center" style="margin-top:30px;"> 
                    <?php
                                                $submit_btn = array(
                                                    'type' => 'submit',
                                                    'name' => 'submit',
                                                    'value' => 'UPLOAD',
                                                    'id' => 'submit',
                                                    'class' => 'btn btn-default btn-sm',
                                                    'tabindex' => '4',
                                                    'onclick'=>'showLoader();'
                                                );
                            echo form_submit($submit_btn);
                            ?>
                    </div>
                     <div class="loader-wrapper" >
 <div class="loader-container">
   <div class="loader" id="loader">Loading...</div>
 </div>
</div>      
                      </form> 

      </div>
      </div>
 <div  class="col-md-4"></div>
      <div  class="col-md-4">
      Click  <button class="btn btn-secondary btn-s" onclick="window.location='<?php echo base_url(); ?>uploads/Member Registration-sample.xls'"><i class="fa fa-file-excel-o" aria-hidden="true"></i></button> to download sample file.
       </div>
   
    </div>
  </div>
</div>





