<section class="content_wrapper profile" id="profile">
<!--FREE MEMBERSHIP-->
    <div class="UpgradSession" style="display:none;"><?php echo getLang('Please_upgrade_membership');?></div>
    <div class="block-alert" style="display:none;"> <?php echo getLang('You_cannot_see_that_profile'); ?>.</div>
  <!--FREE MEMBERSHIP--> 
               <div class="container clearfix">
                  <div class="profile_block clearfix">
                     <div class="left_block">
                        <div class="profile_box clearfix">
                           <div class="change_avatar">
                              <a href="<?php if($userDetials['created']<time()-8*60*60 || $userMembershipDetails['id']==5){ echo base_url().'change/'.(base64_encode($userDetials['avatar_file_id']));} else { echo 'javascript:void(0)';}?>">
                             
                               <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>
                              
                              <?php if($userDetials['created']<time()-8*60*60 || $userMembershipDetails['id']==5){ ?>
                                <span><?php echo getLang('Change_Avatar'); ?></span>
                              <?php } ?>  
                              </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>-->
                              <!--<ul class="memberoptions">
                                 <li><a href="javascript:void(0)"><i class="fa fa-envelope"></i> Message</a></li>
                                 
                              </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'; }?>">
                                
                                 <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['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['filename']!='' && file_exists(FCPATH.'assets/userfiles/'.$images['path'].'/'.$images['filename'].'.'.$images['extension']))
                                        { 
                                          $filename =  base_url().'assets/userfiles/'.$images['path'].'/'.$images['filename'].'.'.$images['extension']; 
                                        }
                                        ?>
                                          <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">
                                                       
                                                   <div style="background: url(<?php echo $filename; ?>) no-repeat center center / cover; " ></div>
                                                   </div>
                                                 </div>
                                                 <div class="hotshotfooter ownHotshot">
                                                   <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>
                                                    
                                                 </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'; }?>">
                            
                          
                                <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['filename']!='' && file_exists(FCPATH.'assets/userfiles/'.$images['path'].'/'.$images['filename'].'.'.$images['extension']))
                                            { 
                                              $filename =  base_url().'assets/userfiles/'.$images['path'].'/'.$images['filename'].'.'.$images['extension']; 
                                            }
                                        ?>
                                                <div class="item">
                                                      
                                                      <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 ownHotshot">
                                                               <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>
                                                               
                                                             </div>
                                                          </div>      
                                                      </div>
                                                    </div>
                                          <?php $i++; } ?>
                                    </div> 
                                  </div> 
                                </div>         
                              <?php } ?>
                                
                          <?php } ?>          


                        </div>
                        <!--<div class="preferences">
                          <span class="user-details-title">Preferences</span>
                          <ul>
                              <?php if(!empty($userPreferences)){ 
                                    foreach ($userPreferences as $preference) { ?>
                                     <li><span><?php echo $preference['sex_preference']; ?></span></li>
                              <?php } } ?>       
                          </ul>
                        </div>-->
                     </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){ ?>
                              <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){ ?>
                              <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'])));
                                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'=>$this->session->userdata('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 $participation) {
                              if($participation['title'])
                              {
                            ?>
                              <?php 
                                $getStatus = getValue('user_to_event',array('user_id'=>$this->session->userdata('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 } } ?>   
                           </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'].'/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'; }?>" 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>
</section>
<section class="all_popups">
<!-- REGISTRATION AFTER VERIFICATION POPUPS  -->
         <div class="modal_container register" id="afterVerification_modal" <?php if(empty($steps)){ echo 'style="display: none;"'; }else{ echo 'style="display: block;"'; }?>>
            <form action="" id="FrmStep_05">
            <input id="baseUrl" name="baseUrl" type="hidden" value="<?php echo base_url(); ?>">
               <div id="Step_05" class="dismissPopup" <?php if(!empty($steps) && $steps['step']==1){ echo 'style="display: block;"'; }else{ echo 'style="display: none;"'; }?>>
                  <h2><?php echo getLang('Register'); ?> <span>1/5</span></h2>
                  <div class="center">
                     <p class="text_white allcaps"><?php echo getLang('Please_fill_out_the_questions'); ?></p>
                  </div>
                  <hr>
                  <ul>
                     <!--<li>
                       <label for="">Correspondence</label>
                        <span class="prefferLanguage">
                           <select name="userlanguage" id="userlanguage">
                                <?php if(!empty($languages)){
                                	foreach ($languages as $lang) {
                                		echo "<option value=".$lang['id'].">".$lang['name']."</option>";
                                	}
                                }?>                               
                             </select>
                        </span>
                     </li>-->
                     <li>
                       <label for="">Country</label>
                        <span class="prefferLanguage">
                           <select name="country" id="country">
                              <option value="">--</option>
                                <?php if(!empty($countries)){
                                  foreach ($countries as $country) {
                                    echo "<option value=".$country['country_code'].">".$country['country_name']."</option>";
                                  }
                                }?>                               
                             </select>
                        </span>
                     </li>
                     <li>
                        <label for=""><?php echo getLang('Interested'); ?></label>
                        <span><input type="checkbox" name="interest_lady" value="1"><?php echo getLang('Ladies'); ?> </span>
                        <span><input type="checkbox" name="interest_gentleman" value="1"><?php echo getLang('Gentleman'); ?>  </span>
                        <span><input type="checkbox" name="interest_couples" value="1"><?php echo getLang('Couples'); ?><span>
                      </li>
                      <li>
                       <label for=""><?php echo getLang('Experience'); ?></label><span><input type="checkbox" name="experience" value="1"> <?php echo getLang('New_to_this_lifestyle'); ?></span>
                     </li>
                     <li>
                       <label for=""><?php echo getLang('Get_Together'); ?></label><span><input type="checkbox" name="escort_interest" value="1"> Meet a party-companion</span>
                     </li>
                     <li>
                       <label for=""><?php echo getLang('Ceremony'); ?></label><span><input type="checkbox" name="interest_private" value="1"> <?php echo getLang('Wish_to_participate_as_a_ceremonial_lady'); ?></span>
                     </li>
                     <li>
                       <label for=""><?php echo getLang('Interaction'); ?></label>
                         <span class="interst"> 
                             <select name="preferences" id="preferences">
                                <option value="">--</option>
                                <option value="no_swap"><?php echo getLang('NO_SWAP'); ?></option>
                                <option value="soft_swap"><?php echo getLang('SOFT_SWAP'); ?></option>
                                <option value="full_swap"><?php echo getLang('FULL_SWAP'); ?></option>
                             </select>
                          </span>
                     </li>
                  </ul>
                  <div class="text_center">
                     <button type="button" class="btn_gold" id="continueStep_05"><?php echo getLang('Continue'); ?></button>
                  </div>
                  <div class="popupFooter">
                    <a href="<?php echo base_url().'privacy'; ?>" target="_blank"><img src="<?php echo base_url().'assets/images/lock.svg'; ?>" width="12"> <?php echo getLang('Privat_Policy'); ?></a>
                    <a href="<?php echo base_url().'settings'; ?>"  target="_blank"><img src="<?php echo base_url().'assets/images/black-settings-button.svg'; ?>" width="12"> <?php echo getLang('Settings'); ?></a>
                  </div>
               </div>
            </form>   
            <form action="" id="FrmStep_06">
               <div id="Step_06" class="dismissPopup" <?php if(!empty($steps) && $steps['step']==2){ echo 'style="display: block;"'; }else{ echo 'style="display: none;"'; }?>>
                  <h2><?php echo getLang('Register'); ?> <span>2/5</span></h2>
                  <h3><?php echo getLang('Settings'); ?></h3>
                  <?php if($userDetials['accounttype']!='couple') { ?>
                    <div class="center">
                     <div class="settinbox clearfix">
                        <div class="shecontentbox">
                           <p><?php echo getLang('AGE'); ?>
                              <span class="year">
                                <select name="he_year" id="he_year">
                                    <option value="0"><?php echo getLang('Year'); ?></option>
                                    <?php for($i=date('Y')-18;$i>date('Y')-78;$i--){ ?>
                                      <option value="<?php echo $i; ?>"><?php echo $i; ?></option>
                                    <?php } ?>  
                                </select>
                              </span>
                              <span>
                                 <select name="he_month" id="he_month" class="month">
                                    <option value="0"><?php echo getLang('Month'); ?></option>
                                    <option value="1">Jan</option>
                                    <option value="2">Feb</option>
                                    <option value="3">Mar</option>
                                    <option value="4">Apr</option>
                                    <option value="5">May</option>
                                    <option value="6">Jun</option>
                                    <option value="7">Jul</option>
                                    <option value="8">Aug</option>
                                    <option value="9">Sep</option>
                                    <option value="10">Oct</option>
                                    <option value="11">Nov</option>
                                    <option value="12">Dec</option>
                                </select>
                                <select name="he_date" id="he_date" class="day">
                                    <option value="0"><?php echo getLang('Day'); ?></option>
                                    <?php for($j=1;$j<32;$j++){ ?>
                                      <option value="<?php echo $j; ?>"><?php echo $j; ?></option>
                                    <?php } ?>  
                                </select>
                              </span>
                           </p>
                           <p>Type 
                              <span class="type">
                                 <select name="he_physis" id="he_physis" >
                                    <option value="">--</option>
                                    <option value="Adventurous"><?php echo getLang('Adventurous'); ?></option>
                                    <option value="Affectionate"><?php echo getLang('Affectionate'); ?></option>
                                    <option value="Appealing"><?php echo getLang('Appealing'); ?></option>
                                    <option value="Athletic"><?php echo getLang('Athletic'); ?></option>
                                    <option value="Attractive"><?php echo getLang('Attractive'); ?></option>
                                    <option value="Beautiful"><?php echo getLang('Beautiful'); ?></option>
                                    <option value="Caring"><?php echo getLang('Caring'); ?></option>
                                    <option value="Charming"><?php echo getLang('Charming'); ?></option>
                                    <option value="Classy"><?php echo getLang('Classy'); ?></option>
                                    <option value="Curvy"><?php echo getLang('Curvy'); ?></option>
                                    <option value="Dreamy"><?php echo getLang('Dreamy'); ?></option>
                                    <option value="Educated"><?php echo getLang('Educated'); ?></option>
                                    <option value="Elegant"><?php echo getLang('Elegant'); ?></option>
                                    <option value="Experienced"><?php echo getLang('Experienced'); ?></option>
                                    <option value="Feminine"><?php echo getLang('Feminine'); ?></option>
                                    <option value="Fit"><?php echo getLang('Fit'); ?></option>
                                    <option value="Gorgeous"><?php echo getLang('Gorgeous'); ?></option>
                                    <option value="Handsome"><?php echo getLang('Handsome'); ?></option>
                                    <option value="Hot"><?php echo getLang('Hot'); ?></option>
                                    <option value="Intelectual"><?php echo getLang('Intelectual'); ?></option>
                                    <option value="Lovely"><?php echo getLang('Lovely'); ?></option>
                                    <option value="Luscious"><?php echo getLang('Luscious'); ?></option>
                                    <option value="Masculine"><?php echo getLang('Masculine'); ?></option>
                                    <option value="Muscular"><?php echo getLang('Muscular'); ?></option>
                                    <option value="Natural"><?php echo getLang('Natural'); ?></option>
                                    <option value="Passionate"><?php echo getLang('Passionate'); ?></option>
                                    <option value="Pretty"><?php echo getLang('Pretty'); ?></option>
                                    <option value="Respectful"><?php echo getLang('Respectful'); ?></option>
                                    <option value="Romantic"><?php echo getLang('Romantic'); ?></option>
                                    <option value="Seductive"><?php echo getLang('Seductive'); ?></option>
                                    <option value="Sexy"><?php echo getLang('Sexy'); ?></option>
                                    <option value="Shapely"><?php echo getLang('Shapely'); ?></option>
                                    <option value="Shy"><?php echo getLang('Shy'); ?></option>
                                    <option value="Skinny"><?php echo getLang('Skinny'); ?></option>
                                    <option value="Strong"><?php echo getLang('Strong'); ?></option>
                                    <option value="Stylish"><?php echo getLang('Stylish'); ?></option>
                                    <option value="Tall"><?php echo getLang('Tall'); ?></option>
                                    <option value="Tattooed"><?php echo getLang('Tattooed'); ?></option>
                                    <option value="Warm"><?php echo getLang('Warm'); ?></option>
                                    <option value="Wealthy"><?php echo getLang('Wealthy'); ?></option>
                                    <option value="Youthful"><?php echo getLang('Youthful'); ?></option>
                                </select>
                              </span>
                           </p>
                        </div>
                     </div>
                  </div>
                  <?php } else { ?>
                  <div class="center">
                     <div class="settinbox clearfix">
                        <span><?php echo getLang('SHE'); ?></span>
                        <div class="shecontentbox">
                           <p><?php echo getLang('AGE'); ?> 
                              <span class="year">
                                <select name="she_year" id="she_year">
                                    <option value="0"><?php echo getLang('Year'); ?></option>
                                    <?php for($i=date('Y')-18;$i>date('Y')-78;$i--){ ?>
                                    	<option value="<?php echo $i; ?>"><?php echo $i; ?></option>
                                    <?php } ?>	
                                </select>
                              </span>
                              <span>
                                 <select name="she_month" id="she_month" class="month">
                                    <option value="0"><?php echo getLang('Month'); ?></option>
                                    <option value="1">Jan</option>
                                    <option value="2">Feb</option>
                                    <option value="3">Mar</option>
                                    <option value="4">Apr</option>
                                    <option value="5">May</option>
                                    <option value="6">Jun</option>
                                    <option value="7">Jul</option>
                                    <option value="8">Aug</option>
                                    <option value="9">Sep</option>
                                    <option value="10">Oct</option>
                                    <option value="11">Nov</option>
                                    <option value="12">Dec</option>
                                </select>
                                <select name="she_date" id="she_date" class="day">
                                    <option value="0"><?php echo getLang('Day'); ?></option>
                                    <?php for($j=1;$j<32;$j++){ ?>
                                    	<option value="<?php echo $j; ?>"><?php echo $j; ?></option>
                                    <?php } ?>	
                                </select>
                              </span>
                           </p>
                           <p>Type 
                              <span class="type">
                                <select name="she_physis" id="she_physis" >
                                    <option value="">--</option>
                                    <option value="Adventurous"><?php echo getLang('Adventurous'); ?></option>
                                    <option value="Affectionate"><?php echo getLang('Affectionate'); ?></option>
                                    <option value="Appealing"><?php echo getLang('Appealing'); ?></option>
                                    <option value="Athletic"><?php echo getLang('Athletic'); ?></option>
                                    <option value="Attractive"><?php echo getLang('Attractive'); ?></option>
                                    <option value="Beautiful"><?php echo getLang('Beautiful'); ?></option>
                                    <option value="Caring"><?php echo getLang('Caring'); ?></option>
                                    <option value="Charming"><?php echo getLang('Charming'); ?></option>
                                    <option value="Classy"><?php echo getLang('Classy'); ?></option>
                                    <option value="Curvy"><?php echo getLang('Curvy'); ?></option>
                                    <option value="Dreamy"><?php echo getLang('Dreamy'); ?></option>
                                    <option value="Educated"><?php echo getLang('Educated'); ?></option>
                                    <option value="Elegant"><?php echo getLang('Elegant'); ?></option>
                                    <option value="Experienced"><?php echo getLang('Experienced'); ?></option>
                                    <option value="Feminine"><?php echo getLang('Feminine'); ?></option>
                                    <option value="Fit"><?php echo getLang('Fit'); ?></option>
                                    <option value="Gorgeous"><?php echo getLang('Gorgeous'); ?></option>
                                    <option value="Handsome"><?php echo getLang('Handsome'); ?></option>
                                    <option value="Hot"><?php echo getLang('Hot'); ?></option>
                                    <option value="Intelectual"><?php echo getLang('Intelectual'); ?></option>
                                    <option value="Lovely"><?php echo getLang('Lovely'); ?></option>
                                    <option value="Luscious"><?php echo getLang('Luscious'); ?></option>
                                    <option value="Masculine"><?php echo getLang('Masculine'); ?></option>
                                    <option value="Muscular"><?php echo getLang('Muscular'); ?></option>
                                    <option value="Natural"><?php echo getLang('Natural'); ?></option>
                                    <option value="Passionate"><?php echo getLang('Passionate'); ?></option>
                                    <option value="Pretty"><?php echo getLang('Pretty'); ?></option>
                                    <option value="Respectful"><?php echo getLang('Respectful'); ?></option>
                                    <option value="Romantic"><?php echo getLang('Romantic'); ?></option>
                                    <option value="Seductive"><?php echo getLang('Seductive'); ?></option>
                                    <option value="Sexy"><?php echo getLang('Sexy'); ?></option>
                                    <option value="Shapely"><?php echo getLang('Shapely'); ?></option>
                                    <option value="Shy"><?php echo getLang('Shy'); ?></option>
                                    <option value="Skinny"><?php echo getLang('Skinny'); ?></option>
                                    <option value="Strong"><?php echo getLang('Strong'); ?></option>
                                    <option value="Stylish"><?php echo getLang('Stylish'); ?></option>
                                    <option value="Tall"><?php echo getLang('Tall'); ?></option>
                                    <option value="Tattooed"><?php echo getLang('Tattooed'); ?></option>
                                    <option value="Warm"><?php echo getLang('Warm'); ?></option>
                                    <option value="Wealthy"><?php echo getLang('Wealthy'); ?></option>
                                    <option value="Youthful"><?php echo getLang('Youthful'); ?></option>
                                </select>
                              </span>
                           </p>
                        </div>
                     </div>
                  </div>
                  <hr>
                  <div class="center">
                     <div class="settinbox clearfix">
                        <span><?php echo getLang('HIM'); ?></span>
                        <div class="shecontentbox">
                           <p><?php echo getLang('AGE'); ?> 
                              <span class="year">
                                <select name="he_year" id="he_year">
                                    <option value="0"><?php echo getLang('Year'); ?></option>
                                    <?php for($i=date('Y')-18;$i>date('Y')-78;$i--){ ?>
                                    	<option value="<?php echo $i; ?>"><?php echo $i; ?></option>
                                    <?php } ?>	
                                </select>
                              </span>
                              <span>
                                 <select name="he_month" id="he_month" class="month">
                                    <option value="0"><?php echo getLang('Month'); ?></option>
                                    <option value="1">Jan</option>
                                    <option value="2">Feb</option>
                                    <option value="3">Mar</option>
                                    <option value="4">Apr</option>
                                    <option value="5">May</option>
                                    <option value="6">Jun</option>
                                    <option value="7">Jul</option>
                                    <option value="8">Aug</option>
                                    <option value="9">Sep</option>
                                    <option value="10">Oct</option>
                                    <option value="11">Nov</option>
                                    <option value="12">Dec</option>
                                </select>
                                <select name="he_date" id="he_date" class="day">
                                    <option value="0"><?php echo getLang('Day'); ?></option>
                                    <?php for($j=1;$j<32;$j++){ ?>
                                    	<option value="<?php echo $j; ?>"><?php echo $j; ?></option>
                                    <?php } ?>	
                                </select>
                              </span>
                           </p>
                           <p>Type 
                              <span class="type">
                                 <select name="he_physis" id="he_physis" >
                                    <option value="">--</option>
                                    <option value="Adventurous"><?php echo getLang('Adventurous'); ?></option>
                                    <option value="Affectionate"><?php echo getLang('Affectionate'); ?></option>
                                    <option value="Appealing"><?php echo getLang('Appealing'); ?></option>
                                    <option value="Athletic"><?php echo getLang('Athletic'); ?></option>
                                    <option value="Attractive"><?php echo getLang('Attractive'); ?></option>
                                    <option value="Beautiful"><?php echo getLang('Beautiful'); ?></option>
                                    <option value="Caring"><?php echo getLang('Caring'); ?></option>
                                    <option value="Charming"><?php echo getLang('Charming'); ?></option>
                                    <option value="Classy"><?php echo getLang('Classy'); ?></option>
                                    <option value="Curvy"><?php echo getLang('Curvy'); ?></option>
                                    <option value="Dreamy"><?php echo getLang('Dreamy'); ?></option>
                                    <option value="Educated"><?php echo getLang('Educated'); ?></option>
                                    <option value="Elegant"><?php echo getLang('Elegant'); ?></option>
                                    <option value="Experienced"><?php echo getLang('Experienced'); ?></option>
                                    <option value="Feminine"><?php echo getLang('Feminine'); ?></option>
                                    <option value="Fit"><?php echo getLang('Fit'); ?></option>
                                    <option value="Gorgeous"><?php echo getLang('Gorgeous'); ?></option>
                                    <option value="Handsome"><?php echo getLang('Handsome'); ?></option>
                                    <option value="Hot"><?php echo getLang('Hot'); ?></option>
                                    <option value="Intelectual"><?php echo getLang('Intelectual'); ?></option>
                                    <option value="Lovely"><?php echo getLang('Lovely'); ?></option>
                                    <option value="Luscious"><?php echo getLang('Luscious'); ?></option>
                                    <option value="Masculine"><?php echo getLang('Masculine'); ?></option>
                                    <option value="Muscular"><?php echo getLang('Muscular'); ?></option>
                                    <option value="Natural"><?php echo getLang('Natural'); ?></option>
                                    <option value="Passionate"><?php echo getLang('Passionate'); ?></option>
                                    <option value="Pretty"><?php echo getLang('Pretty'); ?></option>
                                    <option value="Respectful"><?php echo getLang('Respectful'); ?></option>
                                    <option value="Romantic"><?php echo getLang('Romantic'); ?></option>
                                    <option value="Seductive"><?php echo getLang('Seductive'); ?></option>
                                    <option value="Sexy"><?php echo getLang('Sexy'); ?></option>
                                    <option value="Shapely"><?php echo getLang('Shapely'); ?></option>
                                    <option value="Shy"><?php echo getLang('Shy'); ?></option>
                                    <option value="Skinny"><?php echo getLang('Skinny'); ?></option>
                                    <option value="Strong"><?php echo getLang('Strong'); ?></option>
                                    <option value="Stylish"><?php echo getLang('Stylish'); ?></option>
                                    <option value="Tall"><?php echo getLang('Tall'); ?></option>
                                    <option value="Tattooed"><?php echo getLang('Tattooed'); ?></option>
                                    <option value="Warm"><?php echo getLang('Warm'); ?></option>
                                    <option value="Wealthy"><?php echo getLang('Wealthy'); ?></option>
                                    <option value="Youthful"><?php echo getLang('Youthful'); ?></option>
                                </select>
                              </span>
                           </p>
                        </div>
                     </div>
                  </div>
                  <?php } ?>
                  <div class="text_center margin_top30">
                     <button type="button" class="btn_gold" id="continueStep_06" ><?php echo getLang('Continue'); ?></button>
                  </div>
                  <div class="popupFooter">
                    <a href="<?php echo base_url().'privacy'; ?>" target="_blank"><img src="<?php echo base_url().'assets/images/lock.svg'; ?>" width="12"> <?php echo getLang('Privat_Policy'); ?></a>
                    <a href="<?php echo base_url().'settings'; ?>" target="_blank"><img src="<?php echo base_url().'assets/images/black-settings-button.svg'; ?>" width="12"> <?php echo getLang('Settings'); ?></a>
                  </div>
               </div>
            </form>
            <form action="" id="FrmStep_10" >   
               <div id="Step_10" class="dismissPopup" <?php if(!empty($steps) && $steps['step']==3){ echo 'style="display: block;"'; }else{ echo 'style="display: none;"'; }?>>
                  <h2><?php echo getLang('Register'); ?> <span>2/5</span></h2>
                  <div class="center">
                     <p class="text_white allcaps"><?php echo getLang('LIFESTYLE'); ?> &amp; <?php echo getLang('FANTASIES'); ?></p>
                  </div>
                  <hr>
                  <p class="text_gold"><?php echo getLang('Minimum_2_preferences_are_required'); ?>.</p>
                  <ul class="preferencesList">
                     <?php 
                          if(!empty($lifestyles))
                          {
                            foreach ($lifestyles as $styles) { 
                              $value = $styles['styles'];
                              //$value = strtolower(str_replace(' ', '', str_replace('/', '', str_replace('&', '', $styles['styles']))));
                     ?>
                        <li>
                          <p><input type="checkbox" id="<?php echo $value; ?>" name="sexual_preference[]" value="<?php echo $value; ?>"><label for="<?php echo $value; ?>"><?php echo getLang(str_replace('-', '_', str_replace(' ', '_', $styles['styles']))); ?></label></p>
                        </li>
                     <?php  
                             }
                          }
                     ?>
                  </ul>
                  <div class="text_center margin_top30">
                     <button type="button" class="btn_gold" id="continueStep_10"><?php echo getLang('Continue'); ?></button>
                  </div>
                  <div class="popupFooter">
                    <a href="<?php echo base_url().'privacy'; ?>" target="_blank"><img src="<?php echo base_url().'assets/images/lock.svg'; ?>" width="12"> <?php echo getLang('Privat_Policy'); ?></a>
                    <a href="<?php echo base_url().'settings'; ?>" target="_blank"><img src="<?php echo base_url().'assets/images/black-settings-button.svg'; ?>" width="12"> <?php echo getLang('Settings'); ?></a>
                  </div>
               </div>
            </form>
            <form action="" id="FrmStep_07">   
               <div id="Step_07" class="dismissPopup" <?php if(!empty($steps) && $steps['step']==4){ echo 'style="display: block;"'; }else{ echo 'style="display: none;"'; }?>>
                  <h2><?php echo getLang('Register'); ?> <span>3/5</span></h2>
                  

                  <div class="center">
                     <p class="text_white allcaps"><?php echo getLang('Profile_Text'); ?></p>
                  </div>
                  <hr>
                  <div class="center">
                     <p><?php echo getLang('Please_Describe_You_or_Your_Partner'); ?>.</p>
                     <textarea name="about" id="about" class="blckBorder" ></textarea>
                  </div>
                  <div class="text_center margin_top30">
                     <button type="button" class="btn_gold" id="continueStep_07"><?php echo getLang('Continue'); ?></button>
                  </div>
                  <div class="popupFooter">
                    <a href="<?php echo base_url().'privacy'; ?>" target="_blank"><img src="<?php echo base_url().'assets/images/lock.svg'; ?>" width="12"> <?php echo getLang('Privat_Policy'); ?></a>
                    <a href="<?php echo base_url().'settings'; ?>" target="_blank"><img src="<?php echo base_url().'assets/images/black-settings-button.svg'; ?>" width="12"> <?php echo getLang('Settings'); ?></a>
                  </div>
               </div>
            </form>
            <form action="" id="FrmStep_08" enctype="multipart/form-data">   
               <div id="Step_08" class="dismissPopup" <?php if(!empty($steps) && $steps['step']==5){ echo 'style="display: block;"'; }else{ echo 'style="display: none;"'; }?>>
                  <h2><?php echo getLang('Register'); ?> <span>4/5</span></h2>
                  <div class="center">
                     <p class="text_white allcaps"><?php echo getLang('Upload_your_Profile_picture'); ?></p>
                  </div>
                  <hr>
                  <div class="center">
                     <p><?php echo getLang('The_picture_influences_whether'); ?>!</strong></p>
                  </div>

                  <div class="picuploderbox text_center">
                      <span class="picUploadWrapper"><img src="images/defaultcrown.svg" alt="" id="preview"></span>
                      
                  </div>
                  <br/>
                  <div class="text_center">
                     <input type="file" id="uploadPic" name="uploadPic"  accept="image/png,image/jpg,image/jpeg,image/PNG,image/JPG,image/JPEG">
                     <input type="hidden" id="uploadPicImageName" name="uploadPicImageName" >
                     <label type="button" class="btnUploadPic" for="uploadPic"><?php echo getLang('Uploaded_Pictures'); ?></label>
                     <button type="button" class="btn_gold" id="continueStep_08" style="display:none;"><?php echo getLang('Continue'); ?></button>
                     <!--<span class="button next" id="continueStep_08" style="display:none;"><?php echo getLang('Continue'); ?> </span>-->
                  </div>
                  <div class="popupFooter">
                    <a href="<?php echo base_url().'privacy'; ?>" target="_blank"><img src="<?php echo base_url().'assets/images/lock.svg'; ?>" width="12"> <?php echo getLang('Privat_Policy'); ?></a>
                    <a href="<?php echo base_url().'settings'; ?>" target="_blank"><img src="<?php echo base_url().'assets/images/black-settings-button.svg'; ?>" width="12"> <?php echo getLang('Settings'); ?></a>
                  </div>
               </div>      
            </form>
            <form action="" id="FrmStep_09">   
               <div id="Step_09" class="dismissPopup" <?php if(!empty($steps) && $steps['step'] >5 && $userDetials['free_member']==0){ echo 'style="display: block;"'; }else{ echo 'style="display: none;"'; }?>>
                  <?php if($this->session->userdata('member_msg')){ ?>
                    <span style="color:red"><?php echo $this->session->userdata('member_msg'); $this->session->unset_userdata('member_msg'); ?></span>
                  <?php } ?>
                  <?php if(isset($last_paid_membership)){ ?>
                    <h2><?php echo getLang('reactive_membership'); ?></h2>
                  <?php } else { ?>
                    <h2><?php echo getLang('Register'); ?> <span>5/5</span></h2>
                  <?php } ?>
                  <div class="center">
                     <p class="text_white allcaps"><?php echo getLang('Please_select_membership'); ?></p>
                  </div>
                  <hr>
                  <?php /*****************FREE MEMBERSHIP**********************/
                  if($userDetials['accounttype']=='lady') { ?>
                    <div class="paymentBox selectFreeMembership" data-id="0" data-price="0" data-type="0">
                         <span class="crown"><img src="images/grey_crown.png" alt=""></span>
                         <div class="payment_content">
                            <h4 class="text_white"><?php echo getLang('Free_Lady_Membership'); ?></h4>
                            <p><?php echo getLang('Ladies_only_get_the_opportunity'); ?>.</p>
                          </div>
                    </div>
                  <?php }
                  /*****************FREE MEMBERSHIP**********************/ ?>
                  <?php if(!empty($memberships)){ 
                  		foreach($memberships as $membership){ ?>
		                  <div class="paymentBox selectMembership" data-id="<?php echo $membership['alias']; ?>" data-price="<?php echo ($membership['base_price']/100); ?>" data-type="<?php echo $membership['id']; ?>">
		                     <span class="crown"><img src="images/grey_crown.png" alt=""></span>
		                     <div class="payment_content">
		                        <h4 class="text_white"><?php echo $membership['alias']; ?> <?php echo getLang('Membership'); ?></h4>
		                        <?php if($membership['id']==5){ ?>
		                        <p><?php echo getLang('This_membership_gives'); ?>.</p>
		                        <?php } else { ?>
		                        <p><?php echo getLang('This_exclusive_membership_allow_you_to_stay'); ?>.</p>
		                        <?php } ?>
		                        <p class="text_white noMargin twoValueText">EUR <?php echo number_format((($membership['base_price']/100)),2,',','.'); ?>/ <?php echo getLang('annual_fee'); ?> <?php if($membership['id']==5){ echo 'or EUR '.number_format((($memberships_half[0]['base_price']/100)),2,',','.').'/ '.getLang('Half_year'); } ?><?php if($membership['id']==4){ echo 'or EUR '.number_format((($memberships_half[1]['base_price']/100)),2,',','.').'/ '.getLang('Half_year'); } ?></p>
		                     </div>
		                  </div>
		            <?php } } ?>
		              <div class="basicOpen" style="display: none;">      	
	                  	<div class="paymentBox memberchoose" data-id="<?php echo ($memberships_half[0]['base_price']/100); ?>" data-month="6">
		                     <div class="payment_content " >
		                        <p class="text_white noMargin" >EUR <?php echo number_format((($memberships_half[0]['base_price']/100)),2,',','.'); ?> / <?php echo getLang('Half_year'); ?> </p>
		                     </div>
		                </div>
		                <div class="paymentBox memberchoose" data-id="<?php echo ($memberships[0]['base_price']/100); ?>" data-month="1">
		                     <div class="payment_content " >
		                        <p class="text_white noMargin" >EUR <?php echo number_format((($memberships[0]['base_price']/100)),2,',','.'); ?> / <?php echo getLang('annual_fee'); ?> </p>
		                     </div>
		                </div>
	                </div>
                  <div class="premiumOpen" style="display: none;">        
                      <div class="paymentBox memberchoose" data-id="<?php echo ($memberships_half[1]['base_price']/100); ?>" data-month="6">
                         <div class="payment_content " >
                            <p class="text_white noMargin" >EUR <?php echo number_format((($memberships_half[1]['base_price']/100)),2,',','.'); ?> / <?php echo getLang('Half_year'); ?> </p>
                         </div>
                    </div>
                    <div class="paymentBox memberchoose" data-id="<?php echo ($memberships[1]['base_price']/100); ?>" data-month="1">
                         <div class="payment_content " >
                            <p class="text_white noMargin" >EUR <?php echo number_format((($memberships[1]['base_price']/100)),2,',','.'); ?> / <?php echo getLang('annual_fee'); ?> </p>
                         </div>
                    </div>
                  </div>
                  <input type="hidden" id="membershipPrice" value="<?php echo ($memberships[0]['base_price']/100); ?> ">
	                <input type="hidden" id="membershipMonth" value="">
	                <input type="hidden" id="feePrice" value="0">
	                <input type="hidden" id="vatPrice" value="0">
	                <input type="hidden" id="membershiptype" value="5">
                   <div class="text_center margin_top30">
                     <button type="button" class="btn_gold" id="cancelStep_09" style="display:none"><?php echo getLang('Back'); ?></button>
                     <button type="button" class="btn_gold" id="continueStep_09" style="display:none;"><?php echo getLang('Continue'); ?></button>
                   </div>
                  <div class="popupFooter">
                    <a href="<?php echo base_url().'privacy'; ?>" target="_blank"><img src="<?php echo base_url().'assets/images/lock.svg'; ?>" width="12"> <?php echo getLang('Privat_Policy'); ?></a>
                    <a href="<?php echo base_url().'settings'; ?>" target="_blank"><img src="<?php echo base_url().'assets/images/black-settings-button.svg'; ?>" width="12"> <?php echo getLang('Settings'); ?></a>
                  </div> 
               </div>
            </form>

            <!--------------------------FREE MEMBERSHIP---------------------->
            <form action="" id="FrmStep_free">   
               <div id="Step_free" class="dismissPopup" <?php if(!empty($steps) && $steps['step']>5 && $userDetials['free_member']==1){ echo 'style="display: block;"'; }else{ echo 'style="display: none;"'; }?>>
                  <?php if(isset($last_paid_membership)){ ?>
                    <h2><?php echo getLang('reactive_membership'); ?></h2>
                  <?php } else { ?>
                    <h2><?php echo getLang('Register'); ?> <span>5/5</span></h2>
                  <?php } ?>
                  

                  <div class="center">
                     <p class="text_white allcaps"><?php echo getLang('Free_lady_membership_approval'); ?></p>                  
                  </div>
                  <hr>
                  <div class="center">
                    <div class="freememberwrapper clearfix">
                       <div class="leftContent">
                          <span class="avatar">
                            <img 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'; } ?>" alt="">
                          </span>
                          <div class="avatardetails">
                            <h3><?php echo $userDetials['username']; ?></h3>
                            <span><?php echo $userDetials['accounttype']; ?> - <?php echo $userDetials['country_name']; ?></span>
                          </div>
                          <p><?php echo $userDetials['about']; ?></p>
                       </div>
                       <div class="RightContent">
                          <?php if(count($freeImages)==0){ ?>
                          <span class="freeError" style="color:red"></span>
                          <label class="fileupload" for="normalupload">
                               <?php echo getLang('Upload_pictures'); ?>
                             <input class="freeFile" id="normalupload" type="file" name="freeFile[]" multiple>
                             
                          </label>
                          <br/>
                           <span style="color:#b3975">(<?php echo getLang('Select_multiple_by_Press_CTRL'); ?>)</span>
                          <br/>
                              <span class="freeFileNames"></span>
                          <?php } ?>
                          <?php if(count($freeImages)>0){ 
                              foreach ($freeImages as $free) {
                          ?>
                            <div class="previewimgContainer clearfix">
                              <?php if($free['accepted']==1){ ?>
                                <i class="fa fa-check" title="Approved"></i>
                              <?php } else { ?>
                                <i class="fa  fa-hourglass-3" title="Pending"></i>
                                <?php echo getLang('please_wait_for_approval'); ?>  
                              <?php } ?>
                                <img src="<?php if(!empty($free['filename']) && file_exists(FCPATH.'assets/userfiles/'.$free['path'].'/'.$free['filename'].'.'.$free['extension'])){ echo  base_url().'assets/userfiles/'.$free['path'].'/'.$free['filename'].'.'.$free['extension']; } ?>" alt="">
                            </div>
                          <?php } } ?> 
                          <?php if(count($freeImages)>0 && count($freeImages)<3){ 
                          ?>
                            <div class="previewimgContainer clearfix">
                              <span class="freeError" style="color:red"></span><br/>
                              <i class="fa fa-times" title="Rejected"></i> <?php echo 3-count($freeImages); ?> Image(s) rejected.
                              <label class="fileupload" for="normalupload_<?php echo $i; ?>">
                                <?php echo getLang('Upload_min'); ?> <?php echo 3-count($freeImages); ?> <?php echo getLang('Pictures'); ?>
                                <input class="freeFile" id="normalupload_<?php echo $i; ?>" type="file" name="freeFile[]" multiple>

                              </label>
                              <br/>
                                <span class="freeFileNames"></span>
                            </div>
                          <?php } ?>
                          <span class="imageCount" style="display:none;"><?php if(count($freeImages)>0){ echo 3-count($freeImages); }else { echo 3; } ?></span>
                       </div>
                     </div>
                  </div>

                  <?php if((count($freeImages)>0 && count($freeImages)<3) || count($freeImages)==0){ ?>
                  <div class="text_center margin_top30">
                     <button type="button" class="btn_gold backfree" id="" style=""><?php echo getLang('Back'); ?></button>
                     <button type="submit" class="btn_gold" id="continueStep_free"><?php echo getLang('Continue'); ?></button>
                  </div>
                  <?php } ?>
                  <?php if(count($freeApprovedImages)>=3){ ?>
                  <div class="text_center margin_top30">
                    <button type="button" class="btn_gold backfree" id="" style=""><?php echo getLang('Back'); ?></button>
                     <a href="<?php echo base_url().'profile/approve_free_images'; ?>" class="btn_gold"><?php echo getLang('Continue'); ?></a>
                  </div>
                  <?php } ?>
                  <div class="popupFooter">
                    <a href="<?php echo base_url().'privacy'; ?>" target="_blank"><img src="<?php echo base_url().'assets/images/lock.svg'; ?>" width="12"> <?php echo getLang('Privat_Policy'); ?></a>
                    <a href="<?php echo base_url().'settings'; ?>" target="_blank"><img src="<?php echo base_url().'assets/images/black-settings-button.svg'; ?>" width="12"> <?php echo getLang('Settings'); ?></a>
                  </div>
               </div>
            </form>
            <!--------------------------FREE MEMBERSHIP---------------------->

            <form action="" id="FrmStep_11">   
               <div id="Step_11" class="dismissPopup" style="display: none;">
                  <?php if(isset($last_paid_membership)){ ?>
                    <h2><?php echo getLang('reactive_membership'); ?></h2>
                  <?php } else { ?>
                    <h2><?php echo getLang('Register'); ?> <span>5/5</span></h2>
                  <?php } ?>
                  <div class="center">
                     <p class="text_white allcaps"><?php echo getLang('Membership_Payment'); ?></p>
                  </div>
                  <hr>
                  <?php if(!empty($memberships)){ 
                  		foreach($memberships as $membership){ ?>
		                  <div class="paymentBox <?php echo $membership['alias']; ?>" style="display: none;">
		                     <span class="crown"><img src="images/gold_crown.png" alt=""></span>
		                     <div class="payment_content">
		                        <h4 class="text_white"><?php echo $membership['alias']; ?> <?php echo getLang('Membership'); ?></h4>
		                        <p class="showMemberData"></p>
		                        <!-- <p class="text_white noMargin"><?php echo getLang('Do_you_will_use_a_Swiss_card'); ?>?</p>
		                        <p class="confirmVat">
		                        	<span><input type="radio" class="yes" name="yes_no"><label for="yes"><?php echo getLang('Yes'); ?></label></span>
		                        	<span><input type="radio" class="no" name="yes_no" checked><label for="no"><?php echo getLang('No'); ?></label></span>
		                        </p> -->
		                     </div>
		                  </div>
		            <?php } } ?>

                   <div id="creditCard" class="paymentBox pay" >
                     <span class="payment_icon"><img src="images/paymen_icon.png" alt=""></span>
                     <div class="payment_content">
                        <h4 class="text_white"><?php echo getLang('Pay_by_credit_card'); ?></h4>                        
                     </div>
                  </div>
                  <div class="text_center margin_top30">
                     <button type="button" class="btn_gold" id="cancelStep_11" style="display:none"><?php echo getLang('Back'); ?></button>
                     <button type="button" class="btn_gold" id="continueStep_11"><?php echo getLang('Make_Payment'); ?></button>
                  </div>
                  <div class="popupFooter">
                    <a href="<?php echo base_url().'privacy'; ?>" target="_blank"><img src="<?php echo base_url().'assets/images/lock.svg'; ?>" width="12"> <?php echo getLang('Privat_Policy'); ?></a>
                    <a href="<?php echo base_url().'settings'; ?>" target="_blank"><img src="<?php echo base_url().'assets/images/black-settings-button.svg'; ?>" width="12"> <?php echo getLang('Settings'); ?></a>
                  </div>
               </div>
            </form>

            <form action="" id="FrmStep_12">   
               <div id="Step_12" class="dismissPopup" style="display: none;">
                  <?php if(isset($last_paid_membership)){ ?>
                    <h2><?php echo getLang('reactive_membership'); ?></h2>
                  <?php } else { ?>
                    <h2><?php echo getLang('Register'); ?> <span>5/5</span></h2>
                  <?php } ?>
                  <div class="center">
                     <p class="text_white allcaps"><?php echo getLang('Payment_Method'); ?></p>
                  </div>
                  
                  <div class="payment-type">
					<img class="image" src="images/stripepay.png">
					<p><?php echo getLang('International_payment_gateway'); ?></p>
					<span class="button_panel"><button id="continueStep_12"><?php echo getLang('pay_Now'); ?></button></span>
				</div>

               </div>
            </form>
      <?php if(!empty($steps)){ ?>
        <form action="" method="POST" id="payment-form" autocomplete="on">
        	<div id="Step_13" class="dismissPopup" style="display: none;">
                  <?php if(isset($last_paid_membership)){ ?>
                    <h2><?php echo getLang('reactive_membership'); ?></h2>
                  <?php } else { ?>
                    <h2><?php echo getLang('Register'); ?> <span>5/5</span></h2>
                  <?php } ?>
                  <div class="center">
                     <p class="text_white allcaps"><?php echo getLang('Payment_Method'); ?></p>
                  </div>
                  <div class="center">
                  <span class="payment-errors" style="color:red;"></span>
           		  <span class="payment_details"></span>
                 <p class="ssl_text"><img src="<?php echo  base_url().'assets/images/ssl-icon.png'; ?>">
                  <?php echo getLang('To_guarantee_for_maximum_safety__your_data'); ?>.
                 </p>
                 <span id="terms-error" style="color:red"></span>  
                   <p id="terms"><label><input type="checkbox" name="terms"> <?php echo getLang('I_have_read__understood_and_agree_the'); ?> <a href="<?php echo base_url().'terms'; ?>" target="_blank"><?php echo getLang('terms_and_conditions'); ?>.</a></label></p>
                  <div class="form_group">
            
		              <label><?php echo getLang('Card_Holder'); ?></label>
		              <input type="text" size="20" name="card_holder" id="card_holder" placeholder="<?php echo getLang('Enter_Holder_name'); ?>">
		            
		          </div>

		          <div class="form_group">
		            
		              <label><?php echo getLang('Card_Number'); ?></label>
		              <input type="text" size="20" name="card_number" id="card_number" placeholder="<?php echo getLang('Enter_Card_Number'); ?>">
		            
		          </div>
		         
		          <div class="form_group doubleinput clearfix">
                           
                              <label><?php echo getLang('Expiration__MM/YY'); ?></label>
                              <!--<input type="text" size="2" data-stripe="exp_month" placeholder="Enter Month">-->
                              <select name="exp_month" id="exp_month">
                                    <option value=""><?php echo getLang('Month'); ?></option>
                                    <option value="1">Jan</option>
                                    <option value="2">Feb</option>
                                    <option value="3">Mar</option>
                                    <option value="4">Apr</option>
                                    <option value="5">May</option>
                                    <option value="6">Jun</option>
                                    <option value="7">Jul</option>
                                    <option value="8">Aug</option>
                                    <option value="9">Sep</option>
                                    <option value="10">Oct</option>
                                    <option value="11">Nov</option>
                                    <option value="12">Dec</option>
                              </select>
                              <select name="exp_year" id="exp_year">
                                 <option value=""><?php echo getLang('Year'); ?></option>
                                    <?php for($i=date('Y');$i<date('Y')+50;$i++){ ?>
                                       <option value="<?php echo $i; ?>"><?php echo $i; ?></option>
                                    <?php } ?>  
                             </select>
                           <!--<input type="text" size="2" data-stripe="exp_year" placeholder="Enter Year">-->
                         </div>
                        
                         <div class="form_group cvc">
                       
                             <label><?php echo getLang('CVC'); ?></label>
                             <input type="text" size="4" name="card_cvc" id="card_cvc" placeholder="<?php echo getLang('Enter_CVC'); ?>">
                          
                         </div>
		          <div class="text_center margin_top30">
                     <button type="submit" class="btn_gold" id="continueStep_11"><?php echo getLang('Pay'); ?></button>
                  </div>
		          <!--<input type="submit" class="bigbutton" value="Submit Payment">-->
                </div>
               </div>
          
        </form>
        <?php } ?>
         </div>
         
      <?php if(empty($steps) && $expiry[0]['customer_id']!='' && ($expiry[0]['id']=='25267' || $expiry[0]['id']=='25408')){ ?>
         <?php //print_r($userMembershipDetails); die;?>
         <?php 
              $error = 0;
              $exp = $expiry[0]['saferpay_exp']; 
              $expDate = sprintf("%04s", $exp);
              $expdate = date('d-m-Y',($userMembershipDetails['created']+($userMembershipDetails['time']*86400)));
              $expirydate = "31-".substr($expDate, 0,2).'-20'.substr($expDate, 2,2);
              $requireddate = substr($expDate, 0,2).'/20'.substr($expDate, 2,2);
              $date = date('Y-m-d');
              $effectiveDate = date('d-m-Y',strtotime(date("Y-m-d", strtotime($date)) . " +3 month")); 
              //echo strtotime($expdate).'=='.strtotime($effectiveDate);
              if($exp==0)
              {
                $error = 1;
              }
              elseif(strtotime($expirydate)<time())
              {
                if(strtotime($expirydate)<strtotime($effectiveDate))
                {
                  $error = 1;
                }
              }
         ?>
      <div class="modal_container register" id="afterVerification_modal" <?php if($expiry[0]['customer_id']!='') { if($error==0){ echo 'style="display: none"'; } else { echo 'style="display: block"'; } } else{ echo 'style="display: none"'; }   ?>>
        <span class="modal_close"><i class="fa  fa-times-circle-o"></i></span>
        <div class="addCard">
          <h2>Add Card</h2>
           <p class="stripeDt">
           <img src="<?php echo base_url('assets/images/stripe_card.png'); ?>" alt="">
           to guarantee maximum safety your data will be SSL encrypted and processed directly by the cradit card provider stripe payments.</p>
           <hr>
            <h4 style="font-weight: 700;font-family: Lato, sans-serif;">Add New Payment Method</h4>

              <p class="cardAcpt">
                Castleevents accept all major credit and debit card <span>
                 <img src="<?php echo base_url('assets/images/visa_card.png'); ?>" alt="">
                 <img src="<?php echo base_url('assets/images/M_card.png'); ?>" alt="">
                 <img src="<?php echo base_url('assets/images/maestro.png'); ?>" alt="">
                 <img src="<?php echo base_url('assets/images/am_icon.png'); ?>" alt=""></span>
              </p>

              <div class="namefield">
                <p><?php if($expiry[0]['card_name']!=''){ echo $expiry[0]['card_name'];} else{ echo 'Visa'; } ?></p>
              </div>
              <div class="namefield">
                <p><?php if($expiry[0]['cc_pan']!=''){ echo $expiry[0]['cc_pan'];} else{ echo 'Declined'; } ?> <span><?php if($expiry[0]['saferpay_exp']!=''){ echo $expiry[0]['saferpay_exp'];} else{ echo 'Declined'; } ?></span></p>
              </div>
              <p class="nomargin">Your membership wil be automatically renewed on : <strong><?php if($userMembershipDetails['created']!=''){ echo date('m/Y',($userMembershipDetails['created']+($userMembershipDetails['time']*86400))); }?></strong></p>
            <p class="nomargin">Payment reason: <strong>CE</strong> (Appears on your credit card billing)</p>
            <a href="javascript:void(0)" class="addCardbtn">Add Card</a>
        </div>   
        <form action="" method="POST" id="update-form" style="display:none;" autocomplete="on">
          <div id="" class="dismissPopup" style="">
                  <h2 style="text-align: left !important;"><?php echo  getLang('Your_membership_credit_card_is_expired_within_next_3');?></h2>
                  <p style="color:#fff;"><?php echo  getLang('In_order_for_your_membership_to_continue');?></p>
                  <div class="center">
                     <p class="text_white allcaps"><?php echo getLang('Payment_Method'); ?></p>
                  </div>
                  <div class="center">
                  <span class="update-errors" style="color:red;"></span>
                <span class="payment_details"></span>
                 <p class="ssl_text"><img src="<?php echo  base_url().'assets/images/ssl-icon.png'; ?>">
                  <?php echo getLang('To_guarantee_for_maximum_safety__your_data'); ?>.
                 </p>
                  <div class="form_group">
            
                  <label><?php echo getLang('Card_Holder'); ?></label>
                  <input type="text" size="20" data-stripe="name" placeholder="<?php echo getLang('Enter_Holder_name'); ?>">
                
              </div>

              <div class="form_group">
                
                  <label><?php echo getLang('Card_Number'); ?></label>
                  <input type="text" size="20" data-stripe="number" placeholder="<?php echo getLang('Enter_Card_Number'); ?>">
                
              </div>
             
              <div class="form_group doubleinput clearfix">
                           
                              <label><?php echo getLang('Expiration__MM/YY'); ?></label>
                              <!--<input type="text" size="2" data-stripe="exp_month" placeholder="Enter Month">-->
                              <select data-stripe="exp_month">
                                    <option value=""><?php echo getLang('Month'); ?></option>
                                    <option value="01">Jan</option>
                                    <option value="02">Feb</option>
                                    <option value="03">Mar</option>
                                    <option value="04">Apr</option>
                                    <option value="05">May</option>
                                    <option value="06">Jun</option>
                                    <option value="07">Jul</option>
                                    <option value="08">Aug</option>
                                    <option value="09">Sep</option>
                                    <option value="10">Oct</option>
                                    <option value="11">Nov</option>
                                    <option value="12">Dec</option>
                              </select>
                              <select data-stripe="exp_year">
                                 <option value=""><?php echo getLang('Year'); ?></option>
                                    <?php for($i=date('Y');$i<date('Y')+50;$i++){ ?>
                                       <option value="<?php echo $i; ?>"><?php echo $i; ?></option>
                                    <?php } ?>  
                             </select>
                           <!--<input type="text" size="2" data-stripe="exp_year" placeholder="Enter Year">-->
                         </div>
                        
                         <div class="form_group cvc">
                       
                             <label><?php echo getLang('CVC'); ?></label>
                             <input type="text" size="4" data-stripe="cvc" placeholder="<?php echo getLang('Enter_CVC'); ?>">
                          
                         </div>
                  <div class="text_center margin_top30">
                     <button type="submit" class="btn_gold" id=""><?php echo getLang('Save_Changes'); ?></button>
                  </div>
              <!--<input type="submit" class="bigbutton" value="Submit Payment">-->
                </div>
               </div>
          
        </form>

          <span id="expirySuccess" style="display:none;">
                 <h2><?php echo getLang('Card_Details_Update_Successful'); ?></h2>
                 <div class="center">
                      <p><?php echo getLang('Thanks_you'); ?>. <br/><?php echo getLang('Your_card_detail_successfully_updated'); ?>.</p>
                 </div>
              </span>
         </div>

         <?php } ?>
         <?php if(!empty($steps)){ ?>
         <div class="modalmaskFix" <?php if(empty($steps)){ echo 'style="display: none;"'; } else{ echo 'style="display: block;"'; }?>></div>
         <?php } else { ?>
         <div class="modalmaskFix" <?php if($expiry[0]['customer_id']!='' && ($expiry[0]['id']=='25267' || $expiry[0]['id']=='25408')) { if($error==0){ echo 'style="display: none"'; } else { echo 'style="display: block"'; } } else{ echo 'style="display: none;"'; } ?>></div>

         <?php } ?>

         <div class="modal_container register" id="uploadimageModal" style="display: none">
             <div class="modal-dialog">
              <div class="modal-content">
                    <div class="modal-header">
                      <h2>Crop Image</h2>
                      <button type="button" class="close closeCrop" data-dismiss="modal">&times;</button>
                    </div>
                    <div class="modal-body">
                      <div class="row">
                   <div class="col-md-8 text-center">
                    <div id="image_demo" style="width:350px; margin-top:30px"></div>
                   </div>
                   <div class="col-md-4" style="padding-top:30px; text-align: center;">
                    <br />                    
                    <button class="btn_gold crop_image">Crop & Upload Image</button>
                 </div>
                </div>
                    </div>
                    
                 </div>
                </div>
            </div>
</section>
<script src="js/jquery.min.js"></script>            
<script type="text/javascript">
$(function(){
  /***********FREE MEMBERSHIP*******************/
  <?php if($this->session->userdata('upgrade')){ ?>
    $('.UpgradSession').fadeIn();
    setInterval(function(){
      $('.UpgradSession').fadeOut();
    },5000);
  <?php $this->session->unset_userdata('upgrade'); } ?> 
  /***********FREE MEMBERSHIP*******************/ 
  <?php if($this->session->userdata('you_are_blocked')){ ?>
    $('.block-alert').fadeIn();
    setInterval(function(){
      $('.block-alert').fadeOut();
    },5000);
  <?php $this->session->unset_userdata('you_are_blocked'); } ?> 

  $image_crop = $('#image_demo').croppie({
      enableExif: true,
      viewport: {
        width:200,
        height:200,
        type:'circle' //square
      },
      boundary:{
        width:300,
        height:300
      }
  });
  $('#uploadPic').on('change', function(){
    var reader = new FileReader();
    reader.onload = function (event) {
      $image_crop.croppie('bind', {
        url: event.target.result
      }).then(function(){
        console.log('jQuery bind complete');
        //$('#uploadimageModal').modal('show');
      });
    }
    reader.readAsDataURL(this.files[0]);
    $('#uploadimageModal').modal('show');
  });

  $('.crop_image').click(function(event){
    $image_crop.croppie('result', {
      type: 'canvas',
      size: 'viewport'
    }).then(function(response){
      $('#preview').attr('src', response);
      $('#uploadPicImageName').val(response);
      $('.closeCrop').click();
    })
  });
})
  
</script>          