function quickiconButton($link, $image, $text, $description = null) { $lang = JFactory::getLanguage(); ?> <li class="option-button"> <a href="<?php echo $link; ?> " class="box box-inset"> <?php echo JHTML::_('image', 'administrator/components/' . getBookingExtName() . '/assets/img/' . $image, $text); ?> <h3> <?php echo $text; ?> </h3> <p> <?php //echo $description; ?> </p> </a> </li> <?php }
function language() { $app = JFactory::getApplication(); $code = JRequest::getString('code'); if (empty($code)) { $app->enqueueMessage(JText::_('Code not specified', true)); return; } $file = new stdClass(); $file->name = $code; $path = JPATH_COMPONENT_ADMINISTRATOR . DS . 'language' . DS . $code . DS . $code . getBookingExtName() . '.ini'; $file->path = $path; jimport('joomla.filesystem.file'); $showLatest = true; $loadLatest = false; if (JFile::exists($path)) { $file->content = JFile::read($path); if (empty($file->content)) { $app->enqueueMessage('File not found : ' . $path); } } else { $loadLatest = true; $file->content = JFile::read(JPATH_COMPONENT_ADMINISTRATOR . DS . 'language' . 'en-GB' . DS . 'en-GB.' . getBookingExtName() . '.ini'); } $this->assignRef('file', $file); $tpl = "language"; return $tpl; }
function submitReview() { $model = $this->getModel('hotelratings'); $model->submitReview(); $msg = "Thank you for your review. Your feedback is appreciated."; $confirmationId = JRequest::getVar('confirmation_id'); $this->setRedirect('index.php?option=' . getBookingExtName() . '&controller=hotelratings&view=hotelratings&submitreviewform=true&confirmation_id=' . $confirmationId, $msg); }
function submitReview() { $model = $this->getModel('hotelratings'); $model->submitReview(); $msg = JText::_('LNG_REVIEW_THANK_YOU', true); $confirmationId = JRequest::getVar('confirmation_id'); $this->setRedirect('index.php?option=' . getBookingExtName() . '&controller=hotelratings&view=hotelratings&submitreviewform=true&confirmation_id=' . $confirmationId, $msg); }
function changeState() { $hotelratings = $this->getModel('managehotelratings'); $hotelratings->changeState(); $hotelId = JRequest::getVar('hotel_id'); $msg = JText::_('LNG_REVIEW_PUBLISH_STATE', true); $this->setRedirect('index.php?option=' . getBookingExtName() . '&controller=managehotelratings&view=managehotelratings&hotel_id=' . $hotelId, $msg); parent::display(); }
function includeFunctions() { $doc = JFactory::getDocument(); $doc->addStyleSheet('components/' . getBookingExtName() . '/assets/js/validation/css/validationEngine.jquery.css'); $tag = JHotelUtil::getJoomlaLanguage(); $doc->addScript('components/' . getBookingExtName() . '/assets/js/validation/js/languages/jquery.validationEngine-' . $tag . '.js'); $doc->addScript('components/' . getBookingExtName() . '/assets/js/validation/js/jquery.validationEngine.js'); $doc->addScript('components/' . getBookingExtName() . '/assets/js/jquery.selectlist.js'); }
function delete() { $model = $this->getModel('manageroomfeatures'); if ($model->remove()) { $msg = JText::_('LNG_FEATURE_ROOM_HAS_BEEN_DELETED', true); } else { $msg = JText::_('LNG_ERROR_DELETE_FEATURE_ROOM', true); } // Check the table in so it can be edited.... we are done with it anyway $this->setRedirect('index.php?option=' . getBookingExtName() . '&controller=manageroomfeatures&view=manageroomfeatures', $msg); }
/** * save a record (and redirect to main page) * @return void */ function save() { $model = $this->getModel('tools'); $post = JRequest::get('post'); if ($model->store($post)) { $msg = JText::_('LNG_TAX_SAVED', true); $this->setRedirect('index.php?option=' . getBookingExtName() . '&controller=managetaxes&view=managetaxes', $msg); } else { $msg = ""; JError::raiseWarning(500, JText::_('LNG_ERROR_SAVING_TAX', true)); $this->setRedirect('index.php?option=' . getBookingExtName() . '&controller=managetaxes&view=managetaxes', $msg); } // Check the table in so it can be edited.... we are done with it anyway }
public static function isUserLoggedIn($retunUrl = null) { $user = JFactory::getUser(); if (!$user->id) { $app = JFactory::getApplication(); $msg = JText::_('LNG_UNAUTHORIZED_ACCESS', true); if ($retunUrl == null) { $retunUrl = base64_encode(JRoute::_('index.php?option=' . getBookingExtName() . '&view=customeraccount')); } $app->redirect(JRoute::_("index.php?option=com_users&view=login&return=" . $retunUrl), $msg); } else { return true; } }
function delete() { $model = $this->getModel('managehotelusers'); $post = JRequest::get('post'); if (!isset($post['hotel_id'])) { $post['hotel_id'] = 0; } if ($model->remove()) { $msg = JText::_('LNG_USER_HAS_BEEN_DELETED', true); } else { $msg = JText::_('LNG_ERROR_DELETE_USER', true); } // Check the table in so it can be edited.... we are done with it anyway $this->setRedirect('index.php?option=' . getBookingExtName() . '&controller=managehotelusers&view=managehotelusers&hotel_id=' . $post['hotel_id'], $msg); }
function display($tpl = null) { $this->state = $this->get('State'); $this->reservationDetails = $this->get("ReservationDetails"); $this->paymentMethods = $this->get('paymentMethods'); $this->guestTypes = JHotelReservationHelper::getGuestTypes(); $this->userData = UserDataService::getUserData(); $this->hotel = HotelService::getHotel($this->userData->hotelId); $this->appSettings = JHotelUtil::getInstance()->getApplicationSettings(); $doc = JFactory::getDocument(); $tag = JHotelUtil::getJoomlaLanguage(); $doc->addStyleSheet('administrator/components/' . getBookingExtName() . '/assets/js/validation/css/validationEngine.jquery.css'); $doc->addScript('administrator/components/' . getBookingExtName() . '/assets/js/validation/js/languages/jquery.validationEngine-' . $tag . '.js'); $doc->addScript('administrator/components/' . getBookingExtName() . '/assets/js/validation/js/jquery.validationEngine.js'); parent::display($tpl); }
function includeFunctions() { $doc = JFactory::getDocument(); $doc->addStyleSheet('components/' . getBookingExtName() . '/assets/js/validation/css/validationEngine.jquery.css'); $doc->addStyleSheet('components/' . getBookingExtName() . '/assets/js/validation/css/template.css'); $doc->addStyleSheet('components/' . getBookingExtName() . '/assets/js/datepicker/css/datepicker.css'); $doc->addStyleSheet('components/' . getBookingExtName() . '/assets/js/datepicker/css/layout.css'); $doc->addScript('components/' . getBookingExtName() . '/assets/js/jquery.selectlist.js'); $doc->addScript('components/' . getBookingExtName() . '/assets/js/manageHotels.js'); $doc->addScript('components/' . getBookingExtName() . '/assets/js/datepicker/js/eye.js'); $doc->addScript('components/' . getBookingExtName() . '/assets/js/datepicker/js/datepicker.js'); $doc->addScript('components/' . getBookingExtName() . '/assets/js/datepicker/js/utils.js'); $doc->addScript('components/' . getBookingExtName() . '/assets/js/datepicker/js/layout.js'); $doc->addScript('components/' . getBookingExtName() . '/assets/js/jquery.upload.js'); $tag = JHotelUtil::getJoomlaLanguage(); $doc->addScript('components/' . getBookingExtName() . '/assets/js/validation/js/languages/jquery.validationEngine-' . $tag . '.js'); $doc->addScript('components/' . getBookingExtName() . '/assets/js/validation/js/jquery.validationEngine.js'); }
function editReservation() { $this->item = $this->get('Item'); $this->state = $this->get('State'); $this->appSettings = JHotelUtil::getInstance()->getApplicationSettings(); $this->roomTypes = $this->get('RoomTypesOptions'); $this->guestTypes = JHotelReservationHelper::getGuestTypes(); $hotels = $this->get('Hotels'); $this->hotels = checkHotels(JFactory::getUser()->id, $hotels); if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } $doc = JFactory::getDocument(); $doc->addScriptDeclaration(' var baseUrl="' . (JURI::base() . '/administrator/index.php?option=' . getBookingExtName()) . '"; '); $doc->addScript('administrator/components/' . getBookingExtName() . '/assets/js/reservation.js'); $tpl = 'editreservation'; return $tpl; }
function delete() { // Check for request forgeries JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN', true)); // Get items to remove from the request. $cid = JRequest::getVar('cid', array(), '', 'array'); if (!is_array($cid) || count($cid) < 1) { JError::raiseWarning(500, JText::_('LNG_NO_HOTEL_SELECTED', true)); } $model = $this->getModel('hotels'); // Make sure the item ids are integers jimport('joomla.utilities.arrayhelper'); JArrayHelper::toInteger($cid); if ($model->remove($cid)) { $msg = JText::_('LNG_HOTEL_HAS_BEEN_DELETED', true); } else { $msg = JText::_('LNG_ERROR_DELETE_HOTEL', true); } // Check the table in so it can be edited.... we are done with it anyway $this->setRedirect('index.php?option=' . getBookingExtName() . '&task=hotels.viewHotels', $msg); }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { $canDo = JHotelReservationHelper::getActions(); JRequest::setVar('hidemainmenu', true); $user = JFactory::getUser(); $isNew = $this->item->room_id == 0; JToolBarHelper::title(JText::_('LNG_ROOM', true) . " : " . (!$isNew ? JText::_('LNG_EDIT', true) : JText::_('LNG_ADD_NEW', true)), 'menu.png'); if ($canDo->get('core.create')) { JToolBarHelper::apply('room.apply'); JToolBarHelper::save('room.save'); JToolBarHelper::save2new('room.save2new'); } if (!$isNew) { JToolBarHelper::custom('room.editrateprices', 'edit', 'stats', 'JTOOLBAR_EDIT_RATE_DETAILS', false); } JToolBarHelper::cancel('room.cancel'); JToolBarHelper::divider(); JToolBarHelper::help('JHELP_ROOM_EDIT'); $doc = JFactory::getDocument(); $doc->addScript('components/' . getBookingExtName() . '/assets/js/jquery.upload.js'); }
function changeTopState() { $model = $this->getModel('offers'); if ($model->changeTopState()) { $msg = JText::_('LNG_STATE_CHANGED_SUCCESSFULLY', true); } else { $msg = JText::_('LNG_ERROR_CHANGE_OFFER_STATE', true); } $this->setMessage($msg); //JRequest::setVar( 'view', 'offers' ); $this->setRedirect('index.php?option=' . getBookingExtName() . '&controller=offers&view=offers&hotel_id=' . $model->getState('filter.hotel_id'), $msg); }
echo $item->extra_pers_price; ?> " /> </li> </ul> </div> <?php } ?> </div> </div> <div class="clr"></div> </div> <input type="hidden" name="option" value="<?php echo getBookingExtName(); ?> " /> <input type="hidden" name="task" value="" /> <input type="hidden" name="rate_id" id="rate_id" value="<?php echo $this->state->get("filter.rate_id"); ?> " /> <?php echo JHTML::_('form.token'); ?> </form>
function getLanguages() { $path = JLanguage::getLanguagePath(JPATH_ROOT); $dirs = JFolder::folders($path); foreach ($dirs as $dir) { if (strlen($dir) != 5) { continue; } $xmlFiles = JFolder::files($path . DS . $dir, '^([-_A-Za-z]*)\\.xml$'); $xmlFile = reset($xmlFiles); if (empty($xmlFile)) { continue; } $data = JApplicationHelper::parseXMLLangMetaFile($path . DS . $dir . DS . $xmlFile); $oneLanguage = new stdClass(); $oneLanguage->language = $dir; $oneLanguage->name = $data['name']; $languageFiles = JFolder::files(JPATH_COMPONENT . DS . 'language' . DS . $dir, '^(.*)\\.' . getBookingExtName() . '\\.ini$'); $imageName = JFolder::files(JPATH_COMPONENT . DS . 'language' . DS . $dir, '^(.*)\\.' . getBookingExtName() . '\\.png$'); $languageFile = reset($languageFiles); if (!empty($languageFile)) { $linkEdit = 'index.php?option=' . getBookingExtName() . '&task=language.editLanguage&lngCode=' . $oneLanguage->language; $oneLanguage->edit = ' <a class="modal" title="' . JText::_('LNG_EDIT_LANGUAGE_FILE', true) . '" href="' . $linkEdit . '" rel="{handler: \'iframe\', size:{x:800, y:500}}"><img id="image' . $oneLanguage->language . '" class="icon16" src="' . PATH_ASSETS_IMG . 'edit.png" alt="' . JText::_('LNG_EDIT_LANGUAGE_FILE', true) . '"/></a>'; } else { $linkEdit = 'index.php?option=' . getBookingExtName() . '&task=language.editLanguage&lngCode=' . $oneLanguage->language; $oneLanguage->edit = ' <a class="modal" title="' . JText::_('LNG_ADD_LANGUAGE_FILE', true) . '" href="' . $linkEdit . '" rel="{handler: \'iframe\', size:{x:800, y:500}}"><img id="image' . $oneLanguage->language . '" class="icon16" src="' . PATH_ASSETS_IMG . 'edit.png" alt="' . JText::_('LNG_EDIT_LANGUAGE_FILE', true) . '"/></a>'; } $languages[] = $oneLanguage; } return $languages; }
* * 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/>. */ // No direct access defined('_JEXEC') or die('Restricted access'); if (!checkUserAccess(JFactory::getUser()->id, "manage_taxes")) { $msg = "You are not authorized to access this resource"; $this->setRedirect('index.php?option=' . getBookingExtName(), $msg); } class JHotelReservationViewManageTaxes extends JViewLegacy { function display($tpl = null) { if (JRequest::getString('task') != 'edit' && JRequest::getString('task') != 'add') { JToolBarHelper::title('J-HotelReservation : ' . JText::_('LNG_MANAGE_TAXES', true), 'generic.png'); JRequest::setVar('hidemainmenu', 1); $hotel_id = $this->get('HotelId'); if ($hotel_id > 0) { JToolBarHelper::addNew('managetaxes.edit'); JToolBarHelper::editList('managetaxes.edit'); JToolBarHelper::deleteList('', 'managetaxes.delete', JText::_('LNG_DELETE', true)); JToolBarHelper::custom('managetaxes.back', JHotelUtil::getDashBoardIcon(), 'home', JText::_('LNG_HOTEL_DASHBOARD', true), false, false); }
/** * cancel editing a record * @return void */ function cancel() { if (JRequest::getVar('task') == 'cancel') { $msg = JText::_('LNG_OPERATION_CANCELLED', true); } $post = JRequest::get('post'); if (!isset($post['hotel_id'])) { $post['hotel_id'] = 0; } $this->setRedirect('index.php?option=' . getBookingExtName() . '&controller=manageinvoices&view=manageinvoices&hotel_id=' . $post['hotel_id'], $msg); }
* @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/>. */ // No direct access defined('_JEXEC') or die('Restricted access'); require_once JPATH_COMPONENT_ADMINISTRATOR . '/helpers/helper.php'; JHTML::_('script', 'administrator/components/' . getBookingExtName() . '/assets/js/reservation.js'); if (!checkUserAccess(JFactory::getUser()->id, "manage_reservations")) { $msg = "You are not authorized to access this resource"; $this->setRedirect('index.php?option=' . getComponentName(), $msg); } class JHotelReservationViewReservation extends JViewLegacy { protected $item; protected $state; /** * Display the view */ public function display($tpl = null) { $lang = JFactory::getLanguage(); $this->item = $this->get('Item');
} } JHTML::_('script', 'administrator/components/' . getBookingExtName() . '/assets/js/utils.js'); JHTML::_('stylesheet', 'administrator/components/' . getBookingExtName() . '/assets/css/style.css'); JHTML::_('stylesheet', 'administrator/components/' . getBookingExtName() . '/assets/css/general.css'); JHTML::_('stylesheet', 'administrator/components/' . getBookingExtName() . '/assets/css/joomlatabs.css'); //JHTML::_('script', 'administrator/components/'.getBookingExtName().'/assets/jquery-ui.min.js'); //JHTML::_('script', 'administrator/components/'.getBookingExtName().'/assets/tooltip.js'); //JHTML::_('stylesheet', 'administrator/components/'.getBookingExtName().'/assets/tooltip.css'); //JHTML::_('stylesheet', 'administrator/components/'.getBookingExtName().'/assets/jquery-ui.css'); //JHTML::_('stylesheet', 'administrator/components/'.getBookingExtName().'/assets/datepicker/css/datepicker.css'); //JHTML::_('stylesheet', 'administrator/components/'.getBookingExtName().'/assets/datepicker/css/layout.css'); //JHTML::_('script', 'administrator/components/'.getBookingExtName().'/assets/jquery.upload.js'); JHTML::_('script', 'administrator/components/' . getBookingExtName() . '/assets/js/jquery.blockUI.js'); //JHTML::_('stylesheet', 'administrator/components/'.getBookingExtName().'/assets/TabPane.css'); //JHTML::_('script', 'administrator/components/'.getBookingExtName().'/assets/TabPane.js'); JHTML::_('script', 'administrator/components/' . getBookingExtName() . '/assets/js/common.js'); //JHTML::_('script', 'administrator/components/'.getBookingExtName().'/assets/js/jquery.validate.min.js'); //JHTML::_('script', 'administrator/components/'.getBookingExtName().'/assets/js/additional-methods.min.js'); JHotelUtil::loadAdminLanguage(); JHotelUtil::loadClasses(); $doc = JFactory::getDocument(); $doc->addScriptDeclaration(' window.onload = function() { jQuery.noConflict(); }; var baseUrl="' . (JURI::base() . 'index.php?option=' . getBookingExtName()) . '"; '); $controller = JControllerLegacy::getInstance('JHotelReservation'); $controller->execute(JFactory::getApplication()->input->get('task')); $controller->redirect();
echo $this->hotel->hotel_longitude; ?> ); var myOptions = { zoom: 12, center: myLatlng, mapTypeId: google.maps.MapTypeId.ROADMAP } var mapdiv = document.getElementById("hotel_map"); mapdiv.style.width = '100%'; mapdiv.style.height = '400px'; var map = new google.maps.Map(mapdiv, myOptions); var image = '<?php echo JURI::base() . "/components/" . getBookingExtName(); ?> /assets/img/marker.png'; var marker = new google.maps.Marker({ position: new google.maps.LatLng(<?php echo $this->hotel->hotel_latitude; ?> , <?php echo $this->hotel->hotel_longitude; ?> ), map: map, title: "<?php echo $hotel->hotel_name; ?> ",
function deleteGroups() { $model = $this->getModel('usersmanagement'); $msg = $model->deleteGroups(); $this->setRedirect('index.php?option=' . getBookingExtName() . '&task=usersmanagement.listGroups', $msg); }
function state() { $model = $this->getModel('manageemailsdefault'); if ($model->state()) { $msg = JText::_('', true); } else { $msg = JText::_('LNG_ERROR_CHANGE_EMAIL_STATE', true); } $this->setRedirect('index.php?option=' . getBookingExtName() . '&controller=manageemailsdefault&view=manageemailsdefault', $msg); }
value = '<?php echo $this->item->max_children; ?> ' size = 10 maxlength = 10 style = 'text-align:center' /> <a href ="javascript:;" class ="tooltip" title ="<?php echo JText::_('LNG_INFO_MAX_CHILDREN', true); ?> " > <img src ="<?php echo JURI::base() . "components/" . getBookingExtName() . "/assets/img/help-icon-NLP.png"; ?> " /> </a> </TD> <TD align=left colspan="3"> </TD> </TR> <?php } ?> </TABLE> </fieldset>
/** * cancel editing a record * @return void */ function cancel() { $msg = JText::_('LNG_OPERATION_CANCELLED', true); $post = JRequest::get('post'); if (!isset($post['hotel_id'])) { $post['hotel_id'] = 0; } $this->setRedirect('index.php?option=' . getBookingExtName() . '&controller=offers&view=offers&hotel_id=' . $post['hotel_id'], $msg); }
public static function showUnavailable() { $app = JFactory::getApplication(); $app->redirect(JRoute::_('index.php?option=' . getBookingExtName() . '&task=hotelsettings.showUnavailable'), ""); }
<h2 > <a href="<?php echo JHotelUtil::getHotelLink($hotel); ?> "> <?php echo stripslashes($hotel->hotel_name); ?> </a> </h2> <span class="hotelstars"> <?php for ($i = 1; $i <= $hotel->hotel_stars; $i++) { ?> <img src='<?php echo JURI::root() . "administrator/components/" . getBookingExtName() . "/assets/img/star.png"; ?> ' /> <?php } ?> </span> </div> <div class="hoteladdress"> <?php echo $hotel->hotel_address; ?> , <?php echo $hotel->hotel_city; ?>
* @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/>. */ // No direct access defined('_JEXEC') or die('Restricted access'); jimport('joomla.application.component.controller'); JHTML::_('stylesheet', 'components/' . getBookingExtName() . '/assets/css/specialoffers.css'); require_once JPATH_COMPONENT_SITE . DS . 'views' . DS . 'offer' . DS . 'view.html.php'; require_once JPATH_COMPONENT_SITE . DS . 'views' . DS . 'listoffers' . DS . 'view.html.php'; class JHotelReservationControllerOffers extends JControllerLegacy { /** * constructor (registers additional tasks to methods) * @return void */ function __construct() { parent::__construct(); } function searchOffers() { $model = $this->getModel('offers');