Ejemplo n.º 1
0
						<div><?php echo $_SESSION['booking_nav_error']; ?></div>
						<?php $_SESSION['booking_nav_error'] = ''; } ?>

						<?php
							$stepForm = DOC_ROOT . "bookings/step_$stage.php";
							if(file_exists($stepForm)){
								require_once($stepForm);
							}else{
								die(header('Location: ' . HTTP . "bookings/$seoUrl/step-01"));
							}
						?>
                    </div>
                </div>
            </div>
            <?php
			$hotel_images = new HotelImage;
			$hotel_images->setImageHotelId($hotel->id);
			$hotelImageData = $hotel_images->getHotelImageById();
			?>
            <div class="content-wrapper clearfix gallery">
                <div class="mygallery">
                <?php for($iq=0; $iq < count($hotelImageData); $iq++){
					$hotel_images->extractor($hotelImageData, $iq);
					?>
                    <div>
                        <a class="example-image-link" href="<?php echo DOMAIN; ?>uploads/hotel-gal/<?php echo $hotel_images->imageName(); ?>" data-lightbox="example-set" data-title="">
                            <img alt="<?php echo $hotel_images->imageTitle(); ?>" src="<?php echo DOMAIN; ?>timthumb.php?src=<?php echo DOMAIN; ?>uploads/hotel-gal/<?php echo $hotel_images->imageName(); ?>&w=229&h=172" />
                            <div class="hover"></div>
                        </a>
                        <span><?php echo $hotel_images->imageTitle(); ?></span>
                    </div>
 protected function processBulkDelete()
 {
     if (is_array($this->boxes) && !empty($this->boxes)) {
         foreach ($this->boxes as $key => $value) {
             $obj_branch_features = new HotelBranchFeatures();
             $obj_htl_cart_data = new HotelCartBookingData();
             $obj_htl_img = new HotelImage();
             $obj_htl_rm_info = new HotelRoomInformation();
             $obj_htl_rm_type = new HotelRoomType();
             $ids_product = $obj_htl_rm_type->getIdProductByHotelId($value);
             if (isset($ids_product) && $ids_product) {
                 foreach ($ids_product as $key_prod => $value_prod) {
                     $delete_cart_data = $obj_htl_cart_data->deleteBookingCartDataNotOrderedByProductId($value_prod['id_product']);
                     $delete_room_info = $obj_htl_rm_info->deleteByProductId($value_prod['id_product']);
                     $delete_room_type = $obj_htl_rm_type->deleteByProductId($value_prod['id_product']);
                     $obj_product = new Product($value_prod['id_product']);
                     $delete_product = $obj_product->delete();
                 }
             }
             $delete_branch_features = $obj_branch_features->deleteBranchFeaturesByHotelId($object->id);
             $htl_all_images = $obj_htl_img->getAllImagesByHotelId($object->id);
             foreach ($htl_all_images as $key_img => $value_img) {
                 $path_img = _PS_MODULE_DIR_ . 'hotelreservationsystem/views/img/hotel_img/' . $value_img['hotel_image_id'] . '.jpg';
                 @unlink($path_img);
             }
             $delete_htl_img = $obj_htl_img->deleteByHotelId($object->id);
         }
         parent::processBulkDelete();
     } else {
         $this->errors[] = Tools::displayError('You must select at least one element to delete.');
     }
 }