0;"; $dbo->setQuery($q); $dbo->execute(); if ($dbo->getNumRows() < 1) { $mainframe->redirect('index.php'); exit; } $row = $dbo->loadAssoc(); $customer = array(); $q = "SELECT `c`.*,`co`.`idorder`,`co`.`signature`,`co`.`pax_data`,`co`.`comments`,`co`.`checkindoc` FROM `#__vikbooking_customers` AS `c` LEFT JOIN `#__vikbooking_customers_orders` `co` ON `c`.`id`=`co`.`idcustomer` WHERE `co`.`idorder`=".$row['id'].";"; $dbo->setQuery($q); $dbo->execute(); if ($dbo->getNumRows() > 0) { $customer = $dbo->loadAssoc(); if (!empty($customer['country'])) { if (file_exists(VBO_ADMIN_PATH.DIRECTORY_SEPARATOR.'resources'.DIRECTORY_SEPARATOR.'countries'.DIRECTORY_SEPARATOR.$customer['country'].'.png')) { $customer['country_img'] = ''; } } } if (!(count($customer) > 0)) { VikError::raiseWarning('', JText::translate('VBOCHECKINERRNOCUSTOMER')); $mainframe->redirect('index.php?option=com_vikbooking&task=newcustomer&checkin=1&bid='.$row['id'].($ptmpl == 'component' ? '&tmpl=component' : '')); exit; } $this->row = $row; $this->customer = $customer; // Display the template parent::display($tpl); } }