<header class="pt-3 pb-3">
<?php 
      $uri = service('uri');
      $segment1=$uri->getSegment(1); 
      
  
      $segment2=$uri->getSegment(2); 
      $url='user/dashboard';
      if(!empty($segment2))
      {
        
         if($segment2=='profile')
         {
            $url="user/dashboard";
            $title = "Profile";
         }
         else if($segment2=='security' || $segment2=='asset' || $segment2=='invite' || $segment2=='account')
         {
           $url="user/profile";
         }

         else if($segment2=='recharge' || $segment2=='asset_history' )
         {
           $url="user/asset";
         }
         else if($segment1=='trades')
         {
             $url='tradedetails/'.$segment2;
             
         }
         else if($segment1=='profit_details')
         {
             $url="revenue";
         }
         else if($segment1=='tradedetails')
         {
             $url="user/quantify";
         }
         else if($segment1=='tradesettings')
         {
             $url="tradedetails/".$segment2;
         }
         else if($segment2=='binance' ||  $segment2=='bybit' ||  $segment2=='pionex')
         {
             $url="apikeylist";
         }
       
         
         
        
      }
      else
      {
         if($segment1=='apikeylist' || $segment1=='balance' || $segment1=='asset' || $segment1=='news' || $segment1=='rank' || $segment1=='network' || $segment1=='profile')
         {
           $url="user/profile";
         }
         else if($segment1=='binding')
         {
           $url="apikeylist";
         }
         else if($segment1=='withdrawfund' || $segment1=='transfer')
         {
           $url="user/asset";
         }
         

         
      }

      if(!empty($segment2))
      {
        if($segment2=='profile')
        {
           
           $title = "Profile";
        }
        else if($segment2=='asset')
        {
           
           $title = "My Assets";
        }
        else if($segment2=='recharge')
        {
           
           $title = "Recharge";
        }
        else if($segment2=='invite')
        {
           
           $title = "Share Friends";
        }
        else if($segment2=='security')
        {
           
           $title = "Security Center";
        }
        else if($segment2=='binance')
        {
           
           $title = "Binance Binding";
        }
        else if($segment2=='bybit')
        {
           
           $title = "Bybit Binding";
        }
        else if($segment2=='pionex')
        {
           
           $title = "Pionex Binding";
        }
        
        else if($segment2=='asset_history')
        {
           
           $title = "Assets History";
        }
        else if($segment2=='account')
        {
           
           $title = "Activation";
        }
        else if($segment2=='quantify')
        {
           
           $title = "Trading Quantify";
        }
        else if($segment1=='tradedetails')
        {
           $title = "Trade";
        }
        else if($segment1=='trades')
        {
           $title = "Coin Records";
        }
        else if($segment1=='tradesettings')
        {
           $title = "Transaction Settings";
        }
        else if($segment2=='dashboard')
        {
           
           $title = "Dashboard";
        }
    
        
      }
      else
      {
        if($segment1=='profile')
        {
          
           $title = "My Profile";
        }
        else if($segment1=='informations')
        {
          
           $title = "Logs";
        }
        else if($segment1=='news')
        {
          
           $title = "Announcement";
        }
        else if($segment1=='news_details')
        {
          
           $title = "Announcement Details";
        }
        else if($segment1=='apikeylist')
        {
          
           $title = "API Binding";
        }
        else if($segment1=='network')
        {
          
           $title = "My Team";
        }
        else if($segment1=='rank')
        {
          
           $title = "Membership";
        }
        else if($segment1=='botStatistic')
        {
           
           $title = "Bot Statistic";
        } else if($segment1=='trade_orders')
        {
           
           $title = "All Records";
        }
        else if($segment1=='revenue')
        {
           
           $title = "Billing Details";
        }
        else if($segment1=='transfer')
        {
           
           $title = "Transfer";
        }
        else if($segment1=='withdrawfund')
        {
           
           $title = "Withdraw";
        }
         else if($segment1=='rewardhistory')
        {
           
           $title = "Reward Summary";
        }
       
      }
    
      ?>
    <div class="row">
      <div class="col-1">
          <div class="back-arrow">
            <a href="<?php echo base_url().'/'.$url;?>">
                <iconify-icon icon="bi:arrow-left-circle-fill"></iconify-icon>
            </a>
          </div>
      </div>
      <div class="col-8">
          <div class="title title-top py-2">
            <h2 class="text-primary aleo"><?php echo $title;?></h2>
          </div>
      </div>
      <div class="col-3">
          <div class="common-icon d-flex align-items-center justify-content-end">
            <div class="wallet-icon header-icon me-2">
          <a href="<?php echo base_url();?>/user/asset" class="text-decoration-none "><iconify-icon icon="ph:wallet-bold"></iconify-icon></a>
          </div>
          <div class="header-icon">
          <a href="<?php echo base_url();?>/news" class="text-decoration-none"><iconify-icon icon="mdi:notifications-none"></iconify-icon></a>
          </div>
          </div>
          </div>
    </div>
</header>
<?php
  $this->db = db_connect();
  $this->session = session();
  $uusersid = $this->session->get('uusersid');
  
  if(empty($uusersid))
  {
    throw new \CodeIgniter\Router\Exceptions\RedirectException('login');	
  }
  
  ?>

  