<!doctype html>
<html lang="en" translate="no" class="w-[640px] mx-auto md:w-full">
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <title>Profile</title>
      <?php echo view('user/layout/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: 81px;
         /* float: left; */
         /* left: 240px; */
         font-size: 13px;
         border: 1px solid #ffad00;
         background: #ffad00;
         border-radius: 18px;
         /* color: #fff; */
         padding: 5px;
         /* display:none; */
         }
    
         
     
      </style>
   </head>
   <body class="reg-overflow">
      <section class="  dash-banner-bg banner-bg profile">
         <div class="container">
            <!---header start---->
            <?php echo view('user/layout/header');?>
            <!---header end---->
            <!---banner start---->
            <div class="row">
               <div class="col-lg-12">
                  <div class="profile-form">
                     <div class="title text-center pt-2">
                        <h2 class="text-primary ">Profile</h2>
                     </div>
                     <ul class="menu_admin list-unstyled mb-0 mt-4">
                        <li class="bg-black 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">
                              <?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="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>
                           <!-- <a href=""><iconify-icon icon="pajamas:profile"></iconify-icon></a> -->
                           </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-4">
                        <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-shield 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>
                        <li>
                           <a href="<?php echo base_url();?>/rewardhistory" class="menu-list d-flex align-items-center justify-content-between text-decoration-none">
                              <div class="menu-content ">
                                 <i class="fa fa-bank text-primary"> </i> <span class="ms-2">Rewards</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-4">
                        <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-wallet  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-users  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-star 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-4">
                        <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-bell 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-share-alt  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-sign-out 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>
            <?php echo view('user/layout/footer');?>
         </div>
      </section>
      <!---banner end---->
      <?php echo view('user/layout/footer-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>