{"id":881,"date":"2026-02-14T14:45:33","date_gmt":"2026-02-14T13:45:33","guid":{"rendered":"https:\/\/hyggedays.fr\/?page_id=881"},"modified":"2026-02-18T20:08:13","modified_gmt":"2026-02-18T19:08:13","slug":"test-php","status":"publish","type":"page","link":"https:\/\/hyggedays.fr\/index.php\/test-php\/","title":{"rendered":"test php"},"content":{"rendered":"<p><!--?php \n\/**\n * @package     VikBooking\n * @subpackage  com_vikbooking\n * @author      Alessio Gaggii - e4j - Extensionsforjoomla.com\n * @copyright   Copyright (C) 2018 e4j - Extensionsforjoomla.com. All rights reserved.\n * @license     GNU General Public License version 2 or later; see LICENSE\n * @link        https:\/\/vikwp.com\n *\/\n\ndefined('ABSPATH') or die('No script kiddies please!');\n\n$rooms = $this-&gt;rooms;&lt;br ?--> $tsstart = $this-&gt;tsstart;<br \/>$wmonthsel = $this-&gt;wmonthsel;<br \/>$busy = $this-&gt;busy;<br \/>$vbo_tn = $this-&gt;vbo_tn;<\/p>\n<p>$showpartlyres=VikBooking::showPartlyReserved();<br \/>$vbdateformat = VikBooking::getDateFormat();<br \/>if ($vbdateformat == \"%d\/%m\/%Y\") {<br \/>$df = 'd\/m\/Y';<br \/>} elseif ($vbdateformat == \"%m\/%d\/%Y\") {<br \/>$df = 'm\/d\/Y';<br \/>} else {<br \/>$df = 'Y\/m\/d';<br \/>}<br \/>$datesep = VikBooking::getDateSeparator();<\/p>\n<p>$document = JFactory::getDocument();<br \/>\/\/load jQuery<br \/>if (VikBooking::loadJquery()) {<br \/>\/\/JHtml::fetch('jquery.framework', true, true);<br \/>JHtml::fetch('script', VBO_SITE_URI.'resources\/jquery-1.12.4.min.js');<br \/>}<\/p>\n<p>$pmonth = VikRequest::getInt('month', '', 'request');<br \/>$pshowtype = VikRequest::getInt('showtype', 2, 'request');<br \/>\/\/1 = do not show the units - 2 = show the units remaning - 3 = show the number of units booked.<br \/>$pshowtype = $pshowtype &gt;= 1 &amp;&amp; $pshowtype &lt;= 3 ? $pshowtype : 1; $pitemid = VikRequest::getString('Itemid', '', 'request'); $begin_info = getdate($tsstart); $rids_qstring = ''; foreach ($rooms as $room) { $rids_qstring .= '&amp;room_ids[]=' . $room['id']; } $inonout_allowed = true; $timeopst = VikBooking::getTimeOpenStore(); if (is_array($timeopst)) { if ($timeopst[0] &lt; $timeopst[1]) { \/\/ check-in not allowed on a day where there is already a check out (no arrivals\/depatures on the same day) $inonout_allowed = false; } } ?&gt;<\/p>\n<h3>\u00a0<\/h3>\n<div class=\"vbo-availability-controls\"><form action=\"&lt;?php echo JRoute::rewrite('index.php?option=com_vikbooking&amp;view=availability' . $rids_qstring . (!empty($pitemid) ? '&amp;Itemid='.$pitemid : '')); ?&gt;\" method=\"post\" name=\"vbmonths\"><br \/><!--?php echo $wmonthsel; ?--><br \/><!--?php \n\tforeach ($rooms as $room) {\n\t\t?--><br \/><input name=\"room_ids[]\" type=\"hidden\" value=\"&lt;?php echo $room['id']; ?&gt;\" \/><br \/><!--?php \n\t}\n\t?--><br \/><input name=\"showtype\" type=\"hidden\" value=\"&lt;?php echo $pshowtype; ?&gt;\" \/><\/form>\n<div class=\"vblegendediv\"><span class=\"vblegenda\"><span class=\"vblegenda-status vblegfree\">\u00a0<\/span> <!--?php echo JText::translate('VBLEGFREE'); ?--><\/span><br \/><!--?php \n\tif ($showpartlyres) {\n\t\t?--><br \/><span class=\"vblegenda\"><span class=\"vblegenda-status vblegwarning\">\u00a0<\/span> <!--?php echo JText::translate('VBLEGWARNING'); ?--><\/span><br \/><!--?php \n\t}\n\t?--><br \/><span class=\"vblegenda\"><span class=\"vblegenda-status vblegbusy\">\u00a0<\/span> <!--?php echo JText::translate('VBLEGBUSY'); ?--><\/span><\/div>\n<\/div>\n<p><!--?php \n$check = is_array($busy) &amp;&amp; count($busy) &gt; 0 ? true : false;&lt;br ?--> $days_labels = array(<br \/>JText::translate('VBSUN'),<br \/>JText::translate('VBMON'),<br \/>JText::translate('VBTUE'),<br \/>JText::translate('VBWED'),<br \/>JText::translate('VBTHU'),<br \/>JText::translate('VBFRI'),<br \/>JText::translate('VBSAT')<br \/>);<br \/>?&gt;<\/p>\n<div class=\"vbo-availability-wrapper\"><!--?php \nforeach ($rooms as $rk =&gt; $room) {&lt;br ?--> $nowts = $begin_info;<br \/>$carats = VikBooking::getRoomCaratOriz($room['idcarat'], $vbo_tn);<br \/>?&gt;\n<div class=\"vbo-availability-room-container\">\n<div class=\"vbo-availability-room-details\">\n<div class=\"vbo-availability-room-details-first\">\n<div class=\"vbo-availability-room-details-left\"><!--?php \n\t\t\t\tif (!empty($room['img'])) {\n\t\t\t\t\t?--><br \/><img decoding=\"async\" src=\"&lt;?php echo VBO_SITE_URI; ?&gt;resources\/uploads\/&lt;?php echo $room['img']; ?&gt;\" alt=\"&quot;&lt;?php\" name=\"\" \/>\"\/&gt;<br \/><!--?php \n\t\t\t\t}\n\t\t\t\t?--><\/div>\n<div class=\"vbo-availability-room-details-right\">\n<h4>\u00a0<\/h4>\n<div class=\"vbo-availability-room-details-descr\">\u00a0<\/div>\n<p>\u00a0<\/p>\n<div class=\"room_carats\">\u00a0<\/div>\n<p>\u00a0<\/p>\n<\/div>\n<\/div>\n<div class=\"vbo-availability-room-details-last vbselectr\">\n<div class=\"vbo-availability-room-details-last-inner\">\u00a0<\/div>\n<div id=\"vbo-av-checkin-&lt;?php echo $room['id']; ?&gt;\" class=\"vbo-availability-room-details-last-checkin\">\u00a0<\/div>\n<\/div>\n<\/div>\n<div class=\"vbo-availability-room-monthcal table-responsive\"><br \/><br \/>foreach ($busy[$room['id']] as $b) {$info_in = getdate($b['checkin']);$checkin_ts = mktime(0, 0, 0, $info_in['mon'], $info_in['mday'], $info_in['year']);$info_out = getdate($b['checkout']);$checkout_ts = mktime(0, 0, 0, $info_out['mon'], $info_out['mday'], $info_out['year']);if ($nowts[0] &gt;= $checkin_ts &amp;&amp; $nowts[0] == $checkout_ts) {$is_checkout = true;}if ($nowts[0] &gt;= $checkin_ts &amp;&amp; $nowts[0] &lt; $checkout_ts) { $totfound++; $dclass = \"vbo-occupied-cell\"; if ($nowts[0] == $checkin_ts) { $is_checkin = true; } } } } $useday = ($nowts['mday'] &lt; 10 ? \"0\".$nowts['mday'] : $nowts['mday']); $dclass .= ($totfound &lt; $room['units'] &amp;&amp; $totfound &gt; 0 ? ' vbo-partially-cell' : '');\/\/ partially reserved days can be disabled from the configuration<br \/>$dclass = !$showpartlyres &amp;&amp; $totfound &lt; $room['units'] &amp;&amp; $totfound &gt; 0 ? 'vbo-free-cell' : $dclass;<br \/>if ($is_checkout &amp;&amp; $room['units'] &lt; 2 &amp;&amp; !$inonout_allowed) { \/\/ in case check-in on check-out is disabled, add the occupied class for the check-out date $totfound = 1; $dclass = \"vbo-occupied-cell\"; } \/\/ check if the date is closed at property-level if (!$totfound &amp;&amp; VikBooking::validateClosingDates($nowts[0], ($nowts[0] + 86399))) { \/\/ this date is closed at property-level $totfound = $room['units']; $dclass = \"vbo-occupied-cell\"; } $show_day_units = $totfound; if ($pshowtype == 1) { $show_day_units = ''; } elseif ($pshowtype == 2 &amp;&amp; $totfound &gt;= 1) {<br \/>$show_day_units = ($room['units'] - $totfound);<br \/>$show_day_units = $show_day_units &lt; 0 ? 0 : $show_day_units; } elseif ($pshowtype == 3 &amp;&amp; $totfound &gt;= 1) {<br \/>$show_day_units = $totfound;<br \/>}<br \/>if (!$showpartlyres &amp;&amp; $totfound &lt; $room['units'] &amp;&amp; $totfound &gt; 0) {<br \/>$show_day_units = '';<br \/>}<br \/>if ($totfound == 1) {<br \/>$dclass .= $is_checkin === true ? ' vbo-checkinday-cell' : '';<br \/>$dclass .= $is_checkout === true ? ' vbo-checkoutday-cell' : '';<br \/>$dlnk = \"<span class=\"\\&quot;vbo-availability-day-container\\&quot;\" data-units-booked=\"\\&quot;&quot;.$totfound.&quot;\\&quot;\" data-units-left=\"\\&quot;&quot;.($room['units']\">\".$show_day_units.\"<\/span>\";<br \/>} elseif ($totfound &gt; 1) {<br \/>$dlnk = \"<span class=\"\\&quot;vbo-availability-day-container\\&quot;\" data-units-booked=\"\\&quot;&quot;.$totfound.&quot;\\&quot;\" data-units-left=\"\\&quot;&quot;.($room['units']\">\".$show_day_units.\"<\/span>\";<br \/>}<br \/>?&gt;<br \/>\n<table id=\"vbo-av-table-&lt;?php echo $room['id']; ?&gt;\" class=\"table\" data-room-table=\"&lt;?php echo $room['id']; ?&gt;\">\n<tbody>\n<tr class=\"vbo-availability-room-monthdays\">\n<td class=\"vbo-availability-month-name vbo-pref-color-text\" rowspan=\"2\">\u00a0<\/td>\n<td class=\"vbo-availability-month-day\"><!--?php echo $nowts['mday']; ?--><br \/><!--?php echo $days_labels[$nowts['wday']]; ?--><\/td>\n<!--?php \n\t\t\t\t\t$next = $nowts['mday'] + 1;\n\t\t\t\t\t$dayts = mktime(0, 0, 0, $nowts['mon'], $next, $nowts['year']);\n\t\t\t\t\t$nowts = getdate($dayts);\n\t\t\t\t}\n\t\t\t\t?--><\/tr>\n<tr class=\"vbo-availability-room-avdays\"><!--?php \n\t\t\t\t$nowts = getdate($tsstart);\n\t\t\t\t$mon = $nowts['mon'];\n\t\t\t\twhile ($nowts['mon'] == $mon) {\n\t\t\t\t\t$dclass = \"vbo-free-cell\";\n\t\t\t\t\t$is_checkin = false;\n\t\t\t\t\t$is_checkout = false;\n\t\t\t\t\t$dlnk = \"\";\n\t\t\t\t\t$totfound = 0;\n\t\t\t\t\tif (array_key_exists($room['id'], $busy) &amp;&amp; count($busy[$room['id']]) &gt; 0) {&lt;br ?-->\n<td class=\"&lt;?php echo $dclass; ?&gt;\" data-cell-date=\"&lt;?php echo date(str_replace(\">\" data-cell-ts=\"<!--?php echo $nowts[0]; ?-->\"&gt;<!--?php echo $dlnk; ?--><\/td>\n<!--?php \n\t\t\t\t\t$next = $nowts['mday'] + 1;\n\t\t\t\t\t$dayts = mktime(0, 0, 0, $nowts['mon'], $next, $nowts['year']);\n\t\t\t\t\t$nowts = getdate($dayts);\n\t\t\t\t}\n\t\t\t\t?--><\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u00a0<\/p>\n<\/div>\n<p><script type=\"text\/javascript\"><br \/>\njQuery(function() {<br \/>\n\tjQuery(\".vbo-free-cell, .vbo-partially-cell\").click(function() {<br \/>\n\t\tvar idroom = jQuery(this).closest(\"table\").attr(\"data-room-table\");<br \/>\n\t\tvar celldate = jQuery(this).attr(\"data-cell-date\");<br \/>\n\t\tvar cellts = jQuery(this).attr(\"data-cell-ts\");<br \/>\n\t\tif (idroom.length && celldate.length && cellts.length) {<br \/>\n\t\t\tjQuery(\"#vbo-av-checkin-\"+idroom).hide().find(\"span\").text(\"\");<br \/>\n\t\t\tif (jQuery(\"#vbo-av-btn-\"+idroom).length) {<br \/>\n\t\t\t\tvar btnlink = jQuery(\"#vbo-av-btn-\"+idroom).attr(\"href\");<br \/>\n\t\t\t\tif (jQuery(this).hasClass(\"vbo-cell-selected-arrival\")) {<br \/>\n\t\t\t\t\tjQuery(\"#vbo-av-table-\"+idroom).find(\"tr\").find(\"td\").removeClass(\"vbo-cell-selected-arrival\");<br \/>\n\t\t\t\t\tjQuery(\"#vbo-av-checkin-\"+idroom).fadeOut().find(\"span\").text(celldate);<br \/>\n\t\t\t\t\tbtnlink = btnlink.replace(\/(checkin=)[^\\&]+\/, '$1' + \"-1\");<br \/>\n\t\t\t\t} else {<br \/>\n\t\t\t\t\tjQuery(\"#vbo-av-table-\"+idroom).find(\"tr\").find(\"td\").removeClass(\"vbo-cell-selected-arrival\");<br \/>\n\t\t\t\t\tjQuery(this).addClass(\"vbo-cell-selected-arrival\");<br \/>\n\t\t\t\t\tjQuery(\"#vbo-av-checkin-\"+idroom).fadeIn().find(\"span\").text(celldate);<br \/>\n\t\t\t\t\tbtnlink = btnlink.replace(\/(checkin=)[^\\&]+\/, '$1' + cellts);<br \/>\n\t\t\t\t}<br \/>\n\t\t\t\tjQuery(\"#vbo-av-btn-\"+idroom).attr(\"href\", btnlink);<br \/>\n\t\t\t}<br \/>\n\t\t}<br \/>\n\t});<br \/>\n});<br \/>\n<\/script><\/p>\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n    <div class=\"wp-block-bplugins-custom-html\" id='bPluginsCustomHtml-1'>\r\n    <?php\n\/**\n * @package     VikBooking\n * @subpackage  com_vikbooking\n * @author      Alessio Gaggii - e4j - Extensionsforjoomla.com\n * @copyright   Copyright (C) 2018 e4j - Extensionsforjoomla.com. All rights reserved.\n * @license     GNU General Public License version 2 or later; see LICENSE\n * @link        https:\/\/vikwp.com\n *\/\n\ndefined('ABSPATH') or die('No script kiddies please!');\n\n$rooms = $this->rooms;\n$tsstart = $this->tsstart;\n$wmonthsel = $this->wmonthsel;\n$busy = $this->busy;\n$vbo_tn = $this->vbo_tn;\n\n$showpartlyres=VikBooking::showPartlyReserved();\n$vbdateformat = VikBooking::getDateFormat();\nif ($vbdateformat == \"%d\/%m\/%Y\") {\n\t$df = 'd\/m\/Y';\n} elseif ($vbdateformat == \"%m\/%d\/%Y\") {\n\t$df = 'm\/d\/Y';\n} else {\n\t$df = 'Y\/m\/d';\n}\n$datesep = VikBooking::getDateSeparator();\n\n$document = JFactory::getDocument();\n\/\/load jQuery\nif (VikBooking::loadJquery()) {\n\t\/\/JHtml::fetch('jquery.framework', true, true);\n\tJHtml::fetch('script', VBO_SITE_URI.'resources\/jquery-1.12.4.min.js');\n}\n\n$pmonth = VikRequest::getInt('month', '', 'request');\n$pshowtype = VikRequest::getInt('showtype', 2, 'request');\n\/\/1 = do not show the units - 2 = show the units remaning - 3 = show the number of units booked.\n$pshowtype = $pshowtype >= 1 && $pshowtype <= 3 ? $pshowtype : 1; \n$pitemid = VikRequest::getString('Itemid', '', 'request');\n\n$begin_info = getdate($tsstart);\n\n$rids_qstring = '';\nforeach ($rooms as $room) {\n\t$rids_qstring .= '&room_ids[]=' . $room['id'];\n}\n\n$inonout_allowed = true;\n$timeopst = VikBooking::getTimeOpenStore();\nif (is_array($timeopst)) {\n\tif ($timeopst[0] < $timeopst[1]) {\n\t\t\/\/ check-in not allowed on a day where there is already a check out (no arrivals\/depatures on the same day)\n\t\t$inonout_allowed = false;\n\t}\n}\n\n?>\n<h3><?php echo JText::translate('VBOAVAILABILITYCALENDAR'); ?><\/h3>\n\n<div class=\"vbo-availability-controls\">\n\t<form action=\"<?php echo JRoute::rewrite('index.php?option=com_vikbooking&view=availability' . $rids_qstring . (!empty($pitemid) ? '&Itemid='.$pitemid : '')); ?>\" method=\"post\" name=\"vbmonths\">\n\t\t<?php echo $wmonthsel; ?>\n\t<?php\n\tforeach ($rooms as $room) {\n\t\t?>\n\t\t<input type=\"hidden\" name=\"room_ids[]\" value=\"<?php echo $room['id']; ?>\" \/>\n\t\t<?php\n\t}\n\t?>\n\t\t<input type=\"hidden\" name=\"showtype\" value=\"<?php echo $pshowtype; ?>\" \/>\n\t<\/form>\n\t<div class=\"vblegendediv\">\n\t\t<span class=\"vblegenda\"><span class=\"vblegenda-status vblegfree\">&nbsp;<\/span> <span class=\"vblegenda-lbl\"> <?php echo JText::translate('VBLEGFREE'); ?><\/span><\/span>\n\t<?php\n\tif ($showpartlyres) {\n\t\t?>\n\t\t<span class=\"vblegenda\"><span class=\"vblegenda-status vblegwarning\">&nbsp;<\/span> <span class=\"vblegenda-lbl\"> <?php echo JText::translate('VBLEGWARNING'); ?><\/span><\/span>\n\t\t<?php\n\t}\n\t?>\n\t\t<span class=\"vblegenda\"><span class=\"vblegenda-status vblegbusy\">&nbsp;<\/span> <span class=\"vblegenda-lbl\"> <?php echo JText::translate('VBLEGBUSY'); ?><\/span><\/span>\n\t<\/div>\n<\/div>\n\t\n<?php\n$check = is_array($busy) && count($busy) > 0 ? true : false;\n$days_labels = array(\n\tJText::translate('VBSUN'),\n\tJText::translate('VBMON'),\n\tJText::translate('VBTUE'),\n\tJText::translate('VBWED'),\n\tJText::translate('VBTHU'),\n\tJText::translate('VBFRI'),\n\tJText::translate('VBSAT')\n);\n?>\n<div class=\"vbo-availability-wrapper\">\n<?php\nforeach ($rooms as $rk => $room) {\n\t$nowts = $begin_info;\n\t$carats = VikBooking::getRoomCaratOriz($room['idcarat'], $vbo_tn);\n\t?>\n\t<div class=\"vbo-availability-room-container\">\n\t\t<div class=\"vbo-availability-room-details\">\n\t\t\t<div class=\"vbo-availability-room-details-first\">\n\t\t\t\t<div class=\"vbo-availability-room-details-left\">\n\t\t\t\t<?php\n\t\t\t\tif (!empty($room['img'])) {\n\t\t\t\t\t?>\n\t\t\t\t\t<img decoding=\"async\" src=\"<?php echo VBO_SITE_URI; ?>resources\/uploads\/<?php echo $room['img']; ?>\" alt=\"<?php echo htmlspecialchars($room['name']); ?>\"\/>\n\t\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"vbo-availability-room-details-right\">\n\t\t\t\t\t<h4><?php echo $room['name']; ?><\/h4>\n\t\t\t\t\t<div class=\"vbo-availability-room-details-descr\">\n\t\t\t\t\t\t<?php echo $room['smalldesc']; ?>\n\t\t\t\t\t<\/div>\n\t\t\t\t<?php\n\t\t\t\tif (!empty($carats)) {\n\t\t\t\t\t?>\n\t\t\t\t\t<div class=\"room_carats\">\n\t\t\t\t\t\t<?php echo $carats; ?>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t\t<div class=\"vbo-availability-room-details-last vbselectr\">\n\t\t\t\t<div class=\"vbo-availability-room-details-last-inner\">\n\t\t\t\t\t<a class=\"btn vbo-pref-color-btn\" id=\"vbo-av-btn-<?php echo $room['id']; ?>\" href=\"<?php echo JRoute::rewrite('index.php?option=com_vikbooking&view=roomdetails&roomid='.$room['id'].'&checkin=-1'.(!empty($pitemid) ? '&Itemid='.$pitemid : '')); ?>\"><?php echo JText::translate('VBAVAILBOOKNOW'); ?><\/a>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"vbo-availability-room-details-last-checkin\" id=\"vbo-av-checkin-<?php echo $room['id']; ?>\"><?php VikBookingIcons::e('sign-in', 'vbo-pref-color-element'); ?> <span><\/span><\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<div class=\"vbo-availability-room-monthcal table-responsive\">\n\t\t\t<table class=\"table\" id=\"vbo-av-table-<?php echo $room['id']; ?>\" data-room-table=\"<?php echo $room['id']; ?>\">\n\t\t\t\t<tr class=\"vbo-availability-room-monthdays\">\n\t\t\t\t\t<td class=\"vbo-availability-month-name vbo-pref-color-text\" rowspan=\"2\"><?php echo VikBooking::sayMonth($nowts['mon']).\" \".$nowts['year']; ?><\/td>\n\t\t\t\t<?php\n\t\t\t\t$mon = $nowts['mon'];\n\t\t\t\twhile ($nowts['mon'] == $mon) {\n\t\t\t\t\t?>\n\t\t\t\t\t<td class=\"vbo-availability-month-day\">\n\t\t\t\t\t\t<span class=\"vbo-availability-daynumber\"><?php echo $nowts['mday']; ?><\/span>\n\t\t\t\t\t\t<span class=\"vbo-availability-weekday\"><?php echo $days_labels[$nowts['wday']]; ?><\/span>\n\t\t\t\t\t<\/td>\n\t\t\t\t\t<?php\n\t\t\t\t\t$next = $nowts['mday'] + 1;\n\t\t\t\t\t$dayts = mktime(0, 0, 0, $nowts['mon'], $next, $nowts['year']);\n\t\t\t\t\t$nowts = getdate($dayts);\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t\t<\/tr>\n\t\t\t\t<tr class=\"vbo-availability-room-avdays\">\n\t\t\t\t<?php\n\t\t\t\t$nowts = getdate($tsstart);\n\t\t\t\t$mon = $nowts['mon'];\n\t\t\t\twhile ($nowts['mon'] == $mon) {\n\t\t\t\t\t$dclass = \"vbo-free-cell\";\n\t\t\t\t\t$is_checkin = false;\n\t\t\t\t\t$is_checkout = false;\n\t\t\t\t\t$dlnk = \"\";\n\t\t\t\t\t$totfound = 0;\n\t\t\t\t\tif (array_key_exists($room['id'], $busy) && count($busy[$room['id']]) > 0) {\n\t\t\t\t\t\tforeach ($busy[$room['id']] as $b) {\n\t\t\t\t\t\t\t$info_in = getdate($b['checkin']);\n\t\t\t\t\t\t\t$checkin_ts = mktime(0, 0, 0, $info_in['mon'], $info_in['mday'], $info_in['year']);\n\t\t\t\t\t\t\t$info_out = getdate($b['checkout']);\n\t\t\t\t\t\t\t$checkout_ts = mktime(0, 0, 0, $info_out['mon'], $info_out['mday'], $info_out['year']);\n\t\t\t\t\t\t\tif ($nowts[0] >= $checkin_ts && $nowts[0] == $checkout_ts) {\n\t\t\t\t\t\t\t\t$is_checkout = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ($nowts[0] >= $checkin_ts && $nowts[0] < $checkout_ts) {\n\t\t\t\t\t\t\t\t$totfound++;\n\t\t\t\t\t\t\t\t$dclass = \"vbo-occupied-cell\";\n\t\t\t\t\t\t\t\tif ($nowts[0] == $checkin_ts) {\n\t\t\t\t\t\t\t\t\t$is_checkin = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$useday = ($nowts['mday'] < 10 ? \"0\".$nowts['mday'] : $nowts['mday']);\n\t\t\t\t\t$dclass .= ($totfound < $room['units'] && $totfound > 0 ? ' vbo-partially-cell' : '');\n\n\t\t\t\t\t\/\/ partially reserved days can be disabled from the configuration\n\t\t\t\t\t$dclass = !$showpartlyres && $totfound < $room['units'] && $totfound > 0 ? 'vbo-free-cell' : $dclass;\n\t\t\t\t\tif ($is_checkout && $room['units'] < 2 && !$inonout_allowed) {\n\t\t\t\t\t\t\/\/ in case check-in on check-out is disabled, add the occupied class for the check-out date\n\t\t\t\t\t\t$totfound = 1;\n\t\t\t\t\t\t$dclass = \"vbo-occupied-cell\";\n\t\t\t\t\t}\n\n\t\t\t\t\t\/\/ check if the date is closed at property-level\n\t\t\t\t\tif (!$totfound && VikBooking::validateClosingDates($nowts[0], ($nowts[0] + 86399))) {\n\t\t\t\t\t\t\/\/ this date is closed at property-level\n\t\t\t\t\t\t$totfound = $room['units'];\n\t\t\t\t\t\t$dclass = \"vbo-occupied-cell\";\n\t\t\t\t\t}\n\n\t\t\t\t\t$show_day_units = $totfound;\n\t\t\t\t\tif ($pshowtype == 1) {\n\t\t\t\t\t\t$show_day_units = '';\n\t\t\t\t\t} elseif ($pshowtype == 2 && $totfound >= 1) {\n\t\t\t\t\t\t$show_day_units = ($room['units'] - $totfound);\n\t\t\t\t\t\t$show_day_units = $show_day_units < 0 ? 0 : $show_day_units;\n\t\t\t\t\t} elseif ($pshowtype == 3 && $totfound >= 1) {\n\t\t\t\t\t\t$show_day_units = $totfound;\n\t\t\t\t\t}\n\t\t\t\t\tif (!$showpartlyres && $totfound < $room['units'] && $totfound > 0) {\n\t\t\t\t\t\t$show_day_units = '';\n\t\t\t\t\t}\n\t\t\t\t\tif ($totfound == 1) {\n\t\t\t\t\t\t$dclass .= $is_checkin === true ? ' vbo-checkinday-cell' : '';\n\t\t\t\t\t\t$dclass .= $is_checkout === true ? ' vbo-checkoutday-cell' : '';\n\t\t\t\t\t\t$dlnk = \"<span class=\\\"vbo-availability-day-container\\\" data-units-booked=\\\"\".$totfound.\"\\\" data-units-left=\\\"\".($room['units'] - $totfound).\"\\\">\".$show_day_units.\"<\/span>\";\n\t\t\t\t\t} elseif ($totfound > 1) {\n\t\t\t\t\t\t$dlnk = \"<span class=\\\"vbo-availability-day-container\\\" data-units-booked=\\\"\".$totfound.\"\\\" data-units-left=\\\"\".($room['units'] - $totfound).\"\\\">\".$show_day_units.\"<\/span>\";\n\t\t\t\t\t}\n\t\t\t\t\t?>\n\t\t\t\t\t<td class=\"<?php echo $dclass; ?>\" data-cell-date=\"<?php echo date(str_replace(\"\/\", $datesep, $df), $nowts[0]); ?>\" data-cell-ts=\"<?php echo $nowts[0]; ?>\"><?php echo $dlnk; ?><\/td>\n\t\t\t\t\t<?php\n\t\t\t\t\t$next = $nowts['mday'] + 1;\n\t\t\t\t\t$dayts = mktime(0, 0, 0, $nowts['mon'], $next, $nowts['year']);\n\t\t\t\t\t$nowts = getdate($dayts);\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t\t<\/tr>\n\t\t\t<\/table>\n\t\t<\/div>\n\t<\/div>\n\t<?php\n}\n?>\n<\/div>\n\n<script type=\"text\/javascript\">\njQuery(function() {\n\tjQuery(\".vbo-free-cell, .vbo-partially-cell\").click(function() {\n\t\tvar idroom = jQuery(this).closest(\"table\").attr(\"data-room-table\");\n\t\tvar celldate = jQuery(this).attr(\"data-cell-date\");\n\t\tvar cellts = jQuery(this).attr(\"data-cell-ts\");\n\t\tif (idroom.length && celldate.length && cellts.length) {\n\t\t\tjQuery(\"#vbo-av-checkin-\"+idroom).hide().find(\"span\").text(\"\");\n\t\t\tif (jQuery(\"#vbo-av-btn-\"+idroom).length) {\n\t\t\t\tvar btnlink = jQuery(\"#vbo-av-btn-\"+idroom).attr(\"href\");\n\t\t\t\tif (jQuery(this).hasClass(\"vbo-cell-selected-arrival\")) {\n\t\t\t\t\tjQuery(\"#vbo-av-table-\"+idroom).find(\"tr\").find(\"td\").removeClass(\"vbo-cell-selected-arrival\");\n\t\t\t\t\tjQuery(\"#vbo-av-checkin-\"+idroom).fadeOut().find(\"span\").text(celldate);\n\t\t\t\t\tbtnlink = btnlink.replace(\/(checkin=)[^\\&]+\/, '$1' + \"-1\");\n\t\t\t\t} else {\n\t\t\t\t\tjQuery(\"#vbo-av-table-\"+idroom).find(\"tr\").find(\"td\").removeClass(\"vbo-cell-selected-arrival\");\n\t\t\t\t\tjQuery(this).addClass(\"vbo-cell-selected-arrival\");\n\t\t\t\t\tjQuery(\"#vbo-av-checkin-\"+idroom).fadeIn().find(\"span\").text(celldate);\n\t\t\t\t\tbtnlink = btnlink.replace(\/(checkin=)[^\\&]+\/, '$1' + cellts);\n\t\t\t\t}\n\t\t\t\tjQuery(\"#vbo-av-btn-\"+idroom).attr(\"href\", btnlink);\n\t\t\t}\n\t\t}\n\t});\n});\n<\/script>\n    <\/div>\r\n    ","protected":false},"excerpt":{"rendered":"<p>$tsstart = $this-&gt;tsstart;$wmonthsel = $this-&gt;wmonthsel;$busy = $this-&gt;busy;$vbo_tn = $this-&gt;vbo_tn; $showpartlyres=VikBooking::showPartlyReserved();$vbdateformat = VikBooking::getDateFormat();if ($vbdateformat == \"%d\/%m\/%Y\") {$df = 'd\/m\/Y';} elseif ($vbdateformat == \"%m\/%d\/%Y\") {$df = 'm\/d\/Y';} else {$df = 'Y\/m\/d';}$datesep = VikBooking::getDateSeparator(); $document = JFactory::getDocument();\/\/load jQueryif (VikBooking::loadJquery()) {\/\/JHtml::fetch('jquery.framework', true, true);JHtml::fetch('script', VBO_SITE_URI.'resources\/jquery-1.12.4.min.js');} $pmonth = VikRequest::getInt('month', '', 'request');$pshowtype = VikRequest::getInt('showtype', 2, 'request');\/\/1 = do not show the units [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"class_list":["post-881","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>test php - Hyggedays<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/hyggedays.fr\/index.php\/test-php\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"test php - Hyggedays\" \/>\n<meta property=\"og:description\" content=\"$tsstart = $this-&gt;tsstart;$wmonthsel = $this-&gt;wmonthsel;$busy = $this-&gt;busy;$vbo_tn = $this-&gt;vbo_tn; $showpartlyres=VikBooking::showPartlyReserved();$vbdateformat = VikBooking::getDateFormat();if ($vbdateformat == &quot;%d\/%m\/%Y&quot;) {$df = &#039;d\/m\/Y&#039;;} elseif ($vbdateformat == &quot;%m\/%d\/%Y&quot;) {$df = &#039;m\/d\/Y&#039;;} else {$df = &#039;Y\/m\/d&#039;;}$datesep = VikBooking::getDateSeparator(); $document = JFactory::getDocument();\/\/load jQueryif (VikBooking::loadJquery()) {\/\/JHtml::fetch(&#039;jquery.framework&#039;, true, true);JHtml::fetch(&#039;script&#039;, VBO_SITE_URI.&#039;resources\/jquery-1.12.4.min.js&#039;);} $pmonth = VikRequest::getInt(&#039;month&#039;, &#039;&#039;, &#039;request&#039;);$pshowtype = VikRequest::getInt(&#039;showtype&#039;, 2, &#039;request&#039;);\/\/1 = do not show the units [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/hyggedays.fr\/index.php\/test-php\/\" \/>\n<meta property=\"og:site_name\" content=\"Hyggedays\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-18T19:08:13+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/hyggedays.fr\\\/index.php\\\/test-php\\\/\",\"url\":\"https:\\\/\\\/hyggedays.fr\\\/index.php\\\/test-php\\\/\",\"name\":\"test php - Hyggedays\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/hyggedays.fr\\\/#website\"},\"datePublished\":\"2026-02-14T13:45:33+00:00\",\"dateModified\":\"2026-02-18T19:08:13+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/hyggedays.fr\\\/index.php\\\/test-php\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/hyggedays.fr\\\/index.php\\\/test-php\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/hyggedays.fr\\\/index.php\\\/test-php\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/hyggedays.fr\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"test php\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/hyggedays.fr\\\/#website\",\"url\":\"https:\\\/\\\/hyggedays.fr\\\/\",\"name\":\"Hyggedays\",\"description\":\"Explore the globe with travel &amp; tourism\",\"publisher\":{\"@id\":\"https:\\\/\\\/hyggedays.fr\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/hyggedays.fr\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/hyggedays.fr\\\/#organization\",\"name\":\"Hyggedays\",\"url\":\"https:\\\/\\\/hyggedays.fr\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/hyggedays.fr\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/hyggedays.fr\\\/wp-content\\\/uploads\\\/2023\\\/06\\\/logokira.jpg\",\"contentUrl\":\"https:\\\/\\\/hyggedays.fr\\\/wp-content\\\/uploads\\\/2023\\\/06\\\/logokira.jpg\",\"width\":316,\"height\":164,\"caption\":\"Hyggedays\"},\"image\":{\"@id\":\"https:\\\/\\\/hyggedays.fr\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"test php - Hyggedays","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/hyggedays.fr\/index.php\/test-php\/","og_locale":"en_US","og_type":"article","og_title":"test php - Hyggedays","og_description":"$tsstart = $this-&gt;tsstart;$wmonthsel = $this-&gt;wmonthsel;$busy = $this-&gt;busy;$vbo_tn = $this-&gt;vbo_tn; $showpartlyres=VikBooking::showPartlyReserved();$vbdateformat = VikBooking::getDateFormat();if ($vbdateformat == \"%d\/%m\/%Y\") {$df = 'd\/m\/Y';} elseif ($vbdateformat == \"%m\/%d\/%Y\") {$df = 'm\/d\/Y';} else {$df = 'Y\/m\/d';}$datesep = VikBooking::getDateSeparator(); $document = JFactory::getDocument();\/\/load jQueryif (VikBooking::loadJquery()) {\/\/JHtml::fetch('jquery.framework', true, true);JHtml::fetch('script', VBO_SITE_URI.'resources\/jquery-1.12.4.min.js');} $pmonth = VikRequest::getInt('month', '', 'request');$pshowtype = VikRequest::getInt('showtype', 2, 'request');\/\/1 = do not show the units [&hellip;]","og_url":"https:\/\/hyggedays.fr\/index.php\/test-php\/","og_site_name":"Hyggedays","article_modified_time":"2026-02-18T19:08:13+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/hyggedays.fr\/index.php\/test-php\/","url":"https:\/\/hyggedays.fr\/index.php\/test-php\/","name":"test php - Hyggedays","isPartOf":{"@id":"https:\/\/hyggedays.fr\/#website"},"datePublished":"2026-02-14T13:45:33+00:00","dateModified":"2026-02-18T19:08:13+00:00","breadcrumb":{"@id":"https:\/\/hyggedays.fr\/index.php\/test-php\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/hyggedays.fr\/index.php\/test-php\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/hyggedays.fr\/index.php\/test-php\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/hyggedays.fr\/"},{"@type":"ListItem","position":2,"name":"test php"}]},{"@type":"WebSite","@id":"https:\/\/hyggedays.fr\/#website","url":"https:\/\/hyggedays.fr\/","name":"Hyggedays","description":"Explore the globe with travel &amp; tourism","publisher":{"@id":"https:\/\/hyggedays.fr\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/hyggedays.fr\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/hyggedays.fr\/#organization","name":"Hyggedays","url":"https:\/\/hyggedays.fr\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/hyggedays.fr\/#\/schema\/logo\/image\/","url":"https:\/\/hyggedays.fr\/wp-content\/uploads\/2023\/06\/logokira.jpg","contentUrl":"https:\/\/hyggedays.fr\/wp-content\/uploads\/2023\/06\/logokira.jpg","width":316,"height":164,"caption":"Hyggedays"},"image":{"@id":"https:\/\/hyggedays.fr\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/hyggedays.fr\/index.php\/wp-json\/wp\/v2\/pages\/881","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hyggedays.fr\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/hyggedays.fr\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/hyggedays.fr\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/hyggedays.fr\/index.php\/wp-json\/wp\/v2\/comments?post=881"}],"version-history":[{"count":6,"href":"https:\/\/hyggedays.fr\/index.php\/wp-json\/wp\/v2\/pages\/881\/revisions"}],"predecessor-version":[{"id":889,"href":"https:\/\/hyggedays.fr\/index.php\/wp-json\/wp\/v2\/pages\/881\/revisions\/889"}],"wp:attachment":[{"href":"https:\/\/hyggedays.fr\/index.php\/wp-json\/wp\/v2\/media?parent=881"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}