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); } $this->hotel_id = $hotel_id; $items = $this->get('Datas'); $this->items = $items; $hotels = $this->get('Hotels'); $hotels = checkHotels(JFactory::getUser()->id, $hotels); $this->hotels = $hotels; } else { $item = $this->get('Data'); $this->item = $item; $hotel_id = $this->get('HotelId'); $this->hotel_id = $hotel_id; $hotel = $this->get('Hotel'); $this->hotel = $hotel; JToolBarHelper::title('J-Hotel Reservation : ' . ($item->tax_id > 0 ? JText::_("LNG_EDIT", true) : JText::_("LNG_ADD_NEW", true)) . ' ' . JText::_('LNG_TAX', true), 'generic.png'); JRequest::setVar('hidemainmenu', 1); JToolBarHelper::cancel('managetaxes.back'); JToolBarHelper::save('managetaxes.save'); } parent::display($tpl); }
function display($tpl = null) { if (JRequest::getString('task') != 'edit' && JRequest::getString('task') != 'add') { JToolBarHelper::title('J-Hotel Reservation : ' . JText::_('LNG_MANAGE_AIRPORT_TRANSFER_TYPES', true), 'generic.png'); //JRequest::setVar( 'hidemainmenu', 1 ); $hotel_id = $this->get('HotelId'); if ($hotel_id > 0) { JToolBarHelper::addNew('manageairporttransfertypes.edit'); JToolBarHelper::editList('manageairporttransfertypes.edit'); JToolBarHelper::deleteList('', 'manageairporttransfertypes.delete', JText::_('LNG_DELETE', true)); } JToolBarHelper::custom('back', JHotelUtil::getDashBoardIcon(), 'home', 'Back', false, false); $this->hotel_id = $hotel_id; $items = $this->get('Datas'); $this->items = $items; $hotels = $this->get('Hotels'); $hotels = checkHotels(JFactory::getUser()->id, $hotels); $this->hotels = $hotels; } else { $item = $this->get('Data'); $this->item = $item; $hotel_id = $this->get('HotelId'); $this->hotel_id = $hotel_id; $hotel = $this->get('Hotel'); $this->hotel = $hotel; JToolBarHelper::title('J-Hotel Reservation : ' . ($item->airport_transfer_type_id > 0 ? JText::_('LNG_EDIT', true) : JText::_('LNG_ADD_NEW', true)) . ' ' . JText::_('LNG_AIRPORT_TRANSFER_TYPE', true), 'generic.png'); JRequest::setVar('hidemainmenu', 1); JToolBarHelper::cancel('manageairporttransfertypes.cancel'); JToolBarHelper::save('manageairporttransfertypes.save'); } parent::display($tpl); }
function display($tpl = null) { if (JRequest::getString('task') != 'edit' && JRequest::getString('task') != 'add') { JToolBarHelper::title('J-Hotel Reservation : ' . JText::_('LNG_MANAGE_ARRIVAL_OPTIONS', true), 'generic.png'); //JRequest::setVar( 'hidemainmenu', 1 ); JToolBarHelper::custom('back', JUtil::getDashBoardIcon(), 'home', 'Back', false, false); $hotel_id =& $this->get('HotelId'); if ($hotel_id > 0) { JToolBarHelper::deleteList(JText::_('LNG_ARE_YOU_SURE_YOU_WANT_TO_DELETE', true), 'Delete', 'Delete', 'Detele button', false, false); JToolBarHelper::editList(); JToolBarHelper::addNewX(); } $this->hotel_id = $hotel_id; $items =& $this->get('Datas'); $this->items = $items; $hotels =& $this->get('Hotels'); $hotels = checkHotels(JFactory::getUser()->id, $hotels); $this->hotels = $hotels; } else { $item =& $this->get('Data'); $this->item = $item; $hotel_id =& $this->get('HotelId'); $this->hotel_id = $hotel_id; $hotel =& $this->get('Hotel'); $this->hotel = $hotel; JToolBarHelper::title('J-Hotel Reservation : ' . ($item->arrival_option_id > 0 ? JText::_('LNG_EDIT', true) : JText::_('LNG_ADD_NEW', true)) . ' ' . JText::_('LNG_MANAGE_ARRIVAL_OPTION', true), 'generic.png'); JRequest::setVar('hidemainmenu', 1); JToolBarHelper::cancel(); JToolBarHelper::save(); } parent::display($tpl); }
/** * Display the view */ public function display($tpl = null) { $lang = JFactory::getLanguage(); $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->roomTypes = $this->get('RoomTypesOptions'); $this->reservationStatuses = JHotelReservationHelper::getReservationStatuses(); $this->paymentStatuses = JHotelReservationHelper::getPaymentStatuses(); $hotels = $this->get('Hotels'); $this->hotels = checkHotels(JFactory::getUser()->id, $hotels); //var_dump($this->hotels); // Check for errors. $layout = JRequest::getVar("layout"); if (isset($layout)) { $tpl = $layout; } $this->setLayout('default'); JHotelReservationHelper::addSubmenu('reservations'); if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } $this->addToolbar(); parent::display($tpl); }
function display($tpl = null) { $this->items = $this->get('Items'); $this->items = checkHotels(JFactory::getUser()->id, $this->items); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); JHotelReservationHelper::addSubmenu('hotels'); $this->statuses = JHotelReservationHelper::getStatuses(); $this->accomodationTypes = $this->get('AccommodationTypes'); $this->addToolbar(count($this->items)); parent::display($tpl); }
/** * Display the view */ public function display($tpl = null) { $lang = JFactory::getLanguage(); $this->items = $this->get('Items'); $this->state = $this->get('State'); $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; } parent::display($tpl); $this->addToolbar(); }
function display($tpl = null) { $lang = JFactory::getLanguage(); $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->appSettings = JHotelUtil::getInstance()->getApplicationSettings(); $hotel_id = $this->get('HotelId'); $this->hotel_id = $hotel_id; $hotels = $this->get('Hotels'); $hotels = checkHotels(JFactory::getUser()->id, $hotels); $this->hotels = $hotels; parent::display($tpl); $this->addToolbar(); }
/** * Display the view */ public function display($tpl = null) { $lang = JFactory::getLanguage(); $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; } parent::display($tpl); $this->addToolbar(); }
function display($tpl = null) { if (JRequest::getString('task') == 'save' && JRequest::getString('is_save_ok') == 0) { if (JRequest::getString('offer_id') == 0) { JRequest::setVar('task', 'add'); } else { JRequest::setVar('task', 'edit'); } } if (JRequest::getString('task') != 'edit' && JRequest::getString('task') != 'add') { JToolBarHelper::title('J-Hotel Reservation : ' . JText::_('LNG_MANAGE_OFFERS', true), 'generic.png'); // JRequest::setVar( 'hidemainmenu', 1 ); $hotel_id =& $this->get('HotelId'); JHotelReservationHelper::addSubmenu('offers'); if ($hotel_id > 0) { JToolBarHelper::addNew('manageoffers.edit'); JToolBarHelper::editList('manageoffers.edit'); JToolBarHelper::deleteList('', 'manageoffers.delete', JText::_('LNG_DELETE', true)); } JToolBarHelper::custom('back', JUtil::getDashBoardIcon(), 'home', JText::_('LNG_HOTEL_DASHBOARD', true), false, false); $this->hotel_id = $hotel_id; $items =& $this->get('Datas'); // dbg($items); $this->items = $items; $hotels =& $this->get('Hotels'); $hotels = checkHotels(JFactory::getUser()->id, $hotels); $this->hotels = $hotels; } else { $item =& $this->get('Data'); $this->item = $item; $this->extraOptions = $this->get('ExtraOptions'); $hotel_id =& $this->get('HotelId'); $this->hotel_id = $hotel_id; if (JRequest::getString('is_error_save') == '1') { //exit; } JToolBarHelper::title('J-Hotel Reservation : ' . JText::_($item->offer_id > 0 ? "LNG_EDIT" : "LNG_ADD_NEW", true) . ' ' . JText::_('LNG_OFFER', true), 'generic.png'); JRequest::setVar('hidemainmenu', 1); JToolBarHelper::apply('manageoffers.apply'); JToolBarHelper::save('manageoffers.save'); JToolBarHelper::custom('manageoffers.saveAsNew', 'save.png', 'save.png', 'Duplicate', false, false); JToolBarHelper::cancel('manageoffers.cancel'); $this->includeFunctions(); } parent::display($tpl); }
/** * Display the view */ public function display($tpl = null) { $lang = JFactory::getLanguage(); $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->appSettings = JHotelUtil::getInstance()->getApplicationSettings(); $hotels = $this->get('Hotels'); $this->hotels = checkHotels(JFactory::getUser()->id, $hotels); //var_dump($this->hotels); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } parent::display($tpl); $this->addToolbar(); }
function display($tpl = null) { $hotels = $this->get('Hotels'); $this->hotel_id = JRequest::getVar('hotel_id'); if ($this->hotel_id > 0) { $this->hotelInfo = $this->get('Hotel'); } JHotelReservationHelper::addSubmenu('reviews'); $hotels = checkHotels(JFactory::getUser()->id, $hotels); $this->hotels = $hotels; $this->items = $this->get('HotelReviews'); JToolBarHelper::title('J-HotelReservation :' . JText::_('LNG_MANAGE_HOTEL_RATINGS', true), 'generic.png'); if (!JRequest::getVar('layout') == 'ratingsmenu') { JToolBarHelper::custom('managehotelratings.menuhotelratings', JHotelUtil::getDashBoardIcon(), 'home', 'Back', false, false); $this->addToolbar(); } else { JToolBarHelper::custom('managehotelratings.back', JHotelUtil::getDashBoardIcon(), 'home', 'Back', false, false); } parent::display($tpl); }
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; }
/** * Display the view */ public function display($tpl = null) { $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $layout = JRequest::getVar("layout", null); if (isset($layout)) { $tpl = $layout; } JHotelReservationHelper::addSubmenu('extraoptions'); $hotels = $this->get('Hotels'); $this->hotels = checkHotels(JFactory::getUser()->id, $hotels); $this->statuses = JHotelReservationHelper::getStatuses(); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } $this->hoteltranslationsModel = new JHotelReservationModelhoteltranslations(); $this->addToolbar(); parent::display($tpl); }
/** * Display the view */ public function display($tpl = null) { $lang = JFactory::getLanguage(); $this->rooms = $this->get('Items'); $this->state = $this->get('State'); $this->roomTypes = $this->get('RoomTypesOptions'); //set hotels $hotels = $this->get('Hotels'); $this->hotels = checkHotels(JFactory::getUser()->id, $hotels); JHotelReservationHelper::addSubmenu('reports'); if (PROFESSIONAL_VERSION == 1) { $this->types = array("simple" => "Simple Report", "advanced" => "Advanced Report"); } else { $this->types = array("simple" => "Simple Report"); } if (checkUserAccess(JFactory::getUser()->id, "special_offers_report") && PROFESSIONAL_VERSION == 1) { $this->types["offers"] = "Offers Report"; } switch ($this->state->get('filter.type')) { case "simple": $this->availabilityReport = $this->get('AvailabilityReport'); break; case "advanced": $this->availabilityReport = $this->get('DetailedAvailabilityReport'); break; case "offers": $this->offerReport = $this->get('OfferReport'); break; default: $this->availabilityReport = $this->get('AvailabilityReport'); break; } if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } parent::display($tpl); $this->addToolbar(); }
function display($tpl = null) { if (JRequest::getString('task') != 'edit' && JRequest::getString('task') != 'add') { JToolBarHelper::title('J-Hotel Reservation : ' . JText::_('LNG_MANAGE_EMAILS_TEMPLATES', true), 'generic.png'); $hotel_id = $this->get('HotelId'); JHotelReservationHelper::addSubmenu('emailtemplates'); if ($hotel_id > 0) { JToolBarHelper::addNew('manageemails.edit'); JToolBarHelper::editList('manageemails.edit'); JToolBarHelper::deleteList('', 'manageemails.delete', JText::_('LNG_DELETE', true)); } JToolBarHelper::custom('manageemailsdefault.show', JHotelUtil::getEmailDefaultIcon(), 'home', JText::_('LNG_MANAGE_EMAILS_DEFAULT'), false, false); JToolBarHelper::custom('manageemails.back', JHotelUtil::getDashBoardIcon(), 'home', JText::_('LNG_HOTEL_DASHBOARD', true), false, false); $this->hotel_id = $hotel_id; $items = $this->get('Datas'); $this->items = $items; $this->hoteltranslationsModel = new JHotelReservationModelhoteltranslations(); $hotels = $this->get('Hotels'); $hotels = checkHotels(JFactory::getUser()->id, $hotels); $this->hotels = $hotels; } else { $item = $this->get('Data'); $this->item = $item; $hotel_id = $this->get('HotelId'); $this->hotel_id = $hotel_id; $hotel = $this->get('Hotel'); $this->hotel = $hotel; $hoteltranslationsModel = new JHotelReservationModelhoteltranslations(); $this->translations = $hoteltranslationsModel->getAllTranslations(EMAIL_TEMPLATE_TRANSLATION, $this->item->email_id); JToolBarHelper::title('J-Hotel Reservation : ' . ($item->email_id > 0 ? JText::_('LNG_EDIT', true) : JText::_('LNG_ADD_NEW', true)) . ' ' . JText::_('LNG_EMAIL', true), 'generic.png'); JRequest::setVar('hidemainmenu', 1); JToolBarHelper::apply('manageemails.apply'); JToolBarHelper::save('manageemails.save'); JToolBarHelper::cancel('manageemails.cancel'); } parent::display($tpl); }
function initFilterParams() { $post = JRequest::get('post'); if (isset($post['filter_datas'])) { $post['filter_datas'] = JHotelUtil::convertToMysqlFormat($post['filter_datas']); } if (isset($post['filter_datae'])) { $post['filter_datae'] = JHotelUtil::convertToMysqlFormat($post['filter_datae']); } if (isset($post['hotel_id'])) { $this->hotel_id = $post['hotel_id']; } else { $this->hotel_id = $post['hotel_id'] = 0; } if (isset($post['filter_room_types'])) { $this->filter_room_types = $post['filter_room_types']; } else { $this->filter_room_types = $post['filter_room_types'] = 0; } if (isset($post['filter_datas'])) { $this->filter_datas = $post['filter_datas']; } else { $this->filter_datas = $post['filter_datas'] = date('Y-m-01'); } if (isset($post['filter_datae'])) { $this->filter_datae = $post['filter_datae']; } else { $this->filter_datae = $post['filter_datae'] = date('Y-m-t'); } if (isset($post['filter_report_type'])) { $this->filter_report_type = $post['filter_report_type']; } else { $this->filter_report_type = "MONTH"; } $this->filter_datas = JHotelUtil::convertToFormat($this->filter_datas); $this->filter_datae = JHotelUtil::convertToFormat($this->filter_datae); $hotels = $this->get('Hotels'); $hotels = checkHotels(JFactory::getUser()->id, $hotels); $this->hotels = $hotels; return $post; }