<?php
/*
* Template Name: Pay of Request
*
* */

get_header(); ?>

    <section class="  container-fluid" style="background:url(<?= site_url(); ?>/wp-content/uploads/2019/03/apply_now_bg_white.png)   right center / auto no-repeat,url(<?= site_url(); ?>/wp-content/uploads/2019/03/apply_now_bg.png) center center / cover no-repeat;">
        <div class="row  m_t_100 m_b_100">
            <div class="container">
                <div class="row">
                    <div class="title_text col-md-12 ">
                        <h2><?php the_field('main_contact_title'); ?></h2>
                    </div>
                    <div class="col-md-10 col-md-offset-1   apply_form">
                        <?php $payoffShortcode= get_field('main_cnt_shrtcd'); ?>
                        <?= do_shortcode($payoffShortcode); ?>
                    </div>
                </div>
            </div>
        </div>
    </section>
<?php $testBG = get_field('test_bg',6); ?>
    <section class="container-fluid" style="background:#00395d url(<?= $testBG['url']; ?>) left center / auto no-repeat;">
        <div class="row  m_t_50 m_b_60">
            <div class="container">
                <div class="row">
                    <div class="col-md-12 title_text text_white text-center m_b_30">
                        <h2><?php the_field('test_title',6); ?></h2>
                    </div>
                    <div class="col-md-12 text-center">
                        <div class="owl-carousel" id="customer_reviews">
                            <?php
                            if( have_rows('testimonial',6) ):
                                while ( have_rows('testimonial',6) ) : the_row(); ?>
                                    <div class="item">
                                        <div class="review_box">
                                            <p><?php the_sub_field('author_text'); ?></p>
                                            <div class="review_details">
                                                <?php $authorImage = get_sub_field('author_image'); ?>
                                                <img src="<?= $authorImage['url']; ?>" alt="<?= $authorImage['alt']; ?>" class="review_img"/> <h3><?php the_sub_field('author_name'); ?></h3>
                                            </div>
                                        </div>
                                    </div>
                                <?php endwhile;
                            endif;
                            wp_reset_postdata();
                            ?>
                        </div>
                    </div>
                    <div class="col-md-12 m_t_60 text-center text_underline font_test">
                        <?php
                        $testBtnName=get_field('test_button_name',6);
                        $testBtnURL=get_field('test_button_url',6);
                        if (!empty($testBtnName)&&!empty($testBtnURL)):
                            echo "<a href=\"$testBtnURL\" class=\"text_white text-center text-uppercase\">$testBtnName</a>";
                        endif; ?>
                    </div>
                </div>
            </div>
        </div>
    </section>
<?php if (get_field('payof_text')): ?>
    <section class="dark_section">
        <div class="row">
            <div class="container">
                <div class="row text-center">
                    <p class="m0"><?php the_field('payof_text'); ?></p>
                </div>
            </div>
        </div>
    </section>
<?php endif; ?>
<?php
get_footer();
