room; $allc = $this->allc; $payments = $this->payments; $busy = $this->busy; $vmode = $this->vmode; $dbo = JFactory::getDbo(); $vbo_app = VikBooking::getVboApplication(); $vbo_app->loadSelect2(); $vbo_app->loadDatePicker(); $vbo_app->loadDatesRangePicker(); $document = JFactory::getDocument(); $document->addStyleSheet(VBO_ADMIN_URI.'resources/jquery.highlighttextarea.min.css'); JHtml::fetch('script', VBO_ADMIN_URI.'resources/jquery.highlighttextarea.min.js'); // JS lang def JText::script('VBFILLCUSTFIELDS'); JText::script('VBMSGTHREE'); JText::script('VBMSGFOUR'); JText::script('VBDBTEXTROOMCLOSED'); JText::script('ORDER_NOTES'); JText::script('VBSUBMCLOSEROOM'); JText::script('VBCUSTINFO'); JText::script('VBMAKERESERV'); JText::script('VBDAY'); JText::script('VBOCALCLOSEOTHERROOMS'); JText::script('VBERRCUSTOMEREMAILEXISTS'); JText::script('VBAPPLY'); JText::script('VBANNULLA'); JText::script('VBO_MARK_UNITS_CLOSED'); $vbo_df = VikBooking::getDateFormat(true); if ($vbo_df == "%d/%m/%Y") { $df = 'd/m/Y'; $juidf = 'dd/mm/yy'; } elseif ($vbo_df == "%m/%d/%Y") { $df = 'm/d/Y'; $juidf = 'mm/dd/yy'; } else { $df = 'Y/m/d'; $juidf = 'yy/mm/dd'; } $datesep = VikBooking::getDateSeparator(true); $prices_vat_included = (int)VikBooking::ivaInclusa(); $pcheckin = VikRequest::getString('checkin', '', 'request'); $pcheckin_ymd = $pcheckin; if (!empty($pcheckin)) { $pcheckin = date(str_replace('%', '', $vbo_df), strtotime($pcheckin)); } $pcheckout = VikRequest::getString('checkout', '', 'request'); $pcheckout_ymd = $pcheckout; if (!empty($pcheckout)) { $pcheckout = date(str_replace('%', '', $vbo_df), strtotime($pcheckout)); } $ptmpl = VikRequest::getString('tmpl', '', 'request'); $poverview = VikRequest::getInt('overv', '', 'request'); $poverview_change = VikRequest::getInt('overview_change', 0, 'request'); $padults = VikRequest::getInt('adults', 0, 'request'); $pchildren = VikRequest::getInt('children', 0, 'request'); $pidprice = VikRequest::getInt('idprice', 0, 'request'); $pbooknow = VikRequest::getInt('booknow', 0, 'request'); /** * Split stay data for booking. * * @since 1.16.0 (J) - 1.6.0 (WP) */ $split_stay = VikRequest::getVar('split_stay', array()); $rooms_data = []; foreach ($allc as $room_info) { $rooms_data[$room_info['id']] = $room_info['name']; } if ($this->new_res_id) { ?>

   

0 && $ptmpl == 'component') { $poverview_change = 1; } } $timeopst = VikBooking::getTimeOpenStore(); if (is_array($timeopst)) { $opent = VikBooking::getHoursMinutes($timeopst[0]); $closet = VikBooking::getHoursMinutes($timeopst[1]); $hcheckin = $opent[0]; $mcheckin = $opent[1]; $hcheckout = $closet[0]; $mcheckout = $closet[1]; } else { $hcheckin = 0; $mcheckin = 0; $hcheckout = 0; $mcheckout = 0; } /** * Check if we have a listing-level check-in/check-out time to apply. * * @since 1.18.8 (J) - 1.8.8 (WP) */ $customCheckin = VikBooking::getRoomParam('checkin', $room['params'] ?? ''); $customCheckout = VikBooking::getRoomParam('checkout', $room['params'] ?? ''); if ($customCheckin) { // use proper check-in time at room-level $parts = explode(':', $customCheckin); $hcheckin = (int) $parts[0]; $mcheckin = (int) ($parts[1] ?? 0); } if ($customCheckout) { // use proper check-out time at room-level $parts = explode(':', $customCheckout); $hcheckout = (int) $parts[0]; $mcheckout = (int) ($parts[1] ?? 0); } $formatparts = explode(':', VikBooking::getNumberFormatData()); $currencysymb = VikBooking::getCurrencySymb(); $globnumadults = VikBooking::getSearchNumAdults(true); $adultsparts = explode('-', $globnumadults); $seladults = "\n"; $globnumchildren = VikBooking::getSearchNumChildren(true); $childrenparts = explode('-', $globnumchildren); $selchildren = "\n"; $selpayments = ''; // custom fields $all_countries = array(); $q = "SELECT * FROM `#__vikbooking_custfields` ORDER BY `#__vikbooking_custfields`.`ordering` ASC;"; $dbo->setQuery($q); $all_cfields = $dbo->loadAssocList(); if ($all_cfields) { $q = "SELECT * FROM `#__vikbooking_countries` ORDER BY `#__vikbooking_countries`.`country_name` ASC;"; $dbo->setQuery($q); $all_countries = $dbo->loadAssocList(); } $wiva = ""; $q = "SELECT * FROM `#__vikbooking_iva`;"; $dbo->setQuery($q); $ivas = $dbo->loadAssocList(); if ($ivas) { foreach ($ivas as $kiv => $iv) { $wiva .= "\n"; } } // close other rooms select $closeotherrooms = ''; if (count($allc) > 1) { $closeotherrooms = "\n"; } ?>
\n"; } ?>
printYesNoButtons('setclosed', JText::translate('VBYES'), JText::translate('VBNO'), 0, 1, 0, 'vbCloseRoom();'); ?>
1 && empty($split_stay)) { $num_rooms_vals = range(1, $room['units']); $num_rooms_opts = ''; foreach ($num_rooms_vals as $nrv) { $num_rooms_opts .= ''."\n"; } ?>
$sps_v) { ?>
' . JText::translate('VBO_SPLIT_STAY') : ' '; ?>
1 ? JText::translate('VBDAYS') : JText::translate('VBDAY'); ?>
0 ? ' style="display: none;"' : ''); ?> id="vbo-row-bstat">
 
 
0) { ?> $sps_room) { foreach ($sps_room as $sps_room_k => $sps_room_v) { ?>
Room Image

'com_vikbooking', 'task' => 'calendar', 'cid' => [ $room['id'] ], 'split_stay' => $split_stay, ]; if (!empty($pcheckin_ymd) && !empty($pcheckout_ymd)) { $base_uri_data['checkin'] = $pcheckin_ymd; $base_uri_data['checkout'] = $pcheckout_ymd; } if ($padults > 0) { $base_uri_data['adults'] = $padults; $base_uri_data['children'] = $pchildren; } if (!empty($pidprice)) { $base_uri_data['idprice'] = $pidprice; } if (!empty($pbooknow)) { $base_uri_data['booknow'] = $pbooknow; } if ($ptmpl == 'component') { $base_uri_data['tmpl'] = 'component'; } ?>
'; $cal = ""; ?> '.$days_labels[$d_ind].''; } ?>  "; } while ($newarr['mon'] == $mon) { if ($d_count > 6) { $d_count = 0; $cal .= "\n"; } $dclass = "free"; $dalt = ""; $bid = ""; $totfound = 0; if ($check) { foreach ($busy as $b) { $tmpone = getdate($b['checkin']); $ritts = mktime(0, 0, 0, $tmpone['mon'], $tmpone['mday'], $tmpone['year']); $tmptwo = getdate($b['checkout']); $conts = mktime(0, 0, 0, $tmptwo['mon'], $tmptwo['mday'], $tmptwo['year']); if ($newarr[0] >= $ritts && $newarr[0] < $conts) { $dclass = "busy"; $bid = $b['idorder']; if ((int)$b['closure']) { $dclass .= " busy-closure"; $dalt = JText::translate('VBDBTEXTROOMCLOSED'); } elseif ($newarr[0] == $ritts) { $dalt = JText::translate('VBPICKUPAT')." ".date('H:i', $b['checkin']); } elseif ($newarr[0] == $conts) { $dalt = JText::translate('VBRELEASEAT')." ".date('H:i', $b['checkout']); } $totfound++; } } } $useday = ($newarr['mday'] < 10 ? "0".$newarr['mday'] : $newarr['mday']); if ($totfound > 0 && $totfound < $room['units']) { $dclass .= " vbo-partially"; } if ($totfound == 1) { $dlnk = "".$useday.""; $cal .= "\n"; } elseif ($totfound > 1) { $dlnk = "".$useday.""; $cal .= "\n"; } else { $dlnk = $useday; $cal .= "\n"; } $next = $newarr['mday'] + 1; $dayts = mktime(0, 0, 0, $newarr['mon'], $next, $newarr['year']); $newarr = getdate($dayts); $d_count++; } for ($i = $d_count; $i <= 6; $i++) { $cal .= ""; } echo $cal; ?>
".$dlnk."".$dlnk."".$dlnk." 
"; if ($mon == 12) { $mon = 1; $year += 1; $dayts = mktime(0, 0, 0, $mon, 01, $year); } else { $mon += 1; $dayts = mktime(0, 0, 0, $mon, 01, $year); } $newarr = getdate($dayts); } ?>