<?php
//Contact openssl_get_cert_locations
$contact_telephone = get_field('contact_telephone', 'option');
$contact_email = get_field('contact_email', 'option');
$street_address_1 = get_field('street_address_1', 'option');
$street_address_2 = get_field('street_address_2', 'option');
$town_city = get_field('town_city', 'option');
$postcode = get_field('postcode', 'option');
$country = get_field('country', 'option');

?>
<?php include locate_template('templates/flexible-content/sponsors.php');?>
</div>
</div><!-- end of wrapper forces sticky footer-->

<!-- Footer container wrapper-->
<div class="<?php pageWidth();?> no-padding clear">

  <!-- Footer-->
  <footer id="footer" role="contentinfo" class=' '>

    <div class='island overflow'>
      <div class='container'>

        <?php if($contact_email || $contact_telephone || $street_address_1 || $street_address_2 || $town_city || $postcode || $country):?>
          <div id="address" class='col-12 col-6-m'>
            <div class="vcard text-center text-left-m">
              <p class="adr">

                <?php if($street_address_1):?>
                  <span class="street-address"><?php print $street_address_1; ?></span><br>
                <?php endif; ?>

                <?php if($street_address_2):?>
                  <span class="street-address2"><?php print $street_address_2; ?></span><br>
                <?php endif; ?>

                <?php if($town_city):?>
                  <span class="region"><?php print $town_city; ?></span><br>
                <?php endif; ?>

                <?php if($postcode):?>
                  <span class="postal-code"><?php print $postcode; ?></span><br>
                <?php endif; ?>

                <?php if($country): ?>
                  <span class="country-name"><?php print $country; ?></span>
                <?php endif; ?>

              </p>

              <?php if($contact_telephone):?>
                <p class="tel no-dec"><a href='tel:<?php print $contact_telephone; ?>'><?php print $contact_telephone; ?></a></p>
              <?php endif; ?>

              <?php if($contact_email):?>
                <p><a href="mailto:<?php print $contact_email; ?>?Subject=Hello%20<?php print get_bloginfo('name'); ?>" target="_top"><?php print $contact_email; ?></a></p>
              <?php endif; ?>

            </div>
          </div>
        <?php endif; ?>

        <!--Social icons-->

        <!--Footer bottom Menu-->
        <div class='clear'>
          <div class=' overflow '>
            <div id="copyright" class='center left-m text-center text-left-m'>
            GLS  Copyright &#169; 2016
            </div>

          </div>
        </div>
        <!--Footer Menu-->
        <div class="col-12 clear no-padding">
          <nav id="footer-menu" role="navigation" class='text-center text-left-m'>
            <?php wp_nav_menu( array( 'theme_location' => 'footer-menu' ) ); ?>
          </nav>
        </div>
        <?php if (is_user_logged_in() ):?>
          <div class='logout-button-footer'>
            <?php
            wp_loginout( home_url() ); // Display "Log Out" link.
            ?>
          </div>
        <?php endif; ?>
      </div>
    </div><!-- end of set colour-->



  </footer>
  <!-- End of footer-->
</div>
<!-- Footer container end-->



<script type="text/javascript" src="/wp-content/themes/varn/assets/distribution/js/jquery.min.js"></script>
<script type="text/javascript" src="/wp-content/themes/varn/assets/distribution/js/slick.min.js"></script>
<script type="text/javascript" src="/wp-content/themes/varn/assets/distribution/js/scripts.js"></script>
<?php wp_footer(); ?>
</body>
</html>
