Your IP : 216.73.216.84


Current Path : /home/helpink/www/components/com_jbusinessdirectory/views/event/tmpl/
Upload File :
Current File : /home/helpink/www/components/com_jbusinessdirectory/views/event/tmpl/default_style_1.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');

// Initialize required variables and files
$session = JFactory::getSession();
$menuItem = "&Itemid=" . $session->get("eventsMenuItemId");
$referer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : "";

require_once 'header.php';
require_once BD_CLASSES_PATH . '/attributes/attributeservice.php';
require_once HELPERS_PATH . '/event_styles.php';
?>

<div id="jbd-container" class="jbd-container">
    <div id="event-details-1" class="event-details-1 event-container" itemscope itemtype="http://schema.org/Event">
        <!-- Header Section -->
        <div class="row align-items-center mb-3">
            <!-- Left Column - Title and Navigation -->
            <div class="col-lg-8">
                <!-- Back Navigation -->
                <?php if (!empty($referer) && false) { ?>
                    <a href="<?php echo $referer ?>"><?php echo JText::_("BACK") ?></a>
                <?php } else { ?>
                    <a href="<?php echo JRoute::_('index.php?option=com_jbusinessdirectory&view=events&reload=1' . $menuItem); ?>">
                        <?php echo JText::_("BACK_TO_EVENTS") ?>
                    </a>
                <?php } ?>

                <!-- Event Title -->
                <h1 itemprop="name"><?php echo $this->escape($this->event->name) ?></h1>

                <!-- Event Header Icons -->
                <?php echo JBDEventsStyles::getEventHeaderIcons($this->event); ?>

                <!-- Event URL (Hidden) -->
                <span style="display:none;" itemprop="url">
                    <?php echo JBusinessUtil::getEventLink($this->event->id, $this->event->alias); ?>
                </span>
            </div>

            <!-- Right Column - Event Main Info -->
            <div class="col-lg-4 text-right">
                <div class="event-main-info">
                    <!-- Event Date Display -->
                    <div class="event-date">
                        <p><?php echo JBusinessUtil::getWeekDay($this->event->start_date) ?></p>
                        <p>
                            <?php echo JBusinessUtil::getMonth($this->event->start_date) ?> 
                            <?php echo JBusinessUtil::getDayOfMonth($this->event->start_date) ?>
                        </p>
                    </div>

                    <!-- Event Price (if available) -->
                    <?php if (!empty($this->event->price) && $this->defaultAttributes["price"] != ATTRIBUTE_NOT_SHOW) { ?>
                        <div class="event-date">
                            <p><?php echo JBusinessUtil::getHtmlPriceFormat($this->event->price, $this->event->currency_id) ?></p>
                            <p><?php echo JText::_("LNG_PRICE") ?></p>
                        </div>
                    <?php } ?>

                    <!-- Schema.org Metadata -->
                    <span style="display:none;" itemprop="startDate">
                        <?php echo JBusinessUtil::getDateISOFormat($this->event->start_date) ?>
                    </span>
                    <span style="display:none;" itemprop="endDate">
                        <?php echo JBusinessUtil::getDateISOFormat($this->event->end_date) ?>
                    </span>
                    
                    <!-- Event Image Schema -->
                    <span style="display:none;" itemprop="image" itemscope itemtype="http://schema.org/ImageObject">
                        <?php if (!empty($picturePath)) { ?>
                            <img alt="<?php echo $this->escape($this->event->name) ?>" 
                                 src="<?php echo BD_PICTURES_PATH . $picturePath ?>" 
                                 itemprop="contentUrl">
                            <span style="display:none;" itemprop="url">
                                <?php echo BD_PICTURES_PATH . $picturePath ?>
                            </span>
                        <?php } else { ?>
                            <img title="<?php echo $this->escape($this->event->name) ?>" 
                                 alt="<?php echo $this->event->name ?>" 
                                 src="<?php echo BD_PICTURES_PATH . '/no_image.jpg' ?>" 
                                 itemprop="contentUrl">
                            <span style="display:none;" itemprop="url">
                                <?php echo BD_PICTURES_PATH . '/no_image.jpg' ?>
                            </span>
                        <?php } ?>
                    </span>
                </div>
            </div>
        </div>

        <!-- Main Content Section -->
        <div class="row item-section">
            <!-- Left Column - Main Content -->
            <div class="col-lg-8">
                <!-- Event Pictures Gallery -->
                <?php if (!empty($this->event->pictures)) { ?>
                    <div class="row">
                        <div class="col-12">
                            <?php
                            $this->pictures = $this->event->pictures;
                            require_once JPATH_COMPONENT_SITE . '/include/gallery/image_slick_gallery_simple.php';
                            ?>
                        </div>
                    </div>
                <?php } ?>

                <!-- Event Description -->
                <div class="event-content-box">
                    <div class="box-title"><?php echo JText::_("LNG_DESCRIPTION") ?></div>
                    <div itemprop="description">
                        <?php echo JHTML::_("content.prepare", $this->event->description); ?>
                    </div>

                    <!-- Event Categories -->
                    <?php if (!empty($this->event->categories)) { ?>
                        <div class="categories-wrapper">
                            <?php foreach ($this->event->categories as $category) { ?>
                                <a href="<?php echo JBusinessUtil::getEventCategoryLink($category[0], $category[2]) ?>">
                                    <?php echo $this->escape($category[1]) ?>
                                </a>
                            <?php } ?>
                        </div>
                    <?php } ?>

                    <!-- Event Attributes -->
                    <div class="classification">
                        <?php require_once 'event_attributes.php'; ?>
                    </div>

                    <!-- Event Videos -->
                    <?php require_once 'event_videos.php'; ?>
                </div>

                <!-- Event Tickets Section -->
                <?php if (!empty($this->eventTickets) && $this->appSettings->enable_event_reservation) { ?>
                    <div class="event-content-box">
                        <div class="box-title"><?php echo JText::_("LNG_EVENT_TICKETS") ?></div>
                        <?php require_once 'event_tickets.php'; ?>
                    </div>
                <?php } ?>

                <!-- Event Attachments -->
                <?php if ($this->appSettings->enable_attachments && !empty($this->event->attachments)) { ?>
                    <div class="event-content-box">
                        <div class="box-title"><?php echo JText::_("LNG_ATTACHMENTS") ?></div>
                        <?php require "event_attachments.php" ?>
                    </div>
                <?php } ?>

                <!-- Associated Companies -->
                <?php if (!empty($this->associatedCompanies)) { ?>
                    <div class="event-content-box">
                        <div class="box-title"><?php echo JText::_("LNG_ASSOCIATED_COMPANIES") ?></div>
                        <?php require_once 'event_associated_companies.php'; ?>
                    </div>
                <?php } ?>

                <!-- Event Modules -->
                <?php
                jimport('joomla.application.module.helper');
                $modules = JModuleHelper::getModules('event-details');
                if (!empty($modules)) { 
                ?>
                    <div class="event-modules">
                        <?php foreach ($modules as $module) {
                            echo JModuleHelper::renderModule($module, array("style" => "xhtml"));
                        } ?>
                    </div>
                <?php } ?>
            </div>

            <!-- Right Column - Event Details -->
            <div class="col-lg-4">
                <!-- Ticket Booking Button -->
                <?php if (!empty($this->event->ticket_url) && $this->defaultAttributes["ticket_url"] != ATTRIBUTE_NOT_SHOW) { ?>
                    <a class="book-tickets" target="_blank" href="<?php echo $this->escape($this->event->ticket_url) ?>">
                        <?php echo JText::_("LNG_BOOK_TICKETS") ?>
                    </a>
                <?php } ?>

                <!-- Event Details Box -->
                <div class="event-content-box">
                    <div class="box-title"><?php echo JText::_("LNG_EVENT_DETAILS") ?></div>
                    <?php 
                    echo JBDEventsStyles::getEventDetails($this->event, $this->defaultAttributes, $this->appSettings, $showData);
                    echo JBDEventsStyles::getEventInfo($this->event, $this->defaultAttributes, $this->appSettings, $user, $this->userAssociatedCompanies);
                    ?>
                </div>

                <!-- Location Section -->
                <div class="event-content-box">
                    <div class="box-title"><?php echo JText::_("LNG_LOCATION") ?></div>
                    
                    <!-- Map -->
                    <?php if (!empty($this->event->latitude) && !empty($this->event->longitude)) { ?>
                        <div id="event-map">
                            <?php require_once 'map.php'; ?>
                        </div>
                    <?php } ?>

                    <!-- Address -->
                    <?php 
                    $address = JBusinessUtil::getAddressText($this->event);
                    if (!empty($address)) { 
                    ?>
                        <div class="event-location" itemprop="location" itemscope itemtype="http://schema.org/Place">
                            <i class="icon map-marker"></i>
                            <div>
                                <span itemprop="name"><?php echo $this->escape($address) ?></span>
                                <span style="display:none" itemprop="address">
                                    <?php echo JBusinessUtil::getAddressText($this->event) ?>
                                </span>
                                
                                <!-- Directions Link -->
                                <?php if (!empty($this->event->latitude) && !empty($this->event->longitude)) {
                                    $location = new stdClass;
                                    $location->latitude = $this->event->latitude;
                                    $location->longitude = $this->event->longitude;
                                ?>
                                    - <a target="_blank" href="<?php echo JBusinessUtil::getDirectionURL(null, $location) ?>">
                                        <?php echo JText::_("LNG_GET_MAP_DIRECTIONS") ?>
                                    </a>
                                <?php } ?>
                            </div>
                        </div>
                    <?php } ?>
                </div>

                <!-- Organizer Section -->
                <?php if (!empty($this->event->company)) { ?>
                    <div class="event-content-box">
                        <div class="box-title"><?php echo JText::_("LNG_ORGANIZER") ?></div>

                        <!-- Organizer Details -->
                        <div class="organizer-details" itemprop="organizer" itemscope itemtype="http://schema.org/Organization">
                            <!-- Company Logo -->
                            <div class="business-logo">
                                <?php if (!empty($this->event->company->logoLocation)) { ?>
                                    <img src="<?php echo BD_PICTURES_PATH . $this->event->company->logoLocation ?>" 
                                         alt="<?php echo $this->event->company->name ?>">
                                <?php } else { ?>
                                    <img src="<?php echo BD_PICTURES_PATH . '/no_image.jpg' ?>" 
                                         alt="<?php echo !empty($this->event->company) ? $this->event->company->name : "" ?>">
                                <?php } ?>
                            </div>

                            <!-- Company Details -->
                            <div class="business-details">
                                <a itemprop="url" target="_blank" href="<?php echo JBusinessUtil::getCompanyLink($this->event->company) ?>">
                                    <span itemprop="name"><?php echo $this->escape($this->event->company->name) ?></span>
                                </a>
                                <div class="rating rating-stars">
                                    <span class="user-rating-avg rating-average-review" 
                                          id="rating-average-review" 
                                          title="<?php echo $this->event->company->review_score ?>" 
                                          style="display: block;"></span>
                                </div>
                            </div>
                        </div>

                        <!-- Company Actions -->
                        <div class="business-actions">
                            <div class="business-item">
                                <a class="btn btn-outline" target="_blank" 
                                   href="<?php echo JBusinessUtil::getCompanyLink($this->event->company) ?>">
                                    <?php echo JText::_("LNG_VIEW_PROFILE") ?>
                                </a>
                            </div>

                            <?php if (!empty($this->event->company->website)) { ?>
                                <div class="business-item" itemprop="url">
                                    <a class="btn btn-primary" target="_blank" 
                                       itemprop="url" 
                                       title="<?php echo $this->escape($this->event->company->name) ?> Website" 
                                       onclick="jbdUtils.registerStatAction(<?php echo $this->event->company->id ?>,
                                                                          <?php echo STATISTIC_ITEM_BUSINESS ?>,
                                                                          <?php echo STATISTIC_TYPE_WEBSITE_CLICK ?>)" 
                                       href="<?php echo $this->escape($this->event->company->website) ?>">
                                        <?php echo JText::_('LNG_VISIT_WEBSITE') ?>
                                    </a>
                                </div>
                            <?php } ?>
                        </div>
                    </div>
                <?php } ?>
            </div>
        </div>
    </div>
</div>

<?php require_once 'event_util.php'; ?>