<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <?php
      $this->load->view('user/common_style');
      $this->load->view('user/header');
    ?> 
  
</head>
  <body >
      <?php
        $this->load->view('user/login_header');
        $currency_info = defaultcurrency();
      ?>

     <div class="col-lg-9 col-md-9 col-sm-12 col-xs-12">
      
       <div class="table-list clearfix mb-20">
    
    <h4 class="other-title theme-color"><?php echo $this->lang->line('menu_ex_trans');?></h4>
    
    
    <div class="table-responsive  main-table">
       
        <table>
          <thead>
            <tr>
              <th><?php echo $this->lang->line('menu_ex_time');?></th>
              <th><?php echo $this->lang->line('menu_ex_type');?></th>
              <th><?php echo $this->lang->line('menu_ex_amount');?></th>
              <th><?php echo $this->lang->line('menu_ex_desc');?></th>
            </tr>
          </thead>
          <tbody>
          <?php
            $userid=$this->session->userdata('uusersid');

            $res=$this->db->query("select * from history where type not in('token','Fund_send','Fund_received') and  uusersid='$userid'");
            $row=$res->result();
            if($row)
            {
              foreach($row as $row)
              {
                $type=$row->type;

                $first_dat=$this->db->query("select * from coin_info where coid='".$row->currency."'");
                $fir_d=$first_dat->result();
                $sec_dat=$this->db->query("select * from coin_info where coid='".$row->market_type."'");
                $sec_d=$sec_dat->result();
                

              ?>
                <tr>
                  <td><?php echo $row->date;?></td>
                  <td><?php echo ucfirst($type);?></td>
                  <td><?php echo $row->amount;?> <?php echo strtoupper($fir_d[0]->coin_symbol);?></td>
                  <td><?php echo $row->description;?></td>
                  

                </tr>

                <?php
              }

            }

          ?>
         
            
           
          </tbody>
        </table>

      </div>
    
    
    
    
    
    
    
    </div>
    
    </div>
    
    </div>
    
  </div>
</div>

<?php
$this->load->view('user/footer');
$this->load->view('user/common_script');
  // $this->load->view('user/result_check');
?>
  </body>
</html>
