%PDF- %PDF-
Direktori : /var/www/pn/beta/64801_wp-content/themes/intosai/ |
Current File : /var/www/pn/beta/64801_wp-content/themes/intosai/page.php |
<?php use Roots\Sage\Setup; use Roots\Sage\Wrapper; use Roots\Sage\Titles; $loggedIn = false; if(is_user_logged_in()){ $loggedIn = true; $currentUser = wp_get_current_user(); $userName = $currentUser->user_firstname . ' ' . $currentUser->user_lastname; $userID = $currentUser->ID; $userStatus = get_field('active_user', 'user_'.$userID); if($userStatus == 'yes' || current_user_can('administrator')){ $userActive = true; }else{ $userActive = false; } } ?> <?php /* TOP BANNER */ $banner = get_field('top_banner_options'); if($banner == 'static_banner'){ include('templates/sections/banner_static.php'); }elseif($banner == 'slide_banner'){ include('templates/sections/banner_slider.php'); } /* NAVIGATION IF IS A THIRD LEVEL PAGE */ if(!is_page(array(286, 284))){ include('templates/sections/navigation_thirdlevel.php'); } /* PAGE CONTENT */ while (have_posts()) : the_post(); if(get_the_content() != ''){ echo '<div class="page-content">'; echo '<div class="wrapper">'; the_content(); echo '</div>'; echo '</div>'; } endwhile; /* USER REGISTRATION FORM */ if(is_page(257)){ include('templates/forms/registration_form.php'); } /* MAP LANDING PAGE */ if(is_page(10)){ include('templates/sections/map_landing-chart.php'); } if(!is_page(14) && !is_page(278) && !is_page(280)){ /* PAGE SECTIONS */ if(have_rows('page_sections')): $contRow = 1; while (have_rows('page_sections')) : the_row(); if(get_row_layout() == 'boxes'): include('templates/sections/boxes.php'); elseif(get_row_layout() == 'latest_news'): include('templates/sections/latest_news.php'); elseif(get_row_layout() == 'latest_projects'): include('templates/sections/latest_projects.php'); elseif(get_row_layout() == 'newsletter'): include('templates/sections/newsletter.php'); elseif(get_row_layout() == 'partners'): include('templates/sections/partners.php'); elseif(get_row_layout() == 'text'): include('templates/sections/text.php'); elseif(get_row_layout() == 'colorbox'): include('templates/sections/colorbox.php'); elseif(get_row_layout() == 'accordion'): include('templates/sections/accordion.php'); elseif(get_row_layout() == 'success_stories'): include('templates/sections/success_stories.php'); elseif(get_row_layout() == 'new_success_stories'): include('templates/sections/new_success_stories.php'); elseif(get_row_layout() == 'country_dropdown'): include('templates/sections/country_dropdown.php'); elseif(get_row_layout() == 'downloads'): include('templates/sections/downloads.php'); endif; $contRow++; endwhile; endif; } if(is_page(14)){ //IF IS THE CONTACT PAGE echo '<section class="contact_page">'; echo '<div class="wrapper">'; echo '<div class="contact_left">'; include('templates/forms/contact_form.php'); echo '</div>'; echo '<div class="contact_right">'; include('templates/sections/coworkers.php'); echo '</div>'; echo '</div>'; echo '</section>'; } if(is_page(278)){ //IF IS MY PROJECTS VIEW if($loggedIn && $userActive){ include('templates/logedin/my_projects.php'); }else{ include('templates/logedin/no-access.php'); } } if(is_page(286)){ //IF IS NEW PROJECT if($loggedIn && $userActive){ include('templates/logedin/new_project.php'); }else{ include('templates/logedin/no-access.php'); } } if(is_page(284)){ //IF IS EDIT PROJECT if($loggedIn && $userActive){ include('templates/logedin/edit_project.php'); }else{ include('templates/logedin/no-access.php'); } } if(is_page(280)){ //IF IS USER SETTINGS if($loggedIn && $userActive){ include('templates/logedin/edit_user.php'); }else{ include('templates/logedin/no-access.php'); } } ?>