<span class="header_date_location">

  <?php
  // Show Location
  if ($advancenews['H_Date_Location_locationname'] !='') {

    // Show Icon
    if ($advancenews['H_Date_Location_datelocationicon'] == 'on') {
      echo '<i class="bi bi-geo-alt-fill pe-2"></i>';
    }

    echo $advancenews['H_Date_Location_locationname'].'&nbsp; &nbsp;';
  }

  // Show Date
  if ($advancenews['H_Date_Location_dateformate'] !='') {

    // Show Icon
    if ($advancenews['H_Date_Location_datelocationicon'] == 'on') {
      echo '<i class="bi bi-calendar2-week pe-2"></i>';
    }

    // Show English Date
    if ($advancenews['H_Date_Location_dateformate'] =='endate') {
      echo dokanDate(date('Y-m-d H:i:s'));
    }

    // Show English Date With Day
    elseif ($advancenews['H_Date_Location_dateformate'] =='day_endate') {
      echo dokanDateWithDay(date('Y-m-d H:i:s'));
    }

    // Show Bangla and English Date
    elseif($advancenews['H_Date_Location_dateformate'] =='endate_bndate') {
      ?>
      <span id="bangla-date"><?php echo dokanDate(date('Y-m-d H:i:s')) ?></span>
      <script>
        window.onload = function() {
          fetch('https://bangla.plus/api/converttobangladate/json/?day=30&month=01&year=2025&language=Bangla')
            .then(response => response.json()) // Convert the response to JSON
            .then(data => {
              const banglaDate = data.FullDate;
              document.getElementById('bangla-date').textContent += ', '+banglaDate;
            });
        };
      </script>
      <?php
    }

    // Show Bangla and English Date Whith Date
    elseif($advancenews['H_Date_Location_dateformate'] =='day_endate_bndate') {
      ?>
      <span id="bangla-date"><?php echo dokanDateWithDay(date('Y-m-d H:i:s')) ?></span>
      <script>
        window.onload = function() {
          fetch('https://bangla.plus/api/converttobangladate/json/?day=30&month=01&year=2025&language=Bangla')
            .then(response => response.json()) // Convert the response to JSON
            .then(data => {
              const banglaDate = data.FullDate;
              document.getElementById('bangla-date').textContent += ', '+banglaDate;
            });
        };
      </script>
      <?php
    }

  }
  ?>



</span>
