Your IP : 216.73.216.84


Current Path : /home/helpink/www/components/com_jbusinessdirectory/views/companies/tmpl/
Upload File :
Current File : /home/helpink/www/components/com_jbusinessdirectory/views/companies/tmpl/listing_hours.php

<?php
/**
 * @package    J-BusinessDirectory
 *
 * @author     CMSJunkie http://www.cmsjunkie.com/
 * @copyright  Copyright (C) 2007 - 2022 CMSJunkie. All rights reserved.
 * @license    https://www.gnu.org/licenses/agpl-3.0.en.html
 */ 
defined('_JEXEC') or die('Restricted access');
$dateTime = new DateTime(date("y-m-d"), new DateTimeZone('America/New_York'));
// Check Daylight Saving Time
$isDST = $dateTime->format("I");
$this->company->time_zone = str_replace(":",".", $this->company->time_zone);
$this->company->time_zone = (float)$this->company->time_zone;
if ($isDST == "1" && $this->company->time_zone < 10 && $this->company->time_zone != -3 && $this->company->time_zone != 5) {
    $this->company->time_zone = $this->company->time_zone + 1;
}
?>

<div class="business-hours">
	<fieldset class="fieldset-business_hours">
		<div>
			<div class="business-hours-title">
                <i class="icon clock"></i> <?php echo JText::_('LNG_OPENING_HOURS')?>
                <div class="small right"><?php echo JText::_('LNG_GMT')." ". ($this->company->time_zone>0?" +":""). number_format($this->company->time_zone, 2, ":"); ?></div>
            </div>
            <?php if($this->company->opening_status == COMPANY_OPEN_BY_TIMETABLE){ ?>
                <?php 
                    foreach($this->company->business_hours as $index => $day) { 
                        echo JBusinessUtil::renderOpeningDay($day);
                    }
                ?>
            <?php } else {
                $statusInfo = JBusinessUtil::getOpeningStatus($this->company->opening_status);
                echo '<div class="ml-3 font-weight-bold my-2 badge badge-'.$statusInfo->class.'">'.$statusInfo->status.'</div>';
             }?>
		</div>

		<?php if(!empty($this->company->notes_hours)){ ?>
			<div style="display: block" class="business-notes"><?php echo $this->escape($this->company->notes_hours) ?></div>
		<?php } ?>
	</fieldset>
</div>