function activeHotelFeatured() { $hotel = new Hotels(); $status = 0; if ($_REQUEST['hotel_status'] == 0) { $status = 1; } else { if ($_REQUEST['hotel_status'] == 1) { $status = 0; } } $hotel->setHotelId($_REQUEST['hotels_id']); $hotel->setHotelsFeaturedStatus($status); if ($hotel->updateFeaturedStatus()) { Common::jsonSuccess("updated"); } else { Common::jsonError("Error"); } }