<!doctype html>
<html lang="en"  class="w-[640px]">
   <head>
   <?php echo view('user/layout/head');?>
   </head>
   <style>
         .prof_image{
         width:60px;
         height:60px;
         border-radius:50px;
         position:relative;
         margin-right:10px;
         }
         /* .earn-icon:hover .edit {
         display: block;
         } */
         .edit  {
         position: absolute;
         /* display: flex; */
         top: 5px;
         /* float: left; */
         /* left: 240px; */
         font-size: 13px;
         border: 1px solid #ffad00;
         background: #ffad00;
         border-radius: 18px;
         /* color: #fff; */
         padding: 5px;
         /* display:none; */
         }
      </style>
   <body class="section-overflow">
      <!--banner start -->
      <section class="banner-bg overall-bg ">
         <div class="container">
         <?php echo view('user/layout/header');?>
         </div>
         <section class="dash-wrap profle-wrap">
            <div class="container">
               <div class="row">

               <?php 
                  use App\Libraries\MyEncrypt;
                  use App\Helpers\site_helper;
                  use App\Helpers\form_helper;
                  $this->db = db_connect();
                  $this->session = session();
                  $this->common_model = model('CommonModel');
                  helper('form_helper');
                  
                  $uusersid = $this->session->get('uusersid');
                  $user=$this->db->query("SELECT * FROM uusers WHERE uusersid='".$uusersid."'")->getRow();
                  
                  if(!empty($user->profile))
                  {
                     $image = $user->profile; 
                  }
                  else
                  {
                     $image="profile.png";
                  }
                  
                  ?>
                  <div class="col-12">
                     <ul class="menu-profile list-unstyled mb-0 ">
                        <li class=" main-profile d-flex align-items-center justify-content-between">
                           <a href="#" class="menu-list d-flex align-items-center justify-content-between text-decoration-none">
                              <div class="earning d-flex align-items-center text-white">
                                 <div class="earn-icon">
                                 <img src="<?php echo base_url();?>/assets/images/profile/<?php echo $image;?>" class="prof_image">
                                    <div class="edit">
                           <a href="<?php echo base_url();?>/profile"><i class="fa fa-pencil fa-lg" style="color:#000 !important"></i></a></div>
                                 </div>
                                 <div class="earn-content  ms-2">
                                    <h5 class="text-white mb-0"><?php echo $user->username;?></h5>
                                    <span id="link" style="display:none"><?php echo $user->invitation_code;?></span>
                                    <p class="text-primary d-flex align-items-center justify-content-around"> ID : &nbsp;<?php echo $user->invitation_code;?> &nbsp;
                           <a href="javascript:void(0);" class="text-decoration-none" onclick="javascript:copyToClipboard('#link')"><i class="fa-regular fa-copy "></i></a> </p>
                           </div>
                           </div>
                           </a>
                           <a href="<?php echo base_url();?>/profile">     <i class="fa-solid fa-greater-than"></i></a>
                        </li>
                     </ul>
                     <ul class="menu_admin list-unstyled mb-0 mt-3">
                        <li>
                           <a href="<?php echo base_url();?>/activate/account" class="menu-list d-flex align-items-center justify-content-between text-decoration-none">
                              <div class="menu-content">
                                 <i class="fa fa-tachometer-alt text-primary"> </i> <span class="ms-2">Membership</span>
                              </div>
                              <div class="menu-list-arrow">
                                 <i class="fa-solid fa-greater-than"></i>
                              </div>
                           </a>
                        </li>
                        <li>
                           <a href="<?php echo base_url();?>/apikeylist" class="menu-list d-flex align-items-center justify-content-between text-decoration-none">
                              <div class="menu-content">
                                 <i class="fa fa-cogs text-primary"> </i><span class="ms-2">API Binding</span>
                              </div>
                              <div class="menu-list-arrow">
                                 <i class="fa-solid fa-greater-than"></i>
                              </div>
                           </a>
                        </li>
                        <li>
                           <a href="<?php echo base_url();?>/user/security" class="menu-list d-flex align-items-center justify-content-between text-decoration-none">
                              <div class="menu-content">
                                 <i class="fa fa-box-open text-primary"> </i><span class="ms-2">Security Center</span>
                              </div>
                              <div class="menu-list-arrow">
                                 <i class="fa-solid fa-greater-than"></i>
                              </div>
                           </a>
                        </li>
                       
                     </ul>
                     <ul class="menu_admin list-unstyled mb-0 mt-3">
                        <li>
                           <a href="<?php echo base_url();?>/user/asset" class="menu-list d-flex align-items-center justify-content-between text-decoration-none">
                              <div class="menu-content">
                                 <i class="fa fa-share-square  text-primary"> </i>  <span class="ms-2">My Assets</span>
                              </div>
                              <div class="menu-list-arrow">
                                 <i class="fa-solid fa-greater-than"></i>
                              </div>
                           </a>
                        </li>
                        <li>
                           <a href="<?php echo base_url();?>/network" class="menu-list d-flex align-items-center justify-content-between text-decoration-none">
                              <div class="menu-content">
                                 <i class="fa fa-lock  text-primary" > </i><span class="ms-2">My Team</span>
                              </div>
                              <div class="menu-list-arrow">
                                 <i class="fa-solid fa-greater-than"></i>
                              </div>
                           </a>
                        </li>
                        <li>
                           <a href="<?php echo base_url();?>/rank" class="menu-list d-flex align-items-center justify-content-between text-decoration-none">
                              <div class="menu-content ">
                                 <i class="fa fa-cogs text-primary"> </i><span class="ms-2"> Ranking</span>
                              </div>
                              <div class="menu-list-arrow">
                                 <i class="fa-solid fa-greater-than"></i>
                              </div>
                           </a>
                        </li>
                     </ul>
                     <ul class="menu_admin list-unstyled mb-0 mt-3">
                        <li>
                           <a href="<?php echo base_url();?>/news" class="menu-list d-flex align-items-center justify-content-between text-decoration-none">
                              <div class="menu-content ">
                                 <i class="fa fa-share-square text-primary"> </i>  <span class="ms-2">Announcement</span>
                              </div>
                              <div class="menu-list-arrow">
                                 <i class="fa-solid fa-greater-than"></i>
                              </div>
                           </a>
                        </li>
                        <li>
                           <a href="<?php echo base_url();?>/user/invite" class="menu-list d-flex align-items-center justify-content-between text-decoration-none">
                              <div class="menu-content">
                                 <i class="fa fa-lock  text-primary"> </i><span class="ms-2">Share Friends</span>
                              </div>
                              <div class="menu-list-arrow">
                                 <i class="fa-solid fa-greater-than"></i>
                              </div>
                           </a>
                        </li>
                        <li>
                           <a href="<?php echo base_url();?>/logout" class="menu-list d-flex align-items-center justify-content-between text-decoration-none">
                              <div class="menu-content ">
                                 <i class="fa fa-cogs text-primary"> </i><span class="ms-2"> Logout</span>
                              </div>
                              <div class="menu-list-arrow">
                                 <i class="fa-solid fa-greater-than"></i>
                              </div>
                           </a>
                        </li>
                     </ul>
                  </div>
               </div>
            </div>
            </div>
         </section>
         <!--footer start -->
         <?php echo view('user/layout/footer');?>
         <!--footer end -->
      </section>
      <!-- Modal -->
      <div class="modal fade  modal-fullscreen" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
         <div class="modal-dialog">
            <div class="modal-content">
               <div class="modal-body">
                  <button type="button"    class="btn-close" data-bs-dismiss="modal" aria-label="Close" style="float: right;"></button>
                  <div class="embed-responsive embed-responsive-16by9">
                     <iframe  class="embed-responsive-item" src="https://www.youtube.com/embed/zpOULjyy-n8?rel=0" allowfullscreen></iframe>
                  </div>
               </div>
            </div>
         </div>
      </div>
      <?php echo view('user/layout/footer-script');?>

      <script>
         AOS.init({
         });
      </script>
           <script>
         function copyToClipboard(element) {
         var $temp = $("<input>");
         $("body").append($temp);
         $temp.val($(element).html()).select(); //Note the use of html() rather than text()
         document.execCommand("copy");
         $temp.remove();
         
         }
      </script>
   </body>
</html>
