<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title><?php echo $page_title;?></title>

  <link rel="shortcut icon" href="<?php echo base_url();?>assets/img/favicon.ico">
  <!-- Google Font: Source Sans Pro -->
  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
  <!-- Font Awesome Icons -->
  <link rel="stylesheet" href="<?php echo base_url();?>assets/plugins/fontawesome-free/css/all.min.css">
  <!-- flag-icon-css -->
  <link rel="stylesheet" href="<?php echo base_url();?>assets/plugins/flag-icon-css/css/flag-icon.min.css">
  <!-- overlayScrollbars -->
  <link rel="stylesheet" href="<?php echo base_url();?>assets/plugins/overlayScrollbars/css/OverlayScrollbars.min.css">
  <!-- DataTables -->
  <link rel="stylesheet" href="<?php echo base_url();?>assets/plugins/datatables-bs4/css/dataTables.bootstrap4.min.css">
  <link rel="stylesheet" href="<?php echo base_url();?>assets/plugins/datatables-responsive/css/responsive.bootstrap4.min.css">
  <link rel="stylesheet" href="<?php echo base_url();?>assets/plugins/datatables-buttons/css/buttons.bootstrap4.min.css">
  <!-- Theme style -->
  <link rel="stylesheet" href="<?php echo base_url();?>assets/dist/css/adminlte.min.css">
  <link rel="stylesheet" href="<?php echo base_url();?>assets/css/custom.css">
</head>
<body class="hold-transition sidebar-mini layout-fixed layout-navbar-fixed layout-footer-fixed">
<div class="wrapper">

  <!-- Preloader -->
  <div class="preloader flex-column justify-content-center align-items-center" style="display: none;">
    <img class="animation__wobble" src="<?php echo base_url();?>assets/img/small_logo.png" alt="<?php echo $this->lang->line('website_name');?>" height="60" width="60">
  </div>

  <!-- Navbar -->
  <nav class="main-header navbar navbar-expand navbar-dark">
    <!-- Left navbar links -->
    <ul class="navbar-nav">
      <li class="nav-item">
        <a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars"></i></a>
      </li>
    </ul>

    <!-- Right navbar links -->
    <ul class="navbar-nav ml-auto">
	  <li class="nav-item">
        <a href="<?php echo base_url();?>account/profile/" class="nav-link">
          <?php echo $this->session->userdata('member_username');?>
        </a>
      </li>
	  <li class="nav-item dropdown">
        <a class="nav-link" data-toggle="dropdown" href="#" aria-expanded="false">
          <i class="flag-icon flag-icon-<?php echo ((  ! $this->session->userdata('lang') || $this->session->userdata('lang') == 'zh-CN') ? 'cn' : 'gb');?>"></i>
        </a>
        <div class="dropdown-menu dropdown-menu-right p-0" style="left: inherit; right: 0px;">
		  <a href="<?php echo base_url();?>language/change/zh-CN/" class="dropdown-item <?php echo ((  ! $this->session->userdata('lang') || $this->session->userdata('lang') == 'zh-CN') ? 'active' : '');?>">
            <i class="flag-icon flag-icon-cn mr-2"></i> <?php echo $this->lang->line('lang_zh_cn');?>
          </a>
          <a href="<?php echo base_url();?>language/change/en/" class="dropdown-item <?php echo (($this->session->userdata('lang') && $this->session->userdata('lang') == 'en') ? 'active' : '');?>">
            <i class="flag-icon flag-icon-gb mr-2"></i> <?php echo $this->lang->line('lang_en');?>
          </a>
        </div>
      </li>
	  <li class="nav-item">
        <a href="<?php echo base_url();?>logout/" class="nav-link" alt="<?php echo $this->lang->line('hf_logout');?>">
          <i class="fas fa-power-off"></i>
        </a>
      </li>
      <li class="nav-item" style="display: none;">
        <a class="nav-link" data-widget="fullscreen" href="#" role="button">
          <i class="fas fa-expand-arrows-alt"></i>
        </a>
      </li>
    </ul>
  </nav>
  <!-- /.navbar -->

  <!-- Main Sidebar Container -->
  <aside class="main-sidebar sidebar-dark-primary elevation-4">
    <!-- Brand Logo -->
    <a href="<?php echo base_url();?>home/" class="brand-link">
      <img src="<?php echo base_url();?>assets/img/small_logo.png" alt="<?php echo $this->lang->line('website_name');?>" class="brand-image img-circle elevation-3" style="opacity: .8">
      <span class="brand-text font-weight-lightfont-weight"><?php echo $this->lang->line('website_name');?></span>
    </a>

    <!-- Sidebar -->
    <div class="sidebar">
      <!-- Sidebar Menu -->
      <nav class="mt-2">
        <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
          <!-- Add icons to the links using the .nav-icon class
               with font-awesome or any other icon font library -->
		  <li class="nav-item">
            <a href="<?php echo base_url();?>home/" class="nav-link <?php echo (($this->uri->segment(1) == 'home') ? 'active' : '');?>">
              <i class="nav-icon fas fa-home"></i>
              <p>
                <?php echo $this->lang->line('hf_home');?>
              </p>
            </a>
          </li>
		  <?php if($this->session->userdata('member_active') AND $this->session->userdata('member_active') == 1) {?>
			<li class="nav-item">
				<a href="<?php echo base_url();?>register/" class="nav-link <?php echo (($this->uri->segment(1) == 'register') ? 'active' : '');?>">
				  <i class="nav-icon fas fa-user-plus"></i>
				  <p>
					<?php echo $this->lang->line('hf_registration');?>
				  </p>
				</a>
			</li>
		  <?php }?>
		  <li class="nav-item has-treeview <?php echo (($this->uri->segment(1) == 'buy') ? 'menu-open' : '');?>">
            <a href="#" class="nav-link <?php echo (($this->uri->segment(1) == 'buy') ? 'active' : '');?>">
              <i class="nav-icon fas fa-cubes"></i>
              <p>
                <?php echo $this->lang->line('hf_package_manager');?>
                <i class="fas fa-angle-left right"></i>
              </p>
            </a>
            <ul class="nav nav-treeview">
              <li class="nav-item">
                <a href="<?php echo base_url();?>buy/" class="nav-link <?php echo (($this->uri->segment(1) == 'buy' && ( ! $this->uri->segment(2) || $this->uri->segment(2) == 'index')) ? 'active' : '');?>">
                  <i class="far fa-circle nav-icon text-orange"></i>
                  <p><?php echo $this->lang->line('hf_buy_package');?></p>
                </a>
              </li>
              <li class="nav-item">
                <a href="<?php echo base_url();?>buy/topup_package/" class="nav-link <?php echo (($this->uri->segment(1) == 'buy' && $this->uri->segment(2) == 'topup_package') ? 'active' : '');?>">
                  <i class="far fa-circle nav-icon text-orange"></i>
                  <p><?php echo $this->lang->line('hf_topup_package');?></p>
                </a>
              </li>
			  <li class="nav-item">
                <a href="<?php echo base_url();?>buy/topup_listing/" class="nav-link <?php echo (($this->uri->segment(1) == 'buy' && $this->uri->segment(2) == 'topup_listing') ? 'active' : '');?>">
                  <i class="far fa-circle nav-icon text-orange"></i>
                  <p><?php echo $this->lang->line('hf_topup_package_history');?></p>
                </a>
              </li>
            </ul>
          </li>
		  <li class="nav-item has-treeview <?php echo (($this->uri->segment(1) == 'insurance') ? 'menu-open' : '');?>">
            <a href="#" class="nav-link <?php echo (($this->uri->segment(1) == 'insurance') ? 'active' : '');?>">
              <i class="nav-icon fas fa-user-shield"></i>
              <p>
                <?php echo $this->lang->line('hf_insurance_manager');?>
                <i class="fas fa-angle-left right"></i>
              </p>
            </a>
            <ul class="nav nav-treeview">
              <li class="nav-item">
                <a href="<?php echo base_url();?>insurance/claim/" class="nav-link <?php echo (($this->uri->segment(1) == 'insurance' && $this->uri->segment(2) == 'claim') ? 'active' : '');?>">
                  <i class="far fa-circle nav-icon text-orange"></i>
                  <p><?php echo $this->lang->line('hf_claim_insurance');?></p>
                </a>
              </li>
			  <li class="nav-item">
                <a href="<?php echo base_url();?>insurance/claim_listing/" class="nav-link <?php echo (($this->uri->segment(1) == 'insurance' && $this->uri->segment(2) == 'claim_listing') ? 'active' : '');?>">
                  <i class="far fa-circle nav-icon text-orange"></i>
                  <p><?php echo $this->lang->line('hf_claim_insurance_history');?></p>
                </a>
              </li>
			  <li class="nav-item">
                <a href="<?php echo base_url();?>insurance/buy_listing" class="nav-link <?php echo (($this->uri->segment(1) == 'insurance' && $this->uri->segment(2) == 'buy_listing') ? 'active' : '');?>">
                  <i class="far fa-circle nav-icon text-orange"></i>
                  <p><?php echo $this->lang->line('hf_buy_insurance_history');?></p>
                </a>
              </li>
            </ul>
          </li>
		  <li class="nav-item has-treeview <?php echo (($this->uri->segment(1) == 'topup') ? 'menu-open' : '');?>">
            <a href="#" class="nav-link <?php echo (($this->uri->segment(1) == 'topup') ? 'active' : '');?>">
              <i class="nav-icon fas fa-dollar-sign"></i>
              <p>
                <?php echo $this->lang->line('hf_topup');?>
                <i class="fas fa-angle-left right"></i>
              </p>
            </a>
            <ul class="nav nav-treeview">
              <li class="nav-item">
                <a href="<?php echo base_url();?>topup/" class="nav-link <?php echo (($this->uri->segment(1) == 'topup' && ( ! $this->uri->segment(2) || $this->uri->segment(2) == 'index')) ? 'active' : '');?>">
                  <i class="far fa-circle nav-icon text-orange"></i>
                  <p><?php echo $this->lang->line('hf_account_topup');?></p>
                </a>
              </li>
			  <li class="nav-item">
                <a href="<?php echo base_url();?>topup/listing/" class="nav-link <?php echo (($this->uri->segment(1) == 'topup' && $this->uri->segment(2) == 'listing') ? 'active' : '');?>">
                  <i class="far fa-circle nav-icon text-orange"></i>
                  <p><?php echo $this->lang->line('hf_topup_history');?></p>
                </a>
              </li>
            </ul>
          </li>
		  <li class="nav-item has-treeview <?php echo (($this->uri->segment(1) == 'transfer') ? 'menu-open' : '');?>">
            <a href="#" class="nav-link <?php echo (($this->uri->segment(1) == 'transfer') ? 'active' : '');?>">
              <i class="nav-icon fas fa-exchange-alt"></i>
              <p>
                <?php echo $this->lang->line('hf_transfer');?>
                <i class="fas fa-angle-left right"></i>
              </p>
            </a>
            <ul class="nav nav-treeview">
              <li class="nav-item">
                <a href="<?php echo base_url();?>transfer/" class="nav-link <?php echo (($this->uri->segment(1) == 'transfer' && ( ! $this->uri->segment(2) || $this->uri->segment(2) == 'index')) ? 'active' : '');?>">
                  <i class="far fa-circle nav-icon text-orange"></i>
                  <p><?php echo $this->lang->line('hf_account_transfer');?></p>
                </a>
              </li>
			  <li class="nav-item">
                <a href="<?php echo base_url();?>transfer/listing/" class="nav-link <?php echo (($this->uri->segment(1) == 'transfer' && $this->uri->segment(2) == 'listing') ? 'active' : '');?>">
                  <i class="far fa-circle nav-icon text-orange"></i>
                  <p><?php echo $this->lang->line('hf_transfer_history');?></p>
                </a>
              </li>
            </ul>
          </li>
		  <li class="nav-item has-treeview <?php echo (($this->uri->segment(1) == 'convert') ? 'menu-open' : '');?>">
            <a href="#" class="nav-link <?php echo (($this->uri->segment(1) == 'convert') ? 'active' : '');?>">
              <i class="nav-icon fas fa-sync"></i>
              <p>
                <?php echo $this->lang->line('hf_convert');?>
                <i class="fas fa-angle-left right"></i>
              </p>
            </a>
            <ul class="nav nav-treeview">
              <li class="nav-item">
                <a href="<?php echo base_url();?>convert/" class="nav-link <?php echo (($this->uri->segment(1) == 'convert' && ( ! $this->uri->segment(2) || $this->uri->segment(2) == 'index')) ? 'active' : '');?>">
                  <i class="far fa-circle nav-icon text-orange"></i>
                  <p><?php echo $this->lang->line('hf_account_convert');?></p>
                </a>
              </li>
			  <li class="nav-item">
                <a href="<?php echo base_url();?>convert/listing/" class="nav-link <?php echo (($this->uri->segment(1) == 'convert' && $this->uri->segment(2) == 'listing') ? 'active' : '');?>">
                  <i class="far fa-circle nav-icon text-orange"></i>
                  <p><?php echo $this->lang->line('hf_convert_history');?></p>
                </a>
              </li>
            </ul>
          </li>
		  <li class="nav-item has-treeview <?php echo (($this->uri->segment(1) == 'withdrawal') ? 'menu-open' : '');?>">
            <a href="#" class="nav-link <?php echo (($this->uri->segment(1) == 'withdrawal') ? 'active' : '');?>">
              <i class="nav-icon fas fa-coins"></i>
              <p>
                <?php echo $this->lang->line('hf_withdrawal');?>
                <i class="fas fa-angle-left right"></i>
              </p>
            </a>
            <ul class="nav nav-treeview">
              <li class="nav-item">
                <a href="<?php echo base_url();?>withdrawal/" class="nav-link <?php echo (($this->uri->segment(1) == 'withdrawal' && ( ! $this->uri->segment(2) || $this->uri->segment(2) == 'index')) ? 'active' : '');?>">
                  <i class="far fa-circle nav-icon text-orange"></i>
                  <p><?php echo $this->lang->line('hf_withdraw_request');?></p>
                </a>
              </li>
			  <li class="nav-item">
                <a href="<?php echo base_url();?>withdrawal/listing/" class="nav-link <?php echo (($this->uri->segment(1) == 'withdrawal' && $this->uri->segment(2) == 'listing') ? 'active' : '');?>">
                  <i class="far fa-circle nav-icon text-orange"></i>
                  <p><?php echo $this->lang->line('hf_withdraw_history');?></p>
                </a>
              </li>
            </ul>
          </li>
		  <li class="nav-item">
            <a href="<?php echo base_url();?>network/" class="nav-link <?php echo (($this->uri->segment(1) == 'network') ? 'active' : '');?>">
              <i class="nav-icon fas fa-network-wired"></i>
              <p>
                <?php echo $this->lang->line('hf_placement_group');?>
              </p>
            </a>
          </li>
		  <li class="nav-item">
            <a href="<?php echo base_url();?>income/" class="nav-link <?php echo (($this->uri->segment(1) == 'income') ? 'active' : '');?>">
              <i class="nav-icon fas fa-chart-pie"></i>
              <p>
                <?php echo $this->lang->line('hf_income_details');?>
              </p>
            </a>
          </li>
		  <li class="nav-item">
            <a href="<?php echo base_url();?>message/" class="nav-link <?php echo (($this->uri->segment(1) == 'message') ? 'active' : '');?>">
              <i class="nav-icon fas fa-envelope"></i>
              <p>
                <?php echo $this->lang->line('hf_inbox_message');?>
				<?php if(get_user_unread_message() > 0) {?>
				<span class="badge badge-info"><?php echo get_user_unread_message();?></span>
				<?php }?>
              </p>
            </a>
          </li>
		  <li class="nav-item">
            <a href="<?php echo base_url();?>announcement/" class="nav-link <?php echo (($this->uri->segment(1) == 'announcement') ? 'active' : '');?>">
              <i class="nav-icon fas fa-bullhorn"></i>
              <p>
                <?php echo $this->lang->line('home_announcement');?>
              </p>
            </a>
          </li>
		  <li class="nav-item has-treeview <?php echo (($this->uri->segment(1) == 'account') ? 'menu-open' : '');?>">
            <a href="#" class="nav-link <?php echo (($this->uri->segment(1) == 'account') ? 'active' : '');?>">
              <i class="nav-icon fas fa-cogs"></i>
              <p>
                <?php echo $this->lang->line('hf_settings');?>
                <i class="fas fa-angle-left right"></i>
              </p>
            </a>
            <ul class="nav nav-treeview">
              <li class="nav-item">
                <a href="<?php echo base_url();?>account/profile/" class="nav-link <?php echo (($this->uri->segment(1) == 'account' && $this->uri->segment(2) == 'profile') ? 'active' : '');?>">
                  <i class="far fa-circle nav-icon text-orange"></i>
                  <p><?php echo $this->lang->line('hf_profile');?></p>
                </a>
              </li>
			  <li class="nav-item">
                <a href="<?php echo base_url();?>account/login_password/" class="nav-link <?php echo (($this->uri->segment(1) == 'account' && $this->uri->segment(2) == 'login_password') ? 'active' : '');?>">
                  <i class="far fa-circle nav-icon text-orange"></i>
                  <p><?php echo $this->lang->line('hf_login_password');?></p>
                </a>
              </li>
			  <li class="nav-item">
                <a href="<?php echo base_url();?>account/security_password/" class="nav-link <?php echo (($this->uri->segment(1) == 'account' && $this->uri->segment(2) == 'security_password') ? 'active' : '');?>">
                  <i class="far fa-circle nav-icon text-orange"></i>
                  <p><?php echo $this->lang->line('hf_security_password');?></p>
                </a>
              </li>
			  <li class="nav-item">
                <a href="<?php echo base_url();?>account/account_binding/" class="nav-link <?php echo (($this->uri->segment(1) == 'account' && $this->uri->segment(2) == 'account_binding') ? 'active' : '');?>">
                  <i class="far fa-circle nav-icon text-orange"></i>
                  <p><?php echo $this->lang->line('hf_account_binding');?></p>
                </a>
              </li>
			  <li class="nav-item">
                <a href="<?php echo base_url();?>account/share/" class="nav-link <?php echo (($this->uri->segment(1) == 'account' && $this->uri->segment(2) == 'share') ? 'active' : '');?>">
                  <i class="far fa-circle nav-icon text-orange"></i>
                  <p><?php echo $this->lang->line('hf_share_invitation_link');?></p>
                </a>
              </li>
            </ul>
          </li>
        </ul>
      </nav>
      <!-- /.sidebar-menu -->
    </div>
    <!-- /.sidebar -->
  </aside>

  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">