<div class="ldld full" style="z-index: 999;"></div>  
<?php
$footer_data = getWebSyncsData('Footer Settings', 'footerSettings', '');

$background_music = getWebSyncsData('Background Music', 'backgroundMusic', 'ACTIVE');

// print_r($footer_data); die();
?>

<?php $this->load->view('includes/modals'); ?>

<link rel="stylesheet" type="text/css" href="<?=base_url('assets/css/footer.css');?>">


<!-- ======= Footer ======= -->
<footer id="footer" style="background-color: var(--blue)!important;">

  <div class="footer-top header-footer-bg" style="background-color:#570000">
    <div class="container-fluid px-5">
      <div class="row p-0 m-0">
        <style type="text/css">

        </style>

        <div class="col-md-8 m-0 p-0">
          <div class="row">
            <div class="col-lg-4 col-md-4 mb-4 p-0 footer-links">

              <!-- ======================================================= -->
              <?php if(isset($footer_data[0]['footerLogo']) && $footer_data[0]['footerLogo'] != ''){ ?>
                <img src="<?=ApiBaseUrl()['url'].$footer_data[0]['footerLogo']?>" class="img-fluid footer-logo">
              <?php } ?>
              <!-- ======================================================= -->


              <!-- ==========================Background Music Start============================= -->

              <?php 
              if (!empty($background_music)) {
                $emptyD ='';

                foreach ($background_music as $value) {

                  if (!empty($value['refDataName']) && strtoupper($value['dayName']) == strtoupper(date("l")) && $value['status'] == 'ACTIVE') {
                    $emptyD = 'active';

                    echo '<audio class="h-80 mt-3" id="bgMusic" controls controlslist="nodownload noplaybackrate" style="width:220px">
                    <source src="'.ApiBaseUrl()['url'].$value['refDataName'].'" type="audio/mpeg">
                    Your browser does not support the audio element.
                    </audio>';


                    break;
                  }
                }

                if(empty($emptyD))
                {
                 $day = strtolower(date("l"));
                 $file_path = "assets/music/{$day}-aarti.mp3";

                 if (file_exists($file_path)) {

                  echo '<audio class="h-80 mt-3" id="bgMusic" controls controlslist="nodownload noplaybackrate" style="width:220px">
                  <source src="'.base_url($file_path).'" type="audio/mpeg">
                  Your browser does not support the audio element.
                  </audio>';

                }
              }

            }
            else {

              $day = strtoupper(date("l"));
              $file_path = "assets/music/{$day}-aarti.mp3";

              if (file_exists($file_path)) {
               echo '<audio class="h-80 mt-3" id="bgMusic" controls controlslist="nodownload noplaybackrate" style="width:220px">
               <source src="'.base_url($file_path).'" type="audio/mpeg">
               Your browser does not support the audio element.
               </audio>';
             }
           }
           ?>

           <!-- ===========================Background Music End============================ -->

         </div>

         <div class="col-lg-4 col-md-4 mb-4 p-0 footer-links">
          <h4>ABOUT US<br><img src="<?=base_url('assets/img/border2.png')?>" width="78px" class="img-fluid img-responsive"></h4>
          <ul>
           <li><a href="<?=base_url('about-temple')?>">ABOUT TEMPLE</a></li>
           <li><a href="<?=base_url('calendar')?>">EVENTS</a></li>
           <li><a href="<?=base_url('services')?>">SERVICES</a></li>
           <li><a href="<?=base_url('donations')?>">DONATIONS</a></li>
           <li><a href="<?=base_url('calendar')?>">CALENDAR</a></li>
           <li><a href="<?=base_url('gallery')?>">GALLERY</a></li>
           <li><a href="<?=base_url('volunteer')?>">VOLUNTEER FORM</a></li>
           <li><a href="<?=base_url('priest-request-form')?>">PRIEST REQUEST FORM</a></li>
           <!-- <li><a href="<?=base_url('membership-form')?>">MEMBERSHIP FORM</a></li> -->
         </ul>
       </div>
       <div class="col-lg-4 col-md-4 m-0 p-0 footer-links">
         <div class="row">
           <div class="col-lg-12 col-md-12 m-0 p-0">
             <h4>TEMPLE TIMINGS<br><img src="<?=base_url('assets/img/border2.png')?>" width="78px" class="img-fluid img-responsive"></h4>
             <table class="table table-responsive" style=" background-color:#FFE8A6;color: var(--blue)!important;">
               <tbody>
                 <tr style="border-bottom:1px solid black!important;">

                   <td style="border-right: 1px solid #000;">WEEKDAYS</td>


                   <td><?= (isset($footer_data[0]['weekdayMorningTime']) && $footer_data[0]['weekdayMorningTime'] != '') ? $footer_data[0]['weekdayMorningTime'] : ''?> <br> <?= (isset($footer_data[0]['weekDayEveningTime']) && $footer_data[0]['weekDayEveningTime'] != '') ? $footer_data[0]['weekDayEveningTime'] : ''?></td>


                 </tr>
                 <tr>

                   <td style="border-right: 1px solid #000;">WEEKENDS</td>
                   <td> <?= (isset($footer_data[0]['weekEndMorningTime']) && $footer_data[0]['weekEndMorningTime'] != '') ? $footer_data[0]['weekEndMorningTime'] : ''?> <br> <?= (isset($footer_data[0]['weekEndEveningTime']) && $footer_data[0]['weekEndEveningTime'] != '') ? $footer_data[0]['weekEndEveningTime'] : ''?></td>
                 </tr>

               </tbody>
             </table>
           </div>
           <div class="col-lg-12 col-md-12 mb-4 p-0">
             <h4>FOLLOW US<br><img src="<?=base_url('assets/img/border2.png')?>" width="78px" class="img-fluid img-responsive"></h4>

             <a href="<?= (isset($footer_data[0]['facebookLink']) && $footer_data[0]['facebookLink'] != '') ? $footer_data[0]['facebookLink'] : 'javascript:void(0)'?>"><i class="fa fa-facebook" style="border-radius: 50%;background-color: #FFE8A6;font-size: 20px;padding: 18px 22px; border:1px solid #000;"></i></a>

             <a href="<?= (isset($footer_data[0]['youtubeLink']) && $footer_data[0]['youtubeLink'] != '') ? $footer_data[0]['youtubeLink'] : 'javascript:void(0)'?>"><i class="fa fa-youtube" style="border-radius: 50%;background-color: #FFE8A6;font-size: 20px;padding: 18px 20px; border:1px solid #000;"></i></a>
             
             <a href="<?= (isset($footer_data[0]['twitterLink']) && $footer_data[0]['twitterLink'] != '') ? $footer_data[0]['twitterLink'] : 'javascript:void(0)'?>"><i class="fa fa-twitter" style="border-radius: 50%;background-color: #FFE8A6;font-size: 20px;padding: 18px 19px; border:1px solid #000;"></i></a>

           </div>
         </div>

       </div>


     </div>

   </div>
   <div class="col-md-4 m-0 p-0">
    <div class="row m-0 p-0">
     <div class="col-lg-4 col-md-4 m-0 p-0 footer-contact">
      <div class="footer-divider" style="border-style: solid;border-width: 2px 2px 2px 2px;border-color: #100934;box-shadow: 0px 0px 10px 0px rgb(216 16 16 / 21%);transform: rotate(102deg);margin: 161px -112px; width: 383px;">
      </div>
    </div>
    <div class="col-lg-8 col-md-8 p-0 footer-contact">
      <h4 class="m-0">CONNECT WITH US<br><img src="<?=base_url('assets/img/border2.png')?>" width="78px" class="img-fluid img-responsive"></h4>
      <p style="line-height: 1.9;">
       <a href="https://maps.google.com/?q=<?= (isset($footer_data[0]['refDataCode']) && $footer_data[0]['refDataCode'] != '') ? $footer_data[0]['refDataCode'] : ''?>" rel="nofollow" target="_blank" rel="nofollow"> 
        <?php
        if (isset($footer_data[0]['refDataCode']) && $footer_data[0]['refDataCode'] != '') {

          echo  $footer_data[0]['refDataCode'];

        }
        ?>

      </a><br>
      <i class="fa fa-phone"></i>  
      <a href='tel:+1 <?= (isset($footer_data[0]['phone']) && $footer_data[0]['phone']) != '' ? '+1 '.formatPhoneNumber($footer_data[0]['phone']) : ''?>'>

        <?php
        if (isset($footer_data[0]['phone']) && $footer_data[0]['phone'] != '') {

          echo  '+1 '.formatPhoneNumber($footer_data[0]['phone']);

        }
        ?>


      </a><br>
      <i class="fa fa-envelope"></i>  
      <a href='mailto:<?= (isset($footer_data[0]['email']) && $footer_data[0]['email'] != '') ? $footer_data[0]['email'] : ''?>'>
        <?php
        if (isset($footer_data[0]['email']) && $footer_data[0]['email'] != '') {


          echo $footer_data[0]['email'];

        }
        ?>


      </a><br>
    </p>
    <a href="<?=base_url('contact-us')?>" class="btn btn-primary mt-4 py-2" style="color: var(--blue)!important; border-radius: 20px;  border-color: var(--blue)!important; background: transparent !important; box-shadow: 1px 1px 10px #7e455561;">CONTACT US</a>
  </div>
</div>
</div>

</div>
</div>
</div>

<div class="mx-5 d-md-flex py-2">

  <div class="me-md-auto text-center text-md-start">
    <div class="copyright">
      Powered by<strong><span class="Ab"> VAAP Technologies Inc</span></strong>, All rights reserved.
    </div>
    <div class="credits">
    </div>
  </div>
  <div class="social-links text-center text-md-right pt-3 pt-md-0">
    COPYRIGHT | TERMS  OF USE | PRIVACY POLICY | SECURITY
  </div>
</div>
</footer><!-- End Footer -->
<script type="text/javascript">
  function getCardTypeName(cardTypeCode) {
    switch (cardTypeCode) {
    case "1":
      return "VISA";
    case "2":
      return "MASTERCARD";
    case "3":
      return "AMEX";
    case "4":
      return "DISCOVER";
    case "5":
      return "DINERS CLUB";
    case "6":
      return "JCB";
    case "9":
      return "DINERSCLUB";
    case "10":
      return "MAESTRO";
    default:
      return "Unknown";
    }
  }
</script>
