HEX
Server: nginx/1.18.0
System: Linux vcwordpress 5.15.0-174-generic #184-Ubuntu SMP Fri Mar 13 18:41:50 UTC 2026 x86_64
User: root (0)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/info.viitorcloud.in/wp-content/themes/infoviitorcloud/viitorcloud.php
<?php
/*
  Template Name: viitorcloud page
 */
get_header();
if(is_user_logged_in()) {
  global $current_user,$wpdb;
  get_currentuserinfo();
  $c_user_id = get_current_user_id();
  echo "<input type='hidden' name='currentuser' id='currentuser' value='".$c_user_id."'>";
}

?>
<input type="hidden" name="ajaxurl" id="ajaxurl" value="<?php echo admin_url('admin-ajax.php'); ?>">
<div id="primary" class="content-area">
  <main id="main" class="site-main" role="main">
    <div class="event">
     
     <!-- .....................................................New code..............................................-->


            <?php
                $categories = get_field('category_section'); 
                /*$categories = get_categories( array(
                    'orderby' => 'id',
                    'order'   => 'ASC',
                    'exclude' => array(1),
                    'hide_empty' =>true
                ) );*/
                 $service_row = 1;
                foreach( $categories as $category ) {
                  $cat_id= $category['select_category']->term_id;
                  $limit_title = mb_substr(strtolower($category['select_category']->slug), 0, 3);
                  $loop = "loop-";
                 //echo '<div class="col-md-4"><a href="' . get_category_link($category->term_id) . '">' . $category->name . '</a></div>';
                 ?>
            <section class="event-section company-section">
              <div class="container-fluid">
                  <div class="section-title">
                    <h2><?php echo $category['select_category']->name;?></h2>
                  </div>
                  <div class="section-content d-flex justify-content-start">
                         <?php
                         $args = array(
                              'post_type' => 'post',
                              'post_status' => 'publish',
                              'cat' => $cat_id,
                              'posts_per_page' => -1,
                          );
                         $arr_posts = new WP_Query( $args );
                         if ( $arr_posts->have_posts() ) :
                             while ( $arr_posts->have_posts() ) : $arr_posts->the_post();
                                  $unique_id = "postid-".$post->ID.$limit_title.$service_row;
                                  $count_id = $loop.$unique_id;
                                  $radio_condition = get_field('show_on_click');?>
                                  <div class="event-box" style="display:<?php echo $jor_cls; ?>">
                                    <div class="event-item d-flex justify-content-between flex-column  align-items-center">
                                      <?php
                                      $service_title = get_the_title();
                                      $post_id = $post->ID;
                                      $list_post_id[] = $post_id;
                                      if($radio_condition == "youtube"){?>
                                        <?php if(has_post_thumbnail()){
                                                  the_post_thumbnail('serviceicon');
                                            } else { ?>
                                              <img src="<?php echo get_bloginfo('template_directory') ?>/assets/images/icons/activity.svg" alt="serviceiconimg">
                                          <?php } ?>
                                              <?php if(!empty($service_title)) { ?>
                                                  <div class="event-item-title">
                                                      <img src="<?php echo get_template_directory_uri();?>/assets/images/icons/video-sticky.svg" alt=""title="">
                                                      <h4><?php echo $service_title; ?></h4>
                                                  </div>
                                              <?php } ?>
                                                  <?php
                                                    if(have_rows('youtube')):
                                                      $vid = 0;
                                                      while(have_rows('youtube')) : the_row();
                                                          $youtube_title = get_sub_field('youtube_title');
                                                          $youtube_link = get_sub_field('youtube_link');
                                                         
                                                          if($vid == 0){ ?>

                                                              <a data-id="<?php echo $post_id; ?>" class="view-button-link event-item-hover html5lightbox"  id="<?php echo $count_id ?>" title="<?php echo $youtube_title; ?>" data-fullscreenmode="true" data-group="<?php echo $unique_id; ?>"  href="<?php echo $youtube_link; ?>" >
                                                                  <svg class="view" width="100" height="100" viewBox="0 0 30 30" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg">
                                                                      <defs>
                                                                          <path d="M0,15.089434 C0,16.3335929 5.13666091,24.1788679 14.9348958,24.1788679 C24.7325019,24.1788679 29.8697917,16.3335929 29.8697917,15.089434 C29.8697917,13.8456167 24.7325019,6 14.9348958,6 C5.13666091,6 0,13.8456167 0,15.089434 Z" id="outline"></path>
                                                                          <mask id="mask">
                                                                              <rect width="100%" height="100%" fill="white"></rect>
                                                                              <use xlink:href="#outline" id="lid" fill="black"/>
                                                                          </mask>
                                                                      </defs>
                                                                      <g id="eye">
                                                                          <path d="M0,15.089434 C0,16.3335929 5.13666091,24.1788679 14.9348958,24.1788679 C24.7325019,24.1788679 29.8697917,16.3335929 29.8697917,15.089434 C29.8697917,13.8456167 24.7325019,6 14.9348958,6 C5.13666091,6 0,13.8456167 0,15.089434 Z M14.9348958,22.081464 C11.2690863,22.081464 8.29688487,18.9510766 8.29688487,15.089434 C8.29688487,11.2277914 11.2690863,8.09740397 14.9348958,8.09740397 C18.6007053,8.09740397 21.5725924,11.2277914 21.5725924,15.089434 C21.5725924,18.9510766 18.6007053,22.081464 14.9348958,22.081464 L14.9348958,22.081464 Z M18.2535869,15.089434 C18.2535869,17.0200844 16.7673289,18.5857907 14.9348958,18.5857907 C13.1018339,18.5857907 11.6162048,17.0200844 11.6162048,15.089434 C11.6162048,13.1587835 13.1018339,11.593419 14.9348958,11.593419 C15.9253152,11.593419 14.3271242,14.3639878 14.9348958,15.089434 C15.451486,15.7055336 18.2535869,14.2027016 18.2535869,15.089434 L18.2535869,15.089434 Z" fill="#FFFFFF"></path>
                                                                          <use xlink:href="#outline" mask="url(#mask)" fill="#FFFFFF"/>
                                                                      </g>
                                                                  </svg>
                                                              </a>
                                                          <?php } else { ?>
                                                              <a  href="<?php echo $youtube_link; ?>" title="<?php echo $youtube_title; ?>" class="html5lightbox" data-group="<?php echo $unique_id; ?>" style="display:none;">Second Video</a>
                                                          <?php } ?>
                                                                 
                                                          <?php
                                                          $vid++;
                                                      endwhile; wp_reset_query();?>
                                                  <?php
                                              endif;
                                           ?>
                                      <?php } else if($radio_condition == "pdf"){?>
                                              <?php if(has_post_thumbnail()){
                                                  the_post_thumbnail();
                                              } else { ?>
                                               <img src="<?php echo get_bloginfo('template_directory') ?>/assets/images/icons/activity.svg" alt="serviceiconimg">
                                              <?php } ?>
                                              <?php if(!empty($service_title)) { ?>
                                                  <div class="event-item-title">
                                                      <img src="<?php echo get_template_directory_uri();?>/assets/images/icons/pdf.svg" alt=""title="">
                                                      <h4><?php echo $service_title; ?></h4>
                                                  </div>
                                              <?php }
                                              if(have_rows('add_pdf')):
                                                while(have_rows('add_pdf')) : the_row();

                                                    $pdf_title = get_sub_field('pdf_title');
                                                    $pdf_file = get_sub_field('pdf_file');?>

                                                    <a data-id="<?php echo $post_id; ?>" class="view-button-link event-item-hover html5lightbox"  id="<?php echo $count_id ?>" title="<?php //echo $service_title; ?><?php echo $pdf_title;//echo strip_tags(get_the_title()); ?>" href="<?php echo $pdf_file; ?>">
                                                        <svg class="view" width="100" height="100" viewBox="0 0 30 30" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg">
                                                            <defs>
                                                                <path d="M0,15.089434 C0,16.3335929 5.13666091,24.1788679 14.9348958,24.1788679 C24.7325019,24.1788679 29.8697917,16.3335929 29.8697917,15.089434 C29.8697917,13.8456167 24.7325019,6 14.9348958,6 C5.13666091,6 0,13.8456167 0,15.089434 Z" id="outline"></path>
                                                                <mask id="mask">
                                                                    <rect width="100%" height="100%" fill="white"></rect>
                                                                    <use xlink:href="#outline" id="lid" fill="black"/>
                                                                </mask>
                                                            </defs>
                                                            <g id="eye">
                                                                <path d="M0,15.089434 C0,16.3335929 5.13666091,24.1788679 14.9348958,24.1788679 C24.7325019,24.1788679 29.8697917,16.3335929 29.8697917,15.089434 C29.8697917,13.8456167 24.7325019,6 14.9348958,6 C5.13666091,6 0,13.8456167 0,15.089434 Z M14.9348958,22.081464 C11.2690863,22.081464 8.29688487,18.9510766 8.29688487,15.089434 C8.29688487,11.2277914 11.2690863,8.09740397 14.9348958,8.09740397 C18.6007053,8.09740397 21.5725924,11.2277914 21.5725924,15.089434 C21.5725924,18.9510766 18.6007053,22.081464 14.9348958,22.081464 L14.9348958,22.081464 Z M18.2535869,15.089434 C18.2535869,17.0200844 16.7673289,18.5857907 14.9348958,18.5857907 C13.1018339,18.5857907 11.6162048,17.0200844 11.6162048,15.089434 C11.6162048,13.1587835 13.1018339,11.593419 14.9348958,11.593419 C15.9253152,11.593419 14.3271242,14.3639878 14.9348958,15.089434 C15.451486,15.7055336 18.2535869,14.2027016 18.2535869,15.089434 L18.2535869,15.089434 Z" fill="#FFFFFF"></path>
                                                                <use xlink:href="#outline" mask="url(#mask)" fill="#FFFFFF"/>
                                                            </g>
                                                        </svg>
                                                    </a>

                                                    <?php
                                                endwhile;
                                              endif;?>
                                      <?php } else if($radio_condition == "image"){?>
                                              <?php if(has_post_thumbnail()){
                                                  the_post_thumbnail();
                                              }else { ?>
                                               <img src="<?php echo get_bloginfo('template_directory') ?>/assets/images/icons/activity.svg" alt="serviceiconimg">
                                              <?php } ?>
                                              <?php if(!empty($service_title)) { ?>
                                                  <div class="event-item-title">
                                                      <img src="<?php echo get_template_directory_uri();?>/assets/images/icons/image.svg" alt=""title=""> 
                                                      <h4><?php echo $service_title; ?></h4>
                                                  </div>
                                              <?php }
                                              if(have_rows('images')):
                                              $img = 0;
                                              while(have_rows('images')) : the_row();
                                                  $image_title = get_sub_field('image_title');
                                                  $upload_image = get_sub_field('upload_image');
                                                  if($img == 0){?>
                                                  <a data-id="<?php echo $post_id; ?>" class="view-button-link event-item-hover html5lightbox" id="<?php echo $count_id ?>" title="<?php echo $image_title; ?>" data-fullscreenmode="true" data-group="<?php echo $unique_id; ?>"  href="<?php echo $upload_image; ?>">
                                                      <svg class="view" width="100" height="100" viewBox="0 0 30 30" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg">
                                                          <defs>
                                                              <path d="M0,15.089434 C0,16.3335929 5.13666091,24.1788679 14.9348958,24.1788679 C24.7325019,24.1788679 29.8697917,16.3335929 29.8697917,15.089434 C29.8697917,13.8456167 24.7325019,6 14.9348958,6 C5.13666091,6 0,13.8456167 0,15.089434 Z" id="outline"></path>
                                                              <mask id="mask">
                                                                  <rect width="100%" height="100%" fill="white"></rect>
                                                                  <use xlink:href="#outline" id="lid" fill="black"/>
                                                              </mask>
                                                          </defs>
                                                          <g id="eye">
                                                              <path d="M0,15.089434 C0,16.3335929 5.13666091,24.1788679 14.9348958,24.1788679 C24.7325019,24.1788679 29.8697917,16.3335929 29.8697917,15.089434 C29.8697917,13.8456167 24.7325019,6 14.9348958,6 C5.13666091,6 0,13.8456167 0,15.089434 Z M14.9348958,22.081464 C11.2690863,22.081464 8.29688487,18.9510766 8.29688487,15.089434 C8.29688487,11.2277914 11.2690863,8.09740397 14.9348958,8.09740397 C18.6007053,8.09740397 21.5725924,11.2277914 21.5725924,15.089434 C21.5725924,18.9510766 18.6007053,22.081464 14.9348958,22.081464 L14.9348958,22.081464 Z M18.2535869,15.089434 C18.2535869,17.0200844 16.7673289,18.5857907 14.9348958,18.5857907 C13.1018339,18.5857907 11.6162048,17.0200844 11.6162048,15.089434 C11.6162048,13.1587835 13.1018339,11.593419 14.9348958,11.593419 C15.9253152,11.593419 14.3271242,14.3639878 14.9348958,15.089434 C15.451486,15.7055336 18.2535869,14.2027016 18.2535869,15.089434 L18.2535869,15.089434 Z" fill="#FFFFFF"></path>
                                                              <use xlink:href="#outline" mask="url(#mask)" fill="#FFFFFF"/>
                                                          </g>
                                                      </svg>
                                                  </a>
                                                  <?php } else {?>
                                                  <a href="<?php echo $upload_image; ?>" title="<?php echo $image_title; ?>" data-group="<?php echo $unique_id; ?>" class="html5lightbox"  style="display:none;">Second img</a>
                                                  <?php }
                                              $img++;
                                              endwhile;
                                          endif;
                                       ?>
                                      <?php } else if($radio_condition == "link"){?>
                                        <?php if(has_post_thumbnail()){
                                                  the_post_thumbnail();
                                              } else { ?>
                                               <img src="<?php echo get_bloginfo('template_directory') ?>/assets/images/icons/activity.svg" alt="serviceiconimg">
                                              <?php } ?>
                                        <?php if(!empty($service_title)) { ?>
                                            <div class="event-item-title">
                                                <h4><?php echo $service_title; ?></h4>
                                            </div>
                                        <?php }
                                            $add_link = get_field('add_link');
                                            $link_type = get_field('link_type');
                                            $open_w = ($link_type == "external") ? "_blank" : "_self";
                                            if($link_type == "external") {?>
                                                <a data-id="<?php echo $post_id; ?>" class="view-button-link event-item-hover" target="<?php echo $open_w; ?>" id="<?php echo $service_title; ?>" title="<?php echo $service_title; ?>" href="<?php echo $add_link; ?>">
                                            <?php } else { ?>
                                                <a data-id="<?php echo $post_id; ?>" class="view-button-link event-item-hover html5lightbox" id="<?php echo $service_title; ?>" title="<?php echo $service_title; ?>" href="<?php echo $add_link; ?><?php //echo $pdf_url_pt_res; ?>">
                                            <?php } ?>
                                                    <svg class="view" width="100" height="100" viewBox="0 0 30 30" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg">
                                                        <defs> 
                                                            <path d="M0,15.089434 C0,16.3335929 5.13666091,24.1788679 14.9348958,24.1788679 C24.7325019,24.1788679 29.8697917,16.3335929 29.8697917,15.089434 C29.8697917,13.8456167 24.7325019,6 14.9348958,6 C5.13666091,6 0,13.8456167 0,15.089434 Z" id="outline"></path>
                                                            <mask id="mask">
                                                                <rect width="100%" height="100%" fill="white"></rect>
                                                                <use xlink:href="#outline" id="lid" fill="black"/>
                                                            </mask>
                                                        </defs>
                                                        <g id="eye">
                                                            <path d="M0,15.089434 C0,16.3335929 5.13666091,24.1788679 14.9348958,24.1788679 C24.7325019,24.1788679 29.8697917,16.3335929 29.8697917,15.089434 C29.8697917,13.8456167 24.7325019,6 14.9348958,6 C5.13666091,6 0,13.8456167 0,15.089434 Z M14.9348958,22.081464 C11.2690863,22.081464 8.29688487,18.9510766 8.29688487,15.089434 C8.29688487,11.2277914 11.2690863,8.09740397 14.9348958,8.09740397 C18.6007053,8.09740397 21.5725924,11.2277914 21.5725924,15.089434 C21.5725924,18.9510766 18.6007053,22.081464 14.9348958,22.081464 L14.9348958,22.081464 Z M18.2535869,15.089434 C18.2535869,17.0200844 16.7673289,18.5857907 14.9348958,18.5857907 C13.1018339,18.5857907 11.6162048,17.0200844 11.6162048,15.089434 C11.6162048,13.1587835 13.1018339,11.593419 14.9348958,11.593419 C15.9253152,11.593419 14.3271242,14.3639878 14.9348958,15.089434 C15.451486,15.7055336 18.2535869,14.2027016 18.2535869,15.089434 L18.2535869,15.089434 Z" fill="#FFFFFF"></path>
                                                            <use xlink:href="#outline" mask="url(#mask)" fill="#FFFFFF"/>
                                                        </g>
                                                    </svg>
                                                </a>                                      
                                        <?php } else if($radio_condition == "products"){ ?>
                                        <?php if(has_post_thumbnail()){
                                                  the_post_thumbnail();
                                              } else { ?>
                                               <img src="<?php echo get_bloginfo('template_directory') ?>/assets/images/icons/activity.svg" alt="serviceiconimg">
                                        <?php } ?>
                                        <?php if(!empty($service_title)) { ?>
                                            <div class="event-item-title">
                                                <h4><?php echo $service_title; ?></h4>
                                            </div>
                                        <?php }
                                        $ct_prod = 0;
                                        $products = get_field('product_post_type');
                                        if( $products ):
                                            foreach( $products as $product ):
                                                if($ct_prod == 0){ ?>
                                                        <a data-id="<?php echo $post_id; ?>" href="<?php echo get_permalink( $product->ID ); ?>" id="<?php echo $count_id ?>" class="view-button-link event-item-hover html5lightbox" title="Products"  data-title="<?php echo get_the_title( $product->ID ); ?>" data-fullscreenmode="true"   data-group="<?php echo $unique_id; ?>">
                                                            <svg class="view" width="100" height="100" viewBox="0 0 30 30" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg">
                                                                <defs>
                                                                    <path d="M0,15.089434 C0,16.3335929 5.13666091,24.1788679 14.9348958,24.1788679 C24.7325019,24.1788679 29.8697917,16.3335929 29.8697917,15.089434 C29.8697917,13.8456167 24.7325019,6 14.9348958,6 C5.13666091,6 0,13.8456167 0,15.089434 Z" id="outline"></path>
                                                                    <mask id="mask">
                                                                        <rect width="100%" height="100%" fill="white"></rect>
                                                                        <use xlink:href="#outline" id="lid" fill="black"/>
                                                                    </mask>
                                                                </defs>
                                                                <g id="eye">
                                                                    <path d="M0,15.089434 C0,16.3335929 5.13666091,24.1788679 14.9348958,24.1788679 C24.7325019,24.1788679 29.8697917,16.3335929 29.8697917,15.089434 C29.8697917,13.8456167 24.7325019,6 14.9348958,6 C5.13666091,6 0,13.8456167 0,15.089434 Z M14.9348958,22.081464 C11.2690863,22.081464 8.29688487,18.9510766 8.29688487,15.089434 C8.29688487,11.2277914 11.2690863,8.09740397 14.9348958,8.09740397 C18.6007053,8.09740397 21.5725924,11.2277914 21.5725924,15.089434 C21.5725924,18.9510766 18.6007053,22.081464 14.9348958,22.081464 L14.9348958,22.081464 Z M18.2535869,15.089434 C18.2535869,17.0200844 16.7673289,18.5857907 14.9348958,18.5857907 C13.1018339,18.5857907 11.6162048,17.0200844 11.6162048,15.089434 C11.6162048,13.1587835 13.1018339,11.593419 14.9348958,11.593419 C15.9253152,11.593419 14.3271242,14.3639878 14.9348958,15.089434 C15.451486,15.7055336 18.2535869,14.2027016 18.2535869,15.089434 L18.2535869,15.089434 Z" fill="#FFFFFF"></path>
                                                                    <use xlink:href="#outline" mask="url(#mask)" fill="#FFFFFF"/>
                                                                </g>
                                                            </svg>
                                                        </a>
                                                <?php } else { ?>
                                                        <a href="<?php echo get_permalink( $product->ID ); ?>"  data-title="<?php echo get_the_title( $product->ID ); ?>"  class="html5lightbox" data-group="<?php echo $unique_id; ?>"  style="display:none;">Second Video</a>
                                                <?php }
                                                $ct_prod++;
                                            endforeach;
                                        endif;
                                    ?>
                                    <?php } else if($radio_condition == "contribution") { ?>
                                         <?php if(has_post_thumbnail()){
                                                  the_post_thumbnail();
                                          } else { ?>
                                           <img src="<?php echo get_bloginfo('template_directory') ?>/assets/images/icons/activity.svg" alt="serviceiconimg">
                                          <?php } ?>
                                        <?php if(!empty($service_title)) { ?>
                                            <div class="event-item-title">
                                                <h4><?php echo $service_title; ?></h4>
                                            </div>
                                        <?php }
                                        if(have_rows('open_source_contribution')):?>
                                            <a data-id="<?php echo $post_id; ?>" class="view-button-link event-item-hover html5lightbox" title="<?php echo $service_title; ?>" id="<?php echo $count_id ?>" href="#<?php echo $unique_id;?>">
                                                <svg class="view" width="100" height="100" viewBox="0 0 30 30" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg">
                                                    <defs>
                                                        <path d="M0,15.089434 C0,16.3335929 5.13666091,24.1788679 14.9348958,24.1788679 C24.7325019,24.1788679 29.8697917,16.3335929 29.8697917,15.089434 C29.8697917,13.8456167 24.7325019,6 14.9348958,6 C5.13666091,6 0,13.8456167 0,15.089434 Z" id="outline"></path>
                                                        <mask id="mask">
                                                            <rect width="100%" height="100%" fill="white"></rect>
                                                            <use xlink:href="#outline" id="lid" fill="black"/>
                                                        </mask>
                                                    </defs>
                                                    <g id="eye">
                                                        <path d="M0,15.089434 C0,16.3335929 5.13666091,24.1788679 14.9348958,24.1788679 C24.7325019,24.1788679 29.8697917,16.3335929 29.8697917,15.089434 C29.8697917,13.8456167 24.7325019,6 14.9348958,6 C5.13666091,6 0,13.8456167 0,15.089434 Z M14.9348958,22.081464 C11.2690863,22.081464 8.29688487,18.9510766 8.29688487,15.089434 C8.29688487,11.2277914 11.2690863,8.09740397 14.9348958,8.09740397 C18.6007053,8.09740397 21.5725924,11.2277914 21.5725924,15.089434 C21.5725924,18.9510766 18.6007053,22.081464 14.9348958,22.081464 L14.9348958,22.081464 Z M18.2535869,15.089434 C18.2535869,17.0200844 16.7673289,18.5857907 14.9348958,18.5857907 C13.1018339,18.5857907 11.6162048,17.0200844 11.6162048,15.089434 C11.6162048,13.1587835 13.1018339,11.593419 14.9348958,11.593419 C15.9253152,11.593419 14.3271242,14.3639878 14.9348958,15.089434 C15.451486,15.7055336 18.2535869,14.2027016 18.2535869,15.089434 L18.2535869,15.089434 Z" fill="#FFFFFF"></path>
                                                        <use xlink:href="#outline" mask="url(#mask)" fill="#FFFFFF"/>
                                                    </g>
                                                </svg>
                                            </a>
                                            <div id="<?php echo $unique_id;?>" style="display:none;">
                                                <div class="lightboxcontainer">
                                                    <div class="lightboxleft">
                                                        <div class="row">
                                                        <?php
                                                            while(have_rows('open_source_contribution')) : the_row();
                                                                $c_title    =   get_sub_field('contribution_title');
                                                                $c_image    =   get_sub_field('contribution_image');
                                                                $c_descr    =   get_sub_field('contribution_description');
                                                                $c_link     =   get_sub_field('contribution_link');
                                                                $c_btn      =   get_sub_field('button_text');
                                                                if(!empty($c_title) || !empty($c_image) || !empty($c_descr) || !empty($c_link)) { ?>
                                                                <div class="col-md-6 col-lg-4">
                                                                    <div class="lightbox-item">
                                                                        <?php if(!empty($c_image)) {?>
                                                                            <div class="lightbox-icon"> <img src="<?php echo $c_image; ?>" alt="icon" title="icon" width="75" height="49"> </div>
                                                                        <?php } ?>
                                                                        <?php if(!empty($c_title)) {?>
                                                                            <div class="lightbox-title"> <?php echo $c_title; ?></div>
                                                                        <?php } ?>
                                                                        <div class="lightbox-description">
                                                                            <?php if(!empty($c_descr)) {?>
                                                                                <p><?php echo $c_descr; ?></p>
                                                                            <?php } ?>
                                                                            <?php if(!empty($c_btn)) {?>
                                                                                <a href="<?php echo $c_link; ?>" target="_blank" class="btn lightbox-button" title="<?php echo $c_btn; ?>"><?php echo $c_btn; ?></a>
                                                                            <?php } ?>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            <?php
                                                                }
                                                            endwhile;?>
                                                        </div>
                                                        <div style="clear:both;"></div>
                                                    </div>
                                                </div>
                                            </div><?php
                                        endif;
                                        } else if($radio_condition == "pmtwitheditor") { ?>
                                        <?php if(has_post_thumbnail()){
                                                  the_post_thumbnail();
                                          } else { ?>
                                           <img src="<?php echo get_bloginfo('template_directory') ?>/assets/images/icons/activity.svg" alt="serviceiconimg">
                                          <?php } ?>
                                        <?php if(!empty($service_title)) { ?>
                                            <div class="event-item-title">
                                                <h4><?php echo $service_title; ?></h4>
                                            </div>
                                        <?php } ?>
                                        <a data-id="<?php echo $post_id; ?>" class="view-button-link event-item-hover html5lightbox" id="<?php echo $count_id ?>" title="<?php echo $service_title; ?>" href="#<?php echo $unique_id;?>">
                                            <svg class="view" width="100" height="100" viewBox="0 0 30 30" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg">
                                                <defs>
                                                    <path d="M0,15.089434 C0,16.3335929 5.13666091,24.1788679 14.9348958,24.1788679 C24.7325019,24.1788679 29.8697917,16.3335929 29.8697917,15.089434 C29.8697917,13.8456167 24.7325019,6 14.9348958,6 C5.13666091,6 0,13.8456167 0,15.089434 Z" id="outline"></path>
                                                    <mask id="mask">
                                                        <rect width="100%" height="100%" fill="white"></rect>
                                                        <use xlink:href="#outline" id="lid" fill="black"/>
                                                    </mask>
                                                </defs>
                                                <g id="eye">
                                                    <path d="M0,15.089434 C0,16.3335929 5.13666091,24.1788679 14.9348958,24.1788679 C24.7325019,24.1788679 29.8697917,16.3335929 29.8697917,15.089434 C29.8697917,13.8456167 24.7325019,6 14.9348958,6 C5.13666091,6 0,13.8456167 0,15.089434 Z M14.9348958,22.081464 C11.2690863,22.081464 8.29688487,18.9510766 8.29688487,15.089434 C8.29688487,11.2277914 11.2690863,8.09740397 14.9348958,8.09740397 C18.6007053,8.09740397 21.5725924,11.2277914 21.5725924,15.089434 C21.5725924,18.9510766 18.6007053,22.081464 14.9348958,22.081464 L14.9348958,22.081464 Z M18.2535869,15.089434 C18.2535869,17.0200844 16.7673289,18.5857907 14.9348958,18.5857907 C13.1018339,18.5857907 11.6162048,17.0200844 11.6162048,15.089434 C11.6162048,13.1587835 13.1018339,11.593419 14.9348958,11.593419 C15.9253152,11.593419 14.3271242,14.3639878 14.9348958,15.089434 C15.451486,15.7055336 18.2535869,14.2027016 18.2535869,15.089434 L18.2535869,15.089434 Z" fill="#FFFFFF"></path>
                                                    <use xlink:href="#outline" mask="url(#mask)" fill="#FFFFFF"/>
                                                </g>
                                            </svg>
                                        </a>
                                        <div id="<?php echo $unique_id;?>" style="display:none;">
                                            <div class="lightboxcontainer only-content">
                                                <div class="lightboxleft">
                                                    <div class="divtext">
                                                        <?php //the_content(); ?>
                                                        <?php echo get_field('pmt_description'); ?>
                                                        <?php if(have_rows('pmt_logos')): ?>
                                                            <div class="logos">
                                                                <?php while(have_rows('pmt_logos')) : the_row(); ?>
                                                                    <?php $pmt_logo_size = get_sub_field('pmt_logo');
                                                                          $pmt_logo_url  = $pmt_logo_size['sizes']['pmtlogo'];
                                                                         
                                                                          if(!empty($pmt_logo_url)) {
                                                                                echo '<div class="logo-image">';
                                                                                    echo '<img src="'.$pmt_logo_url.'" alt="'.$pmt_logo_size["title"].'"  class="alignnone size-full" />';
                                                                                echo '</div>';
                                                                            }
                                                                    ?>
                                                                <?php endwhile; ?>
                                                            </div>
                                                        <?php endif; ?>
                                                    </div>
                                                </div>
                                                <div style="clear:both;"></div>
                                            </div>
                                        </div>
                                        <?php } else { ?>
                                        <?php } ?>
                                    </div><!--.event-item-->
                                  </div><!--.event-box-->
                                  <?php 
                              $service_row++;    
                              endwhile;
                         endif;
                         /*$catquery = new WP_Query( 'cat=72&posts_per_page=5' );
                         while($catquery->have_posts()) : $catquery->the_post();

                         endwhile;wp_reset_postdata(); */ ?>
                          </div><!--.section-content-->
                        </div>
                    </section>
                      <?php
                        } wp_reset_postdata();
                     ?>
                 
         


     <!-- .....................................................New code..............................................-->
               <!-- Start for FAQ -->
          <?php
          $faq_section_title = get_field('faq_section_title');
          $faq_repeater = get_field('faqs');
          if(!empty($faq_section_title) || !empty($faq_repeater)) {
          ?>
          <section class="event-section faq-section">
              <div class="container-fluid">
                  <?php if(!empty($faq_section_title)) {?>
                  <div class="section-title">
                      <h2><?php echo $faq_section_title; ?></h2>
                  </div>
                  <?php } ?>
                  <?php if(have_rows('faqs')): ?>
                  <div>
                      <div id="accordion">
                      <?php  $ct_faq = 0; 
                         while(have_rows('faqs')) : the_row();
                            $faq_title  =   get_sub_field('faq_title');
                            $faq_ans    =   get_sub_field('faq_answer');?>
                                <div class="card">
                                    <a class="card-link card-header <?php if($ct_faq == 0){ }else { ?>collapsed<?php } ?>" data-toggle="collapse" href="#collapse<?php echo $ct_faq; ?>">
                                    <?php echo $faq_title; ?>
                                    </a>
                                    <div id="collapse<?php echo $ct_faq; ?>" class="collapse <?php if($ct_faq == 0){ ?>show <?php } ?>" data-parent="#accordion">
                                        <div class="card-body">
                                            <?php echo $faq_ans; ?>
                                        </div>
                                    </div>
                                </div>
                            <?php
                            $ct_faq++;
                          endwhile;?>
                      </div>
                  </div>
                  <?php endif; ?>
              </div>
          </section>
          <?php } ?>

        <!-- inquiry section -->
          <?php
          $inq_section_title = get_field('inquiry_section_title');
          $inq_repeater = get_field('add_buttons');
          if(!empty($inq_section_title) || !empty($inq_repeater)) {
          ?>
          <section class="event-section about-section">
              <div class="container-fluid">
                  <?php if(!empty($inq_section_title)) {?>
                  <div class="section-title">
                      <h2><?php echo $inq_section_title; ?></h2>
                  </div>
                  <?php } ?>
                  <?php if(have_rows('add_buttons')): $btn_count = 1;?>
                      <div>
                          <?php while(have_rows('add_buttons')) : the_row();
                              $btn_text = get_sub_field('button_text');
                              $btn_link = get_sub_field('button_link');
                              if(!empty($btn_link)) {
                                  $target_link = $btn_link;
                              } else {
                                  $target_link = "#";
                              }
                              if($btn_count % 2 == 0) {
                                  $class = "google-form";
                              } else {
                                  $class = "viitorcloud-link";
                              }

                              if(!empty($btn_text)) {
                                  echo '<a class="site-link dd '.$class.'" target="_blank" href="'.$target_link.'">'.$btn_text.'</a>';  
                              }
                          ?>
                          
                          <?php $btn_count++; endwhile; ?>
                      </div>
                  <?php endif; ?>
              </div>
          </section>
          <?php } ?>
          <!-- end inquiry section -->
      <?php if(current_user_can('administrator') ) { ?>
      <!-- Track reports -->
      <section class="event-section faq-section track-reports">
        <div class="container-fluid">
          <div class="section-title">
            <h2>Track Reports (Administrator only)</h2>
          </div>
          <div>
          <div class="container">
          <table class="table table-condensed" id="myTable">
          <thead>
            <tr>
              <th>#</th>
              <th>Username</th>
              <th>Login</th>
              <th>Detail</th>
              <th>Expire Login</th>
            </tr>
          </thead>
          <tbody class="panel">
            <?php 
            global $wpdb;
            //$wp_user_search = $wpdb->get_results("SELECT ID, display_name FROM $wpdb->users ORDER BY ID");
            $wp_user_search = $wpdb->get_results("SELECT userids,username,ucountry,ucontinent FROM ".$wpdb->prefix."reports ORDER BY rid");
            $ctu = 0; 
            foreach ( $wp_user_search as $userid ) {
              //print_r($userid);
              $user_ids  = (int) $userid->userids;
              $user_login    = stripslashes($userid->username);
              $user_ip    = stripslashes($userid->uip);
              $user_country   = stripslashes($userid->ucountry);
              $user_ucontinent   = stripslashes($userid->ucontinent);
               //$display_name  = stripslashes($userid->display_name);
            ?>
            <tr data-toggle="collapse" data-target="#demo<?php echo $ctu; ?>" data-parent="#myTable">
              <td><?php echo $user_ids; ?></td>
              <td><?php echo $user_login; ?></td>
              <td><?php echo get_user_meta( $user_ids, 'sp_login_count', true );  ?></td>
              <td class="text-success">-</td>
              <td class="text-success">-</td>
            </tr>
            <tr id="demo<?php echo $ctu; ?>" class="collapse">
              <td colspan="6" class="hiddenRow">
              <div>
              <!-- demo -->
              <table border="1">
              <tr>
              <th>User IP</th>
              <th>Country</th>
              <th>Continent</th>
              <th>Clicks</th>
              </tr>
              <tr>
              <td><?php echo $user_ip; ?></td>
              <td><?php echo $user_country; ?></td>
              <td><?php echo $user_ucontinent; ?></td>
              <td>
              <table>
              <tr>
              <th>PageName</th>
              <th>Clicks</th>
              </tr>
              <?php 
              $res_pnames_detail = $wpdb->get_results( "SELECT pagenames,countclicks FROM ".$wpdb->prefix."reports WHERE userids = '$user_ids' " ); 
              if(!empty($res_pnames_detail)){
                foreach($res_pnames_detail as $details){?>
                  <tr>
                  <td><?php echo $details->pagenames; ?></td>
                  <td><?php echo $details->countclicks; ?></td>
                  </tr>
              <?php } } ?>
                        
              </table>
              </td>
              </tr>
              </table>
              <!-- demo -->
              
              </div>
              </td>
            </tr>
            <?php $ctu++; 
            } ?>
            
          </tbody>
          </table>
          </div>
            
          </div>
        </div>
      </section>
      <?php } ?>


    </div>
  </main><!-- #main -->
</div><!-- #primary -->
<script>
/*
$=jQuery;
$('a').each(function(){  
     $(this).attr('onclick',+$(this).attr('href'));
     $(this).attr('href','javascript:void(0)');
 }); */
</script> 
 <?php 
global $wpdb;
global $user;

$current_user_id = get_current_user_id();
$current_user = wp_get_current_user();
$username = $current_user->user_login;?>
  <input type="hidden" id="llogin" name="llogin" value="<?php //echo do_shortcode('[lastlogin]'); ?>">
  <input type="hidden" id="cuid" name="cuid" value="<?php echo get_current_user_id(); ?>">
  <input type="hidden" id="cuname" name="cuname" value="<?php echo $username; ?>">
  <input type="hidden" id="uip" name="uip" value="<?php echo $_SERVER['REMOTE_ADDR'];?>">
  <?php $res = file_get_contents('https://www.iplocate.io/api/lookup/'.$_SERVER['REMOTE_ADDR']);
    $rest = json_decode($res); ?>
  <input type="hidden" id="ucountry" name="ucountry" value="<?php echo $rest->country; ?>">
  <input type="hidden" id="ucity" name="ucity" value="<?php echo $rest->city; ?>">
  <input type="hidden" id="ucontinent" name="ucontinent" value="<?php echo $rest->continent; ?>">
<script>
$=jQuery;
$(document).ready(function(){
/* Start for count click */

/* End for count click */

  if (typeof html5Lightbox === "undefined")
    html5Lightbox = jQuery(".html5lightbox").html5lightbox({
      resizespeed:0
  })
 
  $(".html5lightbox").click(function(){
    var dataId = $(this).attr("data-id");
    var dataIdval = $(this).attr("id");
    //alert(dataIdval);
    var clicks = parseInt($("a#clicks_"+dataId).html());
    //alert(clicks);
    
    clicks++;
    $("a#clicks_"+dataId).html(clicks);
    
    var clickscounts = {
      pagesclick: clicks,
      pagename: dataIdval,
    }
    //alert("My name is "+clickscounts.pagesclick+" and"+clickscounts.pagename);
    var llogin = $("#llogin").val();
    //alert(llogin);
    var cuid = $("#cuid").val();
    //alert(cuid);
    var cuname = $("#cuname").val();
    //alert(cuname);
    var uip = $("#uip").val();
    //alert(uip);
    var ucountry = $("#ucountry").val();
    //alert(ucountry);
    var ucontinent = $("#ucontinent").val();
    //alert(ucontinent);
    var ucity = $("#ucity").val();
    //alert(ucity);
    //alert(cuid);
    //alert(cuname);
    $.ajax({
    type : "post",
    url : "<?php echo site_url();?>/wp-admin/admin-ajax.php",
    //url : "<?php echo admin_url('admin-ajax.php'); ?>",
      data : {
        action: "clickevent_results",
        pagesclick: clickscounts.pagesclick,
        pagename: clickscounts.pagename,
        llogin: llogin,
        cuid: cuid,
        cuname: cuname,
        uip: uip,
        ucountry: ucountry,
        ucontinent: ucontinent,
        ucity: ucity
      },
      success: function(data) {
        $('#hellos').html(data);
      }
    }); 
    e.preventDefault();
    // $(this).attr('href','javascript:void(0)');
  //  $(this).attr('onclick',+$(this).attr('href'));
    // $(this).attr('href','javascript:void(0)');
      //var event_id = $(this).attr('id');
  //alert(event_id);
  
    $('html').addClass('overflow');
    setTimeout(function(){
      $("#html5-lightbox-box iframe")[0].contentWindow.oncontextmenu = function () {
        return false;
      }
      $("#html5-lightbox-box iframe").contents().find("#download, #print").remove()
      $("#html5-lightbox-box iframe").contents().find("#viewer").append('<style type="text/css" media="print">* { display: none; }</style>')
      $("#html5-lightbox-box iframe").contents().bind('keydown keypress', function(e) {
        console.log(e.ctrlKey && e.key == "p" || e.charCode == 16 || e.charCode == 112 || e.keyCode == 80) 
        if(e.ctrlKey && (e.key == "p" || e.charCode == 16 || e.charCode == 112 || e.keyCode == 80) ){
          alert("Please use the Print PDF button below for a better rendering on the document");

          e.cancelBubble = true;
          e.preventDefault();
          e.stopImmediatePropagation();
        }  
        if((e.ctrlKey && (e.which == 83))  || (e.ctrlKey && (e.which == 80))) {
          e.preventDefault();
          return false;
        }
      });
      

    },1000)
  })

  window.oncontextmenu = function () {
    return false;
  }
  // for stop body scroll when lightbox open
  $("body").on("mousedown", "#html5-close-fullscreen, #html5-lightbox-overlay, #html5-close", function(){
    $("html").removeClass("overflow");
  });
  $(document).keyup(function(e) {
    if (e.keyCode === 27) {
      $("html").removeClass("overflow");
    }
  });
})
</script>
<!-- <script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.9.1.min.js" type="text/javascript"></script> -->
<script src="<?php echo get_template_directory_uri(); ?>/assets/js/devtools.js" type="text/javascript"></script>
<script type="text/javascript">
$(window).load(function () {
    var frame = $('iframe').get(0);
    if (frame != null) {
        var frmHead = $(frame).contents().find('head');
        if (frmHead != null) {
            frmHead.append($('style, link[rel=stylesheet]').clone()); // clone existing css link
            //frmHead.append($("<link/>", { rel: "stylesheet", href: "/styles/style.css", type: "text/css" })); // or create css link yourself
        }
    }   
  });
 
//});
</script>
<?php get_footer();?>