break; case 'city': $ht = new HotelController(); $ht->get_CityHotels($_GET['id']); break; } break; } } elseif (isset($_GET['p1'], $_GET['id'])) { switch (strtolower($_GET['p1'])) { case 'hotels': //get special hotels //get special hotels case 'hotel': $htl = new HotelController(); $htl->Hotel($_GET['id']); break; case 'country': //get country cities //get country cities case 'countries': case 'countrys': $htl = new CountryController(); $htl->CityList($_GET['id']); break; default: echo json_encode(['err' => 1, 'message' => 'invalid action']); } } elseif (isset($_GET['p1']) && $_GET['p1'] != 'index') { switch (strtolower($_GET['p1'])) { case 'hotels':