<!doctype html>
<html lang="en">
<?php 
$validation =  \Config\Services::validation();
use App\Libraries\MyEncrypt;

$this->db = db_connect();
 $session= \Config\Services::session();
echo view('user/common_style1');?>
</head>
<body>
<?php echo view('user/common_header');?>
 
<link rel="stylesheet" href="<?php echo base_url();?>styles/fonts/Socialico/stylesheet.css">
<link rel="stylesheet" href="<?php echo base_url();?>styles/css/set1.css">
<script src="<?php echo base_url();?>styles/js/modernizr.js"></script>
 <style>
  .contact_one .contact_left_content form input[type="text"]{border:0px;}
  .prfledit label, .prfledit label {
  padding-top: 10px;
}

.help-block {
    color: #eb5055;
    margin: 0em 0em 0em !important;
}
p.frgtpwd {

text-transform: none;
  }
  .profilesub ul li label{
  display: inline;
  color: #eb5055;
}
  </style>
        

</head>
  <body>
      <?php
        
        $currency_info = defaultcurrency();
      ?>

<?php 
  $first_dat=$this->db->query("SELECT * FROM coin_info"); 
  $coin_det=$first_dat->getResult();    
  $site_lang_data = $this->common_model->GetSiteSettings('site');
  $token_symbol =$site_lang_data[19]->site_value;
  $session= \Config\Services::session();
  $uusersid=SESSION('uusersid');
?>           
<section class="trading-bg">
  <div class="container-fluid">
   <?php echo view('user/dashboard_header');?>
    <div class="row">
      <div class="">
        <div class="trading_pairbg bg-white inner-box mt-3 px-3 py-4">
          <div class="inner-title pb-3">
            <h6 class="color-2" style="margin-top: 30px;"><i class="fab fa-bitcoin"></i>CIRCLE</h6>
          </div>
          
          <div class=" offset-lg-1">
      <div class="row row-cols-lg-2 row-cols-md-3">
          <?php
          $trader=$this->db->query("SELECT * FROM trader where uusersid != '".$uusersid."'")->getResult();
          if($trader) 
          {
            $myencrypt = new MyEncrypt;
            foreach ($trader as $row) 
            {
              // $id=$row->coin_id;
              // $coin = $this->db->query("SELECT * FROM coin_info WHERE coid=$id")->getResult();
              // $con=$coin[0];
 ?>

          <div class="row" style="margin-top: 25px;">
            <div class="col-lg-2">
              <div class="pair-exc">

                <?php 

                if($row->trade_image)
                {
                  ?>
                  <img src=<?php echo base_url().'/uploads/trader/'. $row->trade_image;?> width=100 height=100 style="border-radius: 50px;">
                  <?
                }
                else
                {
                  ?>
                   <img src=<?php echo base_url().'/uploads/trader/default.jpeg';?> width=100 height=100 >
                  <?
                }
                ?>
              </div>
            </div>

            <div class="col-lg-8" style="margin-left: 20px;">
              <div class="pair-tab">
                <div class="trading-tab">
                  <ul class="nav nav-pills" id="pills-tab" role="tablist">
                    <li class="nav-item" role="presentation">
                      <h5 class="mont text-black"><span type="button" style="background:#29b6f6;color:white;margin-right: 10px;"><b>Free</b></span><b><?php echo $row->trade_mode?></b></h5>
                    </li>
                  </ul>
                  <ul class="nav nav-pills" id="pills-tab" role="tablist">
                    <li class="nav-item" role="presentation">

                      <img src=<?php echo base_url().'/uploads/trader/arrow.jpeg';?> width=25 height=25 >

                    </li>
                    <li class="nav-item" role="presentation">
                      <h5 class="mont text-black" >sync strategy is turned on</h5>
                    </li>
                    <li class="nav-item" role="presentation">
                      <button class="nav-link active" id="pills-home-tab" data-bs-toggle="pill" data-bs-target="#pills-home" type="button" role="tab" aria-controls="pills-home" aria-selected="true" style="margin-left: 30px;border-radius: 15px;"><a style="color:white;" href="<?php echo base_url().'/circle/user_view/'.$row->id;?>">View</a></button>
                    </li>
                  </ul>
               
                  <ul class="nav nav-pills" id="pills-tab" role="tablist">
                    <li class="nav-item" role="presentation">
                      <h5 class="mont text-black" style="margin-left:12px;">
                        <?php
                          $trade=$this->db->query("SELECT * FROM trader_activation WHERE trader_id=$row->id AND activation=1 ORDER BY id DESC LIMIt 4")->getResult();
                          if($trade) 
                          {
                            $myencrypt = new MyEncrypt;
                            foreach ($trade as $row1) 
                            {
                              $trid=$row1->trader_id;
                               $trad_img=$this->db->query("SELECT * FROM uusers WHERE uusersid='".$row1->uusersid."'")->getResult();
                               foreach ($trad_img as $row2)
                               {
                                if($row2->profile)
                                {
                                ?>
                                  <img src=<?php echo base_url().'/public/content/profile/'. $row2->profile;?> width=25 height=25  style="margin-left:-12px;border-radius: 25px;display:none;">
                                <?php
                                }
                                else
                                {
                                ?>
                                <img src=<?php echo base_url().'/public/content/profile/default.jpeg' ;?> width=30 height=30  style="margin-left:-12px;border-radius: 25px;display:none;">
                                <?php
                                }
                              }
                            }
                          }                        
                        $trade1=$this->db->query("SELECT * FROM trader_activation WHERE trader_id=$row->id AND activation=1")->getNumRows();
                        ?>
                        <span><b><?php echo $trade1;?></b></span> people joined
                      </h5>
                    </li>
                  </ul>
                </div>
              </div> 
              <div class="pair-tab" style="display:none;">
                <div class="trading-tab">
                  <ul class="nav nav-pills mb-3" id="pills-tab" role="tablist">
                    <li class="nav-item" role="presentation">
                      <h5 class="mont text-black"><b><?php echo $id;?></b></h5>
                    </li>
                  </ul>
                </div>
              </div>
            </div>
          </div>
        
          <?php
          }
        }
          ?>
        </div>
      </div>
        </div>
      </div>
    </div>
  </div>
</section>


</body>

<script src="<?php echo base_url();?>styles/js/jquery-1.12.2.min.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>assets/js/formValidation.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>assets/js/bootstrap.js"></script>
<script src="<?php echo base_url();?>/assets/boots/js/select_min.js"></script>
<link rel="stylesheet" type="text/css" href="<?php echo base_url();?>/assets/boots/css/select2.css">
<?php
 echo view('user/footer1');
  echo view('user/common_script');
?> 
</html>

        
        