rows; $allrooms = $this->allrooms; $lim0 = $this->lim0; $navbut = $this->navbut; $orderby = $this->orderby; $ordersort = $this->ordersort; // list of IDs for which VCM should monitor the guest messages in the chat $vcm_bids = array(); $dbo = JFactory::getDbo(); $app = JFactory::getApplication(); $vbo_app = VikBooking::getVboApplication(); $vbo_app->loadDatePicker(); $vbo_app->loadContextMenuAssets(); // JS lang def JText::script('VBOGENINVOICES'); JText::script('VBCONFIRMGENINV'); JText::script('VBADMINNOTESTOGGLE'); JText::script('VBDASHUPRESONE'); JText::script('VBOCHANNEL'); JText::script('VBCOUPON'); JText::script('VBCUSTOMERNOMINATIVE'); $nowdf = VikBooking::getDateFormat(true); if ($nowdf == "%d/%m/%Y") { $df = 'd/m/Y'; } elseif ($nowdf == "%m/%d/%Y") { $df = 'm/d/Y'; } else { $df = 'Y/m/d'; } $datesep = VikBooking::getDateSeparator(true); $juidf = $nowdf == "%d/%m/%Y" ? 'dd/mm/yy' : ($nowdf == "%m/%d/%Y" ? 'mm/dd/yy' : 'yy/mm/dd'); $cid = VikRequest::getVar('cid', array()); $pcust_id = $app->getUserStateFromRequest("vbo.orders.cust_id", 'cust_id', 0, 'int'); $pconfirmnumber = VikRequest::getString('confirmnumber', '', 'request'); // color tags $colortags = VikBooking::loadBookingsColorTags(); $bctags_tip = ''; if (count($colortags) > 0) { $bctags_tip = '
'; foreach ($colortags as $ctagk => $ctagv) { $bctags_tip .= '
'; } $bctags_tip .= '
'; } if (empty($rows)) { $rows = array(); ?>

$spn) { $tpp_key = $spkey; break; } ?>

setQuery($q); $ord_channels = $dbo->loadAssocList(); if ($ord_channels) { foreach ($ord_channels as $o_channel) { $channel_parts = explode('_', $o_channel['channel']); $channel_name = count($channel_parts) > 1 ? trim($channel_parts[1]) : trim($channel_parts[0]); if (in_array($channel_name, $all_channels)) { continue; } $all_channels[] = $channel_name; } } // prepare modal echo $vbo_app->getJmodalScript(); echo $vbo_app->getJmodalHtml('vbo-export-csv', JText::translate('VBCSVEXPORT'), '', 'width: 80%; height: 60%; margin-left: -40%; top: 20% !important;'); echo $vbo_app->getJmodalHtml('vbo-export-ics', JText::translate('VBICSEXPORT'), '', 'width: 80%; height: 60%; margin-left: -40%; top: 20% !important;'); $filters_set = false; ?>
1 ? JText::translate('VBMAILADULTS') : JText::translate('VBMAILADULT')); if ($totchildren > 0) { $guest_nums[] = $totchildren . " " . ($totchildren > 1 ? JText::translate('VBMAILCHILDREN') : JText::translate('VBMAILCHILD')); } if ($totpets > 0) { $guest_nums[] = $totpets . " " . ($totpets > 1 ? JText::translate('VBO_PETS') : JText::translate('VBO_PET')); } $peoplestr = implode(', ', $guest_nums); } $isdue = $row['total']; $otachannel = ''; $otacurrency = ''; if (!empty($row['channel'])) { $channelparts = explode('_', $row['channel']); $otachannel = array_key_exists(1, $channelparts) && strlen($channelparts[1]) > 0 ? $channelparts[1] : ucwords($channelparts[0]); $otachannelclass = $otachannel; if (strstr($otachannelclass, '.') !== false) { $otaccparts = explode('.', $otachannelclass); $otachannelclass = $otaccparts[0]; } $otacurrency = strlen((string)$row['chcurrency']) ? $row['chcurrency'] : ''; } //Customer Details $custdata = $row['custdata']; $custdata_parts = explode("\n", $row['custdata']); if (count($custdata_parts) > 2 && strpos($custdata_parts[0], ':') !== false && strpos($custdata_parts[1], ':') !== false) { //get the first two fields $custvalues = array(); foreach ($custdata_parts as $custdet) { if (strlen($custdet) < 1) { continue; } $custdet_parts = explode(':', $custdet); if (count($custdet_parts) >= 2) { unset($custdet_parts[0]); array_push($custvalues, trim(implode(':', $custdet_parts))); } if (count($custvalues) > 1) { break; } } if (count($custvalues) > 1) { $custdata = implode(' ', $custvalues); } } if (strlen($custdata) > 45) { if (function_exists('mb_substr')) { $custdata = mb_substr($custdata, 0, 45, 'UTF-8') . " ..."; } else { $custdata = substr($custdata, 0, 45) . " ..."; } } // customer profile picture $customer_avatar = null; $q = "SELECT `c`.*,`co`.`idorder` FROM `#__vikbooking_customers` AS `c` LEFT JOIN `#__vikbooking_customers_orders` `co` ON `c`.`id`=`co`.`idcustomer` WHERE `co`.`idorder`=".$row['id']; $dbo->setQuery($q, 0, 1); $cust_country = $dbo->loadAssoc(); if ($cust_country) { if (!empty($cust_country['first_name'])) { $custdata = $cust_country['first_name'].' '.$cust_country['last_name']; if (!empty($cust_country['country'])) { if (file_exists(VBO_ADMIN_PATH.DS.'resources'.DS.'countries'.DS.$cust_country['country'].'.png')) { $custdata .= ''; } } } if (!empty($cust_country['pic'])) { $customer_avatar = $cust_country['pic']; } } $custdata = $row['closure'] > 0 || JText::translate('VBDBTEXTROOMCLOSED') == $row['custdata'] ? ' '.JText::translate('VBDBTEXTROOMCLOSED').'' : $custdata; if ($row['status'] == "confirmed") { $saystaus = '' . JText::translate('VBCONFIRMED') . ''; if (!empty($row['type']) && !strcasecmp($row['type'], 'overbooking')) { $saystaus .= '
' . JText::translate('VBO_BTYPE_' . strtoupper($row['type'])) . '
'; } } elseif ($row['status'] == "standby") { $status_type = !empty($row['type']) ? JText::translate('VBO_BTYPE_' . strtoupper($row['type'])) : JText::translate('VBSTANDBY'); $saystaus = '' . $status_type . ''; } else { $saystaus = '' . JText::translate('VBCANCELLED') . ''; } $ts_info = getdate($row['ts']); $ts_wday = JText::translate('VB'.strtoupper(substr($ts_info['weekday'], 0, 3))); $checkin_info = getdate($row['checkin']); $checkin_wday = JText::translate('VB'.strtoupper(substr($checkin_info['weekday'], 0, 3))); $checkout_info = getdate($row['checkout']); $checkout_wday = JText::translate('VB'.strtoupper(substr($checkout_info['weekday'], 0, 3))); ?>
" class=""> ' : ($orderby == "id" ? '' : '')); ?> " class=""> ' : ($orderby == "ts" ? '' : '')); ?> " class=""> ' : ($orderby == "checkin" ? '' : '')); ?> " class=""> ' : ($orderby == "checkout" ? '' : '')); ?> " class=""> ' : ($orderby == "days" ? '' : '')); ?> " class=""> ' : ($orderby == "total" ? '' : '')); ?>    
1) { if ($row['split_stay']) { ?>
0 ? $room_names[0] : $row['roomsnum']; ?> $rfeatures) { if ($rind != $rooms[0]['roomindex']) { continue; } foreach ($rfeatures as $fname => $fval) { if (strlen($fval)) { $room_number = '#' . $fval; break 2; } } } } } if ($room_number) { ?>
%s', '%s']); ?>
%s', '%s']); ?> 0) { ?> %s', '%s']); ?>
0) { ?>
%s', '%s']); ?>
0) { $bcolortag['name'] = JText::translate($bcolortag['name']); ?>
  ' : ''); ?> setProvenience($otachannel, $row['channel'])->getLogoURL() : false; if ($ota_logo_img !== false) { ?>
0 && !empty($cid[0])) { $oldinvdate = ''; $nextinvnum = VikBooking::getNextInvoiceNumber(); $invsuff = VikBooking::getInvoiceNumberSuffix(); $companyinfo = VikBooking::getInvoiceCompanyInfo(); //if editing an invoice (re-creating an existing invoice for a booking), do not increment the invoice number if (count($cid) == 1) { //the generate invoice btn of the booking details page can pass the invoice notes field via hidden field. If not empty, update invoice notes for this id $pinvnotes = VikRequest::getString('invnotes', '', 'request', VIKREQUEST_ALLOWHTML); if (!empty($pinvnotes)) { $pinvnotes = strpos($pinvnotes, 'quote($pinvnotes)." WHERE `id`=".(int)$cid[0].";"; $dbo->setQuery($q); $dbo->execute(); } // $q = "SELECT `number`,`for_date` FROM `#__vikbooking_invoices` WHERE `idorder`=" . (int)$cid[0]; $dbo->setQuery($q, 0, 1); $prev_data = $dbo->loadAssoc(); if ($prev_data) { $oldinvdate = $prev_data['for_date']; $prev_inv_number = intval(str_replace($invsuff, '', $prev_data['number'])); if ($prev_inv_number > 0) { $nextinvnum = $prev_inv_number; } } } // ?>