function accommodationdetails_merchantdetails($merchant_name) { $parts = explode('-', $merchant_name); $merchant_id = $parts[0]; $model = new BookingForConnectorModelMerchantDetails(); $merchant = $model->getItem($merchant_id); if (!isset($_REQUEST['task'])) { $images = array(); if ($merchant->LogoUrl != null && $merchant->LogoUrl != '') { $images[] = $merchant->LogoUrl; } foreach (explode(', ', $merchant->ImageData) as $image) { $images[] = $image; } if ($merchant->LogoUrl != null && $merchant->LogoUrl != '') { $images = array_diff($images, array($merchant->LogoUrl)); } ob_start(); include 'templates/merchant-gallery.php'; $slider = ob_get_contents(); ob_end_clean(); include 'templates/merchantdetails.php'; } else { $task = $_REQUEST['task']; if ($task == 'getMerchantResources') { $model_resource_details = new BookingForConnectorModelMerchantDetails(); $resources = $model_resource_details->getItems('resourcesajax', $merchant_id); $output = ''; $output = $output . '<div class="com_bookingforconnector_merchantdetails com_bookingforconnector_merchantdetails-t">'; if ($resources != null) { $output = $output . '<div class="com_bookingforconnector_merchantdetails-resources">'; include 'templates/ajaxresources.php'; $output = $output . '</div>'; $output = $output . '</div>'; } die($output); } } }