<section class="content_wrapper profile" id="profile">
               <div class="container clearfix">
                  <div class="profile_block clearfix">
                     <div class="left_block">
                        <div class="profile_box clearfix">
                           <div class="change_avatar">
                              <a href="javascript:void(0)">
                              <?php if(!empty($userDetials)){ 
                                      $zodiac_other = '';   
                                      if($userDetials['accounttype']=='lady')   
                                      {
                                         $zodiac = zodiac($userDetials['dob_lady']);
                                         if($zodiac=='')
                                         {
                                            $zodiac = zodiac($userDetials['dob_gentleman']);
                                         }
                                         $zodiac_other = '';  
                                      }
                                      elseif($userDetials['accounttype']=='gentleman')   
                                      {
                                         $zodiac = zodiac($userDetials['dob_gentleman']);
                                         $zodiac_other = '';  
                                      }
                                      else  
                                      {
                                         $zodiac = zodiac($userDetials['dob_lady']);
                                         $zodiac_other = zodiac($userDetials['dob_gentleman']);
                                      }
                                  }    
                             ?>
                              <div class="profileAvatar">
                  <image src="<?php if(!empty($userDetials['filename']) && file_exists(FCPATH.'assets/userfiles/'.$userDetials['path'].'/160/'.$userDetials['filename'].'.'.$userDetials['extension'])){ echo  base_url().'assets/userfiles/'.$userDetials['path'].'/160/'.$userDetials['filename'].'.'.$userDetials['extension']; } else { echo base_url().'assets/images/crown_log.svg'; } ?>" srcset="<?php if(!empty($userDetials['filename']) && file_exists(FCPATH.'assets/userfiles/'.$userDetials['path'].'/160/'.$userDetials['filename'].'.'.$userDetials['extension'])){ echo  base_url().'assets/userfiles/'.$userDetials['path'].'/160/'.$userDetials['filename'].'.'.$userDetials['extension']; } else { echo base_url().'assets/images/crown_log.svg'; } ?> 1x"/>
            
                 </div>
                              </a>
                           </div>
                           <div class="profile_details <?php if(!empty($userMembershipDetails) && $userMembershipDetails['id']==4) { echo getLang('Premium'); } ?>">
                              <h1><?php if(!empty($userDetials)) { echo $userDetials['username']; }?> <?php if(count($userParticipation)>0 || count($userParticipation_old)>0 || $userDetials['reality_authenticated']==1){ ?><span class="user-auth-ico" <?php if(!empty($userMembershipDetails) && $userMembershipDetails['id']==4) { echo 'style="right: 40px"'; }?> data-tooltip="<?php echo getLang('User_is_verified'); ?>!"></span><?php } ?><?php if(!empty($userMembershipDetails) && $userMembershipDetails['id']==4) { ?><span class="premium-memberIcon" data-tooltip="<?php echo getLang('PREMIUM_MEMBER'); ?>"><img src="images/crown-icon.png"></span><?php } ?></h1>
                              <h3><?php if(!empty($userDetials)) { echo ucfirst($userDetials['accounttype']); }?> - <?php if(!empty($userDetials)) { echo $userDetials['country_name']; }?></h3>
                              <!--<p class="premiumMember"><?php if(!empty($userMembershipDetails) && $userMembershipDetails['id']==4) { echo 'Premium'; } else { echo 'Basic'; }?> Membership <span class="premium_icon"><img src="images/premium-member-ico.png" alt=""></span></p>-->
                              <p id="message_error" style="color:red"></p>
                              <ul class="memberoptions">
                              <?php 
                                $connectCanDo = 1;
                                $hotshotCanDo = 0;
                                $status = 0;
                                $acctype = $loggeduserDetials['accounttype'];
                                if($loggedInUserMembershipDetails['id']==4)
                                {
                                  $status = 1;
                                  $hotshotCanDo = 1;
                                  $connectCanDo = 0;
                                }
                                elseif ($loggedInUserMembershipDetails['id']==5) 
                                {
                                  if($acctype=='lady')
                                  {
                                    $connectCanDo = 0;
                                    $status = 1;
                                    if($userDetials['interested_in_ladies']==1)
                                    {
                                      $hotshotCanDo = 1;
                                      
                                    }
                                  }
                                  if($acctype=='gentleman')
                                  {
                                    $connectCanDo = 0;
                                    if($userDetials['accounttype']=='lady')
                                    {
                                      $connectCanDo = 1;
                                    }
                                    if($userDetials['interested_in_gentlemen']==1)
                                    {
                                      $hotshotCanDo = 1;
                                      if(!empty($friend) || !empty($unfriend) || !empty($friendGuest) || !empty($unfriendGuest))
                                      {
                                        if($friend['status']=='accepted' || $unfriend['status']=='accepted' || $friendGuest['status']=='guest' || $unfriendGuest['status']=='guest')
                                        {
                                          $status = 1;
                                        }
                                        else
                                        {
                                          $status = 2;
                                        }
                                      }
                                    }
                                    else
                                    {
                                      if(!empty($friend) || !empty($unfriend))
                                      {
                                        if($friend['status']=='accepted' || $unfriend['status']=='accepted')
                                        {
                                          $status = 1;
                                        }
                                        else
                                        {
                                          $status = 3;
                                        }
                                      } else {
                                        $status = 3;
                                      }
                                    }
                                  }
                                  if($acctype=='couple')
                                  {
                                    $connectCanDo = 0;
                                    if($userDetials['accounttype']=='lady')
                                    {
                                      $connectCanDo = 1;
                                    }
                                    if($userDetials['interested_in_couples']==1)
                                    {
                                      $hotshotCanDo = 1;
                                      if(!empty($friend) || !empty($unfriend) || !empty($friendGuest) || !empty($unfriendGuest))
                                      {
                                        if($friend['status']=='accepted' || $unfriend['status']=='accepted' || $friendGuest['status']=='guest' || $unfriendGuest['status']=='guest')
                                        {
                                          $status = 1;
                                        }
                                        else
                                        {
                                          $status = 2;
                                        }
                                      }
                                    }
                                    else
                                    {
                                      if(!empty($friend) || !empty($unfriend))
                                      {
                                        if($friend['status']=='accepted' || $unfriend['status']=='accepted')
                                        {
                                          $status = 1;
                                        }
                                        else
                                        {
                                          $status = 3;
                                        }
                                      } else {
                                        $status = 3;
                                      }
                                    }
                                  }
                                }
                                elseif ($loggeduserDetials['free_member']==1) {
                                  if(!empty($friend) || !empty($unfriend) || !empty($friendGuest) || !empty($unfriendGuest))
                                  {
                                    if($friend['status']=='accepted' || $unfriend['status']=='accepted' || $friendGuest['status']=='guest' || $unfriendGuest['status']=='guest')
                                    {  
                                      $status = 1;
                                      $hotshotCanDo = 1;
                                      $connectCanDo = 0;
                                    }
                                  }
                                }
                              ?>

                              <span id="actype" style="display:none;"><?php echo $acctype; ?></span>
                                <li><a href="<?php if($status==1){ echo base_url().'messages/'.base64_encode($userDetials['user_id']);} else { echo 'javascript:void(0)'; } ?>" class="message_send" data-id="<?php echo $status; ?>"><i class="fa fa-envelope"></i> Message</a></li>
                                <?php if(!empty($friend)){ ?>
                                 <!--<li><a href="javascript:void(0)" data-id="<?php echo $userDetials['user_id']; ?>" class="addblockUser" data-type="2"><i class="fa fa-user-times"></i> Block</a></li>-->
                                 <?php } elseif(!empty($unfriend)) { ?>
                                 <!--<li><a href="javascript:void(0)" data-id="<?php echo $userDetials['user_id']; ?>" class="addblockUser" data-type="2"><i class="fa fa-user-times"></i> Block</a></li>-->
                                 <?php } else { ?>
                                 <li><a href="javascript:void(0)" data-id="<?php echo $userDetials['user_id']; ?>" class="addblockUser" data-type="1" data-status="<?php echo $connectCanDo; ?>"><i class="fa fa-user-plus"></i> FRIEND</a></li>
                                 <?php } ?>
                                 <li><a href="javascript:void(0)" data-status="<?php echo $hotshotCanDo; ?>"  data-id="<?php echo $userDetials['user_id']; ?>" class="hotshot_profile"><img src="images/hotspot-icon.png"> HOTSHOT</a></li>
                                 <?php if(!$blocked_data){ ?>
                                 <li><a href="javascript:void(0)" data-id="<?php echo $userDetials['user_id']; ?>" class="block_this_user"><i class="fa fa-ban"></i> BLOCK</a></li>
                                 <?php } ?>
                              </ul>
                           </div>
                        </div>
                        <div class="picture_container">
                           <br/><br/>
               
                      <?php $useragent=$_SERVER['HTTP_USER_AGENT'];
                        if(!preg_match('/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i',$useragent)||preg_match('/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i',substr($useragent,0,4)))
                        {
                      ?>
                              <?php if(!empty($userImages)){ ?>
                                <div class="profile_outer clearfix <?php if(count($userImages)==0){ echo 'blankImage'; }?>">
                                <?php if($loggedInUserMembershipDetails['id']==4 || count($loggedInUserImages)>=3){ ?> 
                                  
                                <?php } else { ?>
                                  <span class="upgradeImages"><h4><img src="images/upgradelockIcon.png" alt=""><?php echo getLang('Upgrade_to_premium_membership'); ?></h4><p><?php echo getLang('Or'); ?> <a href="<?php echo  base_url().'pictures'; ?>" style="text-decoration: underline;"><?php echo getLang('upload_at_least_3_pictures'); ?></a> <?php echo getLang('to_see_more'); ?></p></span>
                                <?php } ?>
                                
                                 <div  class="profile_gallery <?php if(count($userImages)==1){ echo 'single'; } elseif(count($userImages)==2){ echo 'double'; } else { echo 'tripple';}?>">
                                  <?php $i = 0; 
                                        foreach ($userImages as $images) 
                                        { 
                                            if($images['is_private']==1 && $userPrivacy['privacy']==0)
                                            {
                                                if($images['filename']!='' && file_exists(FCPATH.'assets/userfiles/'.$images['path'].'/'.$images['filename'].'_blur.'.$images['extension']))
                                                { 
                                                  $filename =  base_url().'assets/userfiles/'.$images['path'].'/'.$images['filename'].'_blur.'.$images['extension']; ?>
                                         
                                                      <a class="fancybox" href="#inline<?php echo $i; ?>" data-fancybox-group="gallery" style="background:url(<?php echo $filename; ?>) no-repeat center center / cover;" ></a>
                                          <?php  }
                                            }
                                            elseif($images['is_private']==1 && $userPrivacy['privacy']==1)
                                            {
                                                if($images['filename']!='' && file_exists(FCPATH.'assets/userfiles/'.$images['path'].'/'.$images['filename'].'.'.$images['extension']))
                                                { 
                                                  $filename =  base_url().'assets/userfiles/'.$images['path'].'/'.$images['filename'].'.'.$images['extension']; ?>
                                                              
                                                      <a class="fancybox" href="#inline<?php echo $i; ?>" data-fancybox-group="gallery" style="background:url(<?php echo $filename; ?>) no-repeat center center / cover;" ></a>
                                          <?php  } 
                                            }
                                           else
                                            {
                                                if($images['filename']!='' && file_exists(FCPATH.'assets/userfiles/'.$images['path'].'/'.$images['filename'].'.'.$images['extension']))
                                                { 
                                                  $filename =  base_url().'assets/userfiles/'.$images['path'].'/'.$images['filename'].'.'.$images['extension']; ?>
                                                              
                                                      <a class="fancybox" href="#inline<?php echo $i; ?>" data-fancybox-group="gallery" style="background:url(<?php echo $filename; ?>) no-repeat center center / cover;" ></a>
                                          <?php  } 
                                            } 
                                           $i++;
                                        } ?>
                                        <?php if(count($userImages)>3 && $device == 'computer'){ ?>
                                          <span>+<?php echo count($userImages)-3; ?></span>
                                        <?php } elseif(count($userImages)>1 && $device == 'phone'){ ?>
                                          <span>+<?php echo count($userImages)-1; ?></span>
                                        <?php } ?>
                                 </div>
                               </div> 
                              <?php } ?> 


                               <?php if(!empty($userImages)){ 
                                      $i = 0; 
                                      $isBlur = 0;
                                      foreach ($userImages as $images) 
                                      { 
                                        if($images['is_private']==1 && $userPrivacy['privacy']==0)
                                        {
                                          if($images['filename']!='' && file_exists(FCPATH.'assets/userfiles/'.$images['path'].'/'.$images['filename'].'_blur.'.$images['extension']))
                                          { 
                                            $filename =  base_url().'assets/userfiles/'.$images['path'].'/'.$images['filename'].'_blur.'.$images['extension']; 
                                          }
                                          else
                                          { 
                                            $filename =  base_url().'assets/userfiles/'.$images['path'].'/'.$images['filename'].'.'.$images['extension']; 
                                          } 
                                          $isBlur = 1;
                                        }
                                        elseif($images['is_private']==1 && $userPrivacy['privacy']==1)
                                        {
                                          if($images['filename']!='' && file_exists(FCPATH.'assets/userfiles/'.$images['path'].'/'.$images['filename'].'.'.$images['extension']))
                                          { 
                                            $filename =  base_url().'assets/userfiles/'.$images['path'].'/'.$images['filename'].'.'.$images['extension']; 
                                          } 
                                          $isBlur = 0;
                                        }
                                        else
                                        {
                                          if($images['filename']!='' && file_exists(FCPATH.'assets/userfiles/'.$images['path'].'/'.$images['filename'].'.'.$images['extension']))
                                          { 
                                            $filename =  base_url().'assets/userfiles/'.$images['path'].'/'.$images['filename'].'.'.$images['extension']; 
                                          }
                                          $isBlur = 0;  
                                        }
                                        ?>
                                          <div id="inline<?php echo $i; ?>" style="display:none;">
                                              <div class="hotshotWrapper">
                                                 <div class="hotshotHeader">
                                                   <div class="mediumbgAvatar" >
                            <img src="<?php if(!empty($userDetials) && $userDetials['filename']!='' && file_exists(FCPATH.'assets/userfiles/'.$userDetials['path'].'/80/'.$userDetials['filename'].'.'.$userDetials['extension'])){ echo base_url().'assets/userfiles/'.$userDetials['path'].'/80/'.$userDetials['filename'].'.'.$userDetials['extension']; } else { echo base_url().'assets/images/default-avatar.jpg'; }?>" alt="" srcset="<?php if(!empty($userDetials['filename']) && file_exists(FCPATH.'assets/userfiles/'.$userDetials['path'].'/80/'.$userDetials['filename'].'.'.$userDetials['extension'])){ echo  base_url().'assets/userfiles/'.$userDetials['path'].'/80/'.$userDetials['filename'].'.'.$userDetials['extension']; } else { echo base_url().'assets/images/default-avatar.jpg'; } ?> 1x, <?php if(!empty($userDetials['filename']) && file_exists(FCPATH.'assets/userfiles/'.$userDetials['path'].'/160/'.$userDetials['filename'].'.'.$userDetials['extension'])){ echo  base_url().'assets/userfiles/'.$userDetials['path'].'/160/'.$userDetials['filename'].'.'.$userDetials['extension']; } else { echo base_url().'assets/images/default-avatar.jpg'; } ?> 2x" >
                          
                           </div>
                                                   <h4><?php if(!empty($userDetials)) { echo $userDetials['username']; }?></h4>
                                                    <p><?php if(!empty($userDetials)) { echo ucfirst($userDetials['accounttype']); }?> - <span><?php if(!empty($userDetials)) { echo $userDetials['country_name']; }?></span></p>
                                                 </div>
                                                 <div class="hotshotbody">
                                                   <div class="border">
                                                       <?php if($isBlur==1){ ?>
                                                        <a href="javascript:void(0);" <?php if($isBlur == 1){ echo 'data-id="blur"'; }?>  class="<?php if($isBlur == 1){ echo 'modal_popup'; }?>"><i class="fa fa-eye-slash" title="<?php echo getLang('Private_picture_request'); ?>"></i></a>
                                                       <?php } ?>
                                                   <div style="background: url(<?php echo $filename; ?>) no-repeat center center / cover; " ></div>
                                                   </div>
                                                 </div>
                                                 <div class="hotshotfooter">
                                                   <ul>
                                                    <?php $iLike = 0;
                                                        if(!empty($images['likeUsers'])){ 
                                                            foreach ($images['likeUsers'] as $likeUsers) { 
                                                                if($likeUsers['user_id']==$this->session->userdata('user_id'))
                                                                {
                                                                  $iLike = 1;
                                                                }
                                                            ?>
                                                              <li>
                                                                <div class="mediumbgAvatar" >
                                                                  <a href="<?php echo  base_url('profil/'.$likeUsers['alias']); ?>"><img src="<?php if(!empty($likeUsers) && $likeUsers['filename']!='' && file_exists(FCPATH.'assets/userfiles/'.$likeUsers['path'].'/80/'.$likeUsers['filename'].'.'.$likeUsers['extension'])){ echo base_url().'assets/userfiles/'.$likeUsers['path'].'/80/'.$likeUsers['filename'].'.'.$likeUsers['extension']; } else { echo base_url().'assets/images/default-avatar.jpg'; }?>" alt="" srcset="<?php if(!empty($likeUsers['filename']) && file_exists(FCPATH.'assets/userfiles/'.$likeUsers['path'].'/80/'.$likeUsers['filename'].'.'.$likeUsers['extension'])){ echo  base_url().'assets/userfiles/'.$likeUsers['path'].'/80/'.$likeUsers['filename'].'.'.$likeUsers['extension']; } else { echo base_url().'assets/images/default-avatar.jpg'; } ?> 1x, <?php if(!empty($likeUsers['filename']) && file_exists(FCPATH.'assets/userfiles/'.$likeUsers['path'].'/160/'.$likeUsers['filename'].'.'.$likeUsers['extension'])){ echo  base_url().'assets/userfiles/'.$likeUsers['path'].'/160/'.$likeUsers['filename'].'.'.$likeUsers['extension']; } else { echo base_url().'assets/images/default-avatar.jpg'; } ?> 2x" ></a>
                                                                </div>
                                                              </li>
                                                    <?php   }
                                                          }  
                                                      ?>
                                                   </ul>
                                                    <button class="hotshotBtn <?php if($iLike==0){ echo 'hotshot_picture'; }?> <?php if($iLike==1){ echo 'active'; }?>" data-id="<?php echo $images['fileID']; ?>"><img src="images/hotspot-icon.png"> <?php echo getLang('Hotshot'); ?></button>
                                                 </div>
                                              </div>      
                                          </div>
                               <?php  $i++; } 
                                     } ?>     
                        <?php } ?>

                          <?php $useragent=$_SERVER['HTTP_USER_AGENT'];
                            if(preg_match('/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i',$useragent)||preg_match('/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i',substr($useragent,0,4)))
                            {
                          ?>  
                              <?php if(!empty($userImages)){ ?> 
                              <div class="profile_outer clearfix <?php if(count($userImages)==0){ echo 'blankImage'; }?>">
                            <?php if($loggedInUserMembershipDetails['id']==4 || count($loggedInUserImages)>=3){ ?> 
                              
                            <?php } else { ?>
                              <span class="upgradeImages"><h4><img src="images/upgradelockIcon.png" alt=""><?php echo getLang('Upgrade_to_premium_membership'); ?></h4><p><?php echo getLang('Or'); ?> <a href="<?php echo  base_url().'pictures'; ?>" style="text-decoration: underline;"><?php echo getLang('upload_at_least_3_pictures'); ?></a> <?php echo getLang('to_see_more'); ?></p></span>
                            <?php } ?>
                          
                                <div class="wrappercarouselprofile">
                                  <span class="wrappercarouselprofilespan"><i class="fa fa-image"></i> <?php echo count($userImages); ?></span>
                                  <div id="profilePicsCarousel" class="owl-carousel">
                                      <?php $i = 0; 
                                        foreach ($userImages as $images) 
                                        { 
                                            if($images['is_private']==1 && $userPrivacy['privacy']==0)
                                            {
                                              if($images['filename']!='' && file_exists(FCPATH.'assets/userfiles/'.$images['path'].'/'.$images['filename'].'_blur.'.$images['extension']))
                                              { 
                                                $filename =  base_url().'assets/userfiles/'.$images['path'].'/'.$images['filename'].'_blur.'.$images['extension']; 
                                              }
                                              else
                                              { 
                                                $filename =  base_url().'assets/userfiles/'.$images['path'].'/'.$images['filename'].'.'.$images['extension']; 
                                              } 
                                              $isBlur = 1;
                                            }
                                            elseif($images['is_private']==1 && $userPrivacy['privacy']==1)
                                            {
                                              if($images['filename']!='' && file_exists(FCPATH.'assets/userfiles/'.$images['path'].'/'.$images['filename'].'.'.$images['extension']))
                                              { 
                                                $filename =  base_url().'assets/userfiles/'.$images['path'].'/'.$images['filename'].'.'.$images['extension']; 
                                              } 
                                              $isBlur = 0;
                                            }
                                            else
                                            {
                                              if($images['filename']!='' && file_exists(FCPATH.'assets/userfiles/'.$images['path'].'/'.$images['filename'].'.'.$images['extension']))
                                              { 
                                                $filename =  base_url().'assets/userfiles/'.$images['path'].'/'.$images['filename'].'.'.$images['extension']; 
                                              }
                                              $isBlur = 0;  
                                            }
                                        ?>
                                                <div class="item">
                                                      <?php if($isBlur==1){ ?>
                                                        <a href="javascript:void(0);" <?php if($isBlur == 1){ echo 'data-id="blur"'; }?>  class="request_otherprofile"><i class="fa fa-eye-slash" title="<?php echo getLang('Private_picture_request'); ?>"></i></a>
                                                        <div class="requests" class="" style="display:none;">
                                                            <h2><?php echo getLang('Private_image_request'); ?></h2>
                                                            <div class="center">
                                                               <p><?php echo getLang('Do_you_like_to_request'); ?> <?php echo $userDetials['username']; ?> ? </p>
                                                               <p><?php echo getLang('After_users_appoval_you_can_see'); ?>.</p>
                                                               <button type="button" class="btn_gold yes11" data-id="<?php if(!empty($userDetials)) { echo $userDetials['user_id']; }?>"><?php echo getLang('Yes'); ?></button>
                                                               <button type="button" class="btn_gold no11"><?php echo getLang('No'); ?></button>
                                                            </div>
                                                         </div>
                                                         <div class="confirms" class="" style="display:none">
                                                            <h2><?php echo getLang('Confirmation'); ?></h2>
                                                            <div class="center">
                                                               <p><?php echo getLang('Thanks_you_for_your_request'); ?>. </p>
                                                               <button type="button" class="btn_gold ok"><?php echo getLang('Ok'); ?></button>
                                                            </div>
                                                         </div>
                                                      <?php } ?>
                                                      <span style="background:url(<?php echo $filename; ?>) no-repeat center center / cover;" ></span>
                                                      <div id="inline<?php echo $i; ?>" class="inlineClass" >
                                                          <div class="hotshotWrapper">
                                                             <div class="hotshotfooter">
                                                               <ul>
                                                                <?php $iLike = 0;
                                                                    if(!empty($images['likeUsers'])){ 
                                                                        foreach ($images['likeUsers'] as $likeUsers) { 
                                                                            if($likeUsers['user_id']==$this->session->userdata('user_id'))
                                                                            {
                                                                              $iLike = 1;
                                                                            }
                                                                        ?>
                                                                          <li>
                                                                            <div class="mediumbgAvatar" >
                                                                            <a href="<?php echo  base_url('profil/'.$likeUsers['alias']); ?>"><img src="<?php if(!empty($likeUsers) && $likeUsers['filename']!='' && file_exists(FCPATH.'assets/userfiles/'.$likeUsers['path'].'/80/'.$likeUsers['filename'].'.'.$likeUsers['extension'])){ echo base_url().'assets/userfiles/'.$likeUsers['path'].'/80/'.$likeUsers['filename'].'.'.$likeUsers['extension']; } else { echo base_url().'assets/images/default-avatar.jpg'; }?>" alt="" srcset="<?php if(!empty($likeUsers['filename']) && file_exists(FCPATH.'assets/userfiles/'.$likeUsers['path'].'/80/'.$likeUsers['filename'].'.'.$likeUsers['extension'])){ echo  base_url().'assets/userfiles/'.$likeUsers['path'].'/80/'.$likeUsers['filename'].'.'.$likeUsers['extension']; } else { echo base_url().'assets/images/default-avatar.jpg'; } ?> 1x, <?php if(!empty($likeUsers['filename']) && file_exists(FCPATH.'assets/userfiles/'.$likeUsers['path'].'/160/'.$likeUsers['filename'].'.'.$likeUsers['extension'])){ echo  base_url().'assets/userfiles/'.$likeUsers['path'].'/160/'.$likeUsers['filename'].'.'.$likeUsers['extension']; } else { echo base_url().'assets/images/default-avatar.jpg'; } ?> 2x" ></a>
                                                                          
                                                                           </div>
                                                                          </li>
                                                                <?php   }
                                                                      }  
                                                                  ?>
                                                               </ul>
                                                               <?php if($isBlur==0){ ?>
                                                                <button class="hotshotBtn <?php if($iLike==0){ echo 'hotshot_picture'; }?> <?php if($iLike==1){ echo 'active'; }?>" data-id="<?php echo $images['fileID']; ?>"><img src="images/hotspot-icon.png"> <?php echo getLang('Hotshot'); ?></button>
                                                               <?php } ?>
                                                             </div>
                                                          </div>      
                                                      </div>
                                                    </div>
                                          <?php $i++; } ?>
                                    </div> 
                                  </div> 
                                </div>         
                              <?php } ?>
                                
                          <?php } ?>          


                        </div>
                        <?php
                          $thisMembershipClass = 'basic';
                          if(!empty($userMembershipDetails)) { 
                            if($userMembershipDetails['id'] == 5){
                              $thisMembershipClass = 'basic';
                            } else {
                              $thisMembershipClass = '';
                            }
                          }
                        ?>
                        <?php if($this->session->userdata('user_id')== 25267 || $this->session->userdata('user_id')== 26623 || $this->session->userdata('user_id') == 11330){?>
                        <?php if(count($userVideos)>0){ ?>
                        <div class="v-thumb-other <?php echo $thisMembershipClass; ?>">
                          <?php                          
                            //echo '<pre>';print_r($userVideos);
                              $videos_arr = [];
                              foreach ($userVideos as $key => $video) {
                                array_push($videos_arr, $video['videolink']);
                                $videodata = explode('.', $video['filename']);
                                $videoimage =  base_url().'assets/videos/uploads/thumb/'.$videodata[0].'.jpg';
                                //if($key<3){
                          ?>
                          <div class="v-box">
                             <img src="<?php echo $videoimage; ?>" alt=""> 
                             <span class="v-play-btn" data-id="<?php echo $key; ?>">
                               <img src="<?php echo base_url().'assets/images/play-buton.svg'; ?>" alt=""> 
                             </span>
                              <?php if(count($userVideos)>3){
                                    if($key==2){
                              ?>
                              <div class="v-overlay">+<?php echo count($userVideos) - 3; ?></div> 
                              <?php } } ?>                              
                          </div>
                          <?php } //} ?>
                          <span class="videolinks" style="display: none;"></span>
                          <span class="video-errors" style="color:red;"></span>
                          <?php if($thisMembershipClass == 'basic'){ ?>
                          <a href="javascript:void(0)" class="v-more-link">more videos</a>
                          <?php } ?>
                        <!-- Video popup -->
                          <div class="v-popup-box">
                            <div class="v-popup-container">
                               <span class="v-popup-close"></span>
                                <div class="v-container">
                                  <video playsinline controls controlsList="nodownload" id="video_tag">
                                    <source src="" type="">
                                  </video>
                                </div>
                               <div class="v-btns-group">
                                 <span class="btn prev video_prev"></span>
                                 <span class="btn next video_next"></span>
                               </div>
                            </div>
                          </div>

                        </div>
                        <?php } ?>
                        <?php } ?>
                        <?php if(!empty($userLocations)){ ?>
                        <span class="location_title"><i class="fa fa-map-marker"></i> <?php echo getLang('Location'); ?></span>
                        <div class="mapAddress" id="map" style="width: height: 200px;">                          
                                
                        </div>
                          <!-- <ul class="addressList">
                              <?php foreach($userLocations as $locations){ ?>
                                  <li>
                                    <span><img src="<?php echo base_url().'assets/images/marker.svg'; ?>" width="20"></span><span><?php echo $locations['address']; ?></span>
                                  </li>
                              <?php } ?>  
                          </ul> -->
                        <?php } ?>
                     </div>
                     <div class="right_block">
                        <span class="user-details-title"><?php echo getLang('Profile_Details'); ?></span>
                        <div class="your_details">
                            <p class="hello"><?php echo getLang('Hello'); ?></p>
                           <?php if(!empty($userDetials)) { echo html_entity_decode($userDetials['about']); } ?><br/>
                           <?php echo getLang('best_regards'); ?>,<br/>
                           <p class="psudoname"><?php if(!empty($userDetials)) { echo $userDetials['username']; } ?></p>
                        </div>
                        <div class="user_details">
                           <h3><?php echo getLang('Age_and_Physique'); ?></h3>
                           <ul>
                           <?php if(!empty($userDetials)) { 
                              $genteman_age = (time() - $userDetials['dob_gentleman'])/(365*24*60*60);
                              $lady_age = (time() - $userDetials['dob_lady'])/(365*24*60*60);
                           } ?>
                            <?php 
                            if($userDetials['she_height']>0)
                            { 
                                $inches_per_meter = 39.3700787;
                                $she_inches_total = round($userDetials['she_height'] * $inches_per_meter);
                                $she_feet = floor($she_inches_total / 12);  
                                $she_inches = round($she_inches_total % 12);
                            }
                            if($userDetials['he_height']>0)
                            { 
                                $inches_per_meter = 39.3700787;
                                $he_inches_total = round($userDetials['he_height'] * $inches_per_meter);
                                $he_feet = floor($he_inches_total / 12);  
                                $he_inches = round($he_inches_total % 12);
                            }
                            if($userDetials['she_weight']>0)
                            {
                                $she_pounds = round($userDetials['she_weight'] * 2.20462);
                            }
                            if($userDetials['he_weight']>0)
                            {
                                $he_pounds = round($userDetials['he_weight'] * 2.20462);
                            }
                            ?>
                            <?php if(($userDetials['dob_lady']!='' && $userDetials['dob_lady']!=0) || $userDetials['physis_lady']!=''){ ?>
                              <li><i class="fa fa-<?php if($userDetials['accounttype']=='gentleman'){ echo 'mars'; } elseif($userDetials['accounttype']=='lady') { echo 'venus'; } else{ echo 'venus'; } ?>"></i> <?php echo round($lady_age); ?>, <?php if(!empty($userDetials)) { echo ucfirst($userDetials['physis_lady']); } ?> <?php if(!empty($userDetials) && $userDetials['she_height']>0) { echo $userDetials['she_height'].' m ('.$she_feet.'"'.$she_inches.')'; } ?> <?php if(!empty($userDetials) && $userDetials['she_weight']>0) { echo ', '.round($userDetials['she_weight']).' kg ('.$she_pounds.' lb)'; } ?></li>
                            <?php } ?>
                            <?php if(($userDetials['dob_gentleman']!='' && $userDetials['dob_gentleman']!=0) || $userDetials['physis_gentleman']!=''){ ?>
                              <li><i class="fa fa-<?php if($userDetials['accounttype']=='gentleman'){ echo 'mars'; } elseif($userDetials['accounttype']=='lady') { echo 'venus'; } else{ echo 'mars'; } ?>"></i> <?php echo round($genteman_age); ?>, <?php if(!empty($userDetials)) { echo ucfirst($userDetials['physis_gentleman']); } ?> <?php if(!empty($userDetials) && $userDetials['he_height']>0) { echo $userDetials['he_height'].' m ('.$he_feet.'"'.$he_inches.')'; } ?> <?php if(!empty($userDetials) && $userDetials['he_weight']>0) { echo ', '.round($userDetials['he_weight']).' kg ('.$he_pounds.' lb)'; } ?></li>
                            <?php } ?>
                           </ul>
                           <h3><?php echo getLang('Interested_in'); ?></h3>
                           <ul class="interestedin">
                              <?php if(!empty($userDetials) && $userDetials['interested_in_ladies']==1) { echo '<li><img src="images/ladysm.png" alt="">'.getLang('Ladies').'</li>'; } ?>
                              <?php if(!empty($userDetials) && $userDetials['interested_in_gentlemen']==1) { echo '<li><img src="images/gentlemansm.png" alt="">'.getLang('Gentleman').'</li>'; } ?>
                              <?php if(!empty($userDetials) && $userDetials['interested_in_couples']==1) { echo '<li><img src="images/couplesm.png" alt="">'.getLang('Couple').'</li>'; } ?>                              
                           </ul>
                           <div class="prefrences">
                              <?php if(!empty($userDetials)){ 
                                $usermeetingdata = '';
                                if($userDetials['experience']==1)
                                {
                                  $usermeetingdata .= getLang('New_experience').', ';
                                }
                                $usermeetingdata .= getLang(str_replace('-', '_', str_replace(' ', '_', $userDetials['preferences'])));
                                //$usermeetingdata .= str_replace('_', ' ', $userDetials['preferences']);
                                if($userDetials['preferences']=='full_swap' && ($userDetials['same_room']==1 || $userDetials['separate_room']==1))
                                {
                                  $usermeetingdata .= '(';
                                  if($userDetials['same_room']==1)
                                  {
                                    $usermeetingdata .= getLang('Same_Room');
                                  } 
                                  if($userDetials['same_room']==1 && $userDetials['separate_room']==1)
                                  {
                                    $usermeetingdata .= ',';
                                  } 
                                  if($userDetials['separate_room']==1)
                                  {
                                    $usermeetingdata .= getLang('Separate_Room');
                                  } 
                                  $usermeetingdata .= ')';  
                                }
                                $usermeetingdata .= ' ';
                                if($userDetials['escort_interest']==1)
                                {
                                  $usermeetingdata .= ' '.getLang('Looking_for_companion').', ';
                                }
                                if($userDetials['interested_in_private_meeting']==1)
                                {
                                  $usermeetingdata .= ' '.getLang('Ceremony').', ';
                                }
                              }?>
                              <span><?php echo $usermeetingdata ;?>
                              <?php if(!empty($userPreferences)){ 
                                    $i=1;
                                    foreach ($userPreferences as $preference) {
                                      $comma = '';
                                        if($i!=count($userPreferences))
                                        {
                                          $comma = ',';
                                        }
                                       ?>
                                     <?php echo getLang(str_replace('-', '_', str_replace(' ', '_', $preference['sex_preference']))).$comma; ?>
                              <?php $i++; } } ?>
                              </span>
                            </div>
                            <div class="prefrences">
                              <?php if($userDetials['accounttype']=='lady' && $userDetials['interested_financial_interests']==1){ ?>
                                <span><?php echo getLang('Financial_interests'); ?></span>
                              <?php } ?>
                            </div>
                        </div>
                        <?php if(!empty($userParticipation) || !empty($userParticipation_old)){ ?>
                        <div class="attend_party">
                           <span class="user-details-title"><?php echo getLang('Participation'); ?></span>
                           <ul>
                           <?php foreach ($userParticipation as $participation) { 
                              if($participation['title'])
                              {
                            ?>
                              <?php 
                                $getStatus = getValue('user_to_event',array('user_id'=>$userDetials['user_id'],'event_id'=>$participation['event_id']));
                                $check = 0;
                                if($getStatus)
                                {
                                  if($getStatus['status']==1)
                                  {
                                    $check = 1;
                                  }
                                }
                              ?>
                              <?php if($check==0){ ?>
                              <li>
                                <a href="<?php if($participation['visible']==1){ if($participation['time_from']>time()){ echo base_url().'parties/'.$participation['alias'];}else{ echo base_url().'reviews/'.$participation['alias']; } } else { echo 'javascript:void(0)'; }  ?>">
                                 <h5><?php echo $participation['title']; ?></h5>
                                 <span <?php if($participation['visible']==0){ echo 'style="color:#4a3e25 !important"'; }?>><?php echo date('d.m.Y',$participation['time_from']); ?></span>
                                </a>
                              </li>
                              <?php } ?> 
                           <?php } } ?> 
                           <?php foreach ($userParticipation_old as $participations) { 
                              if($participations['title'])
                              {
                            ?>
                              <?php 
                                $getStatus = getValue('user_to_event',array('user_id'=>$userDetials['user_id'],'event_id'=>$participations['event_id']));
                                $check = 0;
                                if($getStatus)
                                {
                                  if($getStatus['status']==1)
                                  {
                                    $check = 1;
                                  }
                                }
                              ?>
                              <?php if($check==0){ ?>
                              <li>
                                <a href="<?php if($participations['visible']==1){ if($participations['time_from']>time()){ echo base_url().'parties/'.$participations['alias'];}else{ echo base_url().'reviews/'.$participations['alias']; } } else { echo 'javascript:void(0)'; }  ?>">
                                 <h5><?php echo $participations['title']; ?></h5>
                                 <span <?php if($participations['visible']==0){ echo 'style="color:#4a3e25 !important"'; }?>><?php echo date('d.m.Y',$participations['time_from']); ?></span>
                                </a>
                              </li>
                              <?php } ?> 
                           <?php } } ?>  
                           </ul>
                        </div>
                        <?php } ?>  
                     </div>
                  </div>
                  <div class="pinnes_block clearfix">
                     <span class="user-details-title"><?php echo getLang('PINNESS'); ?></span>
                     <div class="comment_block">
                        <form id="cmt_frm" action="">
                           <textarea name="" id="cmt_text" placeholder="<?php echo getLang('Compose_the_wall_entry'); ?>"></textarea>
                           <input type="hidden" id="base_url" value="<?php echo base_url(); ?>">
                           <input type="hidden" id="from_id" value="<?php echo $this->session->userdata('user_id'); ?>">
                           <input type="hidden" id="alias" value="<?php echo $userDetials['alias']; ?>">
                           <input type="button" id="cmt_send" class="btn_dark_normal" value="<?php echo getLang('Send'); ?>">
                        </form>
                     </div>
                     <div class="comment_details">
                        <?php if(!empty($comments)){ 
                           foreach ($comments as $comment) { ?>
                        <div class="comment_list clearfix">
                           <a href="<?php echo base_url().'profil/'.$comment['alias']; ?>" class="avatar_small">                        
                           <img src="<?php if(!empty($comment) && $comment['filename']!='' && file_exists(FCPATH.'assets/userfiles/'.$comment['path'].'/'.$comment['filename'].'.'.$comment['extension'])){ echo base_url().'assets/userfiles/'.$comment['path'].'/'.$comment['filename'].'.'.$comment['extension']; } else { echo base_url().'assets/images/default-avatar.jpg'; }?>" alt="" srcset="<?php if(!empty($userDetials['filename']) && file_exists(FCPATH.'assets/userfiles/'.$comment['path'].'/80/'.$comment['filename'].'.'.$comment['extension'])){ echo  base_url().'assets/userfiles/'.$comment['path'].'/80/'.$comment['filename'].'.'.$comment['extension']; } else { echo base_url().'assets/images/default-avatar.jpg'; } ?> 1x, <?php if(!empty($comment['filename']) && file_exists(FCPATH.'assets/userfiles/'.$comment['path'].'/160/'.$comment['filename'].'.'.$comment['extension'])){ echo  base_url().'assets/userfiles/'.$comment['path'].'/160/'.$comment['filename'].'.'.$comment['extension']; } else { echo base_url().'assets/images/default-avatar.jpg'; } ?> 2x">                         
                           </a>
                           <div class="cmntlist_content">
                              <!-- <span class="close_cmnt" data-id="<?php echo $comment['id']; ?>" style="cursor:pointer;">x</span> -->
                              <h4><a href="javascript:void(0)"><?php echo $comment['username']; ?></a></h4>
                              <p><?php echo $comment['comment']; ?></p>
                              <time><span class="time"><?php echo date('d.m.Y H:i:s',$comment['created']); ?></span></time>
                              <span class="type-commenticon"></span>
                           </div>
                        </div>
                        <?php } } ?> 
                     </div>
                  </div>
                  <div class="members_block">
                     <span class="user-details-title"><?php echo getLang('MEMBERS'); ?></span>
                     <div id="latestMembers" class="owl-carousel">
                     <?php if(!empty($latestMembers)){ 
                           foreach ($latestMembers as $members) {  ?>
                           <div class="item">
                                
                <a href="<?php echo base_url();?>profil/<?php echo $members['alias']; ?>" class="member avatar_medium" >
                <img src="<?php if(!empty($members) && $members['filename']!='' && file_exists(FCPATH.'assets/userfiles/'.$members['path'].'/160/'.$members['filename'].'.'.$members['extension'])){ echo base_url().'assets/userfiles/'.$members['path'].'/160/'.$members['filename'].'.'.$members['extension']; } else { echo base_url().'assets/images/default-avatar.jpg'; }?>" alt="" srcset="<?php if(!empty($members['filename']) && file_exists(FCPATH.'assets/userfiles/'.$members['path'].'/160/'.$members['filename'].'.'.$members['extension'])){ echo  base_url().'assets/userfiles/'.$members['path'].'/160/'.$members['filename'].'.'.$members['extension']; } else { echo base_url().'assets/images/default-avatar.jpg'; } ?> 1x, <?php if(!empty($members['filename']) && file_exists(FCPATH.'assets/userfiles/'.$members['path'].'/320/'.$members['filename'].'.'.$members['extension'])){ echo  base_url().'assets/userfiles/'.$members['path'].'/320/'.$members['filename'].'.'.$members['extension']; } else { echo base_url().'assets/images/default-avatar.jpg'; } ?> 2x" >
                            
                                <div class="member_hover">
                                   <span class="user"><?php echo $members['username']; ?></span>
                                   <span class="type"><?php echo $members['accounttype']; ?></span>
                                </div>
                             </a>
                            </div> 
                     <?php } } ?>        
                     </div>
                     <!--<form action="" class="search_form" >
                        <input name="user_search" class="search" placeholder="Search..." type="text">
                        <button name="search" value="true" class="search_btn">Suchen</button>
                     </form>-->
                  </div>
                  
               </div>
               <div class="stickyActionwrapper sticky">
                    <ul class="memberoptions">
                      <?php 
                        $status = 0;
                        if(!empty($friend) || !empty($unfriend)){
                            if($friend['status']=='accepted' || $unfriend['status']=='accepted')
                            {
                              $status = 1;
                            }
                            else
                            {
                              $status = 2;
                            }
                        }
                        elseif($loggedInUserMembershipDetails['id']==4){
                          $status = 1;
                        }
                      ?>
                        <li>
                          <a href="<?php if($status==1){ echo base_url().'messages/'.base64_encode($userDetials['user_id']);} else { echo 'javascript:void(0)'; } ?>" class="message_send" data-id="<?php echo $status; ?>">
                            <i class="fa fa-envelope"></i> <?php echo getLang('Message'); ?>
                          </a>
                          </li>
                        <?php if(!empty($friend)){ ?>
                         <!--<li><a href="javascript:void(0)" data-id="<?php echo $userDetials['user_id']; ?>" class="addblockUser" data-type="2"><i class="fa fa-user-times"></i> Block</a></li>-->
                         <?php } elseif(!empty($unfriend)) { ?>
                         <!--<li><a href="javascript:void(0)" data-id="<?php echo $userDetials['user_id']; ?>" class="addblockUser" data-type="2"><i class="fa fa-user-times"></i> Block</a></li>-->
                         <?php } else { ?>
                         <li><a href="javascript:void(0)" data-id="<?php echo $userDetials['user_id']; ?>" class="addblockUser" data-type="1" data-status="<?php if($loggedInUserMembershipDetails['id']==5 && ($loggeduserDetials['accounttype']=='couple' || $loggeduserDetials['accounttype']=='gentleman') && $userDetials['accounttype']=='lady'){ echo 1; } else { echo 0; }?>"><i class="fa fa-user-plus"></i> <?php echo getLang('Connect'); ?></a></li>
                         <?php } ?>
                         <li><a href="javascript:void(0)" data-id="<?php echo $userDetials['user_id']; ?>" class="hotshot_profile"><img src="images/hotspot-icon.png"> <?php echo getLang('Hotshot'); ?></a></li>
                    </ul>
               </div>
</section>
<section class="all_popups">
         <div class="modal_container register" id="blur_modal" >
            <span class="modal_close"><i class="fa  fa-times-circle-o"></i></span>
            <form action="" >
               <div id="request" class="">
                  <h2><?php echo getLang('Private_image_request'); ?></h2>
                  <div class="center">
                     <p><?php echo getLang('Do_you_like_to_request'); ?> <?php echo $userDetials['username']; ?> ? </p>
                     <p><?php echo getLang('After_users_appoval_you_can_see'); ?>.</p>
                     <button type="button" class="btn_gold yes1" data-id="<?php if(!empty($userDetials)) { echo $userDetials['user_id']; }?>"><?php echo getLang('Yes'); ?></button>
                     <button type="button" class="btn_gold no1"><?php echo getLang('No'); ?></button>
                  </div>
               </div>
               <div id="confirm" class="" style="display:none">
                  <h2><?php echo getLang('Confirmation'); ?></h2>
                  <div class="center">
                     <p><?php echo getLang('Thanks_you_for_your_request'); ?>. </p>
                  </div>
               </div>
            </form>
         </div>
      <div class="modalmask blur_mask"></div>
</section>
<script src="js/jquery.min.js"></script>
<script type="text/javascript" src="https://maps.google.com/maps/api/js?key=AIzaSyBhS6E7uMfyWdUstf1PXpYiEFay86uUj4A"></script>
<script type="text/javascript">
  $(function(){
      $('.request_otherprofile').click(function(){
        $(this).next().show();
      })
      $('.no11').click(function() {
        $(this).parent().parent().hide();
      })
      $('.ok').click(function() {
        $(this).parent().parent().hide();
      })
      $('.yes11').click(function() {
          var user_id = $(this).data('id');
          var baseUrl = $('#base_url').val();
          var this1 = $(this);
          $.ajax({
              url: baseUrl + 'profile/privateRequest',
              data: 'user_id=' + user_id,
              type: 'POST',
              success: function(res) {
                  if (res > 1) {
                      this1.parent().parent().hide();
                      this1.parent().parent().next().show();
                  }
              }
          })
      })
  })  

    var locations = [
    <?php if(!empty($userLocations)){
          $i=0; 
          foreach ($userLocations as $loactions) {
    ?>
        ["<?php echo str_replace(',', '', $loactions['address']); ?>", "<?php echo $loactions['user_lat']; ?>", "<?php echo $loactions['user_long']; ?>","<?php echo $i; ?>"],
    <?php         
          $i++;  }
          }
      ?>
    ];
    console.log('----------'+locations);
    var map = new google.maps.Map(document.getElementById('map'), {
      zoom: 2,
      center: new google.maps.LatLng("<?php if(!empty($userLocations)){ echo $userLocations[0]['user_lat']; }?>", "<?php if(!empty($userLocations)){ echo $userLocations[0]['user_long']; }?>"),
      //mapTypeId: google.maps.MapTypeId.ROADMAP,
      styles: [
            {elementType: 'geometry', stylers: [{color: '#131218'}]},
            {elementType: 'labels.text.stroke', stylers: [{color: '#242f3e'}]},
            {elementType: 'labels.text.fill', stylers: [{color: '#b3975b'}]},
            {
              featureType: 'administrative.locality',
              elementType: 'labels.text.fill',
              stylers: [{color: '#d59563'}]
            },
            {
              featureType: 'poi',
              elementType: 'labels.text.fill',
              stylers: [{color: '#d59563'}]
            },
            {
              featureType: 'poi.park',
              elementType: 'geometry',
              stylers: [{color: '#263c3f'}]
            },
            {
              featureType: 'poi.park',
              elementType: 'labels.text.fill',
              stylers: [{color: '#6b9a76'}]
            },
            {
              featureType: 'road',
              elementType: 'geometry',
              stylers: [{color: '#131218'}]
            },
            {
              featureType: 'road',
              elementType: 'geometry.stroke',
              stylers: [{color: '#131218'}]
            },
            {
              featureType: 'road',
              elementType: 'labels.text.fill',
              stylers: [{color: '#131218'}]
            },
            {
              featureType: 'road.highway',
              elementType: 'geometry',
              stylers: [{color: '#131218'}]
            },
            {
              featureType: 'road.highway',
              elementType: 'geometry.stroke',
              stylers: [{color: '#131218'}]
            },
            {
              featureType: 'road.highway',
              elementType: 'labels.text.fill',
              stylers: [{color: '#131218'}]
            },
            {
              featureType: 'transit',
              elementType: 'geometry',
              stylers: [{color: '#131218'}]
            },
            {
              featureType: 'transit.station',
              elementType: 'labels.text.fill',
              stylers: [{color: '#131218'}]
            },
            {
              featureType: 'water',
              elementType: 'geometry',
              stylers: [{color: '#b3975b'}]
            },
            {
              featureType: 'water',
              elementType: 'labels.text.fill',
              stylers: [{color: '#515c6d'}]
            },
            {
              featureType: 'water',
              elementType: 'labels.text.stroke',
              stylers: [{color: '#17263c'}]
            }
          ]
        
    });

    var infowindow = new google.maps.InfoWindow();

    var marker, i;
    /*var style = [
        { "elementType": "geometry", "stylers": [
        { "saturation": -100 }
        ]
        }
        ];
    var mapType = new google.maps.StyledMapType(style, {name:"Grayscale"});
        map.mapTypes.set('grey', mapType);
        map.setMapTypeId('grey');*/

    for (i = 0; i < locations.length; i++) {  
      marker = new google.maps.Marker({
        position: new google.maps.LatLng(locations[i][1], locations[i][2]),
        map: map
      });

      google.maps.event.addListener(marker, 'click', (function(marker, i) {
        return function() {
          infowindow.setContent(locations[i][0]);
          infowindow.open(map, marker);
        }
      })(marker, i));
    }
  </script>
  <!-- VIDEO POPUP SCRIPT -->
<script type="text/javascript">
  $(function(){   
    $('.v-popup-close').click(function() {
      $('.v-popup-box').removeClass('show')
      $('#video_tag').trigger('pause')
    });
    localStorage.setItem('videolinks', '<?php echo json_encode($videos_arr); ?>');
    $('.v-play-btn').click(function() {
      var jsondata = JSON.parse(localStorage.getItem('videolinks'))
      var data_id = $(this).data('id')
      $('.v-popup-box source').attr('src', jsondata[data_id])
      setTimeout(()=>{
        $('.v-popup-box').addClass('show')
      }, 1000)
      if(data_id == 0){
        $('.video_prev').hide();
      } else {
        $('.video_prev').show();
      }
      if(data_id == jsondata.length - 1){
        $('.video_next').hide();
      } else {
        $('.video_next').show();
      }
      $('.video_prev').data('id', data_id)
      $('.video_next').data('id', data_id)
      $('#video_tag').load();
      //alert($(window).width());
      if($(window).width() < 767){
        $(this).parent().html(`<video playsinline controls controlsList="nodownload" id="video_tag">\
                                    <source src="${jsondata[data_id]}" type="">\
                                  </video>`);
      }
    });
    $('.v-overlay').click(function() {
      var jsondata = JSON.parse(localStorage.getItem('videolinks'));
      var thisMembershipClass = "<?php echo $thisMembershipClass; ?>";
      if(thisMembershipClass == 'basic'){
        $('.video-errors').text('Please upgrade to premium');
      } else {
        var data_id = 2
        $('.v-popup-box source').attr('src', jsondata[data_id])
        setTimeout(()=>{
          $('.v-popup-box').addClass('show')
        }, 1000)
        $('.video_prev').data('id', data_id)
        $('.video_next').data('id', data_id)
      }
    });
    $('.video_prev').click(function() {
      var jsondata = JSON.parse(localStorage.getItem('videolinks'))
      var data_id = parseInt($(this).data('id')) - 1;
      var thisMembershipClass = "<?php echo $thisMembershipClass; ?>";
      if(thisMembershipClass == 'basic'){
        $('.video-errors').text('Please upgrade to premium');
      } else {
        console.log('prev=============', data_id)
        $('.v-popup-box source').attr('src', jsondata[data_id])
        setTimeout(()=>{
          $('.v-popup-box').addClass('show')
        }, 1000)
        if(data_id == 0){
          $('.video_prev').hide();
        } else {
          $('.video_prev').show();
        }
        if(data_id == jsondata.length - 1){
          $('.video_next').hide();
        } else {
          $('.video_next').show();
        }
        $('.video_prev').data('id', data_id)
        $('.video_next').data('id', data_id)
      }
      $('#video_tag').trigger('pause')
      $('#video_tag').load();
    });
    $('.video_next').click(function() {
      var jsondata = JSON.parse(localStorage.getItem('videolinks'))
      var data_id = parseInt($(this).data('id')) + 1;
      var thisMembershipClass = "<?php echo $thisMembershipClass; ?>";
      if(thisMembershipClass == 'basic'){
        $('.video-errors').text('Please upgrade to premium');
      } else {
        console.log('next=============', data_id)
        $('.v-popup-box source').attr('src', jsondata[data_id])
        setTimeout(()=>{
          $('.v-popup-box').addClass('show')
        }, 1000)
        if(data_id == 0){
          $('.video_prev').hide();
        } else {
          $('.video_prev').show();
        }
        if(data_id == jsondata.length - 1){
          $('.video_next').hide();
        } else {
          $('.video_next').show();
        }
        $('.video_prev').data('id', data_id)
        $('.video_next').data('id', data_id)
      }
      $('#video_tag').trigger('pause')
      $('#video_tag').load();
    });
    $('.v-more-link').click(()=>{
      $('.video-errors').text('Please upgrade to premium');
    })
  })
</script>
  <style type="text/css">
    .gm-style-iw-d {
          color: #000 !important;
      }
  </style>