<?php /** * @package CHClient * @copyright Copyright (C) CloudHotelier. All rights reserved. * @license GNU GPLv2 <http://www.gnu.org/licenses/gpl.html> * @author Xavier Pallicer <*****@*****.**> */ defined('_JEXEC') or die; // get data $config = CHClient::getConfig(); $search = CHClient::getSearch(); $rooms_number = count($search->party); $default_room = (object) ['adults' => 2]; $people = CHClient::partyPeople($search->party); // rooms list $list_rooms = []; for ($i = 1; $i <= $config->search_rooms; $i++) { $list_rooms[$i] = CHClient::numstring($i, 'rooms'); } // adults list $list_adults = []; for ($i = 1; $i <= $config->search_adults; $i++) { $list_adults[$i] = CHClient::numstring($i, 'guests_adult'); } // children list $list_children = []; for ($i = 0; $i <= $config->search_children; $i++) { $list_children[$i] = CHClient::numstring($i, 'guests_child_baby'); } // children ages list