%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/pn/beta/64801_wp-content/themes/intosai/
Upload File :
Create Path :
Current File : /var/www/pn/beta/64801_wp-content/themes/intosai/single-project.php

<div class="page-content single-page">
    <div class="wrapper">

        <section class="single_project">

                <?php
                    $status         = get_field('project_status');
                    $benlvl         = get_field('beneficiary_level');
                    $regions        = get_field('intosai_region');
                    $from           = get_field('duration_from');
                    $to             = get_field('duration_to');
                    $budget         = get_field('total_budget');
                    $initiation     = get_field('project_initiated');
                    $further        = get_field('further_info');
                    $cpbrc          = get_field('cp_ben-sai_region_committee');
                    $sf             = get_field('source_funding');
                    $sfc            = get_field('source_funding_custom');
                    $cpdonor        = get_field('cp_donor');
                    $agency         = get_field('imp_agencys');
                    $cpip           = get_field('cp_imp-partners');
                    $tos            = get_field('type_of_support');
                    $sm             = get_field('support_modality');
                    $scc            = get_field('support_cats_covered');
                    $sbo            = get_field('support_based_on');
                    $pc             = get_field('project_connections');
                    $oi             = get_field('other_info');

                    $numSAIS = wp_get_post_terms(get_the_ID(), 'wdi');
                    $numSAIS = count($numSAIS);
                ?>

                <?php while (have_posts()) : the_post(); ?>
                    <h1><?php the_title(); ?></h1>
                <?php endwhile; ?>

                <div class="project_meta">

                    <div class="top">
                        <?php if($benlvl){ ?>
                            <div id="benlvl">
                                <span>Beneficiary level:</span> <?= $benlvl; ?>
                            </div>
                        <?php } ?>
                        <?php if($status){ ?>
                            <div id="status">
                                <span>Project status:</span> <?= $status; ?>
                            </div>
                        <?php } ?>
                        <?php if($regions){ ?>
                            <div id="regions">
                                <span>INTOSAI region(s):</span> <?= $regions; ?>
                            </div>
                        <?php } ?>
                    </div>
                    <div class="bottom">
                        <div id="from">
                            <span>Duration from:</span> <?= $from; ?>
                        </div>
                        <div id="to">
                            <span>Duration to:</span> <?= $to; ?>
                        </div>
                        <?php if($budget){ ?>
                            <div id="budget">
                                <span>Total budget <span>(US Dollar)</span>:</span> $<?= $budget; ?>
                            </div>
                        <?php } ?>
                        <?php if($numSAIS == 1){
                            $singleSAIS = wp_get_post_terms(get_the_ID(), 'wdi');
                            //var_dump($singleSAIS);
                            $saiID = $singleSAIS[0]->term_id;
                            ?>
                            <div id="dac">
                                <span>DAC Income classification:</span> <?= get_field('economic_classification', 'term_'.$saiID); ?>
                            </div>
                        <?php } ?>
                    </div>

                </div>

                <article id="project_info">

                    <div class="row">
                        <div id="projDesc">
                            <?php while (have_posts()) : the_post(); ?>
                                <?php the_content(); ?>
                            <?php endwhile; ?>
                        </div>

                        <div id="connectSais">
                            <div class="list">
                                <h3>SAIs connected to this project</h3>

                                <?php $wdis = wp_get_post_terms(get_the_ID(), 'wdi'); ?>
                                <ul class="projList">
                                    <?php foreach($wdis as $wdi){
                                        $name = $wdi->name;
                                        echo "<li>{$name}</li>";
                                    } ?>
                                </ul>
                            </div>
                        </div>
                    </div>

                    <div class="row bg">
                        <div class="projInfo half left">
                            <div class="label">How the project was initiated</div>
                            <?= $initiation; ?>
                        </div>
                        <div class="projInfo half right">
                            <div class="label">Link to further information on project</div>
                            <?= $further; ?>
                        </div>
                    </div>

                    <div class="row">
                        <div class="projInfo full">
                            <div class="label">Contact person: Beneficiary SAI/Region/Committee</div>
                            <?= $cpbrc; ?>
                        </div>
                    </div>

                    <div class="row bg">
                        <div class="projInfo third">
                            <div class="label">Source of funding</div>
                            <?= $sf; ?>
                        </div>
                        <div class="projInfo third middle">
                            <div class="label">Other Source of funding</div>
                            <?= $sfc; ?>
                        </div>
                        <div class="projInfo third">
                            <div class="label">Contact person: Provider of support</div>
                            <?= $cpdonor; ?>
                        </div>
                    </div>

                    <div class="row">
                        <div class="projInfo half left">
                            <div class="label">Implementing agency(s)</div>
                            <?= $agency; ?>
                        </div>
                        <div class="projInfo half right">
                            <div class="label">Contact person: Implementing partner(s)</div>
                            <?= $cpip; ?>
                        </div>
                    </div>

                    <div class="row bg">
                        <div class="projInfo half left">
                            <div class="label">Type of support</div>
                            <?= $tos; ?>
                        </div>
                        <div class="projInfo half right">
                            <div class="label">Support modality</div>
                            <?= $sm; ?>
                        </div>
                    </div>

                    <div class="row">
                        <div class="projInfo full">
                            <div class="label">Support categories covered</div>
                            <?= $scc; ?>
                        </div>
                    </div>

                    <div class="row bg">
                        <div class="projInfo full">
                            <div class="label">Is support based on beneficiary SAI/INTOSAI region Strategic Plan?</div>
                            <?= $sbo; ?>
                        </div>
                    </div>

                    <div class="row">
                        <div class="projInfo full">
                            <div class="label">Link to related projects/programs</div>

                            <?php
                                if($pc):
                                    $relCount = count($pc);
                                    $c = 1;
                                	foreach($pc as $p):
                                        if($c != 1){ echo ', '; }
                                	    echo '<a href="'.get_permalink($p).'">';
                                            echo get_the_title($p);
                                        echo '</a>';
                                    $c++;
                                    endforeach;

                                else :
                                    echo 'No related projects/programs';
                                endif;
                            ?>

                        </div>
                    </div>

                    <div class="row bg">
                        <div class="projInfo full">
                            <div class="label">Any other information</div>
                            <?= $oi; ?>
                        </div>
                    </div>

                </article>


        </section>

    </div>
</div>
<?php
    /* SOCIAL SHARINBG */
    include('templates/sections/social_sharing.php');
?>

Zerion Mini Shell 1.0