function showExtras() { //$log = Logger::getInstance(JPATH_COMPONENT."/logs/site-log-".date("d-m-Y").'.log',1); //$log->LogDebug("showExtras"); //add room if does not exist $reservedItems = JRequest::getVar("reservedItems"); $hotelId = JRequest::getVar("hotelId"); UserDataService::updateRooms($hotelId, $reservedItems); $userData = UserDataService::getUserData(); $userData->hotelId = $hotelId; $appSetting = JHotelUtil::getApplicationSettings(); if (!isset($userData->currency)) { $hotel = HotelService::getHotel($hotelId); UserDataService::setCurrency($hotel->hotel_currency, $hotel->currency_symbol); } //dump($userData->reservedItems); //dump($userData->hotelId); //$log->LogDebug(serialize($userData->reservedItems)); $model = $this->getModel("ExtraOptions"); $extraOptions = $model->getExtraOptions(); if (count($extraOptions) > 0 && PROFESSIONAL_VERSION == 1 && $appSetting->is_enable_extra_options) { //dump("show extra view"); JRequest::setVar("view", "extraoptions"); parent::display(); } else { if (count($userData->reservedItems) < $userData->rooms) { $this->setRedirect(JRoute::_('index.php?option=com_jhotelreservation&task=hotel.showHotel&hotel_id=' . $userData->hotelId . "&reservedItems=" . $reservedItems, false)); } else { $this->setRedirect(JRoute::_('index.php?option=com_jhotelreservation&view=guestDetails&reservedItems=' . $reservedItems, false)); } } //exit; //$log->LogDebug(serialize($userData->reservedItems)); //$log->LogDebug("End showExtras"); }
function display($tpl = null) { $item = $this->get('Data'); $this->item = $item; $appSettings = JHotelUtil::getApplicationSettings(); $this->lodgingtypes = $this->getModel('lodgingtypes'); $this->facilities = $this->getModel('facilities'); $this->accomodationtypes = $this->getModel('accomodationtypes'); $this->environmenttypes = $this->getModel('environmenttypes'); $this->paymentoptions = $this->getModel('paymentoptions'); $this->regiontypes = $this->getModel('regiontypes'); JToolBarHelper::title('J-Hotel Reservation : ' . ($item->hotel_id > 0 ? JText::_("LNG_EDIT", true) : JText::_('LNG_ADD_NEW', true)) . ' ' . JText::_('LNG_HOTEL', true), 'generic.png'); $elements = new stdClass(); //hotel important informations $elements->allowPets = JHTML::_('select.booleanlist', "pets", '', $item->informations->pets); $elements->parking = JHTML::_('select.booleanlist', "parking", '', $item->informations->parking); $elements->wifi = JHTML::_('select.booleanlist', "wifi", '', $item->informations->wifi); $elements->publicTransport = JHTML::_('select.booleanlist', "public_transport", '', $item->informations->public_transport); $elements->suitableDisabled = JHTML::_('select.booleanlist', "suitable_disabled", '', $item->informations->suitable_disabled); //recommended $elements->recommended = JHTML::_('select.booleanlist', "recommended", '', $item->recommended); $this->elements = $elements; $hoteltranslationsModel = new JHotelReservationModelhoteltranslations(); $this->translations = $hoteltranslationsModel->getAllTranslations(HOTEL_TRANSLATION, $this->item->hotel_id); $this->addToolbar($this->item); $this->includeFunctions(); parent::display($tpl); }
function display($tpl = null) { $this->item = JHotelUtil::getApplicationSettings(); $this->items = $this->get('Items'); $this->currentVersion = $this->get('CurrentVersion'); $this->expirationDate = $this->get('ExpirationDate'); JToolBarHelper::title('J-Hotel Reservation ' . JText::_('LNG_UPDATES', true), 'generic.png'); JToolbarHelper::custom('updates.saveOrder', 'save', 'save', 'LNG_SAVE_ORDER', true, false); JToolbarHelper::custom('updates.update', 'upload', 'upload', 'COM_INSTALLER_TOOLBAR_UPDATE', true, false); JToolbarHelper::custom('updates.find', 'refresh', 'refresh', 'COM_INSTALLER_TOOLBAR_FIND_UPDATES', false, false); JToolbarHelper::divider(); JToolBarHelper::custom('jhotelreservation.back', JHotelUtil::getDashBoardIcon(), 'home', JText::_('LNG_HOTEL_DASHBOARD', true), false, false); parent::display($tpl); }
function __construct() { $this->searchFilter = JRequest::getVar('searchkeyword'); parent::__construct(); $this->_total = 0; $mainframe = JFactory::getApplication(); // Get pagination request variables $limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int'); $limitstart = JRequest::getVar('limitstart', 0, '', 'int'); // In case limit has been changed, adjust it $limitstart = $limit != 0 ? floor($limitstart / $limit) * $limit : 0; $this->setState('limit', $limit); $this->setState('limitstart', $limitstart); $this->appSettings = JHotelUtil::getApplicationSettings(); }
/** * Display the view */ public function display($tpl = null) { //$this->form = $this->get('Form'); $this->item = $this->get('Item'); $this->state = $this->get('State'); $this->hotel = $this->get('Hotel'); $this->pictures = $this->get('ExcursionPictures'); $this->appSettings = JHotelUtil::getInstance()->getApplicationSettings(); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } //get hotel translations $hoteltranslationsModel = new JHotelReservationModelhoteltranslations(); $this->translations = $hoteltranslationsModel->getAllTranslations(EXCURSION_TRANSLATION, $this->item->id); $this->includeFunctions(); $appSettings = JHotelUtil::getApplicationSettings(); parent::display($tpl); $this->addToolbar(); }
defined('_JEXEC') or die('Restricted access'); /** * @copyright Copyright (C) 2008-2009 CMSJunkie. All rights reserved. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ jimport('joomla.html.pane'); $appSetings = JHotelUtil::getApplicationSettings(); JHTML::_("behavior.calendar"); ?> <form action="<?php echo JRoute::_('index.php?option=com_jhotelreservation&view=offerrateprices&layout=edit&rate_id=' . $this->state->get("filter.rate_id")); ?> " method="post" name="quickFilterFrm" id="quickFilterFrm"> <table class="rate-quick-filter"> <thead> <tr> <th colspan="4"><?php echo JText::_("LNG_QUICK_SETUP"); ?> </th> </tr>
function sendInvoiceEmail($hotel, $email, $status) { $mode = 1; //html $ret = true; if ($status == 0) { //JMail::sendMail($from, $fromname, $recipient, $subject, $body, $mode=0, $cc=null, $bcc=null, $attachment=null, $replyto=null, $replytoname=null) $ret = EmailService::sendEmail($email->company_email, $email->company_name, $email->company_email, $hotel->email, null, null, $email->subject, $email->content, $mode); } else { $appSettings = JHotelUtil::getApplicationSettings(); $emailAddress = ''; if ($appSettings->send_invoice_to_email) { $emailAddress = $appSettings->invoice_email; } else { $emailAddress = $hotel->email; } //JMail::sendMail($from, $fromname, $recipient, $subject, $body, $mode=0, $cc=null, $bcc=null, $attachment=null, $replyto=null, $replytoname=null) $ret = EmailService::sendEmail($email->company_email, $email->company_name, $email->company_email, $emailAddress, null, null, $email->subject, $email->content, $mode); } return $ret; }
?> /assets/img/loader.gif'></div>"; jQuery('#chartdiv').html(imgLoading); } function generateChart(){ showLoading(); var siteRoot = '<?php echo JURI::root(); ?> '; var compName = '<?php echo getBookingExtName(); ?> '; var currencyCode = '<?php echo JHotelUtil::getApplicationSettings()->currency_id; ?> '; var dateStart = jQuery('#filter_datas').val(); var dateEnd = jQuery('#filter_datae').val(); var roomTypeId = jQuery('#filter_room_types').val(); var hotelId = jQuery('#hotel_id').val(); var reportType = jQuery('#filter_report_type').val(); var inputParams ='&dateStart='+dateStart+'&dateEnd='+dateEnd+'&roomTypeId='+roomTypeId+'&hotelId='+hotelId+'&reportType='+reportType; var jsonurl = siteRoot+'administrator/index.php?option='+compName+'&task=reservationsreports.getJsonCountriesData'+inputParams; var labels = ["<?php echo JText::_('LNG_RESERVATIONS', true); ?>
public function getExpirationDate() { try { $url = "http://updates.cmsjunkie.com/security/productinfo.php?sku=j-hotelreservation"; $url .= "&orderId=" . JHotelUtil::getApplicationSettings()->order_id . "&orderEmail=" . JHotelUtil::getApplicationSettings()->order_email; //echo $url; $ch = curl_init(); $timeout = 10; curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1)"); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout); $rawdata = curl_exec($ch); curl_close($ch); return $rawdata; } catch (Exception $e) { print_r($e); exit; } }