/* copy source image at a resized size */ imagecopyresampled($virtual_image, $source_image, 0, 0, 0, 0, $desired_width, $desired_height, $width, $height); /* create the physical thumbnail image to its destination */ imagejpeg($virtual_image, $dest); //---------------------------------- $image_list .= $upload->file_copy . ','; $session->setHotelImageUploadList($image_list); $hotels = new Hotels(); $hotels->setHotelId($hotel_file_id); $hotels->extractor($hotels->getHotelFromId()); $hotel_img = $hotels->hotelsImages(); //$img_list = ""; if ($hotel_img != '') { $hotel_img .= ',' . $upload->file_copy; $hotels->updateHotelsImages($hotel_img); //$img_list = $hotel_img; } else { $hotels->updateHotelsImages($upload->file_copy); //$img_list = $upload->file_copy; } $hotel_images = new HotelImages(); $hotel_images->setImageHotelId($hotel_file_id); $hotel_images->setImageType('main');
<?php define('_MEXEC', 'OK'); require_once "../../system/load.php"; $Hotels = new Hotels(); $MainCity = new MainCity(); $queryString = $_REQUEST['queryString']; $queryString = str_replace("'", '’', $queryString); $HotelsQuick_rows = $Hotels->quickSearchHotels($queryString); $MainCityQuick_rows = $MainCity->quickSearchMainCity($queryString); echo '<div class="searchtitle">Hotels</div>'; if (count($HotelsQuick_rows) > 0) { for ($y = 0; $y < count($HotelsQuick_rows); $y++) { $Hotels->extractor($HotelsQuick_rows, $y); $MainCity->extractor($HotelsQuick_rows, $y); if ($Hotels->hotelsImages() != '') { $temp_arr = array(); $temp_arr = explode(",", $Hotels->hotelsImages()); $img_path = $temp_arr[0]; } else { $img_path = "no-image.png"; } echo '<a onClick="fill(\'' . trim($Hotels->hotelName()) . '\',\'' . trim($Hotels->hotelSeoUrl()) . '\',\'1\');"><div class="display_box">'; //echo '<img src="uploads/hotels/'.$img_path.'" alt="" />'; echo $Hotels->hotelName() . '</div></a>'; } } else { //echo 'Hotels Not Found :('; } if (count($MainCityQuick_rows) > 0) { echo '<div class="searchtitle">Citys</div>';